mirror of
https://github.com/certimate-go/certimate.git
synced 2026-04-26 05:05:56 +03:00
[PR #578] [MERGED] Support cloudflare zone api token #985
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#985
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?
📋 Pull Request Information
Original PR: https://github.com/certimate-go/certimate/pull/578
Author: @fudiwei
Created: 3/31/2025
Status: ✅ Merged
Merged: 4/3/2025
Merged by: @usual2970
Base:
main← Head:feat/providers📝 Commits (1)
2f7fd95feat: cloudflare zone api token📊 Changes
7 files changed (+30 additions, -5 deletions)
View changed files
📝
internal/applicant/providers.go(+1 -0)📝
internal/domain/access.go(+2 -1)📝
internal/pkg/core/applicant/acme-dns-01/lego-providers/cloudflare/cloudflare.go(+2 -0)📝
ui/src/components/access/AccessFormCloudflareConfig.tsx(+14 -0)📝
ui/src/domain/access.ts(+1 -0)📝
ui/src/i18n/locales/en/nls.access.json(+5 -2)📝
ui/src/i18n/locales/zh/nls.access.json(+5 -2)📄 Description
该 PR 包含以下内容变更:
备注
Cloudflare 双 API 令牌
出于安全目的和最小权限原则,用户可能希望在 Cloudflare 中为 API 令牌限制为只允许操作特定域(如 #575)。但上游依赖 go-acme/lego 需要遍历全部域,将域名转换为 ZoneID 来进行后续操作,因此必须可访问全部域。
此 PR 提供了一个可行方案:
Zone/DNS/Edit权限的 API 令牌(即DNS API Token),将其范围限定为特定域(Specific zone),该令牌只可读写特定域。Zone/Zone/Read权限的 API 令牌(即Zone API Token),将其范围限定为所有域(All zones),该令牌虽可访问全部域,但其只读。新的
DNS API Token即原先的API Token;而新的Zone API Token是可选的,仅当DNS API Token的范围被限定为特定域时需要填写。🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.