From eed8e43fbd66e748b36d771d0798b667ee12f10a Mon Sep 17 00:00:00 2001 From: Tom Limoncelli Date: Mon, 9 Dec 2019 14:04:52 -0500 Subject: [PATCH] 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 --- integrationTest/providers.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/integrationTest/providers.json b/integrationTest/providers.json index df2071536..a0f3d6939 100644 --- a/integrationTest/providers.json +++ b/integrationTest/providers.json @@ -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"