-
Notifications
You must be signed in to change notification settings - Fork 98
feat(oauth-proxy): configuration enhancements for k8s config #1400
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
Conversation
|
Hi @karatkep. Thanks for your PR. I'm waiting for a eclipse-che member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Codecov Report
@@ Coverage Diff @@
## main #1400 +/- ##
==========================================
+ Coverage 63.04% 63.91% +0.87%
==========================================
Files 70 70
Lines 5812 5853 +41
==========================================
+ Hits 3664 3741 +77
+ Misses 1785 1749 -36
Partials 363 363
Continue to review full report at Codecov.
|
|
/cc @sparkoo |
|
/retest |
sparkoo
left a comment
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.
code looks fine. Can you please explain your motivation behind pass_access_token=true ?
Hi @sparkoo, The motivation is to pass OAuth The long story short: the idea is to improve serviceability and to allow users to configure che-operator to pass OAuth |
|
@karatkep do you have some particular use-case where you need access token? We use it with openshift, because we don't have ID token there. |
@sparkoo we need access token in case AKS cluster security integrated with Azure AD. We use approach described on https://docs.microsoft.com/en-us/azure/aks/concepts-identity#webhook-and-api-server. API Server requires access token to perform validation. |
|
/retest |
And how do you use that token? How do you get it from |
Unf, no magic here :( I used the same way as for OpenShift. This is my POC https://github.com/karatkep/che-operator/pull/1/files which working fine for AKS case. I hardcoded a lot due to POC reason. And of course I will not follow hardcoded version for original repository. As was mentioned above, my plan is to improve che-operator serviceability to allow users to manage this use case via configuration: |
|
Thank you. I didn't get this part that you want to use header rewrite traefik plugin to do this. It make sense now. I'm not sure that |
|
We need only One option to consider is to try ouath2-proxy Alpha configuration. Looks like we no need Traefik changes in this way. I already asked about it in oauth2-proxy/oauth2-proxy#843 (comment) |
|
I am a bit afraid of having these hardcoded. What about configuring them? |
|
/retest |
|
I just have some minor remarks:
In general I don't like @sparkoo |
|
@tolusha code has been updated according to your recommendations. Please review and approve one more time |
|
/retest |
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
|
@karatkep |
Code restructuring
|
Thank you @tolusha . I just slightly refactored unit tests - just to move to the correct folder. Thank you for you help! |
|
/retest |
|
@karatkep: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
Let me fix |
|
Me can merge it. I will fix the test in a separate PR. |
|
Thank you @tolusha |
sparkoo
left a comment
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.
very nice contribution, thank you
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: karatkep, sparkoo, tolusha The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
What does this PR do?
ouath-proxy configuration enhancements for kubernetes config
whitelist_domainsto whitelist che domain (ie: .yourcompany.com)cookie_domainsto set cookie domain to force cookies to (ie: .yourcompany.com)IdentityTokento Che Resource to configure identity token (id_tokenoraccess_token) to be passed to upstream.OAuthScopeto Che Resource to support custom scopes. Example:Screenshot/screencast of this PR
What issues does this PR fix or reference?
It needs for eclipse-che/che#21450
How to test this PR?
PR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or referenceandHow to test this PRcompletedReviewers
Reviewers, please comment how you tested the PR when approving it.