1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

CLOUDFLARE: Integration tests should use API Token, not user/key (#557)

* providers/cloudflare: Support API tokens

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

* CLOUDFLARE: Update integration tests for api token
This commit is contained in:
Tom Limoncelli
2019-12-09 14:04:52 -05:00
committed by Craig Peterson
parent 61c926d5a4
commit eed8e43fbd

View File

@ -15,11 +15,15 @@
"BIND": {
"domain": "example.com"
},
"CLOUDFLAREAPI": {
"CLOUDFLAREAPI_OLD": {
"apikey": "$CF_KEY",
"apiuser": "$CF_USER",
"domain": "$CF_DOMAIN"
},
"CLOUDFLAREAPI": {
"apitoken": "$CF_TOKEN",
"domain": "$CF_DOMAIN"
},
"DIGITALOCEAN": {
"token": "$DO_TOKEN",
"domain": "$DO_DOMAIN"