iris-web icon indicating copy to clipboard operation
iris-web copied to clipboard

[BUG] IRIS_ADM_USERNAME not enforced

Open juadde opened this issue 3 years ago • 1 comments

Describe the bug When set, IRIS_ADM_USERNAME is not enforced, resulting on an administrator with the username administrator instead of set username.

To Reproduce Steps to reproduce the behavior:

  1. Get latest IRIS
  2. Copy .env.model to .env
  3. Uncomment IRIS_ADM_USERNAME line and set it to something else that administrator (admin for example)
  4. Run docker-compose up
  5. See creation of administrator instead of admin in the logs docker logs iriswebapp_app (You can now login with user administrator and password XXX)
  6. Try to login at https://localhost:443 with admin username (or the set username if different), it fails
  7. Try to login at https://localhost:443 with administrator username, it succeed

Expected behavior I expect the administrator to be created with the username set in the .env file.

Server:

  • OS: Ubuntu 22
  • Docker: 20.10.21, build 20.10.21-0ubuntu1~22.04.2
  • IRIS Version: 2.0.2

Desktop:

  • OS: Ubuntu 22
  • Browser: Firefox 112.0
  • IRIS Version: 2.0.2

Additional context This feature will be useful for LDAP authentication.

juadde avatar Apr 19 '23 08:04 juadde

Hi @juadde

Indeed there's an issue in the configuration.py. The IRIS_ADM_USERNAME isn't propagated in the app config. It will be fixed in the next release 👍

whikernel avatar Apr 21 '23 14:04 whikernel