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

OAuth not setting cookie properly with rd= set #2507

Closed
marcusramberg opened this issue May 14, 2018 · 6 comments
Closed

OAuth not setting cookie properly with rd= set #2507

marcusramberg opened this issue May 14, 2018 · 6 comments

Comments

@marcusramberg
Copy link

NGINX Ingress controller version: 0.14

Kubernetes version (use kubectl version):
1.9.7-gke.0

Environment:

  • Cloud provider or hardware configuration: Google container engine
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

What happened:

external auth fails to set a cookie when ?rd=... is added to signin_url - If I remove it after the redirect login works properly

What you expected to happen:

OAuth2 proxy flow to allow me to log into the site

How to reproduce it (as minimally and precisely as possible):
Followed the https://kubernetes.github.io/ingress-nginx/examples/auth/oauth-external-auth/README/ guide to set up oauth2 proxy and two ingresses.

Anything else we need to know:

Seems PR #1164 added ?rd=<current_url> to signin_url - This causes the authentication cookie to not be set for me. There are also other people commenting that they have the same issue after this PR.

@JordanP
Copy link
Contributor

JordanP commented May 16, 2018

Same for me, the OAuth2 proxy didn't work anymore after #1164 For some reasons I cant remember, I was led to believe this is related to bitly/oauth2_proxy#427

Anyway, the simple fix for me was to s/error_page 401 = {{ buildAuthSignURL $location.ExternalAuth.SigninURL }};/error_page 401 = {{ $location.ExternalAuth.SigninURL }};/ in rootfs/etc/nginx/template/nginx.tmpl

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 14, 2018
@marcusramberg
Copy link
Author

This is still an issue in 0.18. Just tested. Not sure how I remove the stale flag.

@audun
Copy link

audun commented Aug 21, 2018

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 21, 2018
@audun
Copy link

audun commented Aug 21, 2018

Using the config change in described in #2741 solved the issue.

/close

@k8s-ci-robot
Copy link
Contributor

@audun: you can't close an active issue unless you authored it or you are assigned to it, Can only assign issues to org members and/or repo collaborators..

In response to this:

Using the config change in described in #2741 solved the issue.

/close

Instructions 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.

@aledbf aledbf closed this as completed Aug 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants