CASSANDRA-21670 Remove Cassandra's requirement for the Java security manager - #5139
Open
JeremiahDJordan wants to merge 1 commit into
Open
JeremiahDJordan wants to merge 1 commit into
JeremiahDJordan wants to merge 1 commit into
Conversation
Add a selectable bytecode sandbox for user-defined functions. Preserve Java Management Extensions subject propagation on newer runtimes. patch by Jeremiah Jordan; reviewed by <Reviewer Here> for CASSANDRA-##### Assisted-by: Codex:GPT-6
smiklosovic
self-requested a review
September 15, 2026 15:44
smiklosovic
reviewed
Sep 15, 2026
| # INFO level | ||
| # UDFs (user defined functions) are disabled by default. | ||
| # As of Cassandra 3.0 there is a sandbox in place that should prevent execution of evil code. | ||
| # Cassandra disables user-defined functions (UDFs) by default. |
Contributor
There was a problem hiding this comment.
change this in cassandra_latest.yaml too
smiklosovic
reviewed
Sep 15, 2026
| For example, add `-Dcassandra.udf.security_mechanism=sandbox` to the JVM options to select the sandbox. | ||
| Use a JDK version that Cassandra supports. | ||
|
|
||
| The bytecode sandbox rejects restricted calls when Cassandra creates a function. |
Contributor
There was a problem hiding this comment.
This whole section feels like AI stuff. I can imagine the prompt "be concise as possible, no fluff" and this is the result :)
smiklosovic
reviewed
Sep 15, 2026
| * {@code securitymanager} requires it. | ||
| * With {@code securitymanager}, {@link #install()} fails on JDK 24 and later. | ||
| */ | ||
| public static boolean useSecurityManager() |
Contributor
There was a problem hiding this comment.
should be isUsingSecurityManager
This file contains hidden or 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
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.
Add a selectable bytecode sandbox for user-defined functions. Preserve Java Management Extensions subject propagation on newer runtimes.