Commit Graph
66 Commits
Author SHA1 Message Date
Manuel Raynaud 46d61a9c76 🐛(backend) correctly configure celery beat to run wopi configuration
The celery beat configuration was not working correctly, we installed
the database scheduler but we didn't configure it correctly. We prefer
removing this scheduler to use the default one. Instead, the crontab
part can be configured using environment variable. By default it will be
run every night at 3AM.
2026-02-02 08:05:18 +01:00
Manuel Raynaud ca6cbacff3 🏗️(ds_proxy) introduce how to use ds_proxy with Drive
We want to add documentation showing how to use DS_Proxy with Drive.
With proxy is fully optionnal and is here if you want to an encryption
layer between Drive and the object storage.
2026-01-23 09:18:03 +01:00
Manuel Raynaud af811c7c48 🔧(backend) allow debian package mimetype
The .deb extension is allowed but not its mimetype. To be coherent the
mimetype is added.
2026-01-13 11:44:00 +01:00
Manuel Raynaud 3901e57cab (backend) add an allowed file mimetype list
Allong the allowed extension list we added an allowed mimetype list. We
combine both to ensure that the user is allowed to make the upload. If
the mimetype is not allowed, then the file and the item are deleted.
2026-01-09 10:43:56 +01:00
Manuel Raynaud d7eccd766f (backend) add an allowed file extension list
We want to limit what type of file can be uploaded. For this we use an
allowed list of file extension. This allowed list can be disabled using
a setting and this list is configurable using a setting. When enabled,
file with no extension and hidden file are also rejected.
2026-01-09 10:43:53 +01:00
Nathan Vasse 9f28cc61ac (back) add /users route to external api custom
We need to allow configuration of /users sub route via
the EXTERNAL_API configuration.
2025-12-18 16:13:07 +01:00
Fabre FlorianandQuentin BEY 03124f4bf1 (backend) add indexed search feature flag
Add setting FEATURES_INDEXED_SEARCH that allows to disable the
search of indexed files while using the indexation tools.

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-12-16 22:50:25 +01:00
Fabre FlorianandQuentin BEY 0d5631cf9c (backend) Fix access token storage issues
When indexer service is not configured, the search view should work
event with a disabled OIDC_STORE_ACCESS_TOKEN.
Disable token storage for the unit tests.
Add bin/fernetkey that generates a key for the OIDC_STORE_REFRESH_TOKEN_KEY
setting.

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-12-16 22:50:25 +01:00
Fabre FlorianandQuentin BEY 5492a68a99 (backend) enable limit for the indexed content
Use SEARCH_INDEXER_CONTENT_MAX_SIZE as limit (in bytes) for the file content.
Fix default configuration of OIDC_STORE_ACCESS_TOKEN

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-12-16 22:50:25 +01:00
Fabre FlorianandQuentin BEY 63cfe37695 (backend) adapt to Find new search pagination & fixes
Use nb_results instead of page/page_size argument for /search API.
Add --batch-size argument to the index command.
Fix an issue in SearchIndexer.has_text when item.mimetype is empty.

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-12-16 22:50:25 +01:00
Fabre FlorianandQuentin BEY 4fe5c335dd (backend) use batches in indexing task
Reduce the number of Find API calls by grouping all the latest changes
for indexation : send all the items updated or deleted since the
triggering of the task.

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-12-16 22:50:25 +01:00
Fabre FlorianandQuentin BEY eb4b511569 (backend) add indexer service
Add SearchIndexer service that handles indexation & search API calls to Find
Add SEARCH_INDEXER_* settings to configure it.

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-12-16 22:50:25 +01:00
Fabre FlorianandQuentin BEY 415e83f344 (backend) add demo populate command
Add a new Django app 'demo' that contains the command 'create_demo'
Generate dummy users and files with existing factories.

