Skip to content

feat: publish RBAC scopes in OAuth2 metadata endpoints#19942

Merged
ThomasK33 merged 1 commit into
mainfrom
thomask33/09-24-add_oauth2_external_scope_metadata
Sep 26, 2025
Merged

feat: publish RBAC scopes in OAuth2 metadata endpoints#19942
ThomasK33 merged 1 commit into
mainfrom
thomask33/09-24-add_oauth2_external_scope_metadata

Conversation

@ThomasK33
Copy link
Copy Markdown
Member

Publish supported OAuth2 scopes from RBAC external scope names

This PR updates the OAuth2 metadata endpoints to publish the supported scopes from the RBAC external scope names. Previously, the ScopesSupported field was empty with a TODO to implement a scope system. Now, both the authorization server metadata and protected resource metadata endpoints return the list of scopes from rbac.ExternalScopeNames().

The tests have been updated to verify that the correct scopes are being returned in the metadata responses.

@ThomasK33 ThomasK33 force-pushed the thomask33/09-22-canonicalize_special_api_key_scopes branch from d62d594 to 57ec770 Compare September 24, 2025 16:08
@ThomasK33 ThomasK33 force-pushed the thomask33/09-24-add_oauth2_external_scope_metadata branch from c86d555 to b630882 Compare September 24, 2025 16:09
@ThomasK33 ThomasK33 force-pushed the thomask33/09-22-canonicalize_special_api_key_scopes branch 2 times, most recently from 411151c to 73e3922 Compare September 24, 2025 16:27
@ThomasK33 ThomasK33 force-pushed the thomask33/09-24-add_oauth2_external_scope_metadata branch from b630882 to 143c808 Compare September 24, 2025 16:27
@ThomasK33 ThomasK33 force-pushed the thomask33/09-22-canonicalize_special_api_key_scopes branch from 73e3922 to 3f1594c Compare September 24, 2025 16:42
@ThomasK33 ThomasK33 force-pushed the thomask33/09-24-add_oauth2_external_scope_metadata branch from 143c808 to 93a509e Compare September 24, 2025 16:42
@ThomasK33 ThomasK33 force-pushed the thomask33/09-22-canonicalize_special_api_key_scopes branch from 3f1594c to dd9a21c Compare September 24, 2025 16:44
@ThomasK33 ThomasK33 force-pushed the thomask33/09-24-add_oauth2_external_scope_metadata branch from 93a509e to 8707c00 Compare September 24, 2025 16:44
@ThomasK33 ThomasK33 force-pushed the thomask33/09-22-canonicalize_special_api_key_scopes branch from dd9a21c to 0edbf0c Compare September 24, 2025 20:50
@ThomasK33 ThomasK33 force-pushed the thomask33/09-24-add_oauth2_external_scope_metadata branch from 8707c00 to 2b7e3a9 Compare September 24, 2025 20:50
@ThomasK33 ThomasK33 force-pushed the thomask33/09-22-canonicalize_special_api_key_scopes branch from 0edbf0c to bb211fa Compare September 25, 2025 15:46
@ThomasK33 ThomasK33 force-pushed the thomask33/09-24-add_oauth2_external_scope_metadata branch from 2b7e3a9 to 20c22fe Compare September 25, 2025 15:46
@ThomasK33 ThomasK33 force-pushed the thomask33/09-22-canonicalize_special_api_key_scopes branch from bb211fa to a4a9d57 Compare September 25, 2025 15:46
@ThomasK33 ThomasK33 force-pushed the thomask33/09-24-add_oauth2_external_scope_metadata branch from 20c22fe to 22123c0 Compare September 25, 2025 15:46
@ThomasK33 ThomasK33 force-pushed the thomask33/09-22-canonicalize_special_api_key_scopes branch from a4a9d57 to acadd79 Compare September 25, 2025 15:56
@ThomasK33 ThomasK33 force-pushed the thomask33/09-24-add_oauth2_external_scope_metadata branch from 22123c0 to 3eeb008 Compare September 25, 2025 15:56
@ThomasK33 ThomasK33 force-pushed the thomask33/09-22-canonicalize_special_api_key_scopes branch from acadd79 to b8267e1 Compare September 25, 2025 16:07
@ThomasK33 ThomasK33 force-pushed the thomask33/09-24-add_oauth2_external_scope_metadata branch from 3eeb008 to 350aacf Compare September 25, 2025 16:07
@ThomasK33 ThomasK33 force-pushed the thomask33/09-24-add_oauth2_external_scope_metadata branch from 350aacf to 58e600e Compare September 25, 2025 16:25
@ThomasK33 ThomasK33 force-pushed the thomask33/09-22-canonicalize_special_api_key_scopes branch from 9e0bf76 to f851f7f Compare September 25, 2025 16:32
@ThomasK33 ThomasK33 force-pushed the thomask33/09-24-add_oauth2_external_scope_metadata branch from 58e600e to 36b876b Compare September 25, 2025 16:48
@ThomasK33 ThomasK33 force-pushed the thomask33/09-22-canonicalize_special_api_key_scopes branch from f851f7f to 907f0c3 Compare September 25, 2025 17:00
@ThomasK33 ThomasK33 force-pushed the thomask33/09-24-add_oauth2_external_scope_metadata branch from 36b876b to 55d1084 Compare September 25, 2025 17:06
@ThomasK33 ThomasK33 force-pushed the thomask33/09-22-canonicalize_special_api_key_scopes branch from 907f0c3 to 9e0bf76 Compare September 25, 2025 17:20
@ThomasK33 ThomasK33 force-pushed the thomask33/09-24-add_oauth2_external_scope_metadata branch from 55d1084 to 58e600e Compare September 25, 2025 17:27
@ThomasK33 ThomasK33 force-pushed the thomask33/09-22-canonicalize_special_api_key_scopes branch from 9e0bf76 to 1c54aa1 Compare September 25, 2025 17:33
@ThomasK33 ThomasK33 force-pushed the thomask33/09-24-add_oauth2_external_scope_metadata branch 2 times, most recently from fb54cae to c6efbe0 Compare September 25, 2025 17:39
@ThomasK33 ThomasK33 force-pushed the thomask33/09-22-canonicalize_special_api_key_scopes branch from 1c54aa1 to 92a39d1 Compare September 25, 2025 17:39
@ThomasK33 ThomasK33 force-pushed the thomask33/09-24-add_oauth2_external_scope_metadata branch from c6efbe0 to 94ad114 Compare September 25, 2025 18:01
@ThomasK33 ThomasK33 marked this pull request as ready for review September 25, 2025 18:13
@ThomasK33 ThomasK33 requested review from Emyrk and johnstcn September 25, 2025 18:13
@ThomasK33 ThomasK33 force-pushed the thomask33/09-24-add_oauth2_external_scope_metadata branch from 94ad114 to 716c772 Compare September 26, 2025 07:45
@ThomasK33 ThomasK33 force-pushed the thomask33/09-22-canonicalize_special_api_key_scopes branch 2 times, most recently from 1d1eb15 to fd6e329 Compare September 26, 2025 08:25
@ThomasK33 ThomasK33 force-pushed the thomask33/09-24-add_oauth2_external_scope_metadata branch from 716c772 to 8f4b99b Compare September 26, 2025 08:25
Copy link
Copy Markdown
Member Author

