OHDSI / Arachne

Arachne Data Node web application
Apache License 2.0
1 stars 1 forks source link

Data node admin password truncated upon setup #28

Closed anthonysena closed 5 months ago

anthonysena commented 5 months ago

After starting up Arachne via Docker, I was unable to log in with the default credentials. I connected to the Docker container running PostgreSQL and found that the password was truncated. See below:

arachne_datanode=# SELECT password FROM users;
 password
----------
 $2a$10
(1 row)

Updating the password fixes the issue:

arachne_datanode=# \x
Expanded display is on.
arachne_datanode=# SELECT password FROM users;
-[ RECORD 1 ]----
password | $2a$10

arachne_datanode=# UPDATE users SET password = '$2a$10$JrltmCF6zqvfdpZTYOTM0uByU1Cx9C3X0x0iRQFqlXX3bTOEsWJae' where id = 1;
UPDATE 1
arachne_datanode=# SELECT password FROM users;
-[ RECORD 1 ]----------------------------------------------------------
password | $2a$10$JrltmCF6zqvfdpZTYOTM0uByU1Cx9C3X0x0iRQFqlXX3bTOEsWJae
konstjar commented 5 months ago

The password's hash is passed incorrectly from the env file via docker-compose. https://docs.docker.com/compose/environment-variables/env-file/#syntax

gorodonoff commented 5 months ago

Fixed by pull request https://github.com/OHDSI/Arachne/pull/39 "password" --> 'password'