Signed-off-by: Fabre Florian <ffabre@hybird.org>
2025-12-16 22:50:25 +01:00
Nathan Vasse 9a86a5f46f (backend) enable full customization of external api
We have some instances that requires more open resource server features.
This change adds a setting that allows to cherry-pick
which api routes needs to be available or not.
2025-12-15 13:46:59 +01:00
Nathan Vasse e909d8cb9a 🔥(back) remove alpha feature flag
Now that we can operate with the can_access entitlements we have
no need for the existing alpha feature flag.
2025-12-01 11:12:43 +01:00
Nathan Vasse 544905bcee (back) implement can_access and claims storage
This require to update the authentication backend. The
metrics route will need to potentially expose claims, so we
need to store them.
2025-12-01 11:11:29 +01:00
Nathan Vasse 1af2af9e0c (back) add entitlement backends
The entitlements are computed from an abstract backend in
order to allow for custom implementations, api calls, etc.
Let's implement those in the appropriate spots.
2025-12-01 11:11:29 +01:00
Nathan Vasse 48937038c6 (back) add usage metrics route
In order to allow the deploy center ( aka espace opérateur )
to collect information about the users, we need to implement
this optionnal route.
2025-12-01 11:11:29 +01:00
Nathan Vasse 817937bbcd (back) add storage compute backends
We consider that the way of computing storage usage can
vary, so let's make it abstract.
2025-12-01 11:11:29 +01:00
Nathan Vasse 482662e3e9 (back) add API key
In order to implement the metric API we need to use
api keys. This library is recommended by DRF and
really simple for our needs.
2025-12-01 11:11:28 +01:00
Manuel RaynaudandNathan Panchout 248612178c 🔧(backend) use setting MAX_PAGE_SIZE to configure pagination
The pagination class Viewsets.Pagination has the max_page_size set to
200. We want to be able to configure this value using a setting. A new
one MAX_PAGE_SIZE is created for this. By default its value is 200 to
not change the current behavior.
2025-11-17 15:40:26 +01:00
Nathan Vasse a485186b1b (back) add resource server settings
Those settings are required to setup the app as a
resource server using django-lasuite library.
2025-10-30 11:02:15 +01:00
Berry den HartogandManuel Raynaud 44fb17569c (back) add dutch translation
Complete dutch translation
2025-10-27 09:25:35 +01:00
Nathan Vasse 66eeac21f3 (back) add messages widget settings vars
We need those vars to allow customization for the feedback button
to opens the messages widget.
2025-09-29 16:27:33 +02:00
Manuel Raynaud 47e97a5a39 (backend) expose url_preview on item object
We want to distinguish the url and the url_preview. The url_preview
property will be provided only if the mimetype is listed in the
ITEM_PREVIEWABLE_MIME_TYPES settings. Also an other route is added to
nginx forcing the content-disposition with the value attachment for
download url.
2025-09-27 09:47:24 +02:00
Manuel Raynaud 166095ab4b (backend) manage placeholders in wopi launch url
Wopi launch url given in the discovery process can have placeholders.
These placeholders are documented in the wopi documentation and we are
able to manage few of them.
https://learn.microsoft.com/en-us/microsoft-365/
cloud-storage-partner-program/online/discovery#placeholder-values
2025-09-26 16:01:16 +02:00
Manuel Raynaud cee51c1488 (backend) install and configure django_celery_beat
We want to save the celery beat configuration in the database. We can
use for the the app django_celery_beat
2025-09-26 16:01:15 +02:00
Manuel Raynaud 9462f7b243 (back) fully compute wopisrc url in the backend
All the info needed to compute the wopisrc url was sent to the front
application and the front application will have to compute it. Instead
of this, everything is made in the back application, the front just have
to use it.
2025-09-26 16:01:14 +02:00
Manuel Raynaud 644920028d (back) use discovery url to configure wopi
in the wopi protocol, a wopi client should expose a discovery url
allowing the host to configure the url to use based on the extension or
the file mimetype. We use now this discovery url to configure the wopi
host and remove all the existing mechanism made in the settings.
2025-09-26 16:01:14 +02:00
Manuel Raynaud 57221b1a3e (back) implement the WOPI host putFile method
The putFile method will allow the WOPI client to save the file modified
by the user.
2025-09-26 16:01:13 +02:00
Manuel Raynaud 5d667a7b54 (back) manage lock operations for wopi host
In order to make modification on the file, the WOPI client manages a
complete lock workflow we have to implement.
2025-09-26 16:01:13 +02:00
Manuel Raynaud 8c22d2f49f (back) implement the WOPI host CheckFileInfo method
The first method to implement is the CheckFileInfo method. Its
documentation can be consulted with this link:
https://learn.microsoft.com/en-us/microsoft-365/
cloud-storage-partner-program/rest/files/checkfileinfo
2025-09-26 16:00:53 +02:00
Manuel Raynaud 626b965230 (back) service managing wopi access token
In order to start a WOPI lifecycle we have to manage an access token.
This access token will be used by the wopi client to check information
about the file but also doing action like fetching the file content,
saving it etc.
This service is here to generate this access token, manage its lifetime,
manage if the user has access to the item. The info related to the
access token (item and user) are saved in the cache.
2025-09-24 19:31:58 +02:00
Manuel Raynaud 452c1c6522 (back) create wopi applcation
We want to implement the wopi protocol. We create a django app dedicated
to manage all the wopi protocol implementation. The first thing made is
to set wopi client configuration.
2025-09-24 19:31:57 +02:00
Manuel Raynaud e2a2cb1de8 ♻️(backend) use PUT presigned-url to upload files
The file upload to the object storage backend was made using a presigned
post. But not many object storage solution implement this method. They
all used presigned url combined with the put_object method. We choose to
change to this method to be more widely compatible.
2025-09-23 18:00:39 +02:00
soyouzpandaandManuel Raynaud 2857d1b951 🔧(backend) support _FILE for secret environment variables
Allow configuration variables that handles secrets, like
`DJANGO_SECRET_KEY` to be able to read from a file which is given
through an environment file.

