feat(oauth): expand OAuth support to audit-logs, logs, error tracking, and OCI#136
Merged
platinummonkey merged 2 commits intodatadog-labs:mainfrom Feb 27, 2026
Conversation
…mmands Server-side changes now allow OAuth for logs, error tracking, incidents, and cloud OCI endpoints. This removes the forced API key fallback for these commands and adds bearer token support via make_bearer_client. - Add 11 new OAuth scopes (error_tracking_read, incident_settings_*, logs_read_archives, logs_read_config, logs_generate_metrics, logs_write_archives, oci_configuration_*) - Remove API key requirement from all logs commands (search, aggregate, archives, custom-destinations, metrics) - Remove API key requirement from error tracking commands (issues search/get) - Remove 13 entries from OAUTH_EXCLUDED_ENDPOINTS table - Update tests to verify OAuth works for previously excluded endpoints Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add the audit_logs_read scope to the OAuth login flow. The audit logs commands already support bearer token auth, but the scope was not being requested. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
E2E Validation ResultsStaging (datad0g.com)
Prod (datadoghq.com)
Summary
Not validated (write ops, skipped for safety): Not validated (blocked by pre-existing pup bugs, not auth-related):
|
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
Expands OAuth bearer token support to logs, error tracking, cloud OCI, and audit logs commands that previously required API+App key authentication or were missing scopes. Also adds 12 new OAuth scopes to the login flow.
Changes
audit_logs_read,error_tracking_read,incident_notification_settings_read,incident_settings_read,incident_settings_write,logs_generate_metrics,logs_read_archives,logs_read_config,logs_write_archives,oci_configuration_edit,oci_configuration_read,oci_configurations_manage(src/auth/types.rs)src/commands/logs.rs)src/commands/error_tracking.rs)OAUTH_EXCLUDED_ENDPOINTStable (src/client.rs)src/client.rs,src/test_commands.rs)Cloud OCI and Incidents commands already used the
make_bearer_clientpattern, so no code changes were needed for those.Testing
cargo clippy -- -D warningscleancargo fmt --checkclean🤖 Generated with Claude Code