Tech Blog

Generate Railo DSN encrypted passwords

Posted At : September 7, 2011 7:19 AM

When dealing with scripted deployments to production environments it's often very worthwhile to be able to remove any dependencies on the GUI/Web interface and just edit the config files directly.

For a recent project we wanted to use Railo encrypted DSN's passwords in the railo-server.xml.

The only issue was that the encryption of the passwords was not documented as to how it works. A bit of digging around in the source code showed me how it was done and I've now made a simple page that will generate these encrypted passwords.

Benefits: - Can use encrypted passwords - Don't need to be able to see the production DB when creating the config file

So I can now generate encrypted passwords for railo without hooking my laptop railo instance up to the production db's. Nice.