Skip to content

feat: support on-behalf-of token exchange and additional parameters#447

Merged
padmak30 merged 1 commit intomainfrom
feat/obo-token-exchange
Apr 30, 2026
Merged

feat: support on-behalf-of token exchange and additional parameters#447
padmak30 merged 1 commit intomainfrom
feat/obo-token-exchange

Conversation

@aidandaly24
Copy link
Copy Markdown
Contributor

Summary

  • Add ON_BEHALF_OF_TOKEN_EXCHANGE as a supported auth_flow value in the requires_access_token decorator
  • Add resources and audiences optional parameters to the requires_access_token decorator
  • Forward resources and audiences through to IdentityClient.get_token()

Related Issues

Mirrors private repo PR: https://github.com/aws/bedrock-agentcore-sdk-python-private/pull/108

Type of Change

New feature

Testing

  • Unit tests added for all three auth flows (M2M, USER_FEDERATION, ON_BEHALF_OF_TOKEN_EXCHANGE)
  • Tests verify resources/audiences are forwarded correctly
  • Existing tests updated to assert new parameters

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • My changes generate no new warnings

Note: services/identity.py get_token() also needs updating to accept resources, audiences, and ON_BEHALF_OF_TOKEN_EXCHANGE in its type signature — see review comments on the private PR.

@aidandaly24 aidandaly24 requested a review from a team April 30, 2026 22:17
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 30, 2026

✅ No Breaking Changes Detected

No public API breaking changes found in this PR.

@aidandaly24 aidandaly24 force-pushed the feat/obo-token-exchange branch from 6b4bea8 to fbf944d Compare April 30, 2026 22:19
@padmak30 padmak30 merged commit 995536b into main Apr 30, 2026
43 of 44 checks passed
@padmak30 padmak30 deleted the feat/obo-token-exchange branch April 30, 2026 22:54
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