Benjamin,

I implemented your suggestion.  I think that I am fairly close, yet running
into some problems.  

When I attempt to connect to use the datasource, I receive ORA-01017:
invalid username/password; logon denied.  I think the problem is because I
pull the password for Jasypt into a separate jasypt.properties file that
will be accessible only to the user running Karaf.  However I don't know how
to fix that.

The following blueprint shows what I have for my datasource. 

Would you have any other advice?



<?xml version="1.0" encoding="UTF-8"?>

<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";
        xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0";
        xmlns:enc="http://karaf.apache.org/xmlns/jasypt/v1.0.0";>

  
  <ext:property-placeholder>
    <ext:location>file:/oracle/jasypt.properties</ext:location>
  </ext:property-placeholder>

  <enc:property-placeholder>
    <enc:encryptor
class="org.jasypt.encryption.pbe.StandardPBEStringEncryptor">
      <property name="config">
        <bean class="org.jasypt.encryption.pbe.config.SimplePBEConfig">
  
          

          <property name="algorithm" value="${jasaypt.algorithm}" />
          <property name="password" value="${jasaypt.encryption.password}"
/>
        </bean>
      </property>
    </enc:encryptor>
  </enc:property-placeholder>

  <bean id="dataSource" class="oracle.jdbc.pool.OracleDataSource">
      <property name=&quot;URL&quot; value=&quot;&lt;url specified here>"/>
      <property name=&quot;user&quot; value=&quot;&lt;user name here>"/>
      <property name=&quot;password&quot; value=&quot;ENC(&lt;encrypted
value here>)" />
  </bean>
  
  <service interface="javax.sql.DataSource" ref="dataSource">
    <service-properties>
            <entry key="osgi.jndi.service.name" value="jdbc/oracleds"/>
    </service-properties>
  </service>
</blueprint>



--
View this message in context: 
http://karaf.922171.n3.nabble.com/Karaf-Datasource-Passwords-tp4048219p4048251.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Reply via email to