Re: Storing JNDI binding password using encryption

2017-07-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Alex, On 7/19/17 3:53 PM, Alex O'Ree wrote: > The jar file is in /tomcat/lib. The class is super simple > > package org.redacted; public class JNDIRealmExt extends JNDIRealm{ > @Override public String getConnectionPassword(){ return >

Re: Storing JNDI binding password using encryption

2017-07-19 Thread Alex O'Ree
The jar file is in /tomcat/lib. The class is super simple package org.redacted; public class JNDIRealmExt extends JNDIRealm{ @Override public String getConnectionPassword(){ return Utility.decrypt(connectionPassword); } } server.xml looks like this ldap://localhost:389; userBase="..."

Re: Storing JNDI binding password using encryption

2017-07-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Alex, On 7/19/17 1:53 PM, Alex O'Ree wrote: > On Wed, Jul 19, 2017 at 12:09 PM, Mark Thomas > wrote: >> On 19/07/17 16:22, Alex O'Ree wrote: >>> Assuming I had access to a reversible encryption mechanism and >>> wanted to store

Re: Storing JNDI binding password using encryption

2017-07-19 Thread Alex O'Ree
Thanks Mark I tried just extend the JDNI Realm class and overriding getConnectionPassword but it doesn't appear that my code ever called, even those my fully qualified classname is listed in the realm xml element. Any ideas? On Wed, Jul 19, 2017 at 12:09 PM, Mark Thomas wrote:

Re: Storing JNDI binding password using encryption

2017-07-19 Thread Mark Thomas
On 19/07/17 16:22, Alex O'Ree wrote: > Assuming I had access to a reversible encryption mechanism and wanted > to store the JNDI binding password in an encrypted form by extending > the JNDIRealm class, which method should i override to encrypt the > password stored in server.xml on the fly? You

Storing JNDI binding password using encryption

2017-07-19 Thread Alex O'Ree
Assuming I had access to a reversible encryption mechanism and wanted to store the JNDI binding password in an encrypted form by extending the JNDIRealm class, which method should i override to encrypt the password stored in server.xml on the fly?