You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to use the GSS context for kerberos token verification.
The normal gradlew run is working correctly with micronaut and I am able to authenticate the token
But , not able to do it in the native Image
Using the latest version of GraalVM can resolve many issues.
Hi , @oubidar-Abderrahim ,
When we are running the micronaut application, using ./gradlew run , we are able to get the GSS context and authenticate the token
But when creating a native executable using ./gradlew nativeCompile
args used in build.gradle
21:28:18.451 [default-nioEventLoopGroup-1-4] ERROR i.m.http.server.RouteExecutor - Unexpected error occurred: null
java.lang.NullPointerException: null
at java.security.jgss@21.0.2/sun.security.jgss.GSSContextImpl.acceptSecContext(GSSContextImpl.java:339)
at java.security.jgss@21.0.2/sun.security.jgss.GSSContextImpl.acceptSecContext(GSSContextImpl.java:303)
Code :
import org.ietf.jgss.GSSContext;
import org.ietf.jgss.GSSCredential;
import org.ietf.jgss.GSSException;
import org.ietf.jgss.GSSManager;
import org.ietf.jgss.GSSName;
GSSManager gssManager = GSSManager.getInstance();
GSSContext gssContext = gssManager.createContext((GSSCredential)null); Not able to set context here
Describe the Issue
I wanted to use the GSS context for kerberos token verification.
The normal gradlew run is working correctly with micronaut and I am able to authenticate the token
But , not able to do it in the native Image
Using the latest version of GraalVM can resolve many issues.
GraalVM Version
OpenJDK Runtime Environment GraalVM CE 21.0.2+13.1
Operating System and Version
linux
Diagnostic Flag Confirmation
-H:ThrowMissingRegistrationErrors=
flag.Run Command
./gradlew nativeCompile
Expected Behavior
Gsscontext should be initalized
Actual Behavior
Steps to Reproduce
buildArgs.add('--verbose')
buildArgs.add('--strict-image-heap')
buildArgs.add('--add-opens java.base/java.lang=ALL-UNNAMED') //for reflection
buildArgs.add('--enable-native-access')
buildArgs.add('-Dsun.security.jgss.native=true')
buildArgs.add('-H:AdditionalSecurityProviders=sun.security.jgss.SunProvider')
buildArgs.add('-H:IncludeResourceBundles=sun.security.util.Resources')
buildArgs.add('-H:+EnableSecurityServicesFeature')
Additional Context
No response
Run-Time Log Output and Error Messages
No response
The text was updated successfully, but these errors were encountered: