Skip to content

Conversation

@michael-richey
Copy link
Collaborator

What does this PR do?

Allows forwarding JWTs.

Description of the Change

This allows for using JWTs instead of app/api keys.

@michael-richey michael-richey marked this pull request as ready for review January 13, 2026 15:19
@michael-richey michael-richey requested a review from a team as a code owner January 13, 2026 15:19
heyronhay
heyronhay previously approved these changes Jan 13, 2026
Copy link
Collaborator

@heyronhay heyronhay left a comment

Choose a reason for hiding this comment

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

Looks good, one suggestion in the comments, but also, we don't log the JWT token anywhere, do we? To prevent it from exposed. I guess this applies to API/APP keys as well.


destination_auth = {}
if k := kwargs.get("destination_api_key"):
# JWT takes precedence over API keys
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we output a message somewhere if JWT and API keys are specified that the JWT overrides it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good idea, added on lines 147-152.

if (kwargs.get("source_jwt") and kwargs.get("source_api_key")) or (
kwargs.get("destination_jwt") and kwargs.get("destination_api_key")
):
logger.warning("Both a JWT and an API key were found.")
Copy link
Collaborator

Choose a reason for hiding this comment

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

"Both a JWT and an API key were found." -> "Both a JWT and an API key were found, JWT will take precedence" or something like that

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oops yeah they need to know what is going on, updated

@michael-richey michael-richey merged commit 4e3a227 into main Jan 13, 2026
11 checks passed
@michael-richey michael-richey deleted the michael.richey/use-jwts branch January 13, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants