JDK-8047789 : auth.login.LoginContext needs to be updated to work with modules
  • Type: Enhancement
  • Component: security-libs
  • Sub-Component: javax.security
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2014-06-23
  • Updated: 2023-12-06
  • Resolved: 2015-04-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b60Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8173014 :  
Description
LoginContext needs to be re-examined to see how it will work with module boundaries. It currently uses Core Reflection to invoke the handler/callback and this will require adjustments to work for the case that the handler is itself in a named module.

Here's an example error when running the JCK with a prototype build:

<Server> Authentication failed: unable to access LoginModule: Class javax.security.auth.login.LoginContext (module java.base) can not access a member of class com.sun.security.auth.module.Krb5LoginModule (module jdk.security.auth) with modifiers "public"

where the underlying error is an IllegalAccessException bring thrown by Class#newInstance because jdk.security.auth is not readable to java.base.

Comments
URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/e571b36aa08c User: lana Date: 2015-04-15 22:02:04 +0000
15-04-2015

URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/e571b36aa08c User: weijun Date: 2015-04-10 01:32:22 +0000
10-04-2015

release notes: After this change, besides including the necessary methods (initialize, login, logout, commit, abort), any login module must implement the LoginModule interface. Otherwise a LoginException will thrown when the login module is used.
24-03-2015

Changing this to P2 as it is blocking issues in the JMX area.
19-03-2015

[~alanb] How can I reproduce the failure now? Any special repo to build?
17-01-2015