如何配置基于 x509 客户端证书的身份验证以连接到基于 AWS RDS 的 PostgreSQL

sha*_*shi 5 security postgresql ssl amazon-web-services x509

我们希望强制执行动态加密以连接到我们托管在 Amazon AWS RDS 中的 PostgreSQL 数据库。我们按照此处给出的步骤操作:https : //docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.SSL

完成这些步骤后,我们可以使用下面给出的命令连接到数据库,其中我们使用的是 AWS 提供的根证书:

    psql -h mydb.ckpjohsjh7j8.us-east-1.rds.amazonaws.com -p 5432 "dbname=mydb user=root password=mypassword sslrootcert=rds-combined-ca-bundle.pem sslmode=verify-full"
Run Code Online (Sandbox Code Playgroud)

但是,我们也可以在不指定“sslrootcert”或“sslmode”参数的情况下进行连接,如下面的命令所示:

    psql -h mydb.ckpjohsjh7j8.us-east-1.rds.amazonaws.com -p 5432 "dbname=mydb user=root password=mypassword"
Run Code Online (Sandbox Code Playgroud)

这意味着未为 AWS RDS 启用 x509 客户端证书验证。我想必须有某种方法来生成我自己的私钥和 csr 以获得由 AWS 签名的公钥,或者某种方法来配置客户提供的私钥、公钥。我搜索了 AWS 文档,但找不到有关如何启用它的任何参考。

您能否指导我如何配置基于 x509 客户端证书的身份验证的“强制”以连接到基于 AWS RDS 的 PostgreSQL 数据库?

亲切的问候, 沙石

sha*_*shi 7

我们联系了 AWS 支持并确认 RDS 目前不支持配置用户生成的,在数据​​库服务器上提供私有的,可以与相应的签名公钥一起使用。它在他们的产品积压中。