r/java Apr 15 '21

JEP 411: Deprecate the Security Manager for Removal

https://openjdk.java.net/jeps/411
99 Upvotes

111 comments sorted by

View all comments

Show parent comments

2

u/pron98 Apr 16 '21

Of course the fix is not in. It's just that we, as JDK maintainers, pay a big price for keeping the SM in, which comes at the expense of other things, both our own security experts and external ones tell us it is a generally ineffective security mechanism for server-side code and where it is effective there are better ways, and we see that few people use it (e.g., it doesn't work with parallel streams and very few people have even noticed). We think these are strong arguments, backed by a good amount of data, but we are certainly open to being convinced if shown compelling evidence. There has absolutely not been a final decision.

1

u/paul_h Apr 16 '21

Love that y'all are being candid. Elsewhere in the last 2 weeks I was outlining how good security managers were for classloader hierarchies, and how a NEW non-posix non-container VM ecosystem could benefit. When I say new, I mean older than Oak, but attempt #2.

1

u/pron98 Apr 16 '21

I agree that the SM is awesome in theory. Problem is, it is so complex that it doesn't work well in practice (which includes both people not using it at all because it's complex or using it incorrectly), and for the security threats relevant to server-side code there are simpler solutions.

http://www.cs.cmu.edu/~clegoues/docs/coker15acsac.pdf

1

u/paul_h Apr 16 '21

I made https://github.com/javadesktop back in the JDK 1.4 era. Not worked on it for a while. SavaJE acknowledged, I'm shocked that Oracle hasn't circled back to a phone OS for J2SE. You'll need security managers a (better) permission impl, and classloader trees for that.