Skip to content

feat(config): add sts_token_url and sts_subject_token_type fields - #1173

Draft
alam0rt wants to merge 1 commit into
containers:mainfrom
alam0rt:feat/sts-token-url-config
Draft

feat(config): add sts_token_url and sts_subject_token_type fields#1173
alam0rt wants to merge 1 commit into
containers:mainfrom
alam0rt:feat/sts-token-url-config

Conversation

@alam0rt

@alam0rt alam0rt commented May 28, 2026

Copy link
Copy Markdown

Summary

  • Adds sts_token_url config field to allow specifying an explicit STS token endpoint instead of relying on OIDC discovery
  • Adds sts_subject_token_type config field for the RFC 8693 subject_token_type parameter
  • When sts_token_url is set, it takes precedence over the OIDC-discovered token endpoint, enabling token exchange with a dedicated STS gateway

Motivation

When running token exchange against a dedicated STS gateway (separate from the OIDC provider), the OIDC-discovered token endpoint points to the wrong service. For example, if Okta is the OIDC provider but token exchange should go to a custom sts-gateway, the current code always resolves to Okta's token endpoint.

This patch lets operators explicitly set sts_token_url in the TOML config to direct token exchange requests to the correct endpoint.

Test plan

  • go build ./... passes
  • Existing tests pass (make test)
  • Manual verification with sts_token_url set to a custom STS gateway endpoint
  • Verify backward compatibility: when sts_token_url is unset, behavior is unchanged (falls back to OIDC discovery)

🤖 Generated with Claude Code

Allow explicit STS token endpoint configuration instead of relying
solely on OIDC discovery. This enables token exchange with a dedicated
STS gateway (e.g., sts-gateway) that is separate from the OIDC provider.

When sts_token_url is set, it takes precedence over the OIDC-discovered
token endpoint. The sts_subject_token_type field allows specifying the
RFC 8693 subject_token_type parameter for the exchange request.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant