Update topo {Get,Create}Keyspace to prevent invalid keyspace names#12732
Update topo {Get,Create}Keyspace to prevent invalid keyspace names#12732deepthi merged 8 commits intovitessio:mainfrom
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 <andrew@planetscale.com>
26e8805 to
689ab9c
Compare
Signed-off-by: Andrew Mason <andrew@planetscale.com>
Signed-off-by: Andrew Mason <andrew@planetscale.com>
mattlord
left a comment
There was a problem hiding this comment.
Had some questions and suggestions, but otherwise it LGTM.
Signed-off-by: Andrew Mason <andrew@planetscale.com>
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.
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 <andrew@planetscale.com>
changelog/17.0/17.0.0/summary.md
Outdated
There was a problem hiding this comment.
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.
It does sound like a bug fix to me, keyspaces can be inaccessible prior to v17.0.0
frouioui
left a comment
There was a problem hiding this comment.
Left one comment, otherwise it looks good to me.
The DCO check is failing.
This reverts commit 5354d4f. Signed-off-by: Andrew Mason <andrew@planetscale.com>
Signed-off-by: Andrew Mason <andrew@planetscale.com>
Co-authored-by: Florent Poinsard <35779988+frouioui@users.noreply.github.com> Signed-off-by: Andrew Mason <andrew@planetscale.com>
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 <andrew@planetscale.com> * embarrassing Signed-off-by: Andrew Mason <andrew@planetscale.com> * docs, release notes Signed-off-by: Andrew Mason <andrew@planetscale.com> * only validate, do not correct Signed-off-by: Andrew Mason <andrew@planetscale.com> * broader restrictions via allow-list Signed-off-by: Andrew Mason <andrew@planetscale.com> * Revert "broader restrictions via allow-list" This reverts commit 5354d4f. Signed-off-by: Andrew Mason <andrew@planetscale.com> * tighten up release notes scope Signed-off-by: Andrew Mason <andrew@planetscale.com> * Update go/vt/topo/keyspace.go Co-authored-by: Florent Poinsard <35779988+frouioui@users.noreply.github.com> Signed-off-by: Andrew Mason <andrew@planetscale.com> --------- Signed-off-by: Andrew Mason <andrew@planetscale.com> Co-authored-by: Florent Poinsard <35779988+frouioui@users.noreply.github.com>
…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 <andrew@planetscale.com> * embarrassing Signed-off-by: Andrew Mason <andrew@planetscale.com> * docs, release notes Signed-off-by: Andrew Mason <andrew@planetscale.com> * only validate, do not correct Signed-off-by: Andrew Mason <andrew@planetscale.com> * broader restrictions via allow-list Signed-off-by: Andrew Mason <andrew@planetscale.com> * Revert "broader restrictions via allow-list" This reverts commit 5354d4f. Signed-off-by: Andrew Mason <andrew@planetscale.com> * tighten up release notes scope Signed-off-by: Andrew Mason <andrew@planetscale.com> * Update go/vt/topo/keyspace.go Co-authored-by: Florent Poinsard <35779988+frouioui@users.noreply.github.com> Signed-off-by: Andrew Mason <andrew@planetscale.com> --------- Signed-off-by: Andrew Mason <andrew@planetscale.com> Co-authored-by: Florent Poinsard <35779988+frouioui@users.noreply.github.com> * update notes and comments Signed-off-by: Andrew Mason <andrew@planetscale.com> --------- Signed-off-by: Andrew Mason <andrew@planetscale.com> Co-authored-by: Florent Poinsard <35779988+frouioui@users.noreply.github.com>
Description
What it says on the tin. Note that any method that calls
GetKeyspacewill be affected by this (almost a good search)Related Issue(s)
Checklist
Deployment Notes