Skip to content
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

Remove SecurityManager #111

Open
2 tasks
reta opened this issue Dec 9, 2021 · 4 comments
Open
2 tasks

Remove SecurityManager #111

reta opened this issue Dec 9, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@reta
Copy link

reta commented Dec 9, 2021

It has been announced a while ago that SecurityManager is going to be phased out from the JDK. The first step, the deprecation of the SecurityManager (JEP-411), has been landed in JDK 17 and issues the following warnings on OpenSearch builds or server startup:

WARNING: System::setSecurityManager will be removed in a future release

The JDK 18 pushes it even further and now fails on startup (see please https://bugs.openjdk.java.net/browse/JDK-8270380), running OpenSearch builds or server on JDK 18 EA fails with:

Caused by: java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release
	at java.base/java.lang.System.setSecurityManager(System.java:416)

What is the problem? What is preventing you from meeting the requirements?
The OpenSearch primary protection mechanism against plugins abuse or misuse is built on top of SecurityManager. It is very likely, it is going to be removed from the JDK-19+.

What are you proposing? What do you suggest we do to solve the problem or improve the existing situation?
There is no alternative or replacement for the SecurityManager. One of the options is to just drop it, it might be considered risky but combined with Plugin Sandbox (see please [1], [2]) it may sounds like a viable option.

What are your assumptions or prerequisites?
It would be great to have Plugin Sandbox design (and ideally, implementation) finalized.

What are remaining open questions?
Basically, the main question is to drop or to replace (bytecode instrumentation? custom classloaders? java agent?).

OpenSearch

Plugins

  • TODO: open issue for each plugin once the decision is made

[1] opensearch-project/OpenSearch#1572
[2] opensearch-project/OpenSearch#1422

@reta
Copy link
Author

reta commented Dec 9, 2021

@dblock done, sorry but cannot add labels to it, whenever you have time please

@nknize
Copy link

nknize commented Dec 9, 2021

I suspect the surface area of this will be quite large. I'd be okay targeting 3.0.0?

@nknize nknize added enhancement New feature or request untriaged labels Dec 9, 2021
@reta
Copy link
Author

reta commented Dec 13, 2021

@nknize we could mark it as 2.0.0 but make a decision to postpone to 3.0.0 if indeed we are not ready

@dblock dblock removed the untriaged label Dec 14, 2021
@dblock
Copy link
Member

dblock commented Dec 14, 2021

I'm not creating a 3.0 label yet, but I removed untriaged. Thanks!

@dblock dblock changed the title [PROPOSAL] Consider removing SecurityManager moving forward Remove SecurityManager Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants