-
Notifications
You must be signed in to change notification settings - Fork 40
Description
Is your feature request related to a problem? Please describe.
IT support and admins sometimes need to impersonate users to troubleshoot, provide support, or conduct training. Enabling it in managed deployments and development environments would allow administrators to use it securely within the Specify 7 docker container.
Describe the solution you'd like
Allow enabling the ALLOW_SUPPORT_LOGIN environment variable in the Dockerfile and configuration so admins can generate support login tokens. This should be set to True in specify_settings.py or in the docker-compose.yml file for managed deployments.
https://discourse.specifysoftware.org/t/allow-support-login-documentation/2838/1
Example configuration location:
specify7/specifyweb/settings/specify_settings.py
Lines 99 to 100 in 2148663
| ALLOW_SUPPORT_LOGIN = False | |
| SUPPORT_LOGIN_TTL = 300 |
Usage steps:
- Enter the running Specify 7 container:
docker exec -it specify7 /bin/bash - Run the support login command:
Replace
ve/bin/python manage.py support_login --username ${username}${username}with the desired account. - The generated token is valid for a time set by the
SUPPORT_LOGIN_TTLenvironment variable (e.g., 300 seconds).
Example output:The following token is valid for 300 seconds: /accounts/support_login/?token=1-1757106120-7394fa7d5ffc6f87fe8306d25c5b2c71b3f98942d9f9c46aea97f3eda725434b
- Navigate to
base_url+/accounts/support_login/?token=...to access the user's account.
Describe alternatives you've considered
- Temporarily resetting passwords and restoring the previous hash, which is time consuming and risky.
- Keeping support login disabled for all but development environments, requiring direct user intervention for troubleshooting.
- Relying on less secure or more manual methods for impersonation.
Additional context
Caution
This feature should be considered a security risk if exposed outside the container or to non-admin users. Only administrators with shell access to the container can use it, and it should be enabled only when necessary for support.
The token is time-limited and usage is logged.