iris-web
iris-web copied to clipboard
[BUG] IRIS_ADM_USERNAME not enforced
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:
- Get latest IRIS
- Copy .env.model to .env
- Uncomment
IRIS_ADM_USERNAMEline and set it to something else that administrator (adminfor example) - Run
docker-compose up - See creation of administrator instead of admin in the logs
docker logs iriswebapp_app(You can now login with user administrator and password XXX) - Try to login at https://localhost:443 with
adminusername (or the set username if different), it fails - Try to login at https://localhost:443 with
administratorusername, 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.
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 👍