Skip to content

[FLINK-36902] Remove support for FlinkSecurityManager #26491

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cushon
Copy link

@cushon cushon commented Apr 21, 2025

What is the purpose of the change

This change removes references to the Security Manager API, for compatibility with JDK 24 and newer versions. Support for the Security Manager permanently disabled in JDK 24.

Brief change log

  • usages of FlinkSecurityManager were removed
  • usages of -Djava.security.manager=allow were removed

Verifying this change

This change is already covered by existing tests.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no
  • The serializers: don't know
  • The runtime per-record code paths (performance sensitive): don't know
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: don't know
  • The S3 file system connector: don't know

Documentation

  • Does this pull request introduce a new feature? no

@flinkbot
Copy link
Collaborator

flinkbot commented Apr 21, 2025

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

} finally {
FlinkSecurityManager.unmonitorUserSystemExitForCurrentThread();
}
callMainMethod(mainClass, args);
Copy link
Contributor

Choose a reason for hiding this comment

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

The jira says it is to deprecate the FlinkSecurityManager, but the PR is removing it. It seems normal practise to deprecate prior to removing.

Copy link
Author

Choose a reason for hiding this comment

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

The JDK Security Manager APIs were deprecated in JDK 17 which was released in 2021, and it has been removed in JDK 24. This code doesn't build with DJK 24 and newer.

I'm not sure there's a great way to keep this functionality around in a deprecated state and support newer JDKs. It might be possible to do something with multi-release jars.

I guess another option would be to mark FlinkSecurityManager as deprecated, and then remove it in a later release, and wait until that later release for Flink to support JDK 24 and newer.

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

Successfully merging this pull request may close these issues.

3 participants