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

authorisation: allow jupyter lab to work in standalone mode #558

Merged
merged 2 commits into from
Apr 4, 2024

Conversation

oliver-sanders
Copy link
Member

@oliver-sanders oliver-sanders commented Feb 16, 2024

Closes #556

Jupyter Lab authorisation is open by default, a curious choice, safe for regular usage, but it becomes a security hole when deploying via Jupyter Hub and allowing users to see each other's servers.

Since this is key to Cylc Hub deployment, and we don't want our users accidentally opening security holes (Cylc must have safe, sane and secure defaults), we override the default security policy to only authorizing the server owner to access Jupyter Lab.

Unfortunately, I forgot to add a necessary backdoor to this policy for token authenticated sessions (i.e. sessions that are not run through Jupyter Hub) where the bearer of the token has full permission over the server.

This means that at present, Jupyter Lab is blocked by default when the Cylc UI Server is launched as a token authenticated (i.e. standalone) server. This PR reinstates access for this situation and this situation only.

  • Requires through security testing both in standalone mode and multi-user mode.

Check List

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Applied any dependency changes to both setup.cfg (and conda-environment.yml if present).
  • Tests are included (manual security testing required).
  • CHANGES.md entry included if this is a change that can affect users
  • Cylc-Doc pull request opened if required at cylc/cylc-doc/pull/XXXX.
  • If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

Copy link
Member

@MetRonnie MetRonnie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, will approve once we have tested this

@MetRonnie
Copy link
Member

My approval is pending a changelog entry.

Also what about an entry for #570?

@oliver-sanders oliver-sanders requested review from markgrahamdawson and removed request for wxtim April 4, 2024 14:55
@MetRonnie MetRonnie merged commit 28adb74 into cylc:1.4.x Apr 4, 2024
4 of 6 checks passed
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

Successfully merging this pull request may close these issues.

jupyterlab: enable access in standalone mode
3 participants