2011-05-02 62 views
2

我試圖使用Oracle TDE與下面的連接字符串連接到JDBC數據源:試圖啓用JDBC數據源Oracle透明數據加密

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); 
+1

透明數據加密不需要對連接進行任何配置更改;你似乎指的是網絡數據加密,這是不同的。 – 2011-05-02 19:35:12

回答

0

我店與Oracle網絡加密10克的經驗是,它的工作通過使服務器端單獨這種變化:

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_CLIENTaccepted,加密連接將被創建。