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

Can't create Notebooks from web app when port-forwarding ISTIO gateway #5763

Closed
kimwnasptd opened this issue Mar 24, 2021 · 4 comments · Fixed by #5764
Closed

Can't create Notebooks from web app when port-forwarding ISTIO gateway #5763

kimwnasptd opened this issue Mar 24, 2021 · 4 comments · Fixed by #5764
Assignees
Labels

Comments

@kimwnasptd
Copy link
Member

/kind bug

What steps did you take and what happened:

  1. Port forward the Istio ingress gateway and access Kubeflow over localhost
  2. Navigate the the Notebooks Management UI
  3. Click LAUNCH in the form and try to spawn a Notebook

After this I got an error due to CSRF header missing in the POST request.

What did you expect to happen:
I would expect the app to be able to work, if accessed over localhost.

Anything else you would like to add:
This is because right now we always use Secure attribute when setting the CSRF cookie. This means that the cookie will not be set in the browser, if the request happens over http.

Here's also the relevant MDN info:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#Secure

Note: Insecure sites (http:) can't set cookies with the Secure attribute (since Chrome 52 and Firefox 52).

cc @yanniszark @elikatsis

@kimwnasptd
Copy link
Member Author

kimwnasptd commented Mar 24, 2021

I can create a small PR that will introduce an APP_SECURE_COOKIES env variable that will control whether our apps should use Secure cookies or not. This will allow people to make the apps work even if exposed over http with a simple change in the manifests.

/assign @kimwnasptd

@saumilsdk
Copy link

Here is how I did the fix in KF 1.4 and K8 1.21

image

@tiansiyuan
Copy link

Same issue with KF 1.8.

kubeflow/manifests#2569

And same with another installation, KF 1.8 on Microk8s 1.24 on a Google cloud VM (Ubuntu 22.04.4 LTS).

@tiansiyuan
Copy link

Here is how I did the fix in KF 1.4 and K8 1.21

image

Thanks. This works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants