(2.12) [FIXED] Leaf node without auth doesn't default to global account #7116
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A leafnode could connect to a server without any credentials and be assigned to the global account. Even if the server we're connecting to requires auth, the leafnode connection would bypass that and connect it to the global account, even if a global account is not configured and nobody is listening in that account.
This is not an issue for decentralized auth or when using auth callout, as they will reject if respectively no valid JWT or credentials are passed. In other setups we need to also respect authentication and require the leafnode to have the proper credentials. This resolves confusing situations where accounts and authentication is defined, but a leafnode is able to connect without creds, connects to the global account, and proceeds to not be usable at all.
Either the leafnode requires proper credentials to be passed when connecting, or
no_auth_user
can be used to allow the leafnode to not specify credentials.Resolves #6972
Signed-off-by: Maurice van Veen github@mauricevanveen.com