feat: add kuudo auth provider for ai agents#99
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9a4f3de953
ℹ️ 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".
| if result.reason != "kuudo_bearer" or not bearer: | ||
| return await call_next(context) | ||
|
|
||
| context_token = provider.set_current_api_key(bearer) |
There was a problem hiding this comment.
Clear tenant state on Kuudo bearer swaps
When a long-lived HTTP/streamable MCP session has already selected an identity under one Kuudo API key, a later tools/call with a different Authorization: Bearer reaches this new path and only sets the provider’s current API key for downstream calls. It never updates the session token fingerprint or clears active_identity/active_credentials, while AuthSessionStateMiddleware persists those values across calls and AuthManager.get_active_credentials() returns valid session credentials before invoking the Kuudo provider. In that token-swap scenario, the new bearer can run Amazon Ads operations with the previous caller’s cached identity/credentials; please wire Kuudo bearer handling into the same token-swap invalidation or key persisted credentials by the Kuudo API-key fingerprint before executing call_next.
Useful? React with 👍 / 👎.
No description provided.