InvalidKeyException while trying to store password in Tomcat Vault

Solution Verified - Updated -

Issue

  • We see the following exception while trying to store a password in Tomcat Vault:
org.apache.tomcat.vault.security.vault.SecurityVaultException: PBOX000128: Unable to encrypt data
        at org.apache.tomcat.vault.security.vault.PicketBoxSecurityVault.store(PicketBoxSecurityVault.java:266)
        at org.apache.tomcat.vault.VaultSession.addSecuredAttribute(VaultSession.java:224)
        at org.apache.tomcat.vault.VaultTool.execute(VaultTool.java:204)
        at org.apache.tomcat.vault.VaultTool.main(VaultTool.java:80)
        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:312)
        at org.jboss.modules.Main.main(Main.java:460)
Caused by: java.security.InvalidKeyException: Illegal key size or default parameters
        at javax.crypto.Cipher.checkCryptoPerm(Cipher.java:1026)
        at javax.crypto.Cipher.implInit(Cipher.java:801)
        at javax.crypto.Cipher.chooseProvider(Cipher.java:864)
        at javax.crypto.Cipher.init(Cipher.java:1249)
        at javax.crypto.Cipher.init(Cipher.java:1186)
        at org.apache.tomcat.vault.util.EncryptionUtil.encrypt(EncryptionUtil.java:120)
        at org.apache.tomcat.vault.security.vault.PicketBoxSecurityVault.store(PicketBoxSecurityVault.java:261)
        ... 9 more

Environment

  • JBoss Enterprise Web Server (JWS) 3.1.0+
    • Tomcat Vault

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In