Closed samuelvl closed 2 years ago
Hi @samuelvl. Thanks for your PR.
I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test
on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test
label.
I understand the commands that are listed here.
/lgtm /hold
Adding a LGTM and hold to let @stlaz look at it as well.
@slaskawi Should I retest? I think the logs show an error with the infra setup:
Let's give it a retry /retest
/retest
Let's give it one more try /retest
I don't get why it is failing. The failing test is TestOAuthProxyE2E/setting_up_e2e_tests_sar-multi-fail
, in the logs I can see this error:
proxy_test.go:302: expected error 'did not reach upstream site', got 'expected to be redirected to the oauth-server login page, got "500 Internal Server Error";
...
<body>
<div class="panel-login">
<div class="panel-content panel-content-centered">
<h1>500 Internal Error</h1>
<p>configmap "oauth-serving-cert" not found</p>
<p><a href="/oauth/sign_in">Log In</a></p>
</div>
</div>
</body>
However if I run the tests locally using my own image including this PR changes the tests pass:
$ go test -v ./test/... -run TestOAuthProxyE2E/setting_up_e2e_tests_sar-multi-fail
=== RUN TestOAuthProxyE2E
util.go:734: Found configuration for host https://api.*****.redhat.com:6443.
...
util.go:768: current authentication operator status: map[Available:true Degraded:false Progressing:false]
proxy_test.go:207: test image: quay.io/samuvl/ose-oauth-proxy:validate-cookie-domain, test namespace: e2e-oauth-proxy-lszdv
=== RUN TestOAuthProxyE2E/setting_up_e2e_tests_sar-multi-fail
proxy_test.go:274: Warning: User 'testuser9' not found
clusterrole.rbac.authorization.k8s.io/admin added: "testuser9"
proxy_test.go:280: cleaning up test sar-multi-fail
--- PASS: TestOAuthProxyE2E (240.97s)
--- PASS: TestOAuthProxyE2E/setting_up_e2e_tests_sar-multi-fail (25.79s)
PASS
ok github.com/openshift/oauth-proxy/test/e2e 240.979s
I am running Openshift 4.9:
Server Version: 4.9.8
/retest
After rebasing a different test is failing that wasn't failing before, so testing again
/retest
/retest
@samuelvl: all tests passed!
Full PR test history. Your PR dashboard.
@slaskawi Tests are finally passing :)
/lgtm
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: samuelvl, slaskawi
To complete the pull request process, please assign deads2k after the PR has been reviewed.
You can assign the PR to them by writing /assign @deads2k
in a comment when ready.
The full list of commands accepted by this bot can be found here.
/assign @stlaz
@slaskawi @stlaz Hey guys, tests are passing, so any chance to get this merged or is there anything else required?
Hello, would it be possible to also backport this to the v4.6 release so that the v4.6 images include the bugfix?
Issues go stale after 90d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle rotten /remove-lifecycle stale
Hi, @samuelvl
please change the title / commit to explicitly mention that you want to use the cookie domain for the signing and validation with hmac. This must be very explicit.
I am also not so happy with the "CookieDomain" solution, but it is already implemented. Ideally you would set a flag, that you enable a cookie for all subdomains and not set the domain on your own. This can be a very problematic setting in the long run.
Title changed, thanks for the suggestion @ibihim
The main reason for this change is trying to get a SSO experience when using the OAuth proxy in Openshift as described in https://github.com/openshift/oauth-proxy/issues/239 to improve the user experience by not requiring multiple re-logins when accessing different route hosts.
If there is an alternative or a future enhancement to provide this capability I'm in favor of deprecating the --cookie-domain
flag and use a more robust functionality instead.
Rotten issues close after 30d of inactivity.
Reopen the issue by commenting /reopen
.
Mark the issue as fresh by commenting /remove-lifecycle rotten
.
Exclude this issue from closing again by commenting /lifecycle frozen
.
/close
@openshift-bot: Closed this PR.
Fix https://github.com/openshift/oauth-proxy/issues/239