-
Notifications
You must be signed in to change notification settings - Fork 40k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
oidc authentication plugin: don't trim issuer URLs with trailing slashes #29860
oidc authentication plugin: don't trim issuer URLs with trailing slashes #29860
Conversation
e8e9277
to
ef8e5cb
Compare
The issuer URL passed to the plugin must identically match the issuer URL returned by OpenID Connect discovery. However, the plugin currently trims all trailing slashes from issuer URLs, causing a mismatch. Since the go-oidc client already handles this case correctly, don't trim the path.
ef8e5cb
to
bc3dc12
Compare
GCE e2e build/test passed for commit bc3dc12. |
@kubernetes/sig-auth beyond test updates this just one line change[0] to the oidc authenticator. It okay for @yifan-gu to LGTM this? [0] https://github.com/kubernetes/kubernetes/pull/29860/files#diff-ab7eb2396e8b0f5861fc6245a6dd307aR176 |
fine with me |
LGTM |
1 similar comment
LGTM |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit bc3dc12. |
Automatic merge from submit-queue |
…r-dont-trim-issuer Automatic merge from submit-queue oidc auth provider: don't trim issuer URL This mirrors a similar side fix for the API server authenticator. Don't trim the issuer URL provided by the user since OpenID Connect mandates that this URL exactly matches the URL returned by the issuer during discovery. This change only impacts clients attempting to connect to providers that are non-spec compliant. No test updates since this is already tested by the go-oidc client package. See: https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationValidation Server side fix kubernetes#29860 Updates kubernetes#29749 cc @kubernetes/sig-auth @hanikesn
…ck-of-#29860-upstream-release-1.3 Automatic merge from submit-queue Automated cherry pick of kubernetes#29860 Cherry pick of kubernetes#29860 on release-1.3.
…ck-of-#29860-upstream-release-1.3 Automatic merge from submit-queue Automated cherry pick of kubernetes#29860 Cherry pick of kubernetes#29860 on release-1.3.
The issuer URL passed to the plugin must identically match the issuer
URL returned by OpenID Connect discovery. However, the plugin currently
trims all trailing slashes from issuer URLs, causing a mismatch. Since
the go-oidc client already handles this case correctly, don't trim the
path.
Closes #29749
cc @hanikesn @kubernetes/sig-auth