Skip to content

Conversation

@jhrozek
Copy link
Contributor

@jhrozek jhrozek commented Jan 30, 2026

Propose centralized AWS credential management for ToolHive to enable OIDC-to-AWS authentication for the AWS MCP Server. Key features:

  • Exchange OIDC tokens for temporary AWS credentials via AssumeRoleWithWebIdentity
  • Priority-based role mapping from JWT claims to IAM roles
  • SigV4 request signing for AWS MCP Server requests
  • MCPExternalAuthConfig CRD extension for Kubernetes configuration

This allows organizations to use their existing IdP (Okta, Azure AD, etc.) to authenticate users accessing AWS MCP Server without distributing AWS credentials to developer machines.

Propose centralized AWS credential management for ToolHive to enable
OIDC-to-AWS authentication for the AWS MCP Server. Key features:

- Exchange OIDC tokens for temporary AWS credentials via AssumeRoleWithWebIdentity
- Priority-based role mapping from JWT claims to IAM roles
- SigV4 request signing for AWS MCP Server requests
- MCPExternalAuthConfig CRD extension for Kubernetes configuration

This allows organizations to use their existing IdP (Okta, Azure AD, etc.)
to authenticate users accessing AWS MCP Server without distributing AWS
credentials to developer machines.
@jhrozek
Copy link
Contributor Author

jhrozek commented Feb 3, 2026

@JAORMX thanks for the review here and on Slack! I changed the proposal is use CEL for expresiveness, but also as the single and only engine, meaning that the simple claim-matching case would be just syntactical sugar unrolled to CEL in the background.

@jhrozek jhrozek merged commit a5afbd5 into main Feb 3, 2026
1 check passed
Copy link

@ChrisJBurns ChrisJBurns left a comment

Choose a reason for hiding this comment

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

Apologies for late feedback on this, ever since the CODEOWNERS stuff, my Github Notifications are going crazy.


- **Role Mapper**: Selects an IAM role based on JWT claims. When multiple claims match configured roles, the one with the lowest priority number wins. A default role is used if no claims match.

- **STS Exchanger**: Calls `AssumeRoleWithWebIdentity` to exchange the user's OIDC token for temporary AWS credentials.

Choose a reason for hiding this comment

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

Is this performed on every request? This adds latency if so and may hit AWS STS rate limits under load (depending on the scale). Not sure what our positions is on caching the creds for the time they are valid?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I should have spelled that out in the RFC explicitly, but I /do/ have caching implemented in my local branch - stacklok/toolhive@a567e02#diff-19c2048f3153cafc974acb282dcfc414dc9f40395592b7b6d31aa2db8b44198eR28

(yes this is vibe-coded. No, I won't submit vibe-code, I am now redoing the branch with proper SWE included. Vibe coding was good enough for a demo)

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.

5 participants