Skip to content

CASSANDRA-21670 Remove Cassandra's requirement for the Java security manager - #5139

Open
JeremiahDJordan wants to merge 1 commit into
apache:trunkfrom
JeremiahDJordan:CASSANDRA-21670-trunk
Open

JeremiahDJordan wants to merge 1 commit into
apache:trunkfrom
JeremiahDJordan:CASSANDRA-21670-trunk

Conversation

@JeremiahDJordan

Copy link
Copy Markdown
Contributor

Add a selectable bytecode sandbox for user-defined functions. Preserve Java Management Extensions subject propagation on newer runtimes.

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 smiklosovic changed the title Remove Cassandra's requirement for the Java security manager CASSANDRA-21670 Remove Cassandra's requirement for the Java security manager Sep 15, 2026
@smiklosovic
smiklosovic self-requested a review September 15, 2026 15:44
Comment thread conf/cassandra.yaml
# 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change this in cassandra_latest.yaml too

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole section feels like AI stuff. I can imagine the prompt "be concise as possible, no fluff" and this is the result :)

* {@code securitymanager} requires it.
* With {@code securitymanager}, {@link #install()} fails on JDK 24 and later.
*/
public static boolean useSecurityManager()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be isUsingSecurityManager

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants