【发布时间】:2011-08-17 03:23:22
【问题描述】:
我正在尝试使用 Oracle TDE 通过以下连接字符串连接到 JDBC 数据源:
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.0.1.101)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=SECUREDATA)))
有没有办法指定 JDBC 属性,以便为此连接启用透明数据加密?
http://www.orafaq.com/wiki/Network_Encryption#Thin_JDBC_client 对如何执行此操作有些冗长,但由于我们目前拥有的软件架构,我几乎只能修改数据源连接字符串。
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);
【问题讨论】:
-
透明数据加密不需要对连接进行任何配置更改;您似乎指的是网络数据加密,这是不同的。