When running a Policy Server, when a user tries to login through a Custom Authentication Scheme, the login process fails and the Policy Server reports the error:
[1371084/140243659372288][Mon Nov 15 2021 17:10:39][SmAuthServer.cpp:364][INFO][sm-Server-02760] Initialized authentication scheme mySamlAuthScheme
[1371084/140243659372288][Mon Nov 15 2021 17:10:39][SmAuthSamlJNI.cpp:532][ERROR][sm-FedServer-00520] Error caught JNI Exception: SamlValidator (Pass 1):
Caught unknown exception or error: java.lang.NoClassDefFoundError:
Could not initialize class sun.security.ec.SunEC - Stacktrace: java.lang.NoClassDefFoundError:at com.netegrity.smkeydatabase.api.XMLSignatureApacheTxmImpl.<clinit>
(XMLSignatureApacheTxmImpl.java:109)
The error:
java.lang.InternalError
at sun.security.ec.SunEC.initialize(Native Method)
at sun.security.ec.SunEC.access$000(SunEC.java:49)
at sun.security.ec.SunEC$1.run(SunEC.java:61)
at sun.security.ec.SunEC$1.run(SunEC.java:58)
at java.security.AccessController.doPrivileged(Native Method)
is related to a known issue on Redhat 6 openjdk package as per this bug (1)(2).
smps.log :
[1371084/140243596433152][Mon Nov 15 2021 17:10:28][SmJVMSupport.cpp:278][INFO][sm-JavaApi-01030] SmJVMSupport: Using the following JRE: /usr/lib/jvm/jre-1.8.0-openjdk.x86_64
[1371084/140243627902720][Mon Nov 15 2021 17:10:36][SmAuthServer.cpp:335][INFO][sm-Server-02750] Loaded authentication scheme myOtherCustomAuthScheme. myCustomAuthScheme authentication scheme
[1371084/140243627902720][Mon Nov 15 2021 17:10:38][AssertionGenerator.java][ERROR][sm-FedServer-00090] AssertionHandler process() throws exception: njava.lang.InternalError
at sun.security.ec.SunEC.initialize(Native Method)
at sun.security.ec.SunEC.access$000(SunEC.java:49)
at sun.security.ec.SunEC$1.run(SunEC.java:61)
at sun.security.ec.SunEC$1.run(SunEC.java:58)
at java.security.AccessController.doPrivileged(Native Method)
[...]
at com.ca.sso.smcrypto.bcfipsimpl.SmCryptoBCFIPSProvider.<clinit>(SmCryptoBCFIPSProvider.java:56)
at com.ca.sso.smcrypto.provider.SmCryptoProviderFactory.getInstance(SmCryptoProviderFactory.java:37)
at com.ca.sso.smcrypto.SmCryptoFacade.<clinit>(SmCryptoFacade.java:35)[1371084/140243659372288][Mon Nov 15 2021 17:10:39][SmAuthServer.cpp:364][INFO][sm-Server-02760] Initialized authentication scheme mySamlAuthScheme
[1371084/140243659372288][Mon Nov 15 2021 17:10:39][SmAuthSamlJNI.cpp:532][ERROR][sm-FedServer-00520] Error caught JNI Exception: SamlValidator (Pass 1): Caught unknown exception or error:
java.lang.NoClassDefFoundError: Could not initialize class sun.security.ec.SunEC -
Stacktrace: java.lang.NoClassDefFoundError: Could not initialize class sun.security.ec.SunEC
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[...]
at com.ca.sso.smcert.bc.BCCertImpl.<clinit>(BCCertImpl.java:62)
at com.ca.sso.smcert.SMCertFactory.<clinit>(SMCertFactory.java:42)[1371084/140243659372288][Mon Nov 15 2021 17:10:40][SmAuthSamlJNI.cpp:532][ERROR][sm-FedServer-00520] Error caught JNI Exception: SamlValidator (Pass 1):
Caught unknown exception or error: java.lang.NoClassDefFoundError: Could not initialize class com.netegrity.smkeydatabase.api.XMLSignatureApacheTxmImpl - Stacktrace: java.lang.NoClassDefFoundError: Could not initialize class com.netegrity.smkeydatabase.api.XMLSignatureApacheTxmImpl
at com.netegrity.ps.auth.saml.Saml2ValidatorTxm.smAuthenticate(Saml2ValidatorTxm.java:434)
at com.netegrity.ps.auth.saml.SamlValidator.smAuthenticate(Unknown Source)
Make the OS package up to date and insure that openjdk package provided by RedHat is a least 1.8.0.91-5.b14;