Skip to content

cloud-auth: document opt-in OAuth scopes for persona-mappings | DAL-981 - #723

Merged
platinummonkey merged 1 commit into
DataDog:mainfrom
srosenthal-dd:stephen.rosenthal/oauth-cloud-auth-persona-mappings-scopes
Aug 13, 2026
Merged

cloud-auth: document opt-in OAuth scopes for persona-mappings | DAL-981#723
platinummonkey merged 1 commit into
DataDog:mainfrom
srosenthal-dd:stephen.rosenthal/oauth-cloud-auth-persona-mappings-scopes

Conversation

@srosenthal-dd

@srosenthal-dd srosenthal-dd commented Aug 13, 2026

Copy link
Copy Markdown
Member

pup's cloud-auth persona-mappings commands already send the OAuth bearer token automatically (no command-logic change needed). The server-side routes now accept OAuth, gated by scopes workload_identity_federation_read/write.

These two permissions are only ever granted to admins, so -- per direction from the team -- they're documented as opt-in via --extra-scopes rather than added to default_scopes(), matching the existing precedent for other admin-only scopes (api_keys_*, app_keys_*, service_account_write, see #702).

Changes

  • Add an AUTHENTICATION doc block to the cloud-auth command noting the required scopes and the opt-in invocation.
  • Add regression tests asserting workload_identity_federation_read/write are excluded from both default_scopes() and read_only_scopes().

Test plan

  • CI green
  • E2e tested against staging with server-side OAuth support already in place: --extra-scopes workload_identity_federation_read,workload_identity_federation_write logs in successfully, list/get return real data over the bearer token, and create reaches business-logic validation (not an auth error), confirming the OAuth path works end-to-end for both read and write.

pup's cloud-auth persona-mappings commands already send the OAuth bearer
token automatically. The routes now accept it server-side, but require
workload_identity_federation_read/write -- permissions only ever granted
to admins, so they're opt-in via --extra-scopes rather than added to
default_scopes(), matching the existing precedent for other admin-only
scopes (api_keys_*, app_keys_*, service_account_write).
@srosenthal-dd
srosenthal-dd marked this pull request as ready for review August 13, 2026 19:41
@srosenthal-dd
srosenthal-dd requested a review from a team as a code owner August 13, 2026 19:41
@platinummonkey
platinummonkey merged commit 296f3b4 into DataDog:main Aug 13, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants