Use when connecting SQL Developer to the database with tcps.
Step-by-step guide
- Create a keystore with the certificates.
- Update the sqldeveloper.conf.
- Update the connection string (PROTOCOL=TCPS, PORT=2484, SERVICE_NAME=kfs40t_srv.uits.uconn.edu)
#Create the keystore and add the keys.
keytool -genkey -alias exa02db -keyalg RSA -keystore exa02db.keystore -dname "cn=exa02" -keypass r1c3pw -storepass r1c3pw
keytool -selfcert -alias exa02db -keystore exa02db.keystore -keypass r1c3pw -storepass r1c3pw -validity 4000 -keysize 2048
keytool -import -alias exa02db01 -file client_cert_exa02db01.txt -keystore exa02db.keystore -storepass r1c3pw
keytool -import -alias exa02db02 -file client_cert_exa02db02.txt -keystore exa02db.keystore -storepass r1c3pw
#Add these to your sqldeveloper.conf. (mine is in C:\Library\sqldeveloper\sqldeveloper\bin\sqldeveoper.conf)
AddVMOption -Djavax.net.ssl.trustStore=C:\\Library\\sqldeveloper\\exa02db.keystore
AddVMOption -Djavax.net.ssl.trustStoreType=JKS
AddVMOption -Djavax.net.ssl.trustStorePassword=r1c3pw
#The JDBC Url requires changes to the PROTOCOL, PORT and SERVICE_NAME.
i.e.
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCPS)(HOST = exa02-scan.uits.uconn.edu)(PORT = 2484))
(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = kfs40t_srv.uits.uconn.edu))
)
Related articles