简体   繁体   English

如何使用 TLS 加密 cx_oracle 连接? 我必须使用 Oracle 钱包吗?

[英]How to make a cx_oracle connection encrypted with TLS? Do I have to use Oracle Wallets?

Need to use cx_oracle module with python 3.x version to connect Oracle 19c with TLS.需要使用 python 3.x 版本的 cx_oracle 模块来连接 Oracle 19c 与 TLS。 There are firewalls and proxies.有防火墙和代理。

How to implement it?如何实施? Do I have to use Oracle Wallets?我必须使用 Oracle 钱包吗? Is TLS 1.2 good enough or I need TLS 1.3 in 2022? TLS 1.2 是否足够好,或者我需要在 2022 年使用 TLS 1.3?

import cx_Oracle
conn = cx_Oracle.connect("uname/pwd@//localhost:1521/sd")
cur = conn.cursor()
cur.execute("SELECT 'Hello' FROM dual")
res = cur.fetchall()

If this is a cloud DB you no longer always need a wallet.如果这是一个云数据库,你就不再总是需要钱包了。 With recent Oracle Client libraries you can use 1-way TLS.借助最新的 Oracle 客户端库,您可以使用单向 TLS。 See Easy wallet-less connections to Oracle Autonomous Databases in Python .请参阅Python 中与 Oracle 自治数据库的轻松无钱包连接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM