Code Monkey home page Code Monkey logo

cloudflare's Introduction

Cloudflare for libdns

godoc reference

This package implements the libdns interfaces for Cloudflare.

Authenticating

Important

This package supports API token authentication (as opposed to legacy API keys).

There are two approaches for token permissions supported by this package:

  1. Single token for everything
    • APIToken permissions required: Zone:Read, Zone.DNS:Write - All zones
  2. Dual token method
    • ZoneToken permissions required: Zone:Read - All zones
    • APIToken permissions required: Zone.DNS:Write - for the zone(s) you wish to manage

The dual token method allows users who have multiple DNS zones in their Cloudflare account to restrict which zones the token can access, whereas the first method will allow access to all DNS Zones. If you only have one domain/zone then this approach does not provide any benefit, and you might as well just have the single API token

To use the dual token approach simply ensure that the ZoneToken property is provided - otherwise the package will use APIToken for all API requests.

To clarify, do NOT use API keys, which are globally-scoped:

Don't use API keys

DO use scoped API tokens:

Don't use API keys

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.