Skip to content
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

Conversation

ericchiang
Copy link
Contributor

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

@k8s-github-robot k8s-github-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. release-note-label-needed labels Aug 1, 2016
@ericchiang ericchiang force-pushed the fix-openid-connect-provider-with-trailing-slash branch from e8e9277 to ef8e5cb Compare August 1, 2016 18:12
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.
@ericchiang ericchiang force-pushed the fix-openid-connect-provider-with-trailing-slash branch from ef8e5cb to bc3dc12 Compare August 1, 2016 18:23
@k8s-bot
Copy link

k8s-bot commented Aug 1, 2016

GCE e2e build/test passed for commit bc3dc12.

@ericchiang
Copy link
Contributor Author

@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

@liggitt
Copy link
Member

liggitt commented Aug 4, 2016

fine with me

@liggitt liggitt added lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. and removed release-note-label-needed labels Aug 4, 2016
@liggitt
Copy link
Member

liggitt commented Aug 4, 2016

LGTM

1 similar comment
@yifan-gu
Copy link
Contributor

yifan-gu commented Aug 4, 2016

LGTM

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Aug 4, 2016

GCE e2e build/test passed for commit bc3dc12.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 5230bb7 into kubernetes:master Aug 4, 2016
@ericchiang ericchiang deleted the fix-openid-connect-provider-with-trailing-slash branch August 4, 2016 23:27
@liggitt liggitt added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Aug 5, 2016
k8s-github-robot pushed a commit that referenced this pull request Aug 5, 2016
…60-upstream-release-1.3

Automatic merge from submit-queue

Automated cherry pick of #29860

Cherry pick of #29860 on release-1.3.
jessfraz pushed a commit to jessfraz/kubernetes that referenced this pull request Aug 19, 2016
…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
shyamjvs pushed a commit to shyamjvs/kubernetes that referenced this pull request Dec 1, 2016
…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.
shouhong pushed a commit to shouhong/kubernetes that referenced this pull request Feb 14, 2017
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants