Skip to content

update jupyterhub user url#862

Merged
consideRatio merged 1 commit intodask:mainfrom
minrk:jupyterhub-auth
Feb 3, 2025
Merged

update jupyterhub user url#862
consideRatio merged 1 commit intodask:mainfrom
minrk:jupyterhub-auth

Conversation

@minrk
Copy link
Copy Markdown
Contributor

@minrk minrk commented Feb 3, 2025

use standard /api/user instead

/authorizations/token/{token} is deprecated since jupyterhub 2.0 in 2021, superseded by /api/user in 0.8 in 2017.

@minrk

This comment was marked as outdated.

/api/user added in 0.8 in 2017

/authorizations/token deprecated since 2.0 in 2021
Copy link
Copy Markdown
Collaborator

@consideRatio consideRatio left a comment

Choose a reason for hiding this comment

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

Thank you @minrk and welcome as a code contributor to dask-gateway! ❤️ 🎉

@consideRatio consideRatio merged commit a9ed31c into dask:main Feb 3, 2025
url = f"{self.jupyterhub_api_url}/user"

kwargs = {
"headers": {"Authorization": "token %s" % self.jupyterhub_api_token},
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Notably, jupyterhub_api_token is entirely not needed by JupyterHubAuth. With this implementation, dask-gateway technically doesn't need to be registered as a jupyterhub service, since it makes no use of the jupyterhub API as itself. That would only really be needed if the gateway began applying full oauth to protect dashboard pages, which appear to currently only be protected by the unguessable cluster names.

@minrk minrk deleted the jupyterhub-auth branch February 3, 2025 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants