-
Notifications
You must be signed in to change notification settings - Fork 3.9k
RABBITMQ_DEFAULT_USER / RABBITMQ_DEFAULT_PASS behavior continues to confuse users #7678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We do log an INFO message in this case: https://github.com/rabbitmq/rabbitmq-server/blob/main/deps/rabbit/src/rabbit.erl#L1066
Perhaps this needs to be called out in the documentation, or the above message needs to be more visible. But, I think that if someone specifies BOTH the env vars and the definitions file, the least-surprising action is to import everything specified. |
Let me chime in with a specific use case where both envs and definitions are desirable. So, my queue is deployed on two different servers - staging and production; I expect their passwords/users to be different for safety (developers could accidentally connect to a wrong queue, and different password is a good protection against it) I pass those thru docker compose from .env file. Now, I still would like my queues and exchanges pre-defined on deploy, which definitions file seems to be ideal for (we also don't care about envs there; queues and exchanges are the same) |
Does that mean that I'll be able to include environment variables into definitions, or that I'll be able to import different definition files depending on an environment variable? |
Fixes #7678 References: * #2384 * #2396 PR #2396 preserved the old behavior where definitions import took priority over the default data and environment data that may be present. This behavior continues to confuse users where they expect `RABBITMQ_DEFAULT_USER` / `RABBITMQ_DEFAULT_PASS` to be imported, especially if there is no `users` data in the definitions file. This PR allows default data and the environment to be imported first, then possibly overwritten by the definitions file.
Between environment variable support in latest Cuttlefish ( |
@michaelklishin as soon as a user specifies that definitions are to be loaded, then there is no other way to add users. You can't do it via the I think this is fine as long as it's clearly documented. This is the log message that is shown:
|
Uh oh!
There was an error while loading. Please reload this page.
Related issue:
Reproduction steps:
rabbitmq.conf
so that the path to the definitions file matches your environment. Notice that the definitions file does not define any users.main
:foobar
nor theguest
user is created:What does work:
The text was updated successfully, but these errors were encountered: