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

Enabling NativeAuthenticator removes all logins including admins #791

Open
MikkoFinellEdupower opened this issue Jan 6, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@MikkoFinellEdupower
Copy link

Bug description

After Enabling the authenticator no users can log in anymore. My admins username and password results in "invalid username or password" and new users cannot login either because they would have to be approved by the admin apparently, who cannot login anymore.

Expected behaviour

I expected new users to be able to register, and I expected the pre-existing admin accounts to still be able to login like before and to approve users from the control panel.

Actual behaviour

Admins or any pre existing users can not login any more.

How to reproduce

  1. Follow the install guide for Digital Ocean.
  2. (Optional) Enabled HTTPs
  3. Logged in with my original admin user, created the password at the login screen.
  4. (Optional) create some users, admin or otherwise, from the control panel.
  5. (Optional) I logged in and out multiple times with admin and other users to make sure 100% I had the passwords stored correctly in a password manager.
  6. Enable user signup. https://tljh.jupyter.org/en/latest/howto/auth/nativeauth.html#enabling-the-authenticator
  7. None of the users can login anymore now.
@MikkoFinellEdupower MikkoFinellEdupower added the bug Something isn't working label Jan 6, 2022
@welcome
Copy link

welcome bot commented Jan 6, 2022

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! 🎉

@mtav
Copy link

mtav commented Sep 12, 2022

You should be able to fix this by:

  • adding c.NativeAuthenticator.import_from_firstuse = True in a configuration file in /opt/tljh/config/jupyterhub_config.d/

  • or ideally by using: sudo tljh-config set auth.NativeAuthenticator.import_from_firstuse True

Unfortunately, it does not work properly at the moment. There are two problems:

  1. tljh-config does not work properly to configure NativeAuthenticator (Can't get NativeAuthenticator to work #295) do to a problem with setting sets/tuples/lists/etc (Using tljh-config set for properties which require tuples, lists, dicts etc. #709, tljh-config set with a list as value  #549) -> See workaround suggested here.
  2. NativeAuthenticator does not properly import the FirstUseAuthenticator database. -> I submitted a fix for it here.

Central issue where this seems to all be worked on: #264

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants