-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
ccl/sqlproxyccl: validate cluster name before establishing connection #103479
Merged
craig
merged 1 commit into
cockroachdb:master
from
jaylim-crl:jay/230516-check-cluster-name
May 18, 2023
Merged
ccl/sqlproxyccl: validate cluster name before establishing connection #103479
craig
merged 1 commit into
cockroachdb:master
from
jaylim-crl:jay/230516-check-cluster-name
May 18, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jaylim-crl
force-pushed
the
jay/230516-check-cluster-name
branch
2 times, most recently
from
May 16, 2023 22:24
f77e31a
to
38fe485
Compare
jaylim-crl
force-pushed
the
jay/230516-check-cluster-name
branch
from
May 16, 2023 22:39
38fe485
to
440ec2a
Compare
jeffswenson
approved these changes
May 17, 2023
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
Previously, we were only validating cluster names when LookupTenantPods get called within the connector, which happens after the ACL check. The rationale behind that is that we didn't want a malicious actor who's iterating through all tenant IDs spinning up pods for them. The cluster name check ensures that the incoming connection knows something about the tenant. Now that we have introduced LookupTenant within the ACL logic, it is possible for a malicious actor to iterate through all the tenant IDs, and figure out which tenant IDs are in use (since it returns "connection refused" if the tenant exists). To address that, we will start validating cluster names before running the ACL check (i.e. at the start of the proxy handler) before proceeding. This ensures that we will return a NotFound error if the tenant doesn't exist, or there's a cluster name mismatch. At the same time, the clusterName parameter has been removed from LookupTenantPods since that is no longer needed. Release note: None Epic: none
jaylim-crl
force-pushed
the
jay/230516-check-cluster-name
branch
from
May 17, 2023 17:36
440ec2a
to
d5b3b01
Compare
TFTR! |
bors r=JeffSwenson |
Build succeeded: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Previously, we were only validating cluster names when LookupTenantPods get called within the connector, which happens after the ACL check. The rationale behind that is that we didn't want a malicious actor who's iterating through all tenant IDs spinning up pods for them. The cluster name check ensures that the incoming connection knows something about the tenant.
Now that we have introduced LookupTenant within the ACL logic, it is possible for a malicious actor to iterate through all the tenant IDs, and figure out which tenant IDs are in use (since it returns "connection refused" if the tenant exists). To address that, we will start validating cluster names before running the ACL check (i.e. at the start of the proxy handler) before proceeding. This ensures that we will return a NotFound error if the tenant doesn't exist, or there's a cluster name mismatch. At the same time, the clusterName parameter has been removed from LookupTenantPods since that is no longer needed.
Release note: None
Epic: none