Skip to content

CRED-2146: Add PAT auth support to Python API client - #3243

Closed
tausman wants to merge 2 commits into
masterfrom
tausman/cred-2146-python-pat-auth
Closed

CRED-2146: Add PAT auth support to Python API client#3243
tausman wants to merge 2 commits into
masterfrom
tausman/cred-2146-python-pat-auth

Conversation

@tausman

@tausman tausman commented Mar 4, 2026

Copy link
Copy Markdown

PR Stack

API Client Libraries (closed)

All client libraries except Rust already support PATs via the existing OAuth/AuthZ code path. No new changes were needed.

Rust: The Rust client generator does not support OAuth/AuthZ, so PATs cannot be used through the client library today. When OAuth/AuthZ support is added to the Rust generator in the future (#1438 has the approach), PATs will work automatically.

OpenAPI Spec Changes


Closing Note

This PR is being closed. PATs can be passed in using the existing OAuth (AuthZ) code path -- no new client library changes are needed. See the test program demonstrating this:

@tausman
tausman force-pushed the tausman/cred-2146-python-pat-auth branch from f7ec619 to 3c7c23c Compare March 5, 2026 17:38
@tausman
tausman marked this pull request as ready for review March 5, 2026 18:43
@tausman
tausman requested review from a team as code owners March 5, 2026 18:43
@tausman

tausman commented Mar 30, 2026

Copy link
Copy Markdown
Author

Closing: PATs work via the existing OAuth (AuthZ) code path -- no new changes needed. See test_program.py.

@craSH

craSH commented Jul 15, 2026

Copy link
Copy Markdown

There isn't really anywhere in the documentation (or PAT/SAT announcement blog post) that mention, explicitly, that you can use them with existing DD_APP_KEY environment variables and elsewhere that an Application Key would be used.

Could documentation be updated to explicitly mention this? It's a bit unusual in that it uses the same Application Key configuration surface, which otherwise needed a corresponding API key to work with before PATs/SATs were introduced.

I feel like a lot of home-grown code may also check for the presence of both the DD_API_KEY and DD_APP_KEY values, making it difficult to adapt existing code paths to this. I guess you can just set a bogus value for DD_API_KEY but that seems like it may invite issues down the road - is there any formal guidance on how clients should be using the new patterns?

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