ibm-messaging / mq-container

Container images for IBM® MQ
Apache License 2.0
247 stars 186 forks source link

Can't log into web console unless MQ_DEV=true #557

Open sichapman opened 5 months ago

sichapman commented 5 months ago

(As of 9.3.5.0-r2)

I don't want the default objects created as they clash with what we add ourselves so usually set MQ_DEV=false.

However with the latest image, trying to log in to the web console using the password I set in the environment variables gives a Login failed. Enter a valid user ID and password. error. The logs show

2024-04-15T08:21:32.363Z CWWKS3005E: A configuration exception has occurred. No UserRegistry implementation service is available.  Ensure that you have a user registry configured.

2024-04-15T08:21:32.385Z FFDC1015I: An FFDC Incident has been created: "com.ibm.ws.security.registry.RegistryException: CWWKS3005E: A configuration exception has occurred. No UserRegistry implementation service is available.  Ensure that you have a user registry configured. com.ibm.ws.security.authentication.jaas.modules.UsernameAndPasswordLoginModule 116" at ffdc_24.04.15_08.21.32.0.log

If I set MQ_DEV=true it works fine (the web console anyway), but it doesn't feel right that this should be necessary, and it didn't used to be.

vgavinash commented 5 months ago

@sichapman, please note that this dependency was deliberately introduced since the dev users (both app & admin) apply to both the qmgr and the web server, and so for entirity, both need configurations available in the default objects. The related check happens at line - https://github.com/ibm-messaging/mq-container/blob/master/cmd/runmqserver/main.go#L176

However I can suggest you a way out, 1) You can do your own web configuration if required Or 2) You can comment out the check for MQ_DEV in the above said line and re-build the container. This will let you login to MQ console using the admin user and MQ_APP_PASSWORD.

Tagging @arthurbarr for any further comments.

Thanks, Avinash