]
Tomaz Cerar reassigned WFLY-4236:
---------------------------------
Assignee: Tomaz Cerar (was: Darran Lofthouse)
vault.bat doesn't work with JDK 9-ea
------------------------------------
Key: WFLY-4236
URL:
https://issues.jboss.org/browse/WFLY-4236
Project: WildFly
Issue Type: Bug
Components: Security
Affects Versions: 9.0.0.Beta1
Environment: Windows 8.1, JDK 9-ea build 44
Reporter: Juergen Zimmermann
Assignee: Tomaz Cerar
I compiled the current WildFly snapshot with JDK 8u25 on Windows 8.1 box. To configure
the vault (for the database password) I switched to JDK 9 (early access, build 44). Then I
created a keystore which can be listed:
{code}
C:\>keytool -list -v -storetype jceks -keystore
C:\Zimmermann\wildfly-9.0.0.Alpha2-20150107\standalone\configuration\vault\vault.jceks
-storepass <mypwd>
Keystore-Typ: JCEKS
Keystore-Provider: SunJCE
Keystore enthält 1 Eintrag
Aliasname: vault
Erstellungsdatum: 09.01.2015
Eintragstyp: SecretKeyEntry
*******************************************
*******************************************
{code}
Then I invoked vault.bat, which was failing:
{code}
C:\>SET
VAULT_DIR=C:/Zimmermann/wildfly-9.0.0.Alpha2-20150107/standalone/configuration/vault
C:\>vault.bat -k %VAULT_DIR%/vault.jceks -a db-pass -x p -s ABCD1234 -p <mypwd>
-e %VAULT_DIR%/
=========================================================================
JBoss Vault Tool
JBOSS_HOME: "C:\Zimmermann\wildfly-9.0.0.Alpha2-20150107"
JAVA: "C:\Zimmermann\Java\jdk\bin\java"
JAVA_OPTS: ""
=========================================================================
Problem occurred:
java.lang.Exception: WFLYSEC0045: Exception encountered:
at
org.jboss.as.security.vault.VaultSession.initSecurityVault(VaultSession.java:192)
at
org.jboss.as.security.vault.VaultSession.startVaultSession(VaultSession.java:210)
at org.jboss.as.security.vault.VaultTool.execute(VaultTool.java:193)
at org.jboss.as.security.vault.VaultTool.main(VaultTool.java:83)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.jboss.modules.Module.run(Module.java:308)
at org.jboss.modules.Main.main(Main.java:483)
Caused by: org.jboss.security.vault.SecurityVaultException: java.lang.RuntimeException:
PBOX000140: Unable to get keystore
(C:/Zimmermann/wildfly-9.0.0.Alpha2-20150107/standalone/configuration/vault/vault.jceks)
at
org.picketbox.plugins.vault.PicketBoxSecurityVault.init(PicketBoxSecurityVault.java:210)
at
org.jboss.as.security.vault.VaultSession.initSecurityVault(VaultSession.java:189)
... 9 more
Caused by: java.lang.RuntimeException: PBOX000140: Unable to get keystore
(C:/Zimmermann/wildfly-9.0.0.Alpha2-20150107/standalone/configuration/vault/vault.jceks)
at
org.picketbox.plugins.vault.PicketBoxSecurityVault.getKeyStore(PicketBoxSecurityVault.java:691)
at
org.picketbox.plugins.vault.PicketBoxSecurityVault.init(PicketBoxSecurityVault.java:205)
... 10 more
Caused by: java.io.IOException: com.sun.crypto.provider.SealedObjectForKeyProtector from
[Module "org.picketbox:main" from local module loader @3e77a1ed (finder: local
module finder @3ffcd140 (roots:
C:\Zimmermann\wildfly-9.0.0.Alpha2-20150107\modules,C:\Zimmermann\wildfly-9.0.0.Alpha2-20150107\modules\system\layers\base))]
at com.sun.crypto.provider.JceKeyStore.engineLoad(JceKeyStore.java:842)
at java.security.KeyStore.load(KeyStore.java:1446)
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
{code}