Skip to content

pup: remove obs-pipelines from OAuth excluded endpoints (cleanup) - #755

Merged
platinummonkey merged 4 commits into
DataDog:mainfrom
srosenthal-dd:stephen.rosenthal/oauth-obs-pipelines
Aug 25, 2026
Merged

pup: remove obs-pipelines from OAuth excluded endpoints (cleanup)#755
platinummonkey merged 4 commits into
DataDog:mainfrom
srosenthal-dd:stephen.rosenthal/oauth-obs-pipelines

Conversation

@srosenthal-dd

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

Copy link
Copy Markdown
Member

Summary

Remove 6 obs-pipelines entries from OAUTH_EXCLUDED_ENDPOINTS so that raw_get/raw_post calls to obs-pipelines paths send the OAuth bearer token.

The pup obs-pipelines diff command uses raw_client::raw_get (not the typed SDK make_api! path used by the other 5 obs-pipelines commands). Because the obs-pipelines entries were in OAUTH_EXCLUDED_ENDPOINTS, apply_auth fell back to API-key-only auth, making pup obs-pipelines diff unusable on an OAuth-only session -- even though the server already accepts OAuth on the underlying route. Removing these entries fixes that.

The other 5 obs-pipelines commands (list, get, create, update, delete, validate) already support OAuth via make_api! and are unaffected by this change.

No server-side dependency -- the server already accepts OAuth on all v2 obs-pipelines routes.

Changes

  • src/raw_client.rs: Removed 6 obs-pipelines entries from OAUTH_EXCLUDED_ENDPOINTS (46 -> 40), updated count test

Remove 6 obs-pipelines endpoints from OAUTH_EXCLUDED_ENDPOINTS so
raw_get/raw_post send the OAuth bearer token. The server already
accepts OAuth on all v2 obs-pipelines routes.
@srosenthal-dd srosenthal-dd changed the title pup: enable OAuth for Observability Pipelines commands pup: remove obs-pipelines from OAuth excluded endpoints (cleanup) Aug 25, 2026
@srosenthal-dd
srosenthal-dd marked this pull request as ready for review August 25, 2026 15:22
@srosenthal-dd
srosenthal-dd requested a review from a team as a code owner August 25, 2026 15:22

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b141caf5ac

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/raw_client.rs Outdated
@srosenthal-dd
srosenthal-dd marked this pull request as draft August 25, 2026 15:31
Add two tests verifying that obs-pipelines routes no longer require
API-key fallback after removal from OAUTH_EXCLUDED_ENDPOINTS:

- test_no_fallback_for_obs_pipelines: asserts requires_api_key_fallback
  returns false for all formerly-excluded method/path combinations
  (collection, ID-parameterized, validation), plus a non-matching method
- test_raw_get_obs_pipelines_uses_oauth_bearer: end-to-end test that
  raw_get sends the Authorization: Bearer header and omits DD-API-KEY
  for an obs-pipelines pipeline path
@datadog-official

This comment has been minimized.

The count test is prone to merge conflicts and tests no actual
behavior. The per-group fallback tests provide real coverage.
platinummonkey
platinummonkey previously approved these changes Aug 25, 2026
@srosenthal-dd
srosenthal-dd marked this pull request as ready for review August 25, 2026 19:48
@platinummonkey
platinummonkey merged commit 6bd9f82 into DataDog:main Aug 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants