I’m doing a test deployment for one of our researchers and think I have all the components talking to one another, but I cannot create the first admin user.
I’ve deployed everything via docker compose and am using Apache rather than traefik to proxy connections, in order to have Shibboleth protection on the server.
When I go to https://(devhost)/api/researcher and log in with admin:admin, I get a “403.no-such-credentials” error, and no new password is generated in the log, as Testing the LAMP Platform | LAMP Platform says should happen. (/api is proxied to the server container on port 3000)
The logs only show
lamp-server-server-1 | GET /researcher 401 - 1.738 ms
lamp-server-server-1 | GET /researcher 403 - 11.403 ms
The test database is working, but if I look at the “mindlamp” database in mongo db, there is only a single collection called “delete_me”. running db.delete_me.drop() in mongosh and restarting the docker services did not cause the normal collections to magically appear.
Here are the containers I have running, from a single compose file:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
86a619ecba16 mongo "docker-entrypoint.s…" 5 days ago Up About an hour 127.0.0.1:27017->27017/tcp lamp-server-mongo-1
2a0d0438395d mongo-express "/sbin/tini -- /dock…" 5 days ago Up About an hour 127.0.0.1:8081->8081/tcp lamp-server-mongo-express-1
a0f5e4df07e8 ghcr.io/bidmcdigitalpsychiatry/lamp-server:2022 "docker-entrypoint.s…" 5 days ago Up About an hour (healthy) 127.0.0.1:3000->3000/tcp lamp-server-server-1
4b31293b4b43 ghcr.io/bidmcdigitalpsychiatry/lamp-dashboard:2023 "/docker-entrypoint.…" 5 days ago Up About an hour (healthy) 127.0.0.1:8000->80/tcp lamp-server-dashboard-1
f627d3076063 redis "docker-entrypoint.s…" 5 days ago Up About an hour 127.0.0.1:6379->6379/tcp lamp-server-redis-1
f97f2c56746d nats "/nats-server --conf…" 5 days ago Up About an hour 127.0.0.1:4222->4222/tcp, 127.0.0.1:8222->8222/tcp, 6222/tcp lamp-server-nats-1
Am I missing a component here?
How is the production database supposed to be generated?
Could I create a new user in MongoDB instead of the web API interface?
The admin password should be generated by the lamp-server service. In your post I can only see one line, it looks like you’ve only captured a portion of the service logs. Could you print multiple lines and check again?
Can you send a copy of your docker-compose file for the “server” and “dashboard” services? (passwords redacted)
The two logs lines for “GET /researcher” are the only ones that appear in the log on login, and are repeated whether I use the Apache proxy, or connect directly to port 3000. Using ‘user:password@localhost:3000’ with curl skips the 401 error and just gives the 403, but at no point does a password generation happen in the log. I’ve stopped and rebuilt the container a few times and there’s no change in the logged data.
2024-01-23T19:36:46.202960275Z GET / 200 - 8.985 ms
2024-01-23T19:37:16.273677702Z GET / 200 - 5.852 ms
2024-01-23T19:37:46.349817439Z GET / 200 - 6.171 ms
2024-01-23T19:37:54.269642358Z GET /researcher 403 - 9.921 ms
2024-01-23T19:38:16.413598503Z GET / 200 - 6.072 ms
2024-01-23T19:38:46.489804242Z GET / 200 - 6.045 ms
2024-01-23T19:39:16.564054945Z GET / 200 - 6.099 ms
(The 200s are the Apache proxy’s heartbeat check.)
Here’s the docker-compose file. I tried unsuccessfully to use password files in a couple places rather than having to keep them in the config, so those have been commented out along with the traefik container options.
How did you update the admin password? The steps are to choose an admin password (ex: testpassword), encrypt it, then insert the encrypted string into the test.credential collection of the mongo database. Afterward, you would use “testpassword” to log-in (not the encrypted string) via the sign-in page.
I haven’t actually updated the password. I’m using the initially-generated password as extracted and decrypted from the database. This works on API access, but not the dashboard.
I stopped the docker services, completely wiped out the data volume, and started again. I got a new admin password from the server startup, was able to create a researcher in the API, but once again fail to log in at the dashboard.
However, with the console open this time, I’m noticing that I’m getting a lot of 404s from the dashboard service, notably /service-worker.js
And what happens if you log-in using the auto-generated password (without doing any encryption/decryption, just copy paste where it says “Administrator Password”) into our dashboard. at dashboard.lamp.digital (i.e. dont deploy your own)?
Can you please try it with traefik first and let us know if that works.
-John
PLEASE NOTE: This message is intended for the use of the person to whom it is addressed. It may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, your use of this message for any purpose is strictly prohibited. If you have received this communication in error, please delete the message and notify the sender so that we may correct our records. See our web page at http://www.bilh.org for a full directory of Beth Israel Lahey Health sites, staff, services and career opportunities.
If I change the server address in the dashboard login screen to my dev host, I get 404s both via the proxy and direct to the container, where going to your server I get 403/401.