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

Fixed users in apiserver.conf receiving 401 (Unauthorized) #1262

Closed
ruipimentel opened this issue May 7, 2024 · 2 comments
Closed

Fixed users in apiserver.conf receiving 401 (Unauthorized) #1262

ruipimentel opened this issue May 7, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@ruipimentel
Copy link

Describe the bug

When trying to log in to a self hosted ClearML server with a user specified in the documentation, I kept receiving HTTP error 401 (Unauthorized).

I could only get the new users to work after a full reinstall (following this page until step 11) and creating /opt/clearml/config/apiserver.conf with hashed passwords BETWEEN steps 11 and 12, that is, before docker-compose -f /opt/clearml/docker-compose.yml up -d.

To reproduce

  1. Begin by following the server installation page, as recommended by this page.
  2. Proceed to the (next recommended page)[https://clear.ml/docs/latest/docs/deploying_clearml/clearml_server_config#using-hashed-passwords] to set up some hashed passwords in /opt/clearml/config/apiserver.conf (e.g., jane with password 123456). Don't forget to restart ClearML server.
  3. Run tail -f /opt/clearml/logs/apiserver.log to monitor when the server is done re-initializing, and to check whether the users are successfully created.
  4. Proceed to http://localhost:8080 on your web browser.
  5. Press F12 and activate the Network tab in Developer Tools.
  6. Try to sign in with one of the new credentials. In my case, I've got error "Unauthorized (invalid credentials) (failed to locate provided credentials)".
    6.1 This can also be tested using curl -u jane:123456 http://localhost:8008/auth.login
  7. Once I was able to successfully set up user jane with password 123456 while tweaking users and passwords from step 2, then repeating steps 3 to 6. But it was only temporary, and after the next tweak, even jane couldn't log in anymore.

Expected behaviour

In my opinion, ClearML server should successfully accept a new password after restarting with new settings in apiserver.conf. While it does seem to TRY to do that, apparently it fails unless installation is fresh.

Environment

  • Server type (self hosted, http://localhost:8080)
  • ClearML SDK Version: clearml PIP package not installed
  • ClearML Server Version: WebApp: 1.15.0-472 • Server: 1.15.0-472 • API: 2.29
  • Python Version: Python 3.10.12
  • OS (Windows \ Linux \ Macos): Linux Ubuntu 22.04.3 LTS (Jammy Jellyfish)
@ruipimentel ruipimentel added the bug Something isn't working label May 7, 2024
@ainoam
Copy link
Collaborator

ainoam commented May 7, 2024

@ruipimentel Sounds like the same issue discussed in #1257, and also in clearml-server/#240.

clearml-server v1.15.1 should address this.

@ruipimentel
Copy link
Author

Indeed! I'm sorry, the keywords I used to search for existing issues totally missed this one.

Looking forward to the fix.

Thank you!

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