Skip to content

Commit faf1e0d

Browse files
authored
docs: update least privilege instructions for Cloudflare (#2339)
1 parent 06dfe51 commit faf1e0d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/content/dns/zz_gen_cloudflare.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,13 @@ Then pass the API token as `CF_DNS_API_TOKEN` to Lego.
9898
**Alternatively,** if you prefer a more strict set of privileges,
9999
you can split the access tokens:
100100

101-
* Create one with *Zone / Zone / Read* permissions and scope it to all your zones.
101+
* Create one with *Zone / Zone / Read* permissions and scope it to all your zones or just the individual zone you need to edit.
102102
This is needed to resolve domain names to Zone IDs and can be shared among multiple Lego installations.
103103
Pass this API token as `CF_ZONE_API_TOKEN` to Lego.
104104
* Create another API token with *Zone / DNS / Edit* permissions and set the scope to the domains you want to manage with a single Lego installation.
105105
Pass this token as `CF_DNS_API_TOKEN` to Lego.
106106
* Repeat the previous step for each host you want to run Lego on.
107+
* It is possible to use the same api token for both variables if it is given `Zone:Read` and `DNS:Edit` permission for the zone.
107108

108109
This "paranoid" setup is mainly interesting for users who manage many zones/domains with a single Cloudflare account.
109110
It follows the principle of least privilege and limits the possible damage, should one of the hosts become compromised.

providers/dns/cloudflare/cloudflare.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,13 @@ Then pass the API token as `CF_DNS_API_TOKEN` to Lego.
4646
**Alternatively,** if you prefer a more strict set of privileges,
4747
you can split the access tokens:
4848
49-
* Create one with *Zone / Zone / Read* permissions and scope it to all your zones.
49+
* Create one with *Zone / Zone / Read* permissions and scope it to all your zones or just the individual zone you need to edit.
5050
This is needed to resolve domain names to Zone IDs and can be shared among multiple Lego installations.
5151
Pass this API token as `CF_ZONE_API_TOKEN` to Lego.
5252
* Create another API token with *Zone / DNS / Edit* permissions and set the scope to the domains you want to manage with a single Lego installation.
5353
Pass this token as `CF_DNS_API_TOKEN` to Lego.
5454
* Repeat the previous step for each host you want to run Lego on.
55+
* It is possible to use the same api token for both variables if it is given `Zone:Read` and `DNS:Edit` permission for the zone.
5556
5657
This "paranoid" setup is mainly interesting for users who manage many zones/domains with a single Cloudflare account.
5758
It follows the principle of least privilege and limits the possible damage, should one of the hosts become compromised.

0 commit comments

Comments
 (0)