I have install oracle express edition database in my local machine. I have one python script by which i am connecting to the local database. But, Right now all connection are non-secure. I don't know how to setup ssl in local database and how to connect to it securely from python script. I am using cx-Oracle pyhton library. Below is the code to connect to the local oracle database.
import cx_Oracle
port = 1521
database = "new_pdb"
username = "testuser"
password = "<password>"
dsn = cx_Oracle.makedsn(host, port, database)
conn_str = (f"{username}/{password}@(DESCRIPTION =(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)"
f"(HOST={host})(PORT={port})))(CONNECT_DATA = (SERVICE_NAME={database})))")
conn = cx_Oracle.connect(conn_str)
if conn is not None:
print("Connection successful...")
Can someone please let me know the steps to configure ssl on local database and how to connect to it from python script?
Thanks in advance!!!