Skip to content

Backport CIMD assertion audience fix to v3 - #4799

Merged
zzstoatzz merged 4 commits into
release/3.xfrom
codex/backport-cimd-audience-3x
Aug 10, 2026
Merged

Backport CIMD assertion audience fix to v3#4799
zzstoatzz merged 4 commits into
release/3.xfrom
codex/backport-cimd-audience-3x

Conversation

@jlowin

@jlowin jlowin commented Aug 10, 2026

Copy link
Copy Markdown
Member

This backports #4659 to release/3.x. OAuthProxy advertises a token endpoint like https://example.com/token, but the stable branch currently validates CIMD private_key_jwt assertions against https://example.com//token because Pydantic adds a trailing slash to a bare-origin base_url. Spec-following clients therefore fail authentication with invalid_client.

The expected audience now comes from the same normalized token endpoint URL advertised in metadata, while preserving path-mounted deployments:

proxy = OAuthProxy(base_url="https://example.com", ...)
proxy.token_endpoint_url  # "https://example.com/token"

Fixes #4789

@marvin-context-protocol marvin-context-protocol Bot added auth Related to authentication (Bearer, JWT, OAuth, WorkOS) for client or server. bug Something isn't working. Reports of errors, unexpected behavior, or broken functionality. security Security fixes: input validation, SSRF/LFI prevention, auth hardening, injection defenses. labels Aug 10, 2026
🤖 Generated with OpenAI Codex
@zzstoatzz
zzstoatzz marked this pull request as ready for review August 10, 2026 20:03
@zzstoatzz
zzstoatzz marked this pull request as draft August 10, 2026 20:16
🤖 Generated with OpenAI Codex
@zzstoatzz
zzstoatzz marked this pull request as ready for review August 10, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auth Related to authentication (Bearer, JWT, OAuth, WorkOS) for client or server. bug Something isn't working. Reports of errors, unexpected behavior, or broken functionality. security Security fixes: input validation, SSRF/LFI prevention, auth hardening, injection defenses.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants