acmedns

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package acmedns implements a DNS provider for solving DNS-01 challenges using Joohoi's acme-dns project. For more information see the ACME-DNS homepage: https://github.com/joohoi/acme-dns

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DNSProvider

type DNSProvider struct {
	// contains filtered or unexported fields
}

DNSProvider is an implementation of the acme.ChallengeProvider interface for an ACME-DNS server.

func NewDNSProvider

func NewDNSProvider() (*DNSProvider, error)

NewDNSProvider creates an ACME-DNS provider using file based account storage. Its configuration is loaded from the environment by reading apiBaseEnvVar and storagePathEnvVar.

func NewDNSProviderClient

func NewDNSProviderClient(client acmeDNSClient, storage goacmedns.Storage) (*DNSProvider, error)

NewDNSProviderClient creates an ACME-DNS DNSProvider with the given acmeDNSClient and goacmedns.Storage.

func (*DNSProvider) CleanUp

func (d *DNSProvider) CleanUp(_, _, _ string) error

CleanUp removes the record matching the specified parameters. It is not implemented for the ACME-DNS provider.

func (*DNSProvider) Present

func (d *DNSProvider) Present(domain, _, keyAuth string) error

Present creates a TXT record to fulfill the DNS-01 challenge. If there is an existing account for the domain in the provider's storage then it will be used to set the challenge response TXT record with the ACME-DNS server and issuance will continue. If there is not an account for the given domain present in the DNSProvider storage one will be created and registered with the ACME DNS server and an ErrCNAMERequired error is returned. This will halt issuance and indicate to the user that a one-time manual setup is required for the domain.

type ErrCNAMERequired

type ErrCNAMERequired struct {
	// The Domain that is being issued for.
	Domain string
	// The alias of the CNAME (left hand DNS label).
	FQDN string
	// The RDATA of the CNAME (right hand side, canonical name).
	Target string
}

ErrCNAMERequired is returned by Present when the Domain indicated had no existing ACME-DNS account in the Storage and additional setup is required. The user must create a CNAME in the DNS zone for Domain that aliases FQDN to Target in order to complete setup for the ACME-DNS account that was created.

func (ErrCNAMERequired) Error

func (e ErrCNAMERequired) Error() string

Error returns a descriptive message for the ErrCNAMERequired instance telling the user that a CNAME needs to be added to the DNS zone of c.Domain before the ACME-DNS hook will work. The CNAME to be created should be of the form:

{{ c.FQDN }} 	CNAME	{{ c.Target }}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL