我正在尝试解决此处描述的问题:
https://github.com/golang/go/issues/39568
和这里:
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL-certificate-rotation.html ,其中 AWS 要求客户重新轮换 RDS 证书 (rds-ca-2019) 以使其与 golang 1.15 兼容
If you are using a Go version 1.15 application with a DB instance that was created or updated to the rds-ca-2019 certificate prior to July 28, 2020, you must update the certificate again. Run the modify-db-instance command shown in the AWS CLI section using rds-ca-2019 as the CA certificate identifier. In this case, it isn't possible to update the certificate using the AWS Management Console. If you created your DB instance or updated its certificate after July 28, 2020, no action is required. For more information, see Go GitHub issue #39568.
需要明确的是,我的 RDS 服务器已经在使用
rds-ca-2019
,但我在 2020 年 7 月 28 日之前轮换了它们。当我使用 openssl s_client -starttls mysql [hostname]
检查证书时,我看到一个没有 SAN 的证书。我在 cli 上发出此命令,但没有任何 react ,没有创建挂起的维护,服务器没有重新启动,证书仍然是没有 SAN 的旧证书。
aws rds modify-db-instance --db-instance-identifier [db-ident] --ca-certificate-identifier rds-ca-2019 --apply-immediately --certificate-rotation-restart
我已经尝试了所有有和没有 --apply-immediately
的排列。和 --certificate-rotation-restart
标志。我在这里做错了什么?
最佳答案
这有效:aws rds modify-db-instance --db-instance-identifier [db-ident] --ca-certificate-identifier rds-ca-2019 --apply-immediately
如果您在 RDS 控制台中停留一分钟,则在发出命令后约 10 秒开始重新启动。
当实例恢复时,它正在使用带有 SAN 的新证书,可以通过以下方式进行验证:openssl s_client -starttls mysql [db-hostname] < /dev/null 2> /dev/null | openssl x509 -noout -text | grep "Subject Alternative Name"
我无法解释为什么在我发布问题时它对我不起作用,但我完全愿意说这比 AWS 更有可能是我的错。 ;)
关于amazon-web-services - 如何重新轮换 AWS RDS 证书以兼容 golang 1.15,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66678201/