-
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
Implement OIDC client AuthProvider #25270
Conversation
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
2 similar comments
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
@erictune Feel free to reassign as you see fit. Thank you. |
fyi, you can probably do a |
|
||
clientConfig := restclient.Config{ | ||
TLSClientConfig: restclient.TLSClientConfig{ | ||
CAFile: cfg["idp-certifiate-authority"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/certifiate/certificate
The way this stores its config and refresh token in the |
Thanks for your comments @erictune; I'm going to rebase onto master now that CJ's changes are merged...If the comments get lost, I'll paste 'em back in. |
CLAs look good, thanks! |
@yifan-gu |
f4e8467
to
e6f6776
Compare
Applying LGTM according to #25270 (comment) |
@k8s-bot ok to test |
I did an offline design discussion with @philips @bobbyrullo @sym3tri and I understand better how this PR will work. They explained how my previous concerns were satisfied by this PR.
I am now fine with keeping the name the same. I don't have time to review before deadine. I asked @sym3tri to review @bobbyrullo code, and @yifan-gu to manage the LGTM labels. Ways to use this, as I now understand it:
So, users have multiple IdP choices and the flow is OIDC-compliant. |
This commit handles: * Passing ID Token as Bearer token * Refreshing of tokens using refresh-tokens * Persisting refreshed tokens * ability to add arbitrary extra scopes via config * this is what enables the cross-client/azp stuff
This makes it easier to test other OIDC code.
* Use an interface for OIDC Client, so that we're testing the behavior of the client, not the go-oidc package itself * add backoff and retry when server rejects token
tests that tokens gets refreshed, passed along as bearers, etc.
GCE e2e build/test passed for commit f575f89. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
@brendandburns - could you please tag this as p1 and 1.3 as per the Effort tracking Spreadsheet? It keeps getting bumped in the queue.... |
@erictune - I promised you some docs, but could use some guidance on where to put things. Setting up OIDC on the API Server goes here, but not sure where to put the following:
|
Re 1) I think a README next to the plugin with the meanings of the config fields is good. I should also put one together for the GCP plugin. |
@bobbyrullo Would you provide an update on the status for the documentation for this feature as well as add any PRs as they are created? Not Started / In Progress / In Review / Done Thanks |
return nil, errors.New("Must provide idp-issuer-url") | ||
} | ||
|
||
providerCfg, err := oidc.FetchProviderConfig(hc, strings.TrimSuffix(issuer, "/")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bobbyrullo This seems to create the same issues as #29749
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bobbyrullo This seems to create the same issues as #29749
@ericchiang not sure if there's something you need to do here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I haven't looked at this code for a second. Will send a PR to not trim the trailing slash.
FIx CI for 3.11 Origin-commit: 64b44fbcfe4b692474a72d1ce2fa13c53a48ec85
@erictune @cjcullen @liggitt @sym3tri @philips @ericchiang
fixes #18549