Feature: ACME DNS-01 challenge delegation (CNAME alias) for least-privilege DNS tokens
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 45/100
Hướng nghiên cứu
Bắt đầu với entrypoint.sh và lớp trừu tượng dns_providers hiện có; theo dõi lời gọi ACME hiện tại, việc xử lý TXT và đường dẫn lỗi CAA. Xem lại luồng ACME_CHALLENGE_ALIAS được đề xuất cùng các manual auth/cleanup hooks của certbot. Hoàn tất khi việc ủy quyền TXT của alias-zone hoạt động mà không cần quyền truy cập vào production-zone, đồng thời CAA accounturi chính xác được in ra và xác minh, hoặc việc không tồn tại được báo cáo rõ ràng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
dstack-ingress issues certs via ACME DNS-01, which requires a DNS provider API token that can edit the served domain's own zone (to write the _acme-challenge TXT, and — per entrypoint.sh — to set the A record and CAA).
In our deployment the served name (e.g. svc.example.com) lives under a shared production zone (example.com) that holds many unrelated production records. Handing the enclave a token for that zone is too broad:
- Cloudflare API tokens scope only to zone level — there is no way to restrict a token to a single subdomain/record.
- Managing the subdomain as its own Cloudflare zone requires an Enterprise plan.
So today we'd have to give the enclave a token that can edit our entire example.com zone, which we can't accept.
Proposed feature: DNS-01 challenge delegation (CNAME alias)
Let the operator delegate only the _acme-challenge to a separate zone they fully control, so the enclave's token never touches the production zone:
- Operator adds one static record in the production zone:
_acme-challenge.svc.example.com CNAME <label>.<delegation-zone> - dstack-ingress writes the challenge TXT into
<delegation-zone>(its token scoped only to that zone). Let's Encrypt follows the CNAME during validation.
This is a standard least-privilege ACME pattern (acme.sh --challenge-alias, lego, cert-manager, and Cloudflare's own "Delegated DCV" all support it), and it fits dstack's zero-trust ethos.
Design sketch (opt-in, non-breaking)
- New env
ACME_CHALLENGE_ALIAS=<delegation-zone>; unset ⇒ current behavior, unchanged. - When set, run certbot with
--manual --preferred-challenges=dns+ auth/cleanup hooks that reuse the existingdns_providersabstraction to write the TXT under the alias zone instead of_acme-challenge.<domain>.
Important: CAA handling (needs an explicit decision)
entrypoint.sh currently auto-sets the accounturi CAA
(letsencrypt.org;validationmethods=dns-01;accounturi=$ACCOUNT_URI) on the served domain, using the same token. In delegation mode the token cannot touch the served domain's zone, so this auto-set won't work — and the current code treats a CAA-set failure as not critical, which would silently drop the accounturi lock (the forge-prevention against a non-TEE account issuing a cert for the domain).
To avoid silently weakening security, in delegation mode the feature should:
- print the exact CAA record the operator must set statically in the served zone (including the account URI), and
- verify the CAA is present / warn loudly if absent, instead of silently continuing.
This keeps the "only the TEE's ACME account can issue" guarantee explicit, rather than silently lost.
- Ngôn ngữ chính
- Python
- Star
- 27
- Fork
- 26
- Merge trung bình
- 1 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 12
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Dstack-TEE/dstack-examples
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Dstack-TEE/dstack-examples#87 · 2 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 28/100
Dstack-TEE/dstack-examples#106 · 3 bình luận ·
-
example with use of client sdk Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
-
enhancement help wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
Oracle example Đang mởapp-idea
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Tất cả issue của Dstack-TEE/dstack-examples
Issue tương tự
-
bug confirmed issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
open-webui/open-webui#30750 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
OpenwaterHealth/openmotion-bloodflow-app#604 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100