2

我正在尝试使用 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);
4

1 回答 1

0

我的商店使用 Oracle 网络加密的 10g 经验是,它仅通过在服务器端进行此更改来工作

SQLNET.ENCRYPTION_SERVER = required
SQLNET.ENCRYPTION_TYPES_SERVER = (list of acceptable crypto algorithms)
SQLNET.CRYPTO_SEED = [my seed value]
SQLNET.CRYPTO_CHECKSUM_SERVER = required
SQLNET.CRYPTO_CHECKSUM_TYPES_SERVER = (list of acceptable crypto algorithms)

作为 和 的默认值,SQLNET.ENCRYPTION_CLIENTSQLNET.CRYPTO_CHECKSUM_CLIENT创建accepted一个加密连接。

于 2011-05-02T19:47:36.847 回答