120 Commits

Author SHA1 Message Date
renovate[bot]
86151954b4 ⬆️(dependencies) Pin dependencies 2026-04-06 12:25:40 +02:00
BEY Quentin
da9cacc109 📝(security) add SECURITY.md with vulnerability reporting details
Added a vulnerability disclosure policy and reporting instructions.
2026-04-03 16:12:32 +02:00
Quentin BEY
9c133629be 🔖(patch) bump release to 0.0.26
Changed

- (oidc) allow login_hint param #69

Fixed

- 🐛(oidc) make `iss` claim optional in introspection response validation
v0.0.26
2026-04-03 15:59:09 +02:00
Bastien Wermeille
9ca753ab5c 🐛(oidc) make iss claim optional in introspection response validation
RFC 7662 does not require the `iss` field in token introspection
responses. Some providers (e.g. GitLab via Doorkeeper) do not include
it, causing authentication to fail. The value is still validated when
present.

Signed-off-by: Bastien Wermeille <bastien.wermeille@gmail.com>
2026-04-03 14:24:08 +02:00
Florian Nari
d5f0c56f4d (oidc) handle login_hint param
see
https://partenaires.proconnect.gouv.fr/docs/fournisseur-service/login_hint_usage
2026-04-03 14:14:56 +02:00
Lebaud Antoine
f6cc5b55f0 📝(oidc) document required oidc_op_url for resource server configuration
The documentation was incomplete: `oidc_op_url` is required to
instantiate the resource server client used by the resource server
backend.

Add this detail to the documentation, based on the configuration
used in the People deployment.
2026-03-19 17:14:42 +01:00
lebaudantoine
d87d7059bc 🔊(oidc) improve logging for improperly configured authorization clients
Enhance the log message to explicitly list which configuration
parameters are missing.

The previous message was too vague and required searching the
repository to understand its origin. This was made harder because
the class name is dynamically injected, preventing a direct search
of the full log string.

Note: instantiating JWTAuthorizationServerClient may emit two logs
when all required parameters are missing. This behavior can be
refined in a future change.
2026-03-19 17:14:42 +01:00
lebaudantoine
1534cbffd1 📝(oidc) fix misleading docstring in AuthorizationServerClient
The docstring referenced a `url_jwks` parameter that is not used by
the AuthorizationServerClient constructor. It appears to have been
copied from JWTAuthorizationServerClient.

Update the docstring to reflect the actual behavior of the class.
2026-03-19 17:14:42 +01:00
Quentin BEY
1b6aeb51db 🔖(patch) bump release to 0.0.25
Added

- 💄(admin) allow admin header color customization
- 🍱(core) vendor mime.types file i/o fetching from Apache
v0.0.25
2026-03-10 14:35:51 +01:00
Stephan Meijer
52073ff9ba ⬆️(ci) upgrade GitHub Actions workflow steps to latest versions
Update all GitHub Actions to their latest major versions for improved
performance, security patches, and Node.js runtime compatibility.

Signed-off-by: Stephan Meijer <me@stephanmeijer.com>
2026-02-25 13:00:53 +01:00
Quentin BEY
4f0aaa06c7 (pyproject) fix extra format for hatchling
See https://github.com/pypa/hatch/issues/2166
This will not change the extra install, as "-" and "_" are
mostly considered the same
(ie `django-lasuite[malware_detection]`
still works)
2026-02-25 12:42:02 +01:00
Marie PUPO JEAMMET
4783342b0d 💄(admin) allow admin header color customization
Provides customization of admin headers for quick
identification when handling multiple environments
2026-02-25 12:42:02 +01:00
Manuel Raynaud
1567be193d 🍱(core) vendor mime.types file i/o fetching from Apache
We want to host the mime.types file coming from the apache project.
2026-02-11 13:29:14 +01:00
jbpenrath
e6722e35fa 🔖(patch) bump release to 0.0.24
Changed
- 🚸(oidc) ignore case when fallback on email #61

Fixed
- 🐛(oidc) use correct session key for token expiration check #56
v0.0.24
2026-02-11 13:22:01 +01:00
Quentin BEY
ecf3a6c2cf 🚸(oidc) ignore case when fallback on email
Some identity providers might change the case, but in our
products we don't consider case variation to be consider as
different email addresses.

Next step would be to normalize the DB value of email to
be lower-case.
2026-02-10 22:36:21 +01:00
Riël Notermans
cc690ae9d2 🐛(oidc) use correct session key for token expiration check
The RefreshOIDCAccessToken middleware was checking for `oidc_token_expiration`
in the session, but mozilla-django-oidc sets `oidc_id_token_expiration`.
This caused the middleware to always think the token was expired (defaulting
to 0), triggering unnecessary token refreshes on every request.

This fix aligns the session key name with mozilla-django-oidc's convention.

Fixes suitenumerique/messages#487
2026-01-27 13:17:05 +01:00
Manuel Raynaud
e40a618bfa 🔖(patch) bump release to 0.0.23
Changed

- ⬆️(oidc) allow use mozilla-django-oidc >5.0.0 with PyJWT
- ♻️(malware) reuse existing file_hash when rescheduling a task
v0.0.23
2026-01-14 15:01:55 +01:00
Manuel Raynaud
9465b58952 ♻️(malware) reuse existing file_hash when rescheduling a task
When a task is rescheduled, the file_hash saved in the table is not reused
leading to redownloading the file to compute its hash. This download can
be avoided if the file_hash is correctly reused.
2026-01-14 15:01:55 +01:00
Quentin BEY
07dc216393 ⬆️(oidc) allow use mozilla-django-oidc >5.0.0 with PyJWT
This will allow to update Mozilla OIDC package to latest version.
2026-01-13 23:50:11 +01:00
Manuel Raynaud
be2b294c8a 🔖(patch) bump release to 0.0.22
Added

- (marketing) create marketing module
v0.0.22
2025-12-08 15:03:18 +01:00
Manuel Raynaud
4d2d924768 (marketing) add documentation
Add documentation explainig how to use this module and how to add a new
backend.
2025-12-08 15:03:18 +01:00
Manuel Raynaud
6b1d47b80d (marketing) create a celery task to create a new contact
To ease the use of this module, we added a shared task which a wrapper
arount the configured backend and will only call the
create_or_update_contact in a celery task.
2025-12-08 15:03:18 +01:00
Manuel Raynaud
609251233a (marketing) implement brevo backend
Brevo is the first real backend we have to implement. The init method is
reposible to configure it.
2025-12-08 15:03:18 +01:00
Manuel Raynaud
48094c2eb8 (marketing) create tooling to help backend initialization
Like we did for the malware_detection module, we want helpers allowing
use to instantiate a backend without knowing in the code how to do it,
just importing a module and the marketing service is ready to be used.
2025-12-08 15:03:18 +01:00
Manuel Raynaud
d326b643e5 (marketing) create a dummy backend
We create first a dummy backend doing nothing allowing us to use later
some helpers without configuring a real backend.
2025-12-08 15:03:18 +01:00
Manuel Raynaud
879a153d90 (marketing) create marketing backend abstraction
Marteking backends will have to implement an abstract base backend in
order to be able to not be dependant from only one implementation
2025-12-08 15:03:18 +01:00
Manuel Raynaud
7e88f9d111 👷(action) add python 3.14 in tests suite
We want to test the library with python 3.14. We update the tox.ini
confiration file and add python 3.14 to the test-back matric.
2025-12-08 15:01:17 +01:00
Manuel Raynaud
33c1839e93 🔖(patch) bump release to 0.0.21
Added

- (malware) save file hash in detection record and callback
v0.0.21
2025-12-04 16:10:15 +01:00
Manuel Raynaud
4e269ac854 (malware) display the file_hash in read only in the admin panel
We want to see the file_hash in the admin panel, this field is in read
only and it is possible to search a file_hash
2025-12-04 16:10:15 +01:00
Manuel Raynaud
f230d027ef (malware) save file hash in detection record and callback
The file hash is a crucial info. We save it in database if a record
exists but also transmit it to the callback in the error_info.
2025-12-04 16:10:15 +01:00
Manuel Raynaud
5df4b8f24b 🔖(patch) bump release to 0.0.20
Added

