Skip to content

CRED-2148: Add PAT auth support to TypeScript v2 API client#3610

Open
tausman wants to merge 1 commit intov2from
tausman/cred-2148-typescript-v2-pat-auth
Open

CRED-2148: Add PAT auth support to TypeScript v2 API client#3610
tausman wants to merge 1 commit intov2from
tausman/cred-2148-typescript-v2-pat-auth

Conversation

@tausman
Copy link

@tausman tausman commented Mar 10, 2026

Why

Personal Access Token (PAT) authentication needs to be supported in the TypeScript v2 (split-by-product) client, matching the functionality already added to the master branch in #3588.

Summary

Adds bearer token authentication support via DD_BEARER_TOKEN env var or programmatic configuration. When configured, the Authorization: Bearer <PAT> header is sent alongside any configured API key and app key headers (NOT mutually exclusive).

Changes

  • packages/datadog-api-client/src/auth.ts - New BearerAuthAuthentication class, added bearerAuth to AuthMethods, AuthMethodsConfiguration, and configureAuthMethods
  • packages/datadog-api-client/src/configuration.ts - DD_BEARER_TOKEN env var support in createConfiguration, always-apply bearer auth in applySecurityAuthentication
  • packages/datadog-api-client/src/http/isomorphic-fetch.ts - Redact Authorization header in debug logs

Test plan

  • BDD tests pass in CI
  • Manual verification with PAT against staging endpoint

🤖 Generated with Claude Code

@tausman tausman force-pushed the tausman/cred-2148-typescript-v2-pat-auth branch from f49fd4c to 0aaf75e Compare March 11, 2026 20:22
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.

1 participant