mirror of
https://github.com/certimate-go/certimate.git
synced 2026-04-25 20:55:52 +03:00
[GH-ISSUE #687] [Feature] 能否增加DNS别名模式-challenge域名 #463
Labels
No labels
announcement
backlog
bug
declined
documentation
duplicate
enhancement
good first issue
good first issue
help wanted
invalid
pull-request
question
stale
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/certimate#463
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @netsmu on GitHub (May 15, 2025).
Original GitHub issue: https://github.com/certimate-go/certimate/issues/687
功能描述 / Description
因为是自建的DNS,没有API接口,能否增加 acme.sh中的challenge-alias参数的功能。 challenge-alias是acme.sh脚本中的一个参数,用于在Let's Encrypt证书申请过程中指定一个别名域名,以便进行DNS验证。使用该参数可以简化多域名证书的申请过程,每次申请时只需指定一个主域名和相应的别名域名,而不需要为每个域名单独设置CNAME记录或TXT记录。
–challenge-alias
DNS别名模式-challenge域名
https://github.com/acmesh-official/acme.sh/wiki/DNS-alias-mode
请求动机 / Motivation
因为是自建的DNS,没有API接口,能否增加 acme.sh中的challenge-alias参数的功能。 challenge-alias是acme.sh脚本中的一个参数,用于在Let's Encrypt证书申请过程中指定一个别名域名,以便进行DNS验证。使用该参数可以简化多域名证书的申请过程,每次申请时只需指定一个主域名和相应的别名域名,而不需要为每个域名单独设置CNAME记录或TXT记录。
–challenge-alias
DNS别名模式-challenge域名
https://github.com/acmesh-official/acme.sh/wiki/DNS-alias-mode
其他 / Miscellaneous
No response
贡献 / Contribution
@dscao commented on GitHub (May 15, 2025):
原来还有这个方式,这个比较强,还支持通配符泛域名。
@fudiwei commented on GitHub (May 15, 2025):
这不就是 CNAME 吗?一直都是支持的呀
https://docs.certimate.me/blog/cname
@dscao commented on GitHub (May 15, 2025):
这个昨天测试了可以用,但只能一个解析只能一个域名,而且没找到泛域名的设置方法,应该是不支持通配符域名,域名解析是这样的:
_acme-challenge.www.a.com CNAME www.a.com.validationserver.b.com上面的别名模式支持通配符及 *.a.com,解析也不一样:
_acme-challenge.example.com. => _acme-challenge.aliasDomainForValidationOnly.com@netsmu commented on GitHub (May 15, 2025):
刚刚测试了。
_acme-challenge.www.a.com CNAME www.a.com.validationserver.b.com
上面这样的设置不行,会执行失败。
然后我设置成 _acme-challenge.www.a.com CNAME _acme-challenge.b.com 就可以了,不知道为什么?
@dscao commented on GitHub (May 16, 2025):
刚刚又测试了下,确实是已经支持别名模式,只要按这个配置好解析就行了。
_acme-challenge.example.com. => _acme-challenge.aliasDomainForValidationOnly.com
可以关闭这个issue了
@Trashblazer commented on GitHub (Jun 28, 2025):
这个东西在文档和界面上都没写明白怎么加CNAME和所需要的API权限,我也是折腾了好久。
需求:既能申请各种域名证书,又最小化暴露dns-01验证所要求的域名控制权。这里只需要使用一个注册的域名。
原理解析:
a.com在DNSPod,为你的任意子域,如acme.a.com添加NS记录托管到阿里云解析。这里通过NS服务商来物理上划分权限。_acme-challenge.a.com--->_acme-challenge.acme.a.com,为下一步传递TXT记录做准备。acme.a.com作为承担所有dns-01验证任务的专用域名。由于这个域名托管在阿里云,所以无论怎样操作、密钥泄露都不会影响到dnspod上的主域名记录。_acme-challenge.acme上添加解析,完成验证。题外话,我认为
alidns:DescribeDomains列出所有域名,是没有必要的操作授权。实际上只需要指定acme.a.com,直接操作记录就完事了。