Why is JBoss EAP throwing a java.lang.SecurityException: JBAS013322: Vault is not initialized error?

Solution Verified - Updated -

Issue

  • Why is JBoss EAP 6 throwing a java.lang.SecurityException: JBAS013322: Vault is not initialized error?
[Server:server-two] 15:47:08,881 INFO  [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 56) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be pasivated.
[Server:server-one] 15:47:08,963 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 55) JBAS014612: Operation ("enable") failed - address: ([
[Server:server-one]     ("subsystem" => "datasources"),
[Server:server-one]     ("data-source" => "MySqlDS")
[Server:server-one] ]): java.lang.SecurityException: JBAS013322: Vault is not initialized
[Server:server-one]     at org.jboss.as.security.vault.RuntimeVaultReader.retrieveFromVault(RuntimeVaultReader.java:98)
[Server:server-one]     at org.jboss.as.server.RuntimeExpressionResolver.resolvePluggableExpression(RuntimeExpressionResolver.java:45)
[Server:server-one]     at org.jboss.as.controller.ExpressionResolverImpl.resolveExpressionsRecursively(ExpressionResolverImpl.java:58) [jboss-as-controller-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
[Server:server-one]     at org.jboss.as.controller.ExpressionResolverImpl.resolveExpressions(ExpressionResolverImpl.java:40) [jboss-as-controller-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
[Server:server-one]     at org.jboss.as.controller.ModelControllerImpl.resolveExpressions(ModelControllerImpl.java:455) [jboss-as-controller-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
[Server:server-one]     at org.jboss.as.controller.OperationContextImpl.resolveExpressions(OperationContextImpl.java:689) [jboss-as-controller-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
[Server:server-one]     at org.jboss.as.controller.ParallelBootOperationContext.resolveExpressions(ParallelBootOperationContext.java:283) [jboss-as-controller-7.1.2.Final-redhat-1.jar:7.1.2.Final-redhat-1]
[Server:server-one]     at org.jboss.as.connector.subsystems.datasources.DataSourceModelNodeUtil.getResolvedStringIfSetOrGetDefault(DataSourceModelNodeUtil.java:338)
[Server:server-one]     at org.jboss.as.connector.subsystems.datasources.DataSourceModelNodeUtil.from(DataSourceModelNodeUtil.java:151)
[Server:server-one]     at org.jboss.as.connector.subsystems.datasources.DataSourceEnable.addServices(DataSourceEnable.java:152)
  • In the host.xml configuration, the following vault data has been configured:
 `"/host=master/core-service=vault:add(vault-options={"KEYSTORE_URL" => "/opt/vault/vault.keystore","KEYSTORE_PASSWORD" => "MASK-3y28rCZlcKR","KEYSTORE_ALIAS" => "vault","SALT" => "12438567","ITERATION_COUNT" => "50","ENC_FILE_DIR" => "/opt/vault/"}"` 

However, the Vault is not initialized issue as seen in following error is received, when trying to start a JBoss domain instance in production environment.

java.lang.SecurityException: JBAS013322: Vault is not initialized
  • The issue java.lang.SecurityException: JBAS013322: Vault is not initialized when using vault with the following configuration for datasource:
        <security>
          <user-name>databaseuser</user-name>
            <password>{VAULT::ds_ExampleDS::password_name::1}</password>
        </security>
  • JBoss EAP 7 fails with below error message :
java.lang.SecurityException: WFLYSRV0230: Vault is not initialized

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x
    • 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content