Skip to content

editoast: merge middleware authorization extensions#17362

Merged
Sh099078 merged 1 commit into
devfrom
lf/merge-authz-extensions
Jun 29, 2026
Merged

editoast: merge middleware authorization extensions#17362
Sh099078 merged 1 commit into
devfrom
lf/merge-authz-extensions

Conversation

@Sh099078

@Sh099078 Sh099078 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Simplify the stack of authentication middlewares that we use in Editoast.

Remove several middleware extensions that were used for authorization. Replace them on call sites by the updated State middleware extension that should contain all the information required.

@github-actions github-actions Bot added the area:editoast Work on Editoast Service label Jun 23, 2026
@Sh099078 Sh099078 moved this to In Progress in Board PI 20 Jun 23, 2026
@Sh099078 Sh099078 force-pushed the lf/merge-authz-extensions branch from ec653b0 to 18b098f Compare June 23, 2026 18:36
@Sh099078 Sh099078 changed the title WIP editoast: merge middleware authorization extensions editoast: merge middleware authorization extensions Jun 23, 2026
@Sh099078 Sh099078 marked this pull request as ready for review June 23, 2026 18:40
@Sh099078 Sh099078 requested a review from a team as a code owner June 23, 2026 18:40
@Sh099078 Sh099078 requested a review from leovalais June 23, 2026 18:41
@Sh099078 Sh099078 moved this from In Progress to Awaiting merge in Board PI 20 Jun 23, 2026

@leovalais leovalais left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sold on ignoring authentication headers and the resulting change of whoami, I just read the first commit.

Comment thread editoast/src/authentication.rs Outdated
Comment thread editoast/src/authentication.rs Outdated
Comment thread editoast/src/authentication.rs Outdated
Comment thread editoast/src/views/authz.rs Outdated
@Sh099078 Sh099078 force-pushed the lf/merge-authz-extensions branch 2 times, most recently from 285ea9a to b565849 Compare June 23, 2026 22:11
@Sh099078 Sh099078 force-pushed the lf/merge-authz-extensions branch 2 times, most recently from 4144c1f to 2c5146b Compare June 24, 2026 15:36
@Sh099078 Sh099078 requested a review from leovalais June 24, 2026 15:36
@Khoyo Khoyo force-pushed the lf/merge-authz-extensions branch 2 times, most recently from c2a99fb to 53ccf0f Compare June 24, 2026 19:15

@leovalais leovalais left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM provided Extension<editoast_models::User>

Comment thread editoast/src/authentication.rs Outdated
Comment thread editoast/src/views/authz.rs Outdated
Comment thread editoast/src/views/authz.rs Outdated
@Sh099078 Sh099078 force-pushed the lf/merge-authz-extensions branch from 53ccf0f to bdeb556 Compare June 29, 2026 11:02
@Sh099078

Copy link
Copy Markdown
Contributor Author

LGTM provided Extension<editoast_models::User>

I added back the extension in 13f8b79

@Sh099078 Sh099078 force-pushed the lf/merge-authz-extensions branch from 13f8b79 to 5cb0814 Compare June 29, 2026 11:31
@Sh099078 Sh099078 enabled auto-merge June 29, 2026 11:35
Remove several middleware extensions that were used for authorization.
Replace them on call sites by the updated `State` middleware extension
that should contain all the information required.

Add some quality of life methods for `State` to make its usage simpler.

Co-authored-by: Younes Khoudli <younes.khoudli@epita.fr>
Signed-off-by: Younes Khoudli <younes.khoudli@epita.fr>
Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
@Sh099078 Sh099078 force-pushed the lf/merge-authz-extensions branch from 5cb0814 to cd51391 Compare June 29, 2026 11:38
@Sh099078 Sh099078 disabled auto-merge June 29, 2026 11:38
@Sh099078 Sh099078 enabled auto-merge June 29, 2026 11:38
@Sh099078 Sh099078 added this pull request to the merge queue Jun 29, 2026
Merged via the queue into dev with commit 2b9c0aa Jun 29, 2026
31 checks passed
@Sh099078 Sh099078 deleted the lf/merge-authz-extensions branch June 29, 2026 12:47
@github-project-automation github-project-automation Bot moved this from Awaiting merge to Awaiting Validation in Board PI 20 Jun 29, 2026
Comment thread editoast/src/views/server/middlewares.rs
Comment thread editoast/src/views/authz.rs
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

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants