-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
CASSANDRA-19385: ALTER ROLE WITH LOGIN=FALSE and REVOKE ROLE do not disconnect existing users #3706
Open
aratno
wants to merge
7
commits into
apache:trunk
Choose a base branch
from
aratno:CASSANDRA-19385-trunk
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Commits on Nov 22, 2024
-
WIP: Implement client-disconnection on authenticated user DROP or ALT…
…ER LOGIN = false It's straightforward to have the coordinator of the DROP / ALTER disconnect the impacted client, but non-coordinators don't have a direct path of finding out that a user has been impacted. The role update causes a write to system_auth.roles, and non-coordinators will pick up that change async when they refresh their RolesCache. It's important for this patch that non-coordinators also disconnect the impacted user, because we could be revoking the role due to account takeover or other risk. One approach to solve this is having all instances periodically check all their active connections, and disconnect impacted users. The active connection count default maximum is 10k, and the list of active connections is scanned for various metrics collection anyway. Another approach is to limit the maximum duration that any connection can be established, so users are required to re-authenticate periodically, like every 24h. This improves our security posture in other ways, and makes it easier to detect nodes that are added to the cluster but cannot be accessed by clients. For either approach, it would be helpful to have a JMX call that allows operators to disconnect users by name, particularly for handling account takeover scenarios.
Configuration menu - View commit details
-
Copy full SHA for 337604d - Browse repository at this point
Copy the full SHA 337604dView commit details -
Disconnect invalid roles on a cadence, on every node
Periodic disconnection would be useful for a few other reasons: - When using mTLS, clients with short-lived certificates that don't support live certificate reloading would be required to re-authenticate periodically - Security requirements that clients re-authenticate periodically, rather that depending on bounce schedules to enforce that
Configuration menu - View commit details
-
Copy full SHA for 7f88b2b - Browse repository at this point
Copy the full SHA 7f88b2bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 565bf81 - Browse repository at this point
Copy the full SHA 565bf81View commit details -
Configuration menu - View commit details
-
Copy full SHA for a0f2387 - Browse repository at this point
Copy the full SHA a0f2387View commit details -
Configuration menu - View commit details
-
Copy full SHA for 856ccdd - Browse repository at this point
Copy the full SHA 856ccddView commit details -
Configuration menu - View commit details
-
Copy full SHA for be6597f - Browse repository at this point
Copy the full SHA be6597fView commit details
Commits on Nov 23, 2024
-
Don't eagerly disconnect from ALTER coordinator, support config to di…
…sable invalid role disconnect, null handling
Configuration menu - View commit details
-
Copy full SHA for dee959c - Browse repository at this point
Copy the full SHA dee959cView commit details
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.