我在 aws Route53 中有两个域名:
bar.org
mybar.org
我正在尝试使用基于 ruby 的 dns-01 挑战 Hook ( https://gist.github.com/joshgarnett/02920846fea35f738d3370fd991bb0e0 )生成 Letsencrypt 证书
我正在为域“mybar.org”生成证书,因此我的domains.txt 包含的名称为:
mybar.org
当我尝试运行脱水 -c 时,出现以下错误:
RRSet with DNS name _acme-challenge.mybar.org. is not permitted in zone bar.org.
为什么它尝试在 bar.org 而不是 mybar.org 中添加 RRSet?我如何让它工作?
最佳答案
问题中链接的基于 ruby 的 dns Hook 在 find_hosted_zone 函数的以下行中在从可用 Route53 区域中查找托管区域索引时存在错误。
index = hosted_zones.index { |zone| domain.end_with?(zone.name.chop) }
索引是根据以给定域名结尾的区域得出的。由于我的域名“mybar.org”与“bar.org”(其他可用区域)的计算结果为 true,因此它返回该区域的索引。所以这需要一个 PR 来解决这个问题。
就我而言,当我将代码修改为:
时,它工作正常:index = hosted_zones.index { |zone| zone.name.chop.end_with?(domain) }
关于amazon-web-services - DNS 名称为 _acme-challenge.mybar.org 的 RRSet。 bar.org 区域不允许。同时让我们加密证书生成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40202669/