Encrypting your JBoss datasource password (specific for LiveCycle).

| No Comments
LiveCycle ES2 uses encryption to store the datasource information. Here is a quick how-to create your own encrypted datasource:

STEP 1)
In a cmd window, navigate to "C:\Adobe\Adobe LiveCycle ES2\jboss"
Perform this command on the sesrver:
java -cp lib/jboss-common.jar;lib/jboss-jmx.jar;server/lc_turnkey/lib/jbosssx.jar;server/lc_turnkey/lib/jboss-jca.jar org.jboss.resource.security.SecureIdentityLoginModule YOUR_PASSWORD_HERE
Don't forget to swap out "YOUR_PASSWORD_HERE" and then copy the resultant, encrypted password for use in Step 3. 

STEP 2)
Edit and copy the mydatasource-ds.xml datasource file to: "C:\Adobe\Adobe LiveCycle ES2\jboss\server\lc_turnkey\deploy".
You should only have to change "YOUR_DATABASE_SERVER_NAME_HERE" if your particular datasource is for an Oracle XE database.


STEP 3)
Add this node to the very bottom (just above </policy> of "C:\Adobe\Adobe LiveCycle ES2\jboss\server\lc_turnkey\conf\login-config.xml"

</application-policy>
        <application-policy name="EncryptDBPassword_MY_ENCRYPTED_DS">
            <authentication>
                <login-module code="org.jboss.resource.security.SecureIdentityLoginModule" flag="required">
                    <module-option name="username">USER_NAME_HERE</module-option>
                    <module-option name="password">THE_ENCRYPTED_PASSWORD_FROM_STEP_1</module-option>
                    <module-option name="managedConnectionFactoryName">jboss.jca:name=ICCD_DS,service=LocalTxCM</module-option>
                </login-module>
            </authentication>
    </application-policy>

Change USER_NAME_HERE to the datasource username and THE_ENCRYPTED_PASSWORD_FROM_STEP_1 to the result of step 1.


You'll have to restart JBoss for the login-config.xml to take.

Leave a comment

Categories