[NOT READY] Add OAuth support to remaining 6 commands#342
Draft
srosenthal-dd wants to merge 1 commit intodatadog-labs:mainfrom
Draft
[NOT READY] Add OAuth support to remaining 6 commands#342srosenthal-dd wants to merge 1 commit intodatadog-labs:mainfrom
srosenthal-dd wants to merge 1 commit intodatadog-labs:mainfrom
Conversation
Six command files only supported API key auth via make_dd_config. Update them to also check for an OAuth bearer token using make_bearer_client, matching the pattern used by all other commands. Affected commands: authn_mappings, data_deletion, datasets, logs_restriction, obs_pipelines, workflows. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
platinummonkey
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
authn_mappings,data_deletion,datasets,logs_restriction,obs_pipelines, andworkflowsmake_bearer_clientpattern used everywhere else in the codebase, so these commands use OAuth when the user authenticates viapup auth logincost.rsNote: some of these API endpoints do not yet support
ValidOAuthAccessTokenon the server side. The client-side change is still correct -- pup should always prefer OAuth and fall back to API key auth. As the server-side routes are updated to accept OAuth, these commands will automatically work without further client changes.Test plan
cargo checkpassescargo testpasses (744 tests)cargo fmtproduces no changesdatasets: OAuth token sent and accepted by server (auth succeeded), confirming the client-side plumbing works end-to-endauthn_mappings,data_deletion,logs_restriction,obs_pipelines: OAuth token sent correctly (confirmed via server logs), but these routes don't yet acceptValidOAuthAccessTokenserver-side -- will need server-side route updatesworkflows: has a client-side check that blocks OAuth -- will need a separate change to remove that restriction🤖 Generated with Claude Code