Skip to content

editoast: fix a couple issues in new authentication middlewares#16980

Draft
leovalais wants to merge 2 commits into
devfrom
lva/rqrpxvntuzum
Draft

editoast: fix a couple issues in new authentication middlewares#16980
leovalais wants to merge 2 commits into
devfrom
lva/rqrpxvntuzum

Conversation

@leovalais
Copy link
Copy Markdown
Contributor

leovalais added 2 commits May 29, 2026 15:48
The middleware pushed in request extensions the user and the roles
of the impersonator instead of the impersonated user.

- Reworks and simplifies the flow of the middleware.
- Fixes impersonation processing.
- Adds a test for `/authz/me` to have a bit of impersonation coverage.
- Adds a request extension `.impersonate`.
- Removes useless referencing of `impl AsRef`.

Signed-off-by: Léo VALAIS <leovalais+git@proton.me>
- Makes sure the user is created if it doesn't exist.
- More consistent behavior when compared to other authentication modes.
- Adds a test for `/authz/me` to inspect the behavior.

Signed-off-by: Léo VALAIS <leovalais+git@proton.me>
@github-actions github-actions Bot added the area:editoast Work on Editoast Service label May 29, 2026
@leovalais leovalais self-assigned this May 29, 2026
@leovalais leovalais added the kind:bug Something isn't working label May 29, 2026
@leovalais leovalais moved this to Awaiting merge in Board PI 20 May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:editoast Work on Editoast Service kind:bug Something isn't working

Projects

Status: Awaiting merge

Development

Successfully merging this pull request may close these issues.

1 participant