Details
-
Enhancement
-
Resolution: Won't Do
-
Major
-
None
-
2.0.0.Alpha4
-
None
Description
Quarkus uses GraalVM static initialization capability to perform native image optimization during the build of a native image.
Quarkus uses wildfly-elytron-realm-token library to implements OAuth2 authentication, in this library the OAuth2IntrospectValidator needs an initialized SSLContext at class initialization time (inside it's constructor), but GraalVM forbid to instantiate an SSLContext at static initilization time (it should not be present in the snapshoted heap).
I propose to allow a lazily initialization of the SSLContext in case no SSLContext is provided to OAuth2IntrospectValidator, this will allow to workaround the issue in native mode.
You can follow this discussion on the Quarkus side with a proposed implementation: https://github.com/quarkusio/quarkus/pull/5768
I can propose a PR on wildfly-elytron with a fix. This will slightly modify the current behaviour as it will no longuer be necessary to provide a SSLContext: if none is provided we will use the default one.