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 ¶
const ( // EnvAPIBase is the environment variable name for the ACME-DNS API address // (e.g. https://acmedns.your-domain.com). EnvAPIBase = envNamespace + "API_BASE" // EnvStoragePath is the environment variable name for the ACME-DNS JSON account data file. // A per-domain account will be registered/persisted to this file and used for TXT updates. EnvStoragePath = envNamespace + "STORAGE_PATH" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DNSProvider ¶
type DNSProvider struct {
// contains filtered or unexported fields
}
DNSProvider implements the challenge.Provider interface.
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 EnvAPIBase and EnvStoragePath.
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 }}