#27 passphrase not readable from external file

v1.9.x
open
None
2
2014-01-24
2014-01-24
No

Hello -

I'm using jasypt in one of our apps.

I have the passphrase externalized in a properties file so it can be kept secure. Rest of the properties are in a different properties file including the encrypted passwords and they get loaded up through Spring. I'm observing that if i type the passphrase directly into the wired encryptor, the encryption works. But if i store it in the external file it throws EncryptionNotPossibleException. Below is my spring wiring. I'm wondering if this is a defect. Can you please help.

<bean id="propertyConfigurer" class="org.jasypt.spring3.properties.EncryptablePropertyPlaceholderConfigurer">
<constructor-arg ref="configurationEncryptor"/>
<property name="locations">
<list>
<value>classpath:passphrase.properties</value>
<value>classpath:app.properties</value>
</list>
</property>
</bean>

<bean id="bcProvider" class="org.bouncycastle.jce.provider.BouncyCastleProvider"/>

<bean id="configurationEncryptor" class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
<property name="algorithm" value="PBEWithMD5AndDES"/>
<property name="password" value="${passphrase}"/>
<property name="provider">
<ref bean="bcProvider"/>
</property>
</bean>

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks