Documentation
¶
Overview ¶
Package dnscontroller applies persistent DNS changes requested by control.
Index ¶
- Variables
- type AddressOwner
- type AddressRecord
- type AddressRemoval
- type AuthoritativeVerifier
- func (v *AuthoritativeVerifier) Verify(ctx context.Context, domain string, expected []string) (bool, error)
- func (v *AuthoritativeVerifier) VerifyAddress(ctx context.Context, hostname string, ...) (bool, error)
- func (v *AuthoritativeVerifier) VerifyAddressRemoval(ctx context.Context, record AddressRecord, nameservers []string) (bool, error)
- func (v *AuthoritativeVerifier) VerifyBrandedZone(ctx context.Context, domain string, expected []string) (bool, error)
- func (v *AuthoritativeVerifier) VerifyChallenge(ctx context.Context, recordName, expected string, nameservers []string) (bool, error)
- func (v *AuthoritativeVerifier) VerifyClaimProof(ctx context.Context, domain, name, value string, backend []string) (bool, error)
- func (v *AuthoritativeVerifier) VerifyDelegationRemoved(ctx context.Context, domain string, previous []string) (bool, error)
- func (v *AuthoritativeVerifier) VerifyNameserverMapping(ctx context.Context, public, aws []string) error
- func (v *AuthoritativeVerifier) VerifyParentDelegation(ctx context.Context, domain string, expected []string) (bool, error)
- func (v *AuthoritativeVerifier) VerifyPublisherAliasWildcardAddress(ctx context.Context, hostname string, ipv4, ipv6, nameservers []string) (bool, error)
- func (v *AuthoritativeVerifier) VerifyPublisherAliasWildcardDelegation(ctx context.Context, domain string, expected []string) (bool, error)
- func (v *AuthoritativeVerifier) VerifyPublisherAliasWildcardOwnership(ctx context.Context, record AddressRecord, nameservers []string) (bool, error)
- func (v *AuthoritativeVerifier) VerifyPublisherAliasWildcardRemoval(ctx context.Context, record AddressRecord, nameservers []string) (bool, error)
- type BrandedDelegationProvider
- type BrandedDelegationVerifier
- type ChallengeChangeStore
- type ChallengeManager
- func (m *ChallengeManager) CleanupSubject(ctx context.Context, subject controlstate.CertificateSubject, ...) error
- func (m *ChallengeManager) PresentSubject(ctx context.Context, subject controlstate.CertificateSubject, ...) error
- func (m *ChallengeManager) VerifySubject(ctx context.Context, subject controlstate.CertificateSubject, ...) (bool, error)
- type ChallengeProvider
- type ChallengeRecord
- type ChallengeStore
- type ChallengeVerifier
- type Config
- type DNSObserver
- type DNSVerifier
- type Provider
- type PublisherAliasWildcardRecords
- type RelayChallengeManager
- func (m *RelayChallengeManager) Cleanup(ctx context.Context, orderID string) error
- func (m *RelayChallengeManager) Present(ctx context.Context, orderID string) error
- func (m *RelayChallengeManager) SetObserver(observer DNSObserver)
- func (m *RelayChallengeManager) Verify(ctx context.Context, orderID string) (bool, error)
- type RelayChallengeStore
- type Route53DelegationProvider
- type Route53Provider
- func (p *Route53Provider) ChangeReady(ctx context.Context, changeID string) (bool, error)
- func (p *Route53Provider) EnsureCustomZone(ctx context.Context, work controlstate.DNSAuthorityWork) (Zone, error)
- func (p *Route53Provider) PublishAddress(ctx context.Context, record AddressRecord) (Zone, error)
- func (p *Route53Provider) ReconcileChallenge(ctx context.Context, record ChallengeRecord) (Zone, error)
- func (p *Route53Provider) ReconcilePublisherAliasWildcard(ctx context.Context, record AddressRecord, removing bool) (PublisherAliasWildcardRecords, error)
- func (p *Route53Provider) RefreshChallenge(ctx context.Context, record ChallengeRecord) (Zone, error)
- func (p *Route53Provider) ReleaseCustomZone(ctx context.Context, work controlstate.DNSAuthorityWork) error
- func (p *Route53Provider) RemoveAddress(ctx context.Context, record AddressRecord) (AddressRemoval, error)
- type Store
- type Worker
- type Zone
Constants ¶
This section is empty.
Variables ¶
var ErrChallengesNotConfigured = terminalReasonf(failure.ServerDNSConfigInvalid, "DNS challenge automation is not configured")
Functions ¶
This section is empty.
Types ¶
type AddressOwner ¶
type AddressOwner struct {
// contains filtered or unexported fields
}
AddressOwner identifies the service that owns an exact DNS address record.
func ServiceOwner ¶
func ServiceOwner(id string) AddressOwner
type AddressRecord ¶
type AddressRemoval ¶
type AuthoritativeVerifier ¶
type AuthoritativeVerifier struct {
// contains filtered or unexported fields
}
func NewAuthoritativeVerifier ¶
func NewAuthoritativeVerifier(server string) (*AuthoritativeVerifier, error)
func (*AuthoritativeVerifier) VerifyAddress ¶
func (*AuthoritativeVerifier) VerifyAddressRemoval ¶
func (v *AuthoritativeVerifier) VerifyAddressRemoval(ctx context.Context, record AddressRecord, nameservers []string) (bool, error)
VerifyAddressRemoval checks the authoritative half of an exact removal. callers must first check that the provider no longer lists the exact sets.
func (*AuthoritativeVerifier) VerifyBrandedZone ¶
func (*AuthoritativeVerifier) VerifyChallenge ¶
func (*AuthoritativeVerifier) VerifyClaimProof ¶
func (*AuthoritativeVerifier) VerifyDelegationRemoved ¶
func (*AuthoritativeVerifier) VerifyNameserverMapping ¶
func (v *AuthoritativeVerifier) VerifyNameserverMapping(ctx context.Context, public, aws []string) error
func (*AuthoritativeVerifier) VerifyParentDelegation ¶
func (*AuthoritativeVerifier) VerifyPublisherAliasWildcardAddress ¶
func (*AuthoritativeVerifier) VerifyPublisherAliasWildcardDelegation ¶
func (*AuthoritativeVerifier) VerifyPublisherAliasWildcardOwnership ¶
func (v *AuthoritativeVerifier) VerifyPublisherAliasWildcardOwnership(ctx context.Context, record AddressRecord, nameservers []string) (bool, error)
func (*AuthoritativeVerifier) VerifyPublisherAliasWildcardRemoval ¶
func (v *AuthoritativeVerifier) VerifyPublisherAliasWildcardRemoval(ctx context.Context, record AddressRecord, nameservers []string) (bool, error)
type BrandedDelegationVerifier ¶
type BrandedDelegationVerifier interface {
VerifyNameserverMapping(context.Context, []string, []string) error
VerifyClaimProof(context.Context, string, string, string, []string) (bool, error)
VerifyParentDelegation(context.Context, string, []string) (bool, error)
VerifyDelegationRemoved(context.Context, string, []string) (bool, error)
VerifyBrandedZone(context.Context, string, []string) (bool, error)
}
type ChallengeChangeStore ¶
type ChallengeManager ¶
type ChallengeManager struct {
// contains filtered or unexported fields
}
func NewChallengeManager ¶
func NewChallengeManager( store ChallengeStore, provider ChallengeProvider, verifier ChallengeVerifier, config Config, ) (*ChallengeManager, error)
func (*ChallengeManager) CleanupSubject ¶
func (m *ChallengeManager) CleanupSubject(ctx context.Context, subject controlstate.CertificateSubject, authorizationID string) error
func (*ChallengeManager) PresentSubject ¶
func (m *ChallengeManager) PresentSubject(ctx context.Context, subject controlstate.CertificateSubject, authorizationID string) error
func (*ChallengeManager) VerifySubject ¶
func (m *ChallengeManager) VerifySubject(ctx context.Context, subject controlstate.CertificateSubject, authorizationID string) (bool, error)
type ChallengeProvider ¶
type ChallengeRecord ¶
type ChallengeStore ¶
type ChallengeStore interface {
ChallengeChangeStore
GetDNSAuthority(context.Context, string) (controlstate.DNSAuthority, error)
GetDNSChallengeContextForSubject(context.Context, controlstate.CertificateSubject, string) (controlstate.DNSChallengeContext, error)
WithDNSRecordLock(context.Context, string, func() error) error
}
type ChallengeVerifier ¶
type Config ¶
type Config struct {
WorkerID string
Observer DNSObserver
Logger *slog.Logger
LeaseDuration time.Duration
OperationTimeout time.Duration
PollInterval time.Duration
RetryInterval time.Duration
ManagedDomain string
ManagedZoneID string
IngressIPv4Addresses []string
IngressIPv6Addresses []string
BrandedProvider BrandedDelegationProvider
BrandedVerifier BrandedDelegationVerifier
}
type DNSObserver ¶
type DNSObserver interface {
ObserveDNSWorkContext(context.Context, string, string, observability.DNSWorkOutcome, time.Duration)
ObserveDNSTransition(kind, state string)
}
type DNSVerifier ¶
type DNSVerifier interface {
Verify(context.Context, string, []string) (bool, error)
VerifyAddress(context.Context, string, []string, []string, []string) (bool, error)
VerifyAddressRemoval(context.Context, AddressRecord, []string) (bool, error)
VerifyPublisherAliasWildcardOwnership(context.Context, AddressRecord, []string) (bool, error)
VerifyPublisherAliasWildcardAddress(context.Context, string, []string, []string, []string) (bool, error)
VerifyPublisherAliasWildcardDelegation(context.Context, string, []string) (bool, error)
VerifyPublisherAliasWildcardRemoval(context.Context, AddressRecord, []string) (bool, error)
}
type Provider ¶
type Provider interface {
EnsureCustomZone(context.Context, controlstate.DNSAuthorityWork) (Zone, error)
ReleaseCustomZone(context.Context, controlstate.DNSAuthorityWork) error
PublishAddress(context.Context, AddressRecord) (Zone, error)
RemoveAddress(context.Context, AddressRecord) (AddressRemoval, error)
ReconcilePublisherAliasWildcard(context.Context, AddressRecord, bool) (PublisherAliasWildcardRecords, error)
}
type RelayChallengeManager ¶
type RelayChallengeManager struct {
// contains filtered or unexported fields
}
func NewRelayChallengeManager ¶
func NewRelayChallengeManager( store RelayChallengeStore, provider ChallengeProvider, verifier ChallengeVerifier, serverDomain, zoneID string, ) (*RelayChallengeManager, error)
func (*RelayChallengeManager) Cleanup ¶
func (m *RelayChallengeManager) Cleanup(ctx context.Context, orderID string) error
func (*RelayChallengeManager) Present ¶
func (m *RelayChallengeManager) Present(ctx context.Context, orderID string) error
func (*RelayChallengeManager) SetObserver ¶
func (m *RelayChallengeManager) SetObserver(observer DNSObserver)
type RelayChallengeStore ¶
type RelayChallengeStore interface {
ChallengeChangeStore
GetRelayDNSChallengeContext(context.Context, string) (controlstate.RelayDNSChallengeContext, error)
WithDNSRecordLock(context.Context, string, func() error) error
}
type Route53DelegationProvider ¶
type Route53DelegationProvider struct {
// contains filtered or unexported fields
}
func NewRoute53DelegationProvider ¶
func NewRoute53DelegationProvider(client route53DelegationAPI) *Route53DelegationProvider
func (*Route53DelegationProvider) DelegationNameservers ¶
type Route53Provider ¶
type Route53Provider struct {
// contains filtered or unexported fields
}
func NewRoute53Provider ¶
func NewRoute53Provider(client route53API) (*Route53Provider, error)
func (*Route53Provider) ChangeReady ¶
func (*Route53Provider) EnsureCustomZone ¶
func (p *Route53Provider) EnsureCustomZone(ctx context.Context, work controlstate.DNSAuthorityWork) (Zone, error)
func (*Route53Provider) PublishAddress ¶
func (p *Route53Provider) PublishAddress(ctx context.Context, record AddressRecord) (Zone, error)
func (*Route53Provider) ReconcileChallenge ¶
func (p *Route53Provider) ReconcileChallenge(ctx context.Context, record ChallengeRecord) (Zone, error)
func (*Route53Provider) ReconcilePublisherAliasWildcard ¶
func (p *Route53Provider) ReconcilePublisherAliasWildcard(ctx context.Context, record AddressRecord, removing bool) (PublisherAliasWildcardRecords, error)
func (*Route53Provider) RefreshChallenge ¶
func (p *Route53Provider) RefreshChallenge(ctx context.Context, record ChallengeRecord) (Zone, error)
RefreshChallenge obtains a new change ID when an earlier Route 53 write succeeded but its receipt was lost before it could be saved.
func (*Route53Provider) ReleaseCustomZone ¶
func (p *Route53Provider) ReleaseCustomZone(ctx context.Context, work controlstate.DNSAuthorityWork) error
func (*Route53Provider) RemoveAddress ¶
func (p *Route53Provider) RemoveAddress(ctx context.Context, record AddressRecord) (AddressRemoval, error)
type Store ¶
type Store interface {
ClaimPublisherAliasWildcard(context.Context, string, time.Time, time.Duration) (controlstate.PublisherAliasWildcardWork, bool, error)
PinPublisherAliasWildcardZone(context.Context, controlstate.PublisherAliasWildcardWork, string, time.Time) error
SavePublisherAliasWildcard(context.Context, controlstate.PublisherAliasWildcardWork, []string, controlstate.PublisherAliasWildcardObservation, int64, time.Time, time.Time) error
ClaimDNSAuthorityWork(context.Context, string, time.Time, time.Duration) (controlstate.DNSAuthorityWork, bool, error)
SaveDNSAuthorityWork(context.Context, controlstate.DNSAuthorityWork, time.Time) (controlstate.DNSAuthorityWork, error)
DNSAuthorityReleaseReady(context.Context, string, time.Time) (bool, error)
GetDNSAuthority(context.Context, string) (controlstate.DNSAuthority, error)
GetIngressPool(context.Context, string) (controlstate.IngressPool, error)
// contains filtered or unexported methods
}