Lua-resty-auto-ssl: 未捕获过期域且未在续订时运行 allow_domain。

创建于 2018-07-11  ·  7评论  ·  资料来源: auto-ssl/lua-resty-auto-ssl

我们在自动证书续订方面遇到了两个相关问题:

-Auto-ssl 认为一个域是有效的,而 whois 显示它在几个月前过期并且处于赎回状态。
-allow_domain 似乎没有为自动续订而运行。

过期域(无法在任何地方解析)
WHOIS 数据:
注册表到期日期:2018-05-22T01:19:25Z
域状态:redemptionPeriod https://icann.org/epp#redemptionPeriod

2018/07/06 17:58:11 [error] 3233#3233: *42151 [lua] lets_encrypt.lua:41: issue_cert(): auto-ssl: dehydrated failed: env HOOK_SECRET=74b9b9da3dc257b6f00948fc00b9117beab9fb356fb129a22dd6893c18a9cca3 HOOK_SERVER_PORT=8999 /usr/local/openresty/luajit/bin/resty-auto-ssl/dehydrated --cron --accept-terms --no-lock --domain www.expireddomain.com --challenge http-01 --config /etc/resty-auto-ssl/letsencrypt/config --hook /usr/local/openresty/luajit/bin/resty-auto-ssl/letsencrypt_hooks status: 256 out: # INFO: Using main config file /etc/resty-auto-ssl/letsencrypt/config
Processing www.expireddomain.com
+ Checking domain name(s) of existing cert... unchanged.
+ Checking expire date of existing cert...
+ Valid till Aug 6 00:52:58 2018 GMT (Less than 30 days). Renewing!
+ Signing domains...
+ Generating private key...
+ Generating signing request...
+ Requesting authorization for www.expireddomain.com...
+ 1 pending challenge(s)
+ Deploying challenge tokens...
+ Responding to challenge for www.expireddomain.com authorization...
Invalid challenge: DOMAIN=www.expireddomain.com RESPONSE={
"type": "http-01",
"status": "invalid",
"error": {
"type": "urn:acme:error:dns",
"detail": "DNS problem: NXDOMAIN looking up A for www.expireddomain.com",
"status": 400
},
"uri": "https://acme-v01.api.letsencrypt.org/acme/challenge/bP_FGFj0H6027YXEVXwUTr0hgPYU3p4ux70J03YgJcg/5508927882",
"token": "xBzqCypg7iDi6AUTXlmc65C8MtifK14wAQOjh76Z4ok",
"keyAuthorization": "xBzqCypg7iDi6AUTXlmc65C8MtifK14wAQOjh76Z4ok.BmCf6H2DAkLb8K_367ROMmY9nfcTaEk0ovuF_zhtU1M",
"validationRecord": [
{
"url": "http://www.expireddomain.com/.well-known/acme-challenge/xBzqCypg7iDi6AUTXlmc65C8MtifK14wAQOjh76Z4ok",
"hostname": "www.expireddomain.com",
"port": "80"
}
]

Allow_domain 似乎没有在自动续订时运行
-当域已移动到另一个提供商并且不再解析到我们的服务器时,这是一个问题
- 如果 allow_domain 在自动证书更新上运行,它也将解决过期域问题,因为我们的 allow_domain 脚本会检查 DNS 解析。 正如letsencrypt报告的那样,这显然失败了。

最有用的评论

没问题@edeis53
我一直想用这个和删除过期的证书支持提出拉取请求,我会看看我是否无法解决它。

所有7条评论

我遇到了同样的问题,因为我们遍历了很多域,并将下面的代码添加到了 renew.lua 中的函数 renew_check_cert 以在允许之前检查域。 此外,我还删除了过期的域,以避免每次都发生这种情况。

-- Verify domain before we issue a renewal request. local allow_domain = auto_ssl_instance:get("allow_domain") if not allow_domain(domain) then ngx.log(ngx.NOTICE, "auto-ssl: domain not allowed - not renewing - ", domain) return end

谢谢@brianlund。

如果 renew_check_cert 可配置以避免维护我们自己的分叉,那就太好了。

没问题@edeis53
我一直想用这个和删除过期的证书支持提出拉取请求,我会看看我是否无法解决它。

@brianlund

是否可以在续订时删除 DNS 错误的域? #173 的详细信息

@prionkor这不能解决您的问题吗? https://github.com/GUI/lua-resty-auto-ssl/pull/128

我认为这应该有望在 v0.13.0 中在 #176 和 #128 的组合之间得到解决。 很抱歉长时间延迟解决这个问题! 所以我要关闭它,但如果新版本中的行为仍然存在任何未解决的问题,请告诉我。

现已安装并测试! 非常感谢合并和发布。

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

byrnedo picture byrnedo  ·  16评论

stackrainbow picture stackrainbow  ·  20评论

domharrington picture domharrington  ·  7评论

jmvbxx picture jmvbxx  ·  6评论

jasonbouffard picture jasonbouffard  ·  6评论