-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Update topo {Get,Create}Keyspace to prevent invalid keyspace names #12732
Update topo {Get,Create}Keyspace to prevent invalid keyspace names #12732
Conversation
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
If a new flag is being introduced:
If a workflow is added or modified:
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
Signed-off-by: Andrew Mason <[email protected]>
26e8805
to
689ab9c
Compare
Signed-off-by: Andrew Mason <[email protected]>
Signed-off-by: Andrew Mason <[email protected]>
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.
Had some questions and suggestions, but otherwise it LGTM.
Signed-off-by: Andrew Mason <[email protected]>
changelog/17.0/17.0.0/summary.md
Outdated
|
||
Prior to v17, it was possible to create a keyspace with invalid characters, which would then be inaccessible to various cluster management operations. | ||
|
||
Now, the TopoServer's `GetKeyspace` and `CreateKeyspace` methods return an error if given an invalid name. |
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.
This seems overly broad. We don't know what other invalid characters people can provide that break in unpredictable ways. The only one we are disallowing is /
.
I would remove the first two sentences altogether and just leave the last one.
Signed-off-by: Andrew Mason <[email protected]>
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.
👍 👍
#### <a id="keyspace-name-validation"> Keyspace name validation in TopoServer | ||
|
||
Prior to v17, it was possible to create a keyspace with invalid characters, which would then be inaccessible to various cluster management operations. | ||
|
||
Keyspace names may no longer contain the forward slash ("/") character, and TopoServer's `GetKeyspace` and `CreateKeyspace` methods return an error if given such a name. | ||
|
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.
Should we be backporting this change? This doesn't look like a bug-fix but a validation on the input received.
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.
It does sound like a bug fix to me, keyspaces can be inaccessible prior to v17.0.0
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.
Left one comment, otherwise it looks good to me.
The DCO check is failing.
This reverts commit 5354d4f. Signed-off-by: Andrew Mason <[email protected]>
Signed-off-by: Andrew Mason <[email protected]>
Co-authored-by: Florent Poinsard <[email protected]> Signed-off-by: Andrew Mason <[email protected]>
4c0b190
to
512ebf4
Compare
It was the revert commit, I rebased to rewrite from there-forward, should be good now! |
I was unable to backport this Pull Request to the following branches: |
…itessio#12732) * Update topo {Get,Create}Keyspace to prevent invalid keyspace names Signed-off-by: Andrew Mason <[email protected]> * embarrassing Signed-off-by: Andrew Mason <[email protected]> * docs, release notes Signed-off-by: Andrew Mason <[email protected]> * only validate, do not correct Signed-off-by: Andrew Mason <[email protected]> * broader restrictions via allow-list Signed-off-by: Andrew Mason <[email protected]> * Revert "broader restrictions via allow-list" This reverts commit 5354d4f. Signed-off-by: Andrew Mason <[email protected]> * tighten up release notes scope Signed-off-by: Andrew Mason <[email protected]> * Update go/vt/topo/keyspace.go Co-authored-by: Florent Poinsard <[email protected]> Signed-off-by: Andrew Mason <[email protected]> --------- Signed-off-by: Andrew Mason <[email protected]> Co-authored-by: Florent Poinsard <[email protected]>
…ce names (#12732) (#12771) * Update topo {Get,Create}Keyspace to prevent invalid keyspace names (#12732) * Update topo {Get,Create}Keyspace to prevent invalid keyspace names Signed-off-by: Andrew Mason <[email protected]> * embarrassing Signed-off-by: Andrew Mason <[email protected]> * docs, release notes Signed-off-by: Andrew Mason <[email protected]> * only validate, do not correct Signed-off-by: Andrew Mason <[email protected]> * broader restrictions via allow-list Signed-off-by: Andrew Mason <[email protected]> * Revert "broader restrictions via allow-list" This reverts commit 5354d4f. Signed-off-by: Andrew Mason <[email protected]> * tighten up release notes scope Signed-off-by: Andrew Mason <[email protected]> * Update go/vt/topo/keyspace.go Co-authored-by: Florent Poinsard <[email protected]> Signed-off-by: Andrew Mason <[email protected]> --------- Signed-off-by: Andrew Mason <[email protected]> Co-authored-by: Florent Poinsard <[email protected]> * update notes and comments Signed-off-by: Andrew Mason <[email protected]> --------- Signed-off-by: Andrew Mason <[email protected]> Co-authored-by: Florent Poinsard <[email protected]>
Description
What it says on the tin. Note that any method that calls
GetKeyspace
will be affected by this (almost a good search)Related Issue(s)
Checklist
Deployment Notes