1
0
mirror of https://github.com/go-acme/lego.git synced 2024-12-22 07:12:22 +02:00

chore: check DNSProvider interface (#2352)

This commit is contained in:
Ludovic Fernandez 2024-11-15 23:21:21 +01:00 committed by GitHub
parent 5987820520
commit a628db57d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
144 changed files with 643 additions and 206 deletions

View File

@ -7,6 +7,7 @@ import (
"fmt"
"github.com/cpu/goacmedns"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
)
@ -23,6 +24,8 @@ const (
EnvStoragePath = envNamespace + "STORAGE_PATH"
)
var _ challenge.Provider = (*DNSProvider)(nil)
// acmeDNSClient is an interface describing the goacmedns.Client functions the DNSProvider uses.
// It makes it easier for tests to shim a mock Client into the DNSProvider.
type acmeDNSClient interface {

View File

@ -11,13 +11,12 @@ import (
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/auth/credentials"
"github.com/aliyun/alibaba-cloud-sdk-go/sdk/requests"
"github.com/aliyun/alibaba-cloud-sdk-go/services/alidns"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"golang.org/x/net/idna"
)
const defaultRegionID = "cn-hangzhou"
// Environment variables names.
const (
envNamespace = "ALICLOUD_"
@ -34,6 +33,10 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
const defaultRegionID = "cn-hangzhou"
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
RAMRole string

View File

@ -9,6 +9,7 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/allinkl/internal"
@ -26,6 +27,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Login string

View File

@ -9,13 +9,12 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/arvancloud/internal"
)
const minTTL = 600
// Environment variables names.
const (
envNamespace = "ARVANCLOUD_"
@ -28,6 +27,10 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
const minTTL = 600
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIKey string

View File

@ -7,13 +7,12 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/nrdcg/auroradns"
)
const defaultBaseURL = "https://api.auroradns.eu"
// Environment variables names.
const (
envNamespace = "AURORA_"
@ -27,6 +26,10 @@ const (
EnvPollingInterval = envNamespace + "POLLING_INTERVAL"
)
const defaultBaseURL = "https://api.auroradns.eu"
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
BaseURL string

View File

@ -9,6 +9,7 @@ import (
"net/url"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/autodns/internal"
@ -29,6 +30,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Endpoint *url.URL

View File

@ -18,8 +18,6 @@ import (
"github.com/go-acme/lego/v4/providers/dns/internal/errutils"
)
const defaultMetadataEndpoint = "http://169.254.169.254"
// Environment variables names.
const (
envNamespace = "AZURE_"
@ -39,6 +37,10 @@ const (
EnvPollingInterval = envNamespace + "POLLING_INTERVAL"
)
const defaultMetadataEndpoint = "http://169.254.169.254"
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
ZoneName string

View File

@ -51,6 +51,8 @@ const (
EnvGitHubOIDCRequestToken = "ACTIONS_ID_TOKEN_REQUEST_TOKEN"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
ZoneName string

View File

@ -12,9 +12,12 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
)
var _ challenge.ProviderTimeout = (*DNSProviderPrivate)(nil)
// DNSProviderPrivate implements the challenge.Provider interface for Azure Private Zone DNS.
type DNSProviderPrivate struct {
config *Config

View File

@ -12,9 +12,12 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud"
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
)
var _ challenge.ProviderTimeout = (*DNSProviderPublic)(nil)
// DNSProviderPublic implements the challenge.Provider interface for Azure Public Zone DNS.
type DNSProviderPublic struct {
config *Config

View File

@ -7,6 +7,7 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/labbsr0x/bindman-dns-webhook/src/client"
@ -23,6 +24,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
PropagationTimeout time.Duration

View File

@ -8,6 +8,7 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/log"
"github.com/go-acme/lego/v4/platform/config/env"
@ -32,6 +33,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
BaseURL string

View File

@ -9,6 +9,7 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/brandit/internal"
@ -27,6 +28,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIKey string

View File

@ -7,13 +7,12 @@ import (
"fmt"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/nrdcg/bunny-go"
)
const minTTL = 60
// Environment variables names.
const (
envNamespace = "BUNNY_"
@ -25,6 +24,10 @@ const (
EnvPollingInterval = envNamespace + "POLLING_INTERVAL"
)
const minTTL = 60
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIKey string

View File

@ -9,6 +9,7 @@ import (
"net/url"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/checkdomain/internal"
@ -27,6 +28,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Endpoint *url.URL

View File

@ -7,16 +7,11 @@ import (
"time"
"github.com/civo/civogo"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
)
const (
minTTL = 600
defaultPollingInterval = 30 * time.Second
defaultPropagationTimeout = 300 * time.Second
)
// Environment variables names.
const (
envNamespace = "CIVO_"
@ -28,6 +23,14 @@ const (
EnvPollingInterval = envNamespace + "POLLING_INTERVAL"
)
const (
minTTL = 600
defaultPollingInterval = 30 * time.Second
defaultPropagationTimeout = 300 * time.Second
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
ProjectID string

View File

@ -8,6 +8,7 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/clouddns/internal"
@ -27,6 +28,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the DNSProvider.
type Config struct {
ClientID string

View File

@ -6,19 +6,45 @@ import (
"errors"
"fmt"
"net/http"
"strconv"
"strings"
"sync"
"time"
"github.com/cloudflare/cloudflare-go"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/log"
"github.com/go-acme/lego/v4/platform/config/env"
)
// Environment variables names.
const (
envNamespace = "CLOUDFLARE_"
EnvEmail = envNamespace + "EMAIL"
EnvAPIKey = envNamespace + "API_KEY"
EnvDNSAPIToken = envNamespace + "DNS_API_TOKEN"
EnvZoneAPIToken = envNamespace + "ZONE_API_TOKEN"
EnvTTL = envNamespace + "TTL"
EnvPropagationTimeout = envNamespace + "PROPAGATION_TIMEOUT"
EnvPollingInterval = envNamespace + "POLLING_INTERVAL"
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
const (
altEnvNamespace = "CF_"
altEnvEmail = altEnvNamespace + "API_EMAIL"
)
const (
minTTL = 120
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
AuthEmail string
@ -36,11 +62,11 @@ type Config struct {
// NewDefaultConfig returns a default configuration for the DNSProvider.
func NewDefaultConfig() *Config {
return &Config{
TTL: env.GetOrDefaultInt("CLOUDFLARE_TTL", minTTL),
PropagationTimeout: env.GetOrDefaultSecond("CLOUDFLARE_PROPAGATION_TIMEOUT", 2*time.Minute),
PollingInterval: env.GetOrDefaultSecond("CLOUDFLARE_POLLING_INTERVAL", 2*time.Second),
TTL: env.GetOneWithFallback(EnvTTL, minTTL, strconv.Atoi, altEnvName(EnvTTL)),
PropagationTimeout: env.GetOneWithFallback(EnvPropagationTimeout, 2*time.Minute, env.ParseSecond, altEnvName(EnvPropagationTimeout)),
PollingInterval: env.GetOneWithFallback(EnvPollingInterval, 2*time.Second, env.ParseSecond, altEnvName(EnvPollingInterval)),
HTTPClient: &http.Client{
Timeout: env.GetOrDefaultSecond("CLOUDFLARE_HTTP_TIMEOUT", 30*time.Second),
Timeout: env.GetOneWithFallback(EnvHTTPTimeout, 30*time.Second, env.ParseSecond, altEnvName(EnvHTTPTimeout)),
},
}
}
@ -68,14 +94,14 @@ type DNSProvider struct {
// in this case pass both CLOUDFLARE_ZONE_API_TOKEN and CLOUDFLARE_DNS_API_TOKEN accordingly.
func NewDNSProvider() (*DNSProvider, error) {
values, err := env.GetWithFallback(
[]string{"CLOUDFLARE_EMAIL", "CF_API_EMAIL"},
[]string{"CLOUDFLARE_API_KEY", "CF_API_KEY"},
[]string{EnvEmail, altEnvEmail},
[]string{EnvAPIKey, altEnvName(EnvAPIKey)},
)
if err != nil {
var errT error
values, errT = env.GetWithFallback(
[]string{"CLOUDFLARE_DNS_API_TOKEN", "CF_DNS_API_TOKEN"},
[]string{"CLOUDFLARE_ZONE_API_TOKEN", "CF_ZONE_API_TOKEN", "CLOUDFLARE_DNS_API_TOKEN", "CF_DNS_API_TOKEN"},
[]string{EnvDNSAPIToken, altEnvName(EnvDNSAPIToken)},
[]string{EnvZoneAPIToken, altEnvName(EnvZoneAPIToken), EnvDNSAPIToken, altEnvName(EnvDNSAPIToken)},
)
if errT != nil {
//nolint:errorlint
@ -84,10 +110,10 @@ func NewDNSProvider() (*DNSProvider, error) {
}
config := NewDefaultConfig()
config.AuthEmail = values["CLOUDFLARE_EMAIL"]
config.AuthKey = values["CLOUDFLARE_API_KEY"]
config.AuthToken = values["CLOUDFLARE_DNS_API_TOKEN"]
config.ZoneToken = values["CLOUDFLARE_ZONE_API_TOKEN"]
config.AuthEmail = values[EnvEmail]
config.AuthKey = values[EnvAPIKey]
config.AuthToken = values[EnvDNSAPIToken]
config.ZoneToken = values[EnvZoneAPIToken]
return NewDNSProviderConfig(config)
}
@ -189,3 +215,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
return nil
}
func altEnvName(v string) string {
return strings.ReplaceAll(v, envNamespace, altEnvNamespace)
}

View File

@ -9,12 +9,18 @@ import (
"github.com/stretchr/testify/require"
)
const envDomain = envNamespace + "DOMAIN"
var envTest = tester.NewEnvTest(
"CLOUDFLARE_EMAIL",
"CLOUDFLARE_API_KEY",
"CLOUDFLARE_DNS_API_TOKEN",
"CLOUDFLARE_ZONE_API_TOKEN").
WithDomain("CLOUDFLARE_DOMAIN")
EnvEmail,
EnvAPIKey,
EnvDNSAPIToken,
EnvZoneAPIToken,
altEnvEmail,
altEnvName(EnvAPIKey),
altEnvName(EnvDNSAPIToken),
altEnvName(EnvZoneAPIToken)).
WithDomain(envDomain)
func TestNewDNSProvider(t *testing.T) {
testCases := []struct {
@ -25,45 +31,45 @@ func TestNewDNSProvider(t *testing.T) {
{
desc: "success email, API key",
envVars: map[string]string{
"CLOUDFLARE_EMAIL": "test@example.com",
"CLOUDFLARE_API_KEY": "123",
EnvEmail: "test@example.com",
EnvAPIKey: "123",
},
},
{
desc: "success API token",
envVars: map[string]string{
"CLOUDFLARE_DNS_API_TOKEN": "012345abcdef",
EnvDNSAPIToken: "012345abcdef",
},
},
{
desc: "success separate API tokens",
envVars: map[string]string{
"CLOUDFLARE_DNS_API_TOKEN": "012345abcdef",
"CLOUDFLARE_ZONE_API_TOKEN": "abcdef012345",
EnvDNSAPIToken: "012345abcdef",
EnvZoneAPIToken: "abcdef012345",
},
},
{
desc: "missing credentials",
envVars: map[string]string{
"CLOUDFLARE_EMAIL": "",
"CLOUDFLARE_API_KEY": "",
"CLOUDFLARE_DNS_API_TOKEN": "",
EnvEmail: "",
EnvAPIKey: "",
EnvDNSAPIToken: "",
},
expected: "cloudflare: some credentials information are missing: CLOUDFLARE_EMAIL,CLOUDFLARE_API_KEY or some credentials information are missing: CLOUDFLARE_DNS_API_TOKEN,CLOUDFLARE_ZONE_API_TOKEN",
},
{
desc: "missing email",
envVars: map[string]string{
"CLOUDFLARE_EMAIL": "",
"CLOUDFLARE_API_KEY": "key",
EnvEmail: "",
EnvAPIKey: "key",
},
expected: "cloudflare: some credentials information are missing: CLOUDFLARE_EMAIL or some credentials information are missing: CLOUDFLARE_DNS_API_TOKEN,CLOUDFLARE_ZONE_API_TOKEN",
},
{
desc: "missing api key",
envVars: map[string]string{
"CLOUDFLARE_EMAIL": "awesome@possum.com",
"CLOUDFLARE_API_KEY": "",
EnvEmail: "awesome@possum.com",
EnvAPIKey: "",
},
expected: "cloudflare: some credentials information are missing: CLOUDFLARE_API_KEY or some credentials information are missing: CLOUDFLARE_DNS_API_TOKEN,CLOUDFLARE_ZONE_API_TOKEN",
},
@ -110,7 +116,7 @@ func TestNewDNSProviderWithToken(t *testing.T) {
{
desc: "same client when zone token is missing",
envVars: map[string]string{
"CLOUDFLARE_DNS_API_TOKEN": "123",
EnvDNSAPIToken: "123",
},
expected: expected{
dnsToken: "123",
@ -121,8 +127,8 @@ func TestNewDNSProviderWithToken(t *testing.T) {
{
desc: "same client when zone token equals dns token",
envVars: map[string]string{
"CLOUDFLARE_DNS_API_TOKEN": "123",
"CLOUDFLARE_ZONE_API_TOKEN": "123",
EnvDNSAPIToken: "123",
EnvZoneAPIToken: "123",
},
expected: expected{
dnsToken: "123",
@ -133,7 +139,7 @@ func TestNewDNSProviderWithToken(t *testing.T) {
{
desc: "failure when only zone api given",
envVars: map[string]string{
"CLOUDFLARE_ZONE_API_TOKEN": "123",
EnvZoneAPIToken: "123",
},
expected: expected{
error: "cloudflare: some credentials information are missing: CLOUDFLARE_EMAIL,CLOUDFLARE_API_KEY or some credentials information are missing: CLOUDFLARE_DNS_API_TOKEN",
@ -142,8 +148,8 @@ func TestNewDNSProviderWithToken(t *testing.T) {
{
desc: "different clients when zone and dns token differ",
envVars: map[string]string{
"CLOUDFLARE_DNS_API_TOKEN": "123",
"CLOUDFLARE_ZONE_API_TOKEN": "abc",
EnvDNSAPIToken: "123",
EnvZoneAPIToken: "abc",
},
expected: expected{
dnsToken: "123",
@ -154,10 +160,10 @@ func TestNewDNSProviderWithToken(t *testing.T) {
{
desc: "aliases work as expected", // CLOUDFLARE_* takes precedence over CF_*
envVars: map[string]string{
"CLOUDFLARE_DNS_API_TOKEN": "123",
"CF_DNS_API_TOKEN": "456",
"CLOUDFLARE_ZONE_API_TOKEN": "abc",
"CF_ZONE_API_TOKEN": "def",
EnvDNSAPIToken: "123",
altEnvName(EnvDNSAPIToken): "456",
EnvZoneAPIToken: "abc",
altEnvName(EnvZoneAPIToken): "def",
},
expected: expected{
dnsToken: "123",
@ -169,9 +175,9 @@ func TestNewDNSProviderWithToken(t *testing.T) {
defer envTest.RestoreEnv()
localEnvTest := tester.NewEnvTest(
"CLOUDFLARE_DNS_API_TOKEN", "CF_DNS_API_TOKEN",
"CLOUDFLARE_ZONE_API_TOKEN", "CF_ZONE_API_TOKEN",
).WithDomain("CLOUDFLARE_DOMAIN")
EnvDNSAPIToken, altEnvName(EnvDNSAPIToken),
EnvZoneAPIToken, altEnvName(EnvZoneAPIToken),
).WithDomain(envDomain)
envTest.ClearEnv()
for _, test := range testCases {

View File

@ -8,6 +8,7 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/log"
"github.com/go-acme/lego/v4/platform/config/env"
@ -29,6 +30,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
AuthID string

View File

@ -10,6 +10,7 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/cloudru/internal"
@ -30,6 +31,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
ServiceInstanceID string

View File

@ -8,6 +8,7 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/conoha/internal"
@ -28,6 +29,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Region string

View File

@ -10,6 +10,7 @@ import (
"strconv"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/constellix/internal"
@ -29,6 +30,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIKey string

View File

@ -7,6 +7,7 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/corenetworks/internal"
@ -26,6 +27,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Login string

View File

@ -11,6 +11,7 @@ import (
"strings"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/cpanel/internal/cpanel"
@ -33,6 +34,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
type apiClient interface {
FetchZoneInformation(ctx context.Context, domain string) ([]shared.ZoneRecord, error)
AddRecord(ctx context.Context, serial uint32, domain string, record shared.Record) (*shared.ZoneSerial, error)

View File

@ -10,6 +10,7 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/derak/internal"
@ -29,6 +30,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIKey string

View File

@ -9,6 +9,7 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/nrdcg/desec"
@ -30,6 +31,8 @@ const (
// https://desec.readthedocs.io/_/downloads/en/latest/pdf/
const defaultTTL int = 3600
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Token string

View File

@ -10,6 +10,7 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/gophercloud/gophercloud"
@ -44,6 +45,8 @@ const (
EnvCloud = envNamespaceClient + "CLOUD"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
ZoneName string

View File

@ -10,6 +10,7 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/digitalocean/internal"
@ -28,6 +29,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
BaseURL string

View File

@ -7,6 +7,7 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/directadmin/internal"
@ -27,6 +28,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
BaseURL string

View File

@ -9,6 +9,7 @@ import (
"time"
"github.com/dnsimple/dnsimple-go/dnsimple"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/internal/useragent"
@ -28,6 +29,8 @@ const (
EnvPollingInterval = envNamespace + "POLLING_INTERVAL"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Debug bool

View File

@ -11,6 +11,7 @@ import (
"strings"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/dnsmadeeasy/internal"
@ -30,6 +31,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
BaseURL string

View File

@ -8,6 +8,7 @@ import (
"strconv"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/nrdcg/dnspod-go"
@ -25,6 +26,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
LoginToken string

View File

@ -8,6 +8,7 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/dode/internal"
@ -25,6 +26,8 @@ const (
EnvSequenceInterval = envNamespace + "SEQUENCE_INTERVAL"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Token string

View File

@ -8,6 +8,7 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/domeneshop/internal"
@ -25,6 +26,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIToken string

View File

@ -10,6 +10,7 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/dreamhost/internal"
@ -26,6 +27,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
BaseURL string

View File

@ -9,6 +9,7 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/duckdns/internal"
@ -26,6 +27,8 @@ const (
EnvSequenceInterval = envNamespace + "SEQUENCE_INTERVAL"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Token string

View File

@ -8,6 +8,7 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/dyn/internal"
@ -27,6 +28,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
CustomerName string

View File

@ -8,6 +8,7 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/dynu/internal"
@ -25,6 +26,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIKey string

View File

@ -12,6 +12,7 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/easydns/internal"
@ -32,6 +33,8 @@ const (
EnvSequenceInterval = envNamespace + "SEQUENCE_INTERVAL"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Endpoint *url.URL

View File

@ -10,6 +10,7 @@ import (
configdns "github.com/akamai/AkamaiOPEN-edgegrid-golang/configdns-v2"
"github.com/akamai/AkamaiOPEN-edgegrid-golang/edgegrid"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/log"
"github.com/go-acme/lego/v4/platform/config/env"
@ -39,6 +40,8 @@ const (
const maxBody = 131072
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
edgegrid.Config

View File

@ -9,6 +9,7 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/efficientip/internal"
@ -30,6 +31,8 @@ const (
EnvInsecureSkipVerify = envNamespace + "INSECURE_SKIP_VERIFY"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Username string

View File

@ -9,6 +9,7 @@ import (
"strings"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/epik/internal"
@ -26,6 +27,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Signature string

View File

@ -10,6 +10,7 @@ import (
"os/exec"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/log"
"github.com/go-acme/lego/v4/platform/config/env"
@ -27,6 +28,8 @@ const (
EnvSequenceInterval = envNamespace + "SEQUENCE_INTERVAL"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config Provider configuration.
type Config struct {
Program string

View File

@ -10,6 +10,7 @@ import (
egoscale "github.com/exoscale/egoscale/v3"
"github.com/exoscale/egoscale/v3/credentials"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/internal/useragent"
@ -29,6 +30,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIKey string

View File

@ -8,6 +8,7 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/nrdcg/freemyip"
@ -26,6 +27,8 @@ const (
EnvSequenceInterval = envNamespace + "SEQUENCE_INTERVAL"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Token string

View File

@ -9,16 +9,12 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/gandi/internal"
)
// Gandi API reference: http://doc.rpc.gandi.net/index.html
// Gandi API domain examples: http://doc.rpc.gandi.net/domain/faq.html
const minTTL = 300
// Environment variables names.
const (
envNamespace = "GANDI_"
@ -31,6 +27,10 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
const minTTL = 300
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
BaseURL string

View File

@ -10,16 +10,13 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/log"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/gandiv5/internal"
)
// Gandi API reference: http://doc.livedns.gandi.net/
const minTTL = 300
// Environment variables names.
const (
envNamespace = "GANDIV5_"
@ -33,6 +30,10 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
const minTTL = 300
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// inProgressInfo contains information about an in-progress challenge.
type inProgressInfo struct {
fieldName string

View File

@ -11,6 +11,7 @@ import (
"time"
"cloud.google.com/go/compute/metadata"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/log"
"github.com/go-acme/lego/v4/platform/config/env"
@ -22,10 +23,6 @@ import (
"google.golang.org/api/option"
)
const (
changeStatusDone = "done"
)
// Environment variables names.
const (
envNamespace = "GCE_"
@ -41,6 +38,10 @@ const (
EnvPollingInterval = envNamespace + "POLLING_INTERVAL"
)
const changeStatusDone = "done"
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Debug bool

View File

@ -8,16 +8,12 @@ import (
"strings"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/gcore/internal"
)
const (
defaultPropagationTimeout = 360 * time.Second
defaultPollingInterval = 20 * time.Second
)
// Environment variables names.
const (
envNamespace = "GCORE_"
@ -30,6 +26,13 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
const (
defaultPropagationTimeout = 360 * time.Second
defaultPollingInterval = 20 * time.Second
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config for DNSProvider.
type Config struct {
APIToken string

View File

@ -9,13 +9,12 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/glesys/internal"
)
const minTTL = 60
// Environment variables names.
const (
envNamespace = "GLESYS_"
@ -29,6 +28,10 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
const minTTL = 60
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIUser string

View File

@ -8,13 +8,12 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/godaddy/internal"
)
const minTTL = 600
// Environment variables names.
const (
envNamespace = "GODADDY_"
@ -28,6 +27,10 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
const minTTL = 600
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIKey string

View File

@ -25,8 +25,7 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
// static compile-time check on interface implementation.
var _ challenge.Provider = &DNSProvider{}
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {

View File

@ -8,13 +8,12 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/hetzner/internal"
)
const minTTL = 60
// Environment variables names.
const (
envNamespace = "HETZNER_"
@ -27,6 +26,10 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
const minTTL = 60
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIKey string

View File

@ -9,6 +9,7 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/internal/hostingde"
@ -27,6 +28,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIKey string

View File

@ -10,6 +10,7 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/hosttech/internal"
@ -27,6 +28,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIKey string

View File

@ -10,6 +10,7 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/internal/hostingde"
@ -28,6 +29,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIKey string

View File

@ -11,6 +11,7 @@ import (
"net/url"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/internal/errutils"
@ -30,6 +31,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
type message struct {
FQDN string `json:"fqdn"`
Value string `json:"value"`

View File

@ -9,6 +9,7 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/platform/wait"
@ -33,6 +34,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
AccessKeyID string

View File

@ -8,6 +8,7 @@ import (
"strings"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/hurricane/internal"
@ -25,6 +26,8 @@ const (
EnvSequenceInterval = envNamespace + "SEQUENCE_INTERVAL"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Credentials map[string]string

View File

@ -9,6 +9,7 @@ import (
"path/filepath"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/hyperone/internal"
@ -28,6 +29,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIEndpoint string

View File

@ -6,6 +6,7 @@ import (
"fmt"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/ibmcloud/internal"
@ -32,6 +33,8 @@ const (
EnvPollingInterval = envNamespace + "POLLING_INTERVAL"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Username string

View File

@ -9,6 +9,7 @@ import (
"strings"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/iij/doapi"
@ -28,6 +29,8 @@ const (
EnvPollingInterval = envNamespace + "POLLING_INTERVAL"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
AccessKey string

View File

@ -28,6 +28,8 @@ const (
EnvPollingInterval = envNamespace + "POLLING_INTERVAL"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Token string
@ -49,8 +51,6 @@ func NewDefaultConfig() *Config {
}
}
var _ challenge.Provider = &DNSProvider{}
// DNSProvider implements the challenge.Provider interface.
type DNSProvider struct {
client dpfapi.ClientInterface

View File

@ -8,6 +8,7 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/internal/useragent"
@ -34,6 +35,8 @@ const (
const defaultPoolConnections = 10
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
// Host is the URL of the grid manager.

View File

@ -9,6 +9,7 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/infomaniak/internal"
@ -30,6 +31,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIEndpoint string

View File

@ -8,6 +8,7 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/internetbs/internal"
@ -26,6 +27,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIKey string

View File

@ -6,6 +6,7 @@ import (
"fmt"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/log"
"github.com/go-acme/lego/v4/platform/config/env"
@ -27,6 +28,8 @@ const (
EnvPollingInterval = envNamespace + "POLLING_INTERVAL"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Username string

View File

@ -10,13 +10,12 @@ import (
"strings"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/ionos/internal"
)
const minTTL = 300
// Environment variables names.
const (
envNamespace = "IONOS_"
@ -29,6 +28,10 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
const minTTL = 300
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIKey string

View File

@ -9,6 +9,7 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/ipv64/internal"
@ -24,9 +25,10 @@ const (
EnvPropagationTimeout = envNamespace + "PROPAGATION_TIMEOUT"
EnvPollingInterval = envNamespace + "POLLING_INTERVAL"
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
EnvSequenceInterval = envNamespace + "SEQUENCE_INTERVAL" // Deprecated: unused, will be removed in v5.
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIKey string

View File

@ -8,6 +8,7 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/iwantmyname/internal"
@ -26,6 +27,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Username string

View File

@ -6,12 +6,15 @@ import (
"fmt"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/log"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/joker/internal/dmapi"
)
var _ challenge.ProviderTimeout = (*dmapiProvider)(nil)
// dmapiProvider implements the challenge.Provider interface.
type dmapiProvider struct {
config *Config

View File

@ -6,11 +6,14 @@ import (
"fmt"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/joker/internal/svc"
)
var _ challenge.ProviderTimeout = (*svcProvider)(nil)
// svcProvider implements the challenge.Provider interface.
type svcProvider struct {
config *Config

View File

@ -9,6 +9,7 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/log"
"github.com/go-acme/lego/v4/platform/config/env"
@ -16,11 +17,6 @@ import (
"github.com/hashicorp/go-retryablehttp"
)
const (
minTTL = 120
maxTTL = 432000
)
// Environment variables names.
const (
envNamespace = "LIARA_"
@ -33,6 +29,13 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
const (
minTTL = 120
maxTTL = 432000
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIKey string

View File

@ -14,14 +14,11 @@ import (
awsconfig "github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/lightsail"
awstypes "github.com/aws/aws-sdk-go-v2/service/lightsail/types"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
)
const (
maxRetries = 5
)
// Environment variables names.
const (
envNamespace = "LIGHTSAIL_"
@ -33,6 +30,10 @@ const (
EnvPollingInterval = envNamespace + "POLLING_INTERVAL"
)
const maxRetries = 5
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
DNSZone string

View File

@ -10,6 +10,7 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/limacity/internal"
@ -29,6 +30,8 @@ const (
EnvSequenceInterval = envNamespace + "SEQUENCE_INTERVAL"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIKey string

View File

@ -9,6 +9,7 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/internal/useragent"
@ -16,12 +17,6 @@ import (
"golang.org/x/oauth2"
)
const (
minTTL = 300
dnsUpdateFreqMins = 15
dnsUpdateFudgeSecs = 120
)
// Environment variables names.
const (
envNamespace = "LINODE_"
@ -34,6 +29,14 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
const (
minTTL = 300
dnsUpdateFreqMins = 15
dnsUpdateFudgeSecs = 120
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Token string

View File

@ -10,14 +10,13 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
lw "github.com/liquidweb/liquidweb-go/client"
"github.com/liquidweb/liquidweb-go/network"
)
const defaultBaseURL = "https://api.liquidweb.com"
// Environment variables names.
const (
envNamespace = "LIQUID_WEB_"
@ -34,6 +33,10 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
const defaultBaseURL = "https://api.liquidweb.com"
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
BaseURL string

View File

@ -9,13 +9,12 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/loopia/internal"
)
const minTTL = 300
// Environment variables names.
const (
envNamespace = "LOOPIA_"
@ -30,6 +29,10 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
const minTTL = 300
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
type dnsClient interface {
AddTXTRecord(ctx context.Context, domain string, subdomain string, ttl int, value string) error
RemoveTXTRecord(ctx context.Context, domain string, subdomain string, recordID int) error

View File

@ -10,13 +10,12 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/luadns/internal"
)
const minTTL = 300
// Environment variables names.
const (
envNamespace = "LUADNS_"
@ -30,6 +29,10 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
const minTTL = 300
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIUsername string

View File

@ -7,6 +7,7 @@ import (
"fmt"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/nrdcg/mailinabox"
@ -24,6 +25,8 @@ const (
EnvPollingInterval = envNamespace + "POLLING_INTERVAL"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Email string

View File

@ -8,6 +8,7 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/nzdjb/go-metaname"
@ -25,6 +26,8 @@ const (
EnvPollingInterval = envNamespace + "POLLING_INTERVAL"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
AccountReference string

View File

@ -8,6 +8,7 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/mijnhost/internal"
@ -27,6 +28,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIKey string

View File

@ -9,6 +9,7 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/mittwald/internal"
@ -30,6 +31,8 @@ const (
const minTTL = 300
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Token string

View File

@ -8,6 +8,7 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/mydnsjp/internal"
@ -25,6 +26,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
MasterID string

View File

@ -9,6 +9,7 @@ import (
"net/url"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/mythicbeasts/internal"
@ -29,6 +30,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
UserName string

View File

@ -10,6 +10,7 @@ import (
"strings"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/log"
"github.com/go-acme/lego/v4/platform/config/env"
@ -45,47 +46,7 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
// A challenge represents all the data needed to specify a dns-01 challenge to lets-encrypt.
type challenge struct {
domain string
key string
keyFqdn string
keyValue string
tld string
sld string
host string
}
// newChallenge builds a challenge record from a domain name and a challenge authentication key.
func newChallenge(domain, keyAuth string) (*challenge, error) {
domain = dns01.UnFqdn(domain)
tld, _ := publicsuffix.PublicSuffix(domain)
if tld == domain {
return nil, fmt.Errorf("invalid domain name %q", domain)
}
parts := strings.Split(domain, ".")
longest := len(parts) - strings.Count(tld, ".") - 1
sld := parts[longest-1]
var host string
if longest >= 1 {
host = strings.Join(parts[:longest-1], ".")
}
info := dns01.GetChallengeInfo(domain, keyAuth)
return &challenge{
domain: domain,
key: "_acme-challenge." + host,
keyFqdn: info.EffectiveFQDN,
keyValue: info.Value,
tld: tld,
sld: sld,
host: host,
}, nil
}
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
@ -178,22 +139,22 @@ func (d *DNSProvider) Timeout() (timeout, interval time.Duration) {
// Present installs a TXT record for the DNS challenge.
func (d *DNSProvider) Present(domain, token, keyAuth string) error {
// TODO(ldez) replace domain by FQDN to follow CNAME.
ch, err := newChallenge(domain, keyAuth)
pr, err := newPseudoRecord(domain, keyAuth)
if err != nil {
return fmt.Errorf("namecheap: %w", err)
}
ctx := context.Background()
records, err := d.client.GetHosts(ctx, ch.sld, ch.tld)
records, err := d.client.GetHosts(ctx, pr.sld, pr.tld)
if err != nil {
return fmt.Errorf("namecheap: %w", err)
}
record := internal.Record{
Name: ch.key,
Name: pr.key,
Type: "TXT",
Address: ch.keyValue,
Address: pr.keyValue,
MXPref: "10",
TTL: strconv.Itoa(d.config.TTL),
}
@ -206,7 +167,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
}
}
err = d.client.SetHosts(ctx, ch.sld, ch.tld, records)
err = d.client.SetHosts(ctx, pr.sld, pr.tld, records)
if err != nil {
return fmt.Errorf("namecheap: %w", err)
}
@ -216,14 +177,14 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
// CleanUp removes a TXT record used for a previous DNS challenge.
func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
// TODO(ldez) replace domain by FQDN to follow CNAME.
ch, err := newChallenge(domain, keyAuth)
pr, err := newPseudoRecord(domain, keyAuth)
if err != nil {
return fmt.Errorf("namecheap: %w", err)
}
ctx := context.Background()
records, err := d.client.GetHosts(ctx, ch.sld, ch.tld)
records, err := d.client.GetHosts(ctx, pr.sld, pr.tld)
if err != nil {
return fmt.Errorf("namecheap: %w", err)
}
@ -232,7 +193,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
var found bool
var newRecords []internal.Record
for _, h := range records {
if h.Name == ch.key && h.Type == "TXT" {
if h.Name == pr.key && h.Type == "TXT" {
found = true
} else {
newRecords = append(newRecords, h)
@ -243,9 +204,51 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
return nil
}
err = d.client.SetHosts(ctx, ch.sld, ch.tld, newRecords)
err = d.client.SetHosts(ctx, pr.sld, pr.tld, newRecords)
if err != nil {
return fmt.Errorf("namecheap: %w", err)
}
return nil
}
// A pseudoRecord represents all the data needed to specify a dns-01 challenge to lets-encrypt.
type pseudoRecord struct {
domain string
key string
keyFqdn string
keyValue string
tld string
sld string
host string
}
// newPseudoRecord builds a challenge record from a domain name and a challenge authentication key.
func newPseudoRecord(domain, keyAuth string) (*pseudoRecord, error) {
domain = dns01.UnFqdn(domain)
tld, _ := publicsuffix.PublicSuffix(domain)
if tld == domain {
return nil, fmt.Errorf("invalid domain name %q", domain)
}
parts := strings.Split(domain, ".")
longest := len(parts) - strings.Count(tld, ".") - 1
sld := parts[longest-1]
var host string
if longest >= 1 {
host = strings.Join(parts[:longest-1], ".")
}
info := dns01.GetChallengeInfo(domain, keyAuth)
return &pseudoRecord{
domain: domain,
key: "_acme-challenge." + host,
keyFqdn: info.EffectiveFQDN,
keyValue: info.Value,
tld: tld,
sld: sld,
host: host,
}, nil
}

View File

@ -127,7 +127,7 @@ func mockDNSProvider(t *testing.T, baseURL string) *DNSProvider {
func assertHdr(t *testing.T, tc *testCase, values *url.Values) {
t.Helper()
ch, _ := newChallenge(tc.domain, "")
ch, _ := newPseudoRecord(tc.domain, "")
assert.Equal(t, envTestUser, values.Get("ApiUser"), "ApiUser")
assert.Equal(t, envTestKey, values.Get("ApiKey"), "ApiKey")
assert.Equal(t, envTestUser, values.Get("UserName"), "UserName")
@ -177,7 +177,7 @@ func TestDNSProvider_CleanUp(t *testing.T) {
}
}
func TestDomainSplit(t *testing.T) {
func Test_newPseudoRecord_domainSplit(t *testing.T) {
tests := []struct {
domain string
valid bool
@ -205,7 +205,7 @@ func TestDomainSplit(t *testing.T) {
for _, test := range tests {
t.Run(test.domain, func(t *testing.T) {
valid := true
ch, err := newChallenge(test.domain, "")
ch, err := newPseudoRecord(test.domain, "")
if err != nil {
valid = false
}

View File

@ -7,14 +7,12 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/namedotcom/go/namecom"
)
// according to https://www.name.com/api-docs/DNS#CreateRecord
const minTTL = 300
// Environment variables names.
const (
envNamespace = "NAMECOM_"
@ -29,6 +27,11 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
// according to https://www.name.com/api-docs/DNS#CreateRecord
const minTTL = 300
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Username string

View File

@ -6,16 +6,12 @@ import (
"fmt"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/nrdcg/namesilo"
)
const (
defaultTTL = 3600
maxTTL = 2592000
)
// Environment variables names.
const (
envNamespace = "NAMESILO_"
@ -27,6 +23,13 @@ const (
EnvPollingInterval = envNamespace + "POLLING_INTERVAL"
)
const (
defaultTTL = 3600
maxTTL = 2592000
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIKey string

View File

@ -8,6 +8,7 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/nearlyfreespeech/internal"
@ -27,6 +28,8 @@ const (
EnvSequenceInterval = envNamespace + "SEQUENCE_INTERVAL"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIKey string

View File

@ -9,6 +9,7 @@ import (
"strings"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/log"
"github.com/go-acme/lego/v4/platform/config/env"
@ -29,6 +30,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Key string

View File

@ -10,6 +10,7 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/netlify/internal"
@ -27,6 +28,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Token string

View File

@ -9,6 +9,7 @@ import (
"strings"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/nicmanager/internal"
@ -33,6 +34,8 @@ const (
const minTTL = 900
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Login string

View File

@ -9,6 +9,7 @@ import (
"net/url"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/platform/wait"
@ -29,6 +30,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
BaseURL string

View File

@ -9,6 +9,7 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/njalla/internal"
@ -27,6 +28,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
Token string

View File

@ -9,6 +9,7 @@ import (
"sync"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/nrdcg/nodion"
@ -26,6 +27,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIToken string

View File

@ -7,6 +7,7 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/log"
"github.com/go-acme/lego/v4/platform/config/env"
@ -26,6 +27,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
APIKey string

View File

@ -8,6 +8,7 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/oracle/oci-go-sdk/v65/common"
@ -33,6 +34,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
CompartmentID string

View File

@ -9,16 +9,12 @@ import (
"net/http"
"time"
"github.com/go-acme/lego/v4/challenge"
"github.com/go-acme/lego/v4/challenge/dns01"
"github.com/go-acme/lego/v4/platform/config/env"
"github.com/go-acme/lego/v4/providers/dns/otc/internal"
)
const defaultIdentityEndpoint = "https://iam.eu-de.otc.t-systems.com:443/v3/auth/tokens"
// minTTL 300 is otc minimum value for TTL.
const minTTL = 300
// Environment variables names.
const (
envNamespace = "OTC_"
@ -36,6 +32,13 @@ const (
EnvSequenceInterval = envNamespace + "SEQUENCE_INTERVAL"
)
const defaultIdentityEndpoint = "https://iam.eu-de.otc.t-systems.com:443/v3/auth/tokens"
// minTTL 300 is otc minimum value for TTL.
const minTTL = 300
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
type Config struct {
IdentityEndpoint string

Some files were not shown because too many files have changed in this diff Show More