mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
CLOUDFLARE: Support API tokens (#555)
Cloudflare API tokens are a new way to authenticate to Cloudflare API. Unlike the Global API key, tokens can be given specific permissions to only access parts of the API. See [1] for details. [1] https://blog.cloudflare.com/api-tokens-general-availability/ This commit introduces a new credential for cloudflare called `apitoken`, which is mutually exclusive with `apiuser` and `apikey`. In order for DNSControl to work with this token, it should have the right to read DNS zones and edit DNS records. Closes #534
This commit is contained in:
committed by
Tom Limoncelli
parent
96583a9188
commit
4e6d05b716
@@ -66,8 +66,7 @@ If you are using other providers, you will likely need to make a `creds.json` fi
|
||||
{% highlight js %}
|
||||
{
|
||||
"cloudflare":{ // provider name to be used in dnsconfig.js
|
||||
"apikey": "key", // API key
|
||||
"apiuser": "username" // username for cloudflare
|
||||
"apitoken": "token" // API token
|
||||
},
|
||||
"namecom":{ // provider name to be used in dnsconfig.js
|
||||
"apikey": "key", // API Key
|
||||
@@ -259,4 +258,4 @@ If you are going to use this in production, we highly recommend the following:
|
||||
* Store the configuration files in Git.
|
||||
* Encrypt the `creds.json` file before storing it in Git.
|
||||
* Use a CI/CD tool like Jenkins to automatically push DNS changes.
|
||||
* Join the DNSControl community. File [issues and PRs](https://github.com/StackExchange/dnscontrol).
|
||||
* Join the DNSControl community. File [issues and PRs](https://github.com/StackExchange/dnscontrol).
|
||||
|
||||
Reference in New Issue
Block a user