I need to enable oracle SQL*Net encryption for my database connection (oracle thin driver).
I have added the following properties to my hibernate.properties:
Code:
hibernate.connection.sqlnet.encryption_client = required
hibernate.connection.sqlnet.crypto_seed=XXXX
hibernate.connection.sqlnet.encryption_types_client=(RC4_40)
hibernate.connection.sqlnet.crypt-checksum_client = required
hibernate.connection.sqlnet.cypto_checksum_types_client = (MD5)
These parameters work with non-hibernate pooled JNDI connections under JBoss.
When I connect using hibernate (straight JDBC, not pooled), the connection is successful, but tcpdump on the 1521 port shows an unencrypted session.
I am using a mixture of .xml configuration and .properties, but according to the log (below) the properties are being used from both locations.
Any ideas? Relevent configuration excerpts are below.
Hibernate version: 3.0.5
Mapping documents:Code:
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="show_sql">false</property>
<property name="use_outer_join">true</property>
<property name="connection.username">XXXX</property>
<property name="connection.password">XXXX</property>
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="connection.url">jdbc:oracle:thin:@XXXX:1521:XXXX</property>
Code between sessionFactory.openSession() and session.close(): N/A
Full stack trace of any exception that occurs: N/A
Name and version of the database you are using: Oracle9i Enterprise Edition Release 9.2.0.7.0
The generated SQL (show_sql=true): N/A
Debug level Hibernate log excerpt:Code:
using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@XXXX:1521:XXXX
connection properties: {sqlnet.crypt-checksum_client=required, user=XXXX, password=XXXX, sqlnet.cypto_checksum_types_client=(MD5), sqlnet.crypto_seed=XXXX, sqlnet.encryption_types_client=(RC4_40), sqlnet.encryption_client=required}
RDBMS: Oracle, version: Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production
JDBC driver: Oracle JDBC driver, version: 10.1.0.2.0