【问题标题】:Why postgres forced sslmode=verify-full though it it not there in the connection string为什么 postgres 强制 sslmode=verify-full 虽然它不在连接字符串中
【发布时间】:2019-11-18 10:37:17
【问题描述】:

我已从仍在运行服务的连接字符串中删除了 sslmode=verify-full,它采用 sslmode=verify-full。我制作了 ssl=true 但删除了 sslmode。是在有效的连接字符串中还是有什么其他需要做的?

这是我的网址:

url="jdbc:amazon:postgresql://${apollo.OCF.FTPayDatabase.dbHost}:${apollo.OCF.FTPayDatabase.dbSock}/${apollo.OCF.FTPayDatabase.dbname}?ssl=true;sslrootcert=/apollo/env/RhythmTomcatBase/certs/rds-combined-ca-bundle.pem"

【问题讨论】:

  • 它是documented behaviour: "最简单的是 ssl=true,将它传递给驱动程序将导致驱动程序验证 SSL 证书并验证主机名(与 verify-满)。”

标签: postgresql ssl jdbc


【解决方案1】:

添加

sslfactory=org.postgresql.ssl.NonValidatingFactory

到您的 JDBC URL。这在the documentation 中有介绍。

【讨论】:

    猜你喜欢
    • 2015-09-30
    • 2021-08-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-20
    • 1970-01-01
    • 2020-09-11
    • 1970-01-01
    相关资源
    最近更新 更多