I am trying to use Oracle TDE to connect to a JDBC data source with the following connection string:
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.1.101)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=SECUREDATA)))
Is there a way to specify JDBC properties such that Transparent Data Encryption is enabled for this connection?
http://www.orafaq.com/wiki/Network_Encryption#Thin_JDBC_client has some verbiage on how to do this, but due to the software architecture we currently have, I can pretty much only modify the data source connection string.
Thin JDBC client
In this case, sqlnet.ora file is not read and taken into account; we have to set
properties on the connection.
For example:
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Properties props = new Properties();
props.put("oracle.net.encryption_client", "accepted");
props.put("oracle.net.encryption_types_client", "RC4_128");
props.put("user", "XXX");
props.put("password", "YYY");
Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@myhost:1521:mySID", props);