For example, if `DJANGO_SECRET_KEY_FILE` is set to
`/var/lib/meet/django-secret-key`, the value of `DJANGO_SECRET_KEY` will
be the content of `/var/lib/meet/django-secret-key`.
2025-09-12 14:33:36 +02:00
Manuel Raynaud fb3600603b (backend) search endpoint for ItemViewSet
We need a new endpoint for the search feature. Using existing filters on
the list or children endpoint does not match what we want. We want to
search for all accessible items for the current user.
2025-09-02 15:32:17 +02:00
Manuel Raynaud 49c200f768 (backend) configure lasuite.malware_detection module
We want to use the malware_detection module from lasuite library. We add
a new setting MALWARE_DETECTION to configure the backend we want to use.
The callback is also added. It removes the file if it is not safe and
update the item upload state accordongly.
2025-09-02 09:41:08 +02:00
Manuel Raynaud c38498824f 🔧(back) customize cache config
We want to split the cache config between the app cache and the session
cache. In the app cache, the default one, we allow to configure a
prefix. By default this prefix is a fixed string so the cache will be
never revoked because it is changing but it allow every instance to
implement its own strategy like prefixing the keyx cache with a
timestamp.
To not impact session, the session cache is splitted in the settings.
2025-08-29 11:08:42 +02:00
Nathan Vasse ddb5ed8121 (back) add demo app with quick authent
We want to be able to login users quickly from the e2e frontend tests.
Because sometimes we may need to reset the DB to run the test, instead
of spending 5sec of going through the login process via keycloak, just
calling this new api route cost 50ms, and voilà. Really great for DX
and tests performances.
2025-08-27 15:45:15 +02:00
Manuel RaynaudandNathan Vasse 780301ef0b (back) allow theme customnization using a configuration file
We want to customize the theme by using a configuration file. This
configuration file path can be defined using the settings
THEME_CUSTOMIZATION_FILE_PATH. If this file does not exists or is an
invalid json, an empty json object will be added in the config endpoint.
2025-08-21 10:40:50 +02:00
Nathan Vasse 8a5aeb0b0e 🔧(back) increase sdk_event_relay throttle
The default throttle was set below the polling rate of the SDK causing
429 response when the file picker was opened for more than 1 minute.

Fixes #294
2025-08-18 12:17:48 +02:00
Nathan VasseandManuel Raynaud 23fbf0e738 ♻️(back) handle specific allow cors for sdk relay
We want to be able to specify which origins are allowed to pull the
event route. This way we introduce SDK_ALLOWED_ORIGINS.

I did not found a clean and easy to maintain way to to do the same
behavior with django-cors-headers which aim to provide a global
behavior accross the API, here we want a special behavior only for
the sdk relay routes.

Also remove the possibility to use the POST route from cross
domain.
2025-07-29 13:51:46 +02:00
Nathan Vasse 279fa69a92 🔧(back) update settings cache
We need by default a reliable redis cache in order to make the
sdk relay work. With the previous cache it does not work.
2025-07-17 16:25:48 +02:00
Nathan Vasse d563699350 (back) Add OIDC_REDIRECT_FIELD_NAME
We need to be able to provide a custom redirect url when logging in
from the file picker, we want to be redirected to the specific popup
page, not to the default home route.
2025-07-17 16:15:47 +02:00
Nathan Vasse 53219dfddc (back) add sdk api relay route
This route is intended to be used anonymously from any domain in
order to pass data from the file picker popup to the parent window as
the reference to the parent window is lost when logging via ProConnect.
2025-07-17 16:15:47 +02:00
Nathan Vasse 0e74d4e1fe (back) add FRONTEND_HIDE_GAUFRE envvar
We need this in order to decide whether we want this component or not.
2025-07-11 14:50:33 +02:00
Nathan Vasse 2706d4b745 (back) add frontend envvar to settings and config
We need more envvar to pass to the frontend to allow greater
customization for instances of Drive.
2025-07-03 09:31:46 +02:00
Manuel Raynaud 893621dca3 🔒️(drf) disable browsable HTML API renderer
The `BrowsableAPIRenderer` generates a form to test POST/PUT/... actions
and fill the FK fields with unfiltered data. This issue has been spoted
on visio and fixed suitenumerique/meet#508
2025-06-27 16:58:01 +02:00
Manuel Raynaud db111f59b7 🔧(back) remove usage of deprecated db engine
The db engine postgresql_psycopg2 does not exists anymore in django but
for BC compat it is possible to use it in the configuration and it is
replace by postgresql at runtime. We changed this settings to use the
good one.
2025-06-27 16:34:21 +02:00