ThomasK33 commented Sep 26, 2025

Merge activity

  • Sep 26, 9:30 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Sep 26, 9:58 AM UTC: Graphite rebased this pull request as part of a merge.
  • Sep 26, 10:15 AM UTC: @ThomasK33 merged this pull request with Graphite.

@ThomasK33 ThomasK33 changed the base branch from thomask33/09-22-canonicalize_special_api_key_scopes to graphite-base/19942 September 26, 2025 09:44
@ThomasK33 ThomasK33 changed the base branch from graphite-base/19942 to main September 26, 2025 09:56
Replace empty slice placeholders with rbac.ExternalScopeNames() to
publish supported OAuth2 scopes from the curated RBAC scope catalog in
both authorization server and protected resource metadata endpoints.
Update tests to verify proper scope exposure instead of empty arrays.
@ThomasK33 ThomasK33 force-pushed the thomask33/09-24-add_oauth2_external_scope_metadata branch from 8f4b99b to 9de28ef Compare September 26, 2025 09:57
@ThomasK33 ThomasK33 merged commit 05537c1 into main Sep 26, 2025
47 of 49 checks passed
@ThomasK33 ThomasK33 deleted the thomask33/09-24-add_oauth2_external_scope_metadata branch September 26, 2025 10:15
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 26, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants