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

multi user: canonical username #487

Open
oliver-sanders opened this issue Aug 22, 2023 · 3 comments
Open

multi user: canonical username #487

oliver-sanders opened this issue Aug 22, 2023 · 3 comments

Comments

@oliver-sanders
Copy link
Member

On some systems, it might be possible for a user to authenticate using multiple different user names.

This is fine, however, for multi-user setups it may make it hard for users to access other users servers because the user name you authenticate with is what Jupyter Hub configures the configurable-http-proxy to use for accessing your server.

E.G. If a user can authenticate as either:

  • usera
  • usera.some.domain

Then the URL to their server would be either:

For these setups it would be advantageous to have a canonical user name to avoid the confusion.

Ideas:

  • Scan Jupyter docs, if we're lucky there may be a configuration somewhere?
  • Subclass the authenticator?
  • Pre-populate user records in the DB?
@oliver-sanders oliver-sanders transferred this issue from cylc/cylc-flow Aug 24, 2023
@oliver-sanders
Copy link
Member Author

This has been observed to cause issues with the Cylc authorization layer.

@oliver-sanders
Copy link
Member Author

It looks like JupterHub has an interface for this, providing you are able to map aliases onto the "canonical" username.

https://jupyterhub.readthedocs.io/en/4.1.3/reference/authenticators.html#normalize-usernames

@oliver-sanders
Copy link
Member Author

The pam_normalize_username option does the trick!

https://jupyterhub.readthedocs.io/en/4.1.3/reference/api/auth.html#jupyterhub.auth.PAMAuthenticator.pam_normalize_username

This "round trips" the username going from username to uid to username.

The remainder of this issue is about documentation. We should probably collect this, along with other configurations into a list of recommended configurations or something of the ilk?

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

No branches or pull requests

1 participant