Skip to content

editoast: add authorization to the rolling stock endpoints - #17364

Draft
younesschrifi wants to merge 24 commits into
devfrom
feature-branch/check-rolling-stock-privileges
Draft

editoast: add authorization to the rolling stock endpoints#17364
younesschrifi wants to merge 24 commits into
devfrom
feature-branch/check-rolling-stock-privileges

Conversation

@younesschrifi

@younesschrifi younesschrifi commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Add authorization to the rolling stock and light rolling stock endpoints.

Related ticket: https://github.com/osrd-project/osrd-confidential/issues/1064

Warning

This PR is a feature branch and is not ready for review yet.

TODO

Backend - Add authorization on the following endpoints:

@github-actions github-actions Bot added the area:editoast Work on Editoast Service label Jun 24, 2026
@Sh099078
Sh099078 force-pushed the feature-branch/check-rolling-stock-privileges branch from 61083bb to 016cefe Compare June 24, 2026 15:41
@Sh099078

Copy link
Copy Markdown
Contributor

rebased on dev

@Sh099078 Sh099078 changed the title editoast: check rolling stock privileges editoast: add authorization to the rolling stock endpoints Jun 24, 2026
@younesschrifi
younesschrifi force-pushed the feature-branch/check-rolling-stock-privileges branch from 9cda363 to af93581 Compare June 26, 2026 14:04
@Sh099078
Sh099078 force-pushed the feature-branch/check-rolling-stock-privileges branch from af93581 to 49c63ff Compare June 29, 2026 14:35
@Sh099078

Copy link
Copy Markdown
Contributor

rebase on dev + update obsolete commit name in the feature branch

@younesschrifi

Copy link
Copy Markdown
Contributor Author

rebase on dev

@younesschrifi
younesschrifi force-pushed the feature-branch/check-rolling-stock-privileges branch from 25b1202 to c6e470e Compare July 3, 2026 12:33
@younesschrifi
younesschrifi force-pushed the feature-branch/check-rolling-stock-privileges branch from 77c7390 to 3d24d43 Compare July 15, 2026 07:19
@Sh099078
Sh099078 force-pushed the feature-branch/check-rolling-stock-privileges branch from 89df84a to 86fba80 Compare July 17, 2026 18:46
@Sh099078

Copy link
Copy Markdown
Contributor

rebased on dev

@Sh099078
Sh099078 force-pushed the feature-branch/check-rolling-stock-privileges branch from 86fba80 to 6ff73e4 Compare July 21, 2026 10:18
@Sh099078

Copy link
Copy Markdown
Contributor

rebased on dev

@github-actions github-actions Bot added area:front Work on Standard OSRD Interface modules kind:api-change labels Jul 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ API changes

This Pull Request introduces some changes in the API:

  • please own it: notify or even prepare dedicated PR(s) to consumer projects

@Sh099078

Copy link
Copy Markdown
Contributor

rebase on dev

@Sh099078
Sh099078 force-pushed the feature-branch/check-rolling-stock-privileges branch from e6c0c41 to 91e0817 Compare July 30, 2026 19:33
@Sh099078

Copy link
Copy Markdown
Contributor

rebased on dev

@Sh099078

Copy link
Copy Markdown
Contributor

rebased on dev

@Sh099078
Sh099078 force-pushed the feature-branch/check-rolling-stock-privileges branch 2 times, most recently from c53a018 to a9f83e3 Compare August 12, 2026 11:17
younesschrifi and others added 22 commits August 14, 2026 11:19
Signed-off-by: Youness CHRIFI ALAOUI <youness.chrifi@gmail.com>
Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
add privileges checks for get_by_id and get_by_name rolling stock endpoints.
Signed-off-by: Youness CHRIFI ALAOUI <youness.chrifi@gmail.com>
Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
Signed-off-by: Youness CHRIFI ALAOUI <youness.chrifi@gmail.com>
Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
Signed-off-by: Youness CHRIFI ALAOUI <youness.chrifi@gmail.com>
Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
Signed-off-by: Youness CHRIFI ALAOUI <youness.chrifi@gmail.com>
Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
…ndpoint

Signed-off-by: Youness CHRIFI ALAOUI <youness.chrifi@gmail.com>
Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
- Users must have the Reader grant on the rolling stock to get its
  usage.
- No role is required (or allows) to read a rolling stock usage except
  admin.

Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
Signed-off-by: Youness CHRIFI ALAOUI <youness.chrifi@gmail.com>
Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
Signed-off-by: Youness CHRIFI ALAOUI <youness.chrifi@gmail.com>
Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
Signed-off-by: Youness CHRIFI ALAOUI <youness.chrifi@gmail.com>
Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
Signed-off-by: Youness CHRIFI ALAOUI <youness.chrifi@gmail.com>
Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
The endpoint is supposed to be only used by core. When authorization is
not skipped, deny anyone who is not an admin.

Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
Signed-off-by: Youness CHRIFI ALAOUI <youness.chrifi@gmail.com>
Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
Signed-off-by: Youness CHRIFI ALAOUI <youness.chrifi@gmail.com>
Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
Signed-off-by: Youness CHRIFI ALAOUI <youness.chrifi@gmail.com>
Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
Signed-off-by: Youness CHRIFI ALAOUI <youness.chrifi@gmail.com>
Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
@Sh099078
Sh099078 force-pushed the feature-branch/check-rolling-stock-privileges branch from 444db59 to a317b05 Compare August 14, 2026 10:13
@Sh099078

Copy link
Copy Markdown
Contributor

rebased on dev

The issuer must have the Reader grant on the rolling stocks.

Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
@Sh099078
Sh099078 force-pushed the feature-branch/check-rolling-stock-privileges branch from a317b05 to d0063aa Compare August 14, 2026 10:19
Signed-off-by: Loup Federico <16464925+Sh099078@users.noreply.github.com>
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 area:front Work on Standard OSRD Interface modules kind:api-change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants