How to configure multiple datasources using encrypted password on JBoss?

Solution Verified - Updated -

Issue

  • How to configure multiple datasources using encrypted password on JBoss?

  • How would we configure the datasources as they are all using the same account?

  • Do we have to provide many managedConnectionFactoryName options in the same login-module? (Example 1)

  • Do we have to provide the managedConnectionFactoryName option with many references to datasources? (Example 2)

  • Would we need to do this configuration for every new datasource?

    • Example 1

      ...
      <application-policy name="SOAPlatformEncrypted">
          <authentication>
              <login-module code="org.jboss.resource.security.SecureIdentityLoginModule" flag="required">
                  <module-option name="username">soa</module-option>
                  <module-option name="password">xxx</module-option>
                  <module-option name="managedConnectionFactoryName">jboss.jca:name=DefaultDS,service=LocalTxCM</module-option>
                  <module-option name="managedConnectionFactoryName">jboss.jca:name=JmsDS,service=LocalTxCM</module-option>
                  <module-option name="managedConnectionFactoryName">jboss.jca:name=JBossESBDS,service=LocalTxCM</module-option>
                  <module-option name="managedConnectionFactoryName">jboss.jca:name=juddiDB,service=LocalTxCM</module-option>
                  <module-option name="managedConnectionFactoryName">jboss.jca:name=JbpmDS,service=LocalTxCM</module-option>
              </login-module>
          </authentication>
      </application-policy>
      ...
      
    • Example 2

      ...
      <application-policy name="SOAPlatformEncrypted">
          <authentication>
              <login-module code="org.jboss.resource.security.SecureIdentityLoginModule" flag="required">
                  <module-option name="username">soa</module-option>
                  <module-option name="password">xxx</module-option>
                  <module-option name="managedConnectionFactoryName">jboss.jca:name=DefaultDS/JmsDS/JBossESBDS/juddiDB/JbpmDS,service=LocalTxCM</module-option>               
              </login-module>
          </authentication>
      </application-policy>
      ...
      

Environment

  • JBoss Enterprise Application Platform (EAP) 5.x
  • Other products that is based on EAP

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
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.