Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-3854 Make it build & work on JDK9
  3. WFLY-4236

vault.bat doesn't work with JDK 9-ea

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Major Major
    • 10.1.0.CR1, 10.1.0.Final
    • 9.0.0.Beta1
    • Security
    • None

      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:

      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
      
      *******************************************
      *******************************************
      

      Then I invoked vault.bat, which was failing:

      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
      

              tomazcerar Tomaž Cerar (Inactive)
              juergen.zimmermann Juergen Zimmermann (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: