Merge Entra ID `roles` and OIDC `scp` Claims for Authorisation
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 0
- Forks
- 1
- Avg merge
- 26m
- Merged PRs (30d)
- 24
Description
FDS currently authorises users based on the scp (or scope) claim extracted from the Identity Provider's JWT. While this works perfectly for standard OIDC providers like Keycloak (which maps user roles directly into the scope string), Microsoft Entra ID separates these concepts, placing application roles into a separate roles list.
To support Entra ID without requiring code changes in every downstream service relying on AuthenticatedUser, the Auth Layer (app/auth/security.py) needs to be updated.
Acceptance Criteria:
- Update JWT validation to extract both the
scpstring and theroleslist. - Merge these values into a single, unified set of Effective Scopes.
- Ensure the existing
TRUSTED_IDPSexplicit scope stripping mechanism filters this combined set correctly.
Governing ADR(s): ADR 0006, ADR 0007
Migrated from the internal tracker, where it was #1, opened 2026-02-25.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in app/auth/security.py and read ADR 0006 and ADR 0007 for the authentication and trust model. Trace JWT validation and the TRUSTED_IDPS scope-stripping path, then verify that scp and roles form one Effective Scopes set and that explicit stripping applies to the combined values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- authentication, authorization, security
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100