-
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
[1.3.3] OpenID Connect provider fails with trailing slashes in the issuer URL #29749
Comments
This commit 36bd693 breaks the verification. Paging @yifan-gu |
I believe this was fixed in our client. Feel free to assign me. I'll try to update the dependency today. |
@ericchiang I think the client looks fine in 1.3.3 and it's just the old workaround that breaks things. |
Ah sorry. Yeah this line in the OpenID Connect plugin looks redundant[0] |
…-with-trailing-slash Automatic merge from submit-queue oidc authentication plugin: don't trim issuer URLs with trailing slashes 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
Any chance to get this backported for 1.3? I tried cherry picking it, but it didn't apply cleanly. |
I created this cherry pick: |
…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
I like to use Azure Active Directory as IDP:
https://sts.windows.net/14929598-cff9-49f0-b20b-295e9d4dcb8b/.well-known/openid-configuration
The issuer URL has a trailing slash:
https://sts.windows.net/14929598-cff9-49f0-b20b-295e9d4dcb8b/
, but when I specify the issuer url with a trailing slash on the command line options for kube-apiserver the trailing slash gets trimmed before validation:This means I can't use this IDP. And the apiserver will fail to start with this configuration.
Related issues:
#20476
#21128
The text was updated successfully, but these errors were encountered: