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

Add authorization url that checks if the user is authorized to access jupyterhub #19

Merged
merged 2 commits into from
Oct 2, 2023

Conversation

mishaschwartz
Copy link
Collaborator

@mishaschwartz mishaschwartz commented Sep 26, 2023

Add an optional setting that can be used to check whether a user has permission to log in to juptyerhub.

After a user is logged in to Magpie, the MagpieAuthenticator will make a request to the provided URL and will allow the login if the response is "OK" (ie. < 400)

This should be used in combination with a jupyterhub provider setting in Magpie that can be queried through the /twitcher/ows/verify/ endpoints to enable/disable access to log in to jupyterhub for a specific user or group.

Example set up:

  • Configure Magpie so that when a user logs in to Magpie, the url http://my.domain.com//twitcher/ows/verify/jupyterhub will return a 200 response code when the user is allowed to log in to juptyerhub
  • set MagpieAuthenticator.authorization_url = "http://my.domain.com//twitcher/ows/verify/jupyterhub"

Copy link
Contributor

@tlvu tlvu left a comment

Choose a reason for hiding this comment

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

LGTM. But in the PR description I think you meant allow and not reject the login if the verify response is "OK"? :D

@mishaschwartz mishaschwartz merged commit 8f8d0d0 into master Oct 2, 2023
@mishaschwartz mishaschwartz deleted the add-auth-check branch October 2, 2023 18:35
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.

2 participants