Getting Invalid secret key format when starts up the server or accessing to a vault in JBoss EAP
Issue
-
Exception thrown or Elytron unable to initialize:
Caused by: java.io.IOException: Invalid secret key format at com.sun.crypto.provider.JceKeyStore.engineLoad(JceKeyStore.java:856) at java.security.KeyStore.load(KeyStore.java:1445) at org.picketbox.util.KeyStoreUtil.getKeyStore(KeyStoreUtil.java:201) at org.picketbox.util.KeyStoreUtil.getKeyStore(KeyStoreUtil.java:151) at org.picketbox.plugins.vault.PicketBoxSecurityVault.getKeyStore(PicketBoxSecurityVault.java:688) ... 11 more
or
Caused by: java.io.IOException: Invalid secret key format at com.sun.crypto.provider.JceKeyStore.engineLoad(JceKeyStore.java:856) at java.security.KeyStore.load(KeyStore.java:1445) [rt.jar:1.8.0_191-1-redhat] at org.wildfly.security.credential.store.impl.KeyStoreCredentialStore.load(KeyStoreCredentialStore.java:859) [wildfly-elytron-1.6.1.Final-redhat-00001.jar:1.6.1.Final-redhat-00001] ... 11 more
-
An
ObjectInputFilter REJECTED
error has been thrown when trying to create aVault
:WFLYSEC0056: Initializing Vault May 01, 2018 11:13:49 AM java.io.ObjectInputStream filterCheck INFO: ObjectInputFilter REJECTED: null, array length: -1, nRefs: 1, depth: 1, bytes: 70, ex: n/a WFLYSEC0059: Exception encountered:WFLYSEC0045: Exception encountered:
-
NullPointerException
in log:Caused by: org.jboss.security.vault.SecurityVaultException: java.lang.NullPointerException at org.picketbox.plugins.vault.PicketBoxSecurityVault.init(PicketBoxSecurityVault.java:192) at org.jboss.as.security.vault.RuntimeVaultReader.createVault(RuntimeVaultReader.java:82) [jboss-as-security-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14] ... 11 more Caused by: java.lang.NullPointerException at org.picketbox.plugins.vault.PicketBoxSecurityVault.checkAndConvertKeyStoreToJCEKS(PicketBoxSecurityVault.java:527) at org.picketbox.plugins.vault.PicketBoxSecurityVault.init(PicketBoxSecurityVault.java:189) ... 12 more
-
Server doesn't start because it can't find the vault file.
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6
- 7
- Red Hat JBoss Data Grid
- 7.1.2
- JDK that has included non-public JDK-8189997 including:
- JDK 1.8.0_171+ (OpenJDK or Oracle JDK)
- JDK 1.7.0_181+ (OpenJDK or Oracle JDK)
- Using Elytron Credential Stores or the JBoss EAP Vault
- Often after version migration or java update
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.