feat(config): add sts_token_url and sts_subject_token_type fields - #1173
Draft
alam0rt wants to merge 1 commit into
Draft
feat(config): add sts_token_url and sts_subject_token_type fields#1173alam0rt wants to merge 1 commit into
alam0rt wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sts_token_urlconfig field to allow specifying an explicit STS token endpoint instead of relying on OIDC discoverysts_subject_token_typeconfig field for the RFC 8693subject_token_typeparametersts_token_urlis set, it takes precedence over the OIDC-discovered token endpoint, enabling token exchange with a dedicated STS gatewayMotivation
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_urlin the TOML config to direct token exchange requests to the correct endpoint.Test plan
go build ./...passesmake test)sts_token_urlset to a custom STS gateway endpointsts_token_urlis unset, behavior is unchanged (falls back to OIDC discovery)🤖 Generated with Claude Code