Is there a way to bring the encryption features of Oracle advanced
Security into Spring JDBC dataSource configuation?
The DBA told me to pass the following arguments into the connection on client side.
sqlnet.encryption_client = requested
sqlnet.encryption_types_client = (RC4_128)
sqlnet.crypto_checksum_client = requested
sqlnet.crypto_checksum_types_client = (MD5)
According to the Oracle Documentation, encryption can be set for thin driver, by adding the arguments to the OracleConnection via good old java.util.Properties.
However, I can not find a way doing this with my Spring dataSource.xml configuration.
The dataSource bean works fine:
<bean id="dataSource"
class="oracle.jdbc.pool.OracleDataSource" destroy-method="close">
<property name="URL" value="${datasource.url}" />
<property name="user" value="${datasource.user}" />
<property name="password" value="${datasource.password}" />
<property name="connectionCachingEnabled" value="true"/>
</bean>
But unfortunately the required properties aren't understood and bring the following Exception
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'encryption_client' of bean class [oracle.jdbc.pool.OracleDataSource]
<property name="encryption_client" value="${datasource.encryption_client}"/>
<property name="encryption_types_client" value="${datasource.encryption_types_client}"/>
<property name="crypto_checksum_client" value="${datasource.crypto_checksum_client}"/>
<property name="crypto_checksum_types_client" value="${datasource.crypto_checksum_types_client}"/>
- In the Spring documentation I see that there are only a handful attributes mentioned.
- Looking again at the example in the Oracle Documentation, the properties are set like this
OracleDataSource ods = new OracleDataSource();ods.setProperties(prop)
... but the API hasn't asetProperties()method.
(https:// docs.oracle.com/cd/E18283_01/appdev.112/e13995/oracle/jdbc/pool/OracleDataSource.html)
I'm quite confused :(
Any help or hint is highly appreciated.
TL;TR
Is there any solution for handing over these Oracle encryption properties to Spring?