- (backend) keep traces of failed malware analysis tasks
- (backend) save backend used in a malware analysis task
- (backend) allow a malware detection backend to reschedule a task
- (malware) add management command to reschedule processing
- (malware) add an admin view to ease tracking tasks
v0.0.20
2025-12-02 09:31:29 +01:00
Manuel Raynaud
79e1fecba3 (malware) admin action to reschedule tasks
We add an admin action allowing to reschedule a task from the list view
2025-12-02 09:31:29 +01:00
Manuel Raynaud
00e66992e8 (malware) add an admin view to ease tracking tasks
We want to more easily track tasks, we added an admin view. For now this
admin view only list all existing tasks in the database.
2025-12-02 09:31:29 +01:00
Manuel Raynaud
3bdfdf2b16 ♻️(malware) log filehash when a submission fail
We want to log the file has when a submission fail in order to aggregate
all this logs to send them to JCOP.
2025-12-02 09:31:29 +01:00
Manuel Raynaud
b0b90be8fe (malware) add management command to reschedule processing
We want to reschedule processing task when they are older than 3 days.
A settings is used to modify this delay. The current backend is
instanciated and it is the backend responsability to determine if it
should reschedule it or not.
2025-12-02 09:31:29 +01:00
Manuel Raynaud
98c0510f6d (malware) add frezzegun dependency
In a future test we will need to control the datetime, we install the
freezegun library for this.
2025-12-02 09:31:29 +01:00
Manuel Raynaud
519f58ea8a (malware) allow a malware detection backend to reschedule a task
For multiple reasons a task can be blocked in processing task. We wanto
to allow a backend to reschedule a blocked task.
2025-12-02 09:31:29 +01:00
Manuel Raynaud
3d86ec7e4e (malware) save backend used in a malware analysis task
For later use we wan't to know the backend used for a given task
2025-12-02 09:31:29 +01:00
Manuel Raynaud
a91ad0009e (malware) keep traces of failed malware analysis tasks
We want to keep in the database the failed tasks with the reason why
they failed. The idea is to take a decision later on what to do for
tasks reaching a max retries for example.
2025-12-02 09:31:29 +01:00
Quentin BEY
6947c146a4 🔖(patch) bump release to 0.0.19
Changed

- ♻️(resource-server) make token introspection earlier #46
v0.0.19
2025-11-21 16:46:44 +01:00
Quentin BEY
c4e82df906 🐛(resource-server) do not load OIDC backend at initialization
The previous code was loading the `get_oidc_backend` before
override it after. Loading loading an unused backend is a
waste of resource ^^

While the default OIDC backend requires
more settings, like `OIDC_FALLBACK_TO_EMAIL_FOR_IDENTIFICATION`
which might be useless for resource server only project, it
could raise error for missing, unused parameter.
2025-11-21 16:41:25 +01:00
Quentin BEY
2e9ad45f30 (resource-server) fix EC key test
For some reason, this test was false but working. It does not
work anymore with recent version of jose lib so we fix it.
2025-11-21 16:41:25 +01:00
Quentin BEY
3fe817189b ♻️(resource-server) make token introspection earlier
The base implementation from Mozilla let the backend in charge
of making the introspection (probably to stay generic), but
in LaSuite project we will always perform introspection when
acting as resource server.

To improve domain consistency and "payload" access to other part
of the code, we chose to make the introspection earlier in the
authentication process.

Note the introspection payload, does not contain much information,
in our current implementation we need it to contain at least the
user's `sub``.
2025-11-21 16:41:25 +01:00
jbpenrath
8aada72a22 🔖(patch) bump release to 0.0.18
Changed

- 🐛(joserfc) refactor JWT handling with joserfc library updates #35
- 👔(oidc) consider urls as refreshable no matter the HTTP method #42
v0.0.18
2025-11-12 10:00:54 +01:00
jbpenrath
a9e2daa979 👔(oidc) consider urls as refreshable no matter the HTTP method
Currently, only `GET` method as considered as refreshable url as it could
be weird to return a redirect response for other kind of HTTP methods.
On our side, we assume to be always in a XHR context so we don't want
to be bothered by redirects and in case the session has expired
we returned a 401 status. So we can safely ignore the request HTTP method
to check if the url is refreshable.
2025-11-05 10:32:04 +01:00
renovate[bot]
654ec35437 ⬆️(dependencies) update python to 3.14 2025-11-04 15:08:55 +01:00
renovate[bot]
e6a59febd0 ⬆️(dependencies) update actions/setup-python action to v6 2025-11-04 15:08:41 +01:00
renovate[bot]
eed6563c6a ⬆️(dependencies) update actions/checkout action to v5 2025-11-04 15:08:27 +01:00
renovate[bot]
a45bf5801c ⬆️(dependencies) update astral-sh/setup-uv action to v7 2025-11-04 15:08:12 +01:00
renovate[bot]
d9562ee561 ⬆️(dependencies) update dorny/test-reporter action to v2 2025-11-04 15:07:43 +01:00