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 usage and references #1262

Open
jim-krueger opened this issue May 13, 2024 · 10 comments
Open

Remove SecurityManager usage and references #1262

jim-krueger opened this issue May 13, 2024 · 10 comments
Assignees
Milestone

Comments

@jim-krueger
Copy link
Contributor

The SecurityManager has been deprecated in JDK 11 (I believe) and removed in JDK 18+. The JAkarta Rest APIs should be cleaned to removed all usage and references going forward.

For sure these API's a affected and possibly more:

  • jakarta/ws/rs/sse/FactoryFinder.java
  • jakarta/ws/rs/ext/RuntimeDelegate.java
  • jakarta/ws/rs/ext/FactoryFinder.java
  • jakarta/ws/rs/client/FactoryFinder.java
  • jakarta/ws/rs/client/ClientBuilder.java
@jamezp
Copy link
Contributor

jamezp commented May 13, 2024

FWIW it has not yet been removed, but you have to explicitly enable it. It was deprecated in 17 with https://openjdk.org/jeps/411. It does however still work if you explicitly enable it.

AFAIK there is not an explicit version set for it to be removed in.

That said, it's been removed from the Jakarta EE 11 Platform specification jakartaee/platform#551.

All that said, addressing this in 5.0 makes sense to me.

@jim-krueger
Copy link
Contributor Author

Thanks for the clarification James.

@ivargrimstad
Copy link
Member

As pointed out by Guru in https://www.eclipse.org/lists/rest-dev/msg00314.html, there may be need to address this in a service release prior to 5.0 depending on your timeline. For reference, the Security Manger is proposed to be permanently disabled in Java SE 24.

JEP 486: Permanently Disable the Security Manager
https://openjdk.org/jeps/486

@tjwatson
Copy link
Member

tjwatson commented Nov 8, 2024

JEP 486 says:

Retain the Security Manager API in this release, so that maintainers of existing code that depends upon it have time to migrate away.

What breaks in 4.x API if the references to the Security Manager are not removed? Looks like all references in the API of rest does are optional behavior only if there is a SecurityManager enabled. JEP 486 only prevents a SecurityManger from being enabled, it does not remove the actual SecurityManager class and its other related APIs.

Seems like a fine thing to do for a 5.0 release.

@jamezp
Copy link
Contributor

jamezp commented Nov 8, 2024

I replied to the email, but I agree that I see no reason to do a service release for this. This seems fine for 5.0, but I see no reason to remove it for 4.0.

@jim-krueger
Copy link
Contributor Author

This would not be possible anyway. As Emily Jiang states in the email chain:
Not a service release. Service release is not allowed to do any api changes. Only the removal of TCKs is allowed. Thanks Emily

@jansupol
Copy link
Contributor

jansupol commented Nov 8, 2024

+1 for 5.0

@tjwatson
Copy link
Member

tjwatson commented Nov 8, 2024

Not a service release. Service release is not allowed to do any api changes. Only the removal of TCKs is allowed. Thanks Emily

I agree this isn't needed for a point release of 4.x, but I consider it a bug fix vs. an actual API change since all the changes would be internal to the body of the methods and would not change the API signatures. But the "bug fix" isn't fixing any actual problem because the security manager APIs will remain in the next Java release. It is not until we get another JEP that pushes for the final removal of all the security manager APIs that this becomes a problem. At that point it would be a required bug fix so that the API JARs for 4.x could be used on the version of java that finally removes the security manager APIs.

@mkarg
Copy link
Contributor

mkarg commented Nov 9, 2024

Following JEP 14's tip-and-tail model, I am +1 for removing all references to SecurityManager in 5.0 but not earlier releases.

@arjantijms
Copy link
Contributor

arjantijms commented Nov 21, 2024

Just wondering, consider the opposite situation:

Some people from the team did a service release and actually removed the security manager references (it's almost trivial to do so)

Would y'all actually want to revert that then, and do yet another service release to bring the security manager back?

@mkarg mkarg self-assigned this Dec 21, 2024
@mkarg mkarg moved this to In progress in Jakarta REST 5.0 Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress
Development

No branches or pull requests

7 participants