Skip to content

Allow setting of redirect URI port for OIDC flows#1692

Open
yashhzd wants to merge 1 commit intosigstore:mainfrom
yashhzd:feat/redirect-port
Open

Allow setting of redirect URI port for OIDC flows#1692
yashhzd wants to merge 1 commit intosigstore:mainfrom
yashhzd:feat/redirect-port

Conversation

@yashhzd
Copy link

@yashhzd yashhzd commented Feb 13, 2026

Fixes #1029

Adds an optional redirect_port parameter to Issuer.identity_token() that gets threaded through to the internal OAuth redirect server. This allows callers to specify a fixed port for the local redirect server instead of always using an ephemeral port (port 0).

This is useful in enterprise environments where OIDC providers require a pre-registered redirect URI with a specific port.

Changes:

  • Issuer.identity_token(): new redirect_port: int = 0 parameter (default preserves existing behavior)
  • _OAuthFlow.__init__(): accepts and forwards redirect_port
  • _OAuthRedirectServer.__init__(): accepts port parameter instead of hardcoded 0

Signed-off-by: Yash Goel yashgoel892@gmail.com

Adds a `redirect_port` parameter to `Issuer.identity_token()` that
allows callers to specify a fixed port for the local OAuth redirect
server. This is needed for enterprise OIDC providers that require
pre-registered redirect URIs and don't allow wildcard localhost ports.

The default remains `0` (ephemeral port), preserving backward
compatibility.

Fixes sigstore#1029

Signed-off-by: Yash Goel <yashgoel892@gmail.com>

Signed-off-by: Yash Goel <yashgoel892@gmail.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.

Allow setting of redirect uri port

1 participant