LiveCycle - Encrypting Cleartext JBoss Data Source Passwords

| 3 Comments

DBAs and JBoss system administrators are weary of having the password to the LiveCycle database in cleartext in the data source configuration XML file. JBoss provides instructions here on how to use it in encrypt form.

1) Encrypt database password
The following command will encrypt the password "lc_password":
java -cp C:\Programs\jboss_es2\lib\jboss-common.jar;C:\Programs\jboss_es2\lib\jboss-jmx.jar;C:\Programs\jboss_es2\server\lc_mysql\lib\jbosssx.jar;C:\Programs\jboss_es2\server\lc_mysql\lib\jboss-jca.jar org.jboss.resource.security.SecureIdentityLoginModule lc_password.
Obviously, you should replace the paths to the JAR files with yours. In the above example, the JBoss configuration is "lc_mysql"
If successful, you should get a response like as follows:
Encoded password: -2d19d44d319c1d9e008fba5553e14ea0

2) Create new Application Policy
Edit the %JBOSS_HOME%\server\lc_mysql\conf\login-config.xml file and create a new application policy that would look something like this.

3) Configure data source with the new Application Policy
Replace the following:
<user-name>lc_db_usr</user-name>
<password>password</password>
with this:
<security-domain>EncryptDBPasswordAppPolicy</security-domain>
where "EncryptDBPasswordAppPolicy" is the name of the 'application policy' you created in %JBOSS_HOME%\server\\conf\login-config.xml

This has been tested to work with MySQL. Your mileage with Oracle, SQL Server etc may vary.

3 Comments

Hi,

I have just achieved this with Oracle. It's not obvious from the error messages you will get but the trick is that you will need to create three different security domain policies. These are to reflect the different jndi names used DefaultDS, IDP_DS and EDC_DS. The corresponding local-tx datasource would have to the correct one.

Nick

Hi Jayan,

Thanks for your post on how to remove the clear text passwords from adobe-ds.xml. I ran into a snag when I did it though. Your snippet includes the line
jboss.jca:service=LocalTxCM,name=DefaultDS

Note the part about name=DefaultDS. This won't work unless you specify the same data source name that's noted in adobe-ds.xml. Namely IDP_DS. There are two others as well, called EDC_DS and com.celequest.metadata.metaDatasource. I didn't bother with those. I assume the latter is for BAM, which I'm not using. Do you know what the other one is (EDC_DS)? Thanks.

Jared

Leave a comment

Pages

Powered by Movable Type 4.261

About this Entry

This page contains a single entry by Jayan Kandathil published on October 26, 2009 3:51 PM.

Handling assertion expiry in Service Invocation was the previous entry in this blog.

Configuring JBoss / LiveCycle to Autostart on SUSE Enterprise Linux is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.