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 we initialise oauth_client when initialise JupyterLab, to support the case that Jupyter Api called when server not yet spawned #4786

Open
linlol opened this issue Apr 15, 2024 · 1 comment

Comments

@linlol
Copy link

linlol commented Apr 15, 2024

Hi team, I use JupyterHub in k8s with our internal OAuth

In my case, I developed an GET API (denoted as /base_url/sample) protected via @tornado.web.authenticate which is supposed to be called directly from browser

Behaviour would be tricky if jupyterLab pod isn't yet spawned, the behaviour would be like this.

  1. Hub noticed that server/pod is not yet spawned, thus redirect user to hub's home page /${prefix}/hub/home
  2. User select correct profile to spawn server
  3. After spawn, user would be redirected to /base_url/sample with 403 error, the reason is that user is redirect but /oauth_callback is not yet requested, thus, user's oauth_client_id is not yet set in cookie

Is there any workarounds to avoid this behaviour with proper protection?

Copy link

welcome bot commented Apr 15, 2024

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

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

No branches or pull requests

1 participant