-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[FIXED/CHANGED] Reject server/cluster/gateway names with spaces #5676
Conversation
Having cluster name with spaces in the context of a leaf node could cause problems when a subscription on the leaf node would be propagated in the cluster's hub. Since when a gateway is specified the name of the gateway needs to match the name of the cluster, the restriction of "no spaces" is added to gateway name. Finally, in the case of the leafnode, if no cluster name is specified the server name is used, so also applying the restriction to the server name. Resolves #5633 Signed-off-by: Ivan Kozlovic <[email protected]>
My one concern is that this could break existing deployments since this adds a new constraint (in terms of rolling upgrade and servers failing to start). If even names have spaces, there may be deployments where the unintended behavior is not observed. The question is whether the risk qualifies for inclusive into a 2.10.x patch or we kick to 2.11 with a note on the new constraint? |
@bruth So what do we do? We could limit this PR to simply reject incoming LEAF that send a cluster name with spaces, but don't have the other code/checks. It could still "break" deployments in that leaf nodes that used to be able to connect to a hub may now fail, but again, the issue with the spaces would cause the hub some issues too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks Ivan.
Whitespace in a leafnode server name, JetStream domain, etc. could cause issues. As discussed in nats-io/nats-server#5676. Signed-off-by: reubenninan <[email protected]>
Whitespace in a leafnode server name, JetStream domain, etc. could cause issues. As discussed in nats-io/nats-server#5676. Signed-off-by: reubenninan <[email protected]>
Whitespace in a leafnode server name, JetStream domain, etc. could cause issues. As discussed in nats-io/nats-server#5676. Signed-off-by: reubenninan <[email protected]>
Whitespace in a leafnode server name, JetStream domain, etc. could cause issues. As discussed in nats-io/nats-server#5676. Signed-off-by: reubenninan <[email protected]>
Whitespace in a leafnode server name, JetStream domain, etc. could cause issues. As discussed in nats-io/nats-server#5676. Signed-off-by: reubenninan <[email protected]>
Whitespace in a leafnode server name, JetStream domain, etc. could cause issues. As discussed in nats-io/nats-server#5676. Signed-off-by: reubenninan <[email protected]>
Whitespace in a leafnode server name, JetStream domain, etc. could cause issues. As discussed in nats-io/nats-server#5676. Signed-off-by: reubenninan <[email protected]>
Whitespace in a leafnode server name, JetStream domain, etc. could cause issues. As discussed in nats-io/nats-server#5676. Signed-off-by: reubenninan <[email protected]>
Whitespace in a leafnode server name, JetStream domain, etc. could cause issues. As discussed in nats-io/nats-server#5676. Signed-off-by: reubenninan <[email protected]>
Whitespace in a leafnode server name, JetStream domain, etc. could cause issues. As discussed in nats-io/nats-server#5676. Signed-off-by: reubenninan <[email protected]>
Whitespace in a leafnode server name, JetStream domain, etc. could cause issues. As discussed in nats-io/nats-server#5676. Signed-off-by: reubenninan <[email protected]>
Whitespace in a leafnode server name, JetStream domain, etc. could cause issues. As discussed in nats-io/nats-server#5676. Signed-off-by: reubenninan <[email protected]>
Having cluster name with spaces in the context of a leaf node could cause problems when a subscription on the leaf node would be propagated in the cluster's hub.
Since when a gateway is specified the name of the gateway needs to match the name of the cluster, the restriction of "no spaces" is added to gateway name.
Finally, in the case of the leafnode, if no cluster name is specified the server name is used, so also applying the restriction to the server name.
Resolves #5633
Signed-off-by: Ivan Kozlovic [email protected]