有没有一种方法可以将 Google Cloud IAM 服务帐户仅限于 Coud DNS 中的一个区域?我想使用它来自动颁发 ACME DNS-01 证书,但我不想添加对所有域/区域的完全控制。我尝试将条件设置为服务帐户,但它不起作用 - 区域名称可能不是资源?
文档说最低的资源是项目,因此获得 acme 挑战的唯一可能性是为该域拥有拥有自己的服务帐户的单独项目? https://cloud.google.com/dns/docs/access-control
我正在为我的 Docker Swarm 的 Let's Encrypt 设置而苦苦挣扎。Traefik 在我的堆栈的 compose 文件中以这种方式启动:
image: traefik:v2.2
ports:
- 80:80
- 443:443
- 8080:8080
command:
- --api
- --log.level=DEBUG
- --providers.docker=true
- --providers.docker.endpoint=unix:///var/run/docker.sock
- --providers.docker.swarmMode=true
- --providers.docker.exposedbydefault=false
- --providers.docker.network=traefik-public
- --entrypoints.http.address=:80
- --entrypoints.https.address=:443
- --certificatesResolvers.certbot=true
- --certificatesResolvers.certbot.acme.httpChallenge=true
- --certificatesResolvers.certbot.acme.httpChallenge.entrypoint=http
- --certificatesResolvers.certbot.acme.email=${EMAIL?Variable EMAIL not set}
- --certificatesResolvers.certbot.acme.storage=/certs/acme-v2.json
- --certificatesResolvers.certbot.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory
...networks, volumes...
deploy:
mode: replicated
replicas: 1 # to avoid concurrency issues
...
labels:
- "traefik.docker.network=traefik-public"
- "traefik.enable=true"
- "traefik.http.services.traefik.loadbalancer.server.port=8080"
- "traefik.http.routers.traefik.rule=Host(`traefik.my-domain.com`)"
- "traefik.http.routers.traefik.entrypoints=http,https"
- "traefik.http.routers.traefik.tls.certresolver=certbot"
- …Run Code Online (Sandbox Code Playgroud) 我正在使用 fszlin/certes 生成 LE 证书。
我已从 Lets Encrypt 下载了最新的暂存发行者 PEM,并将其转换为 Base64 字符串。
byte[] base64PEM = Convert.FromBase64String(lePemContents);
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试添加时使用:
pfxbuilder.AddIssuers(base64PEM);
Run Code Online (Sandbox Code Playgroud)
并“构建”PFX,我收到错误:
“找不到证书‘C=US,O=(STAGING) Let's Encrypt,CN=(STAGING) 的颁发者 'C=US,O=(STAGING) Internet Security Research Group,CN=(STAGING) Doctored Durian Root CA X3' ) 人造杏 R3'。”
这个 PEM 是否必须以某种特殊方式进行编码,pfxbuilder 才能正确构建并且不返回此错误?
我已经从第三方下载了一个可以正常工作的编码版本(.cer),但是,我想使用 LetsEncrypt 的 PEM,因此,如果 LE 再次更改它,代码将设置为无需任何第三方即可进行转换当事人。
我也尝试过
lePemContents = lePemContents.Replace("-----BEGIN CERTIFICATE-----", "");
lePemContents = lePemContents.Replace("-----END CERTIFICATE-----", "");
lePemContents = lePemContents.Replace("\r\n", "");
Run Code Online (Sandbox Code Playgroud)
之前
Convert.FromBase64String(lePemContents);
Run Code Online (Sandbox Code Playgroud)
得到相同的结果。
我可能会缺少什么?TIA
我最近在我的 Ubuntu 服务器上安装了 Gitlab CE。我想要运行 Gitlab 的域是https://git.mydomain.com(这是一个示例 URL),所以我更喜欢使用 Lets Encrypt 在服务器上启用 SSL。在安装结束时,我收到此错误:
Running handlers:
There was an error running gitlab-ctl reconfigure:
letsencrypt_certificate[git.mydomain.com] (letsencrypt::http_authorization line 5) had an error: Acme::Client::Error::Malformed: acme_certificate[staging] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/letsencrypt/resources/certificate.rb line 25) had an error: Acme::Client::Error::Malformed: Method not allowed
Run Code Online (Sandbox Code Playgroud)
我已经阅读了很多页面来找到解决方案,但没有一个没有用。你能帮我在这个 Gitlab 实例上激活 SSL 吗?
根据官方 ACME.SH 文档链接,颁发证书就像运行以下命令一样简单:
$ acme.sh --issue --alpn -d example.com
Run Code Online (Sandbox Code Playgroud)
但是,我收到以下错误
Error, can not get domain token entry example.com for `tls-alpn-01`
The supported validation types are `http-01` `dns-01` , but you specified: `tls-alpn-01`
Run Code Online (Sandbox Code Playgroud)
我尝试从默认切换ZeroSSL.com到BuyPass.com,但这没有帮助。这些提供商似乎不允许tls-alpn-01验证方法,但这可能与我缺少的东西有关。
PS:抢先回答一些问题:
port 80被 ISP 阻止,因此tls-alpn-01netstat端口 443 是否未绑定到服务。--debug 2,我得到以下_authorizations_map变量值_authorizations_map='example.com,{"identifier":{"type":"dns","value":"example.com"},"status":"pending","expires":"2021-08-18T22 :53:50Z","挑战":[{"type":"http-01","url":"https://acme.zerossl.com/v2/DV90/chall/wYehJ8kQjUDiDadBJ12qKw","状态": "待处理","令牌":"Sfga2N2KwV-2hg3wo1gYAoyFvqV87dRvG2sHw4I6ups"},{"type":"dns-01","url":"https://acme.zerossl.com/v2/DV90/chall/CkrMQdEJthf-TmWvllW -Bg", "状态":"待处理","令牌":"_AlgMGzIfSQs7673Su-njnpieba_zLpSYxiUdXDEFnz"}]}'
我已经使用 Traefik 一段时间来获取和续订 ACME 通配符证书。它使用 AWS Route 53 进行 DNS 挑战。证书最近过期了,由于错误而未能续订,我在任何地方都找不到解决方案。我能找到的 Traefik 的任何文档中似乎都不存在“Endpoint”。
route53: MissingEndpoint: 'Endpoint' configuration is required for this service
Run Code Online (Sandbox Code Playgroud)
FULL ERROR:
time="2022-05-09T20:23:49Z" level=error msg="Error renewing certificate from LE: {*.internal.<DOMAIN REMOVED> []}, error: one or more domains had a problem:\n[*.internal.<DOMAIN REMOVED>] [*.internal.<DOMAIN REMOVED>] acme: error presenting token: route53: MissingEndpoint: 'Endpoint' configuration is required for this service\n" providerName=dns-route53.acme ACME CA="https://acme-v02.api.letsencrypt.org/directory" here
Run Code Online (Sandbox Code Playgroud)
这是我的 docker-compose 文件的精简版本,用于定义 Traefik:
services:
traefik:
image: "traefik:latest"
environment:
- AWS_ACCESS_KEY_ID=${TRAEFIK_AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${TRAEFIK_AWS_SECRET_ACCESS_KEY}
- AWS_REGION=${AWS_REGION}
- AWS_HOSTED_ZONE_ID=${ROUTE53_HOSTED_ZONE_ID}
command: …Run Code Online (Sandbox Code Playgroud)