diff --git a/README.md b/README.md
index aff5052ca..e9a8caacc 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@ So if you think that lego is worth it, please consider [donating](https://donate
- Support [RFC 8738](https://www.rfc-editor.org/rfc/rfc8738.html): certificates for IP addresses
- Support [RFC 9773](https://www.rfc-editor.org/rfc/rfc9773.html): Renewal Information (ARI) Extension
- Support [draft-ietf-acme-profiles-00](https://datatracker.ietf.org/doc/draft-ietf-acme-profiles/): Profiles Extension
-- Comes with about [170 DNS providers](https://go-acme.github.io/lego/dns)
+- Comes with about [180 DNS providers](https://go-acme.github.io/lego/dns)
- Register with CA
- Obtain certificates, both from scratch or with an existing CSR
- Renew certificates
@@ -56,6 +56,8 @@ Documentation is hosted live at https://go-acme.github.io/lego/.
Detailed documentation is available [here](https://go-acme.github.io/lego/dns).
+If your DNS provider is not supported, please open an [issue](https://github.com/go-acme/lego/issues/new?assignees=&labels=enhancement%2C+new-provider&template=new_dns_provider.yml).
+
diff --git a/docs/content/_index.md b/docs/content/_index.md
index d3787cf19..95e411afc 100644
--- a/docs/content/_index.md
+++ b/docs/content/_index.md
@@ -24,7 +24,7 @@ I've been maintaining it for about 10 years.
- Support [RFC 8738](https://www.rfc-editor.org/rfc/rfc8738.html): issues certificates for IP addresses
- Support [RFC 9773](https://www.rfc-editor.org/rfc/rfc9773.html): Renewal Information (ARI) Extension
- Support [draft-ietf-acme-profiles-00](https://datatracker.ietf.org/doc/draft-ietf-acme-profiles/): Profiles Extension
-- Comes with about [170 DNS providers]({{% ref "dns" %}})
+- Comes with about [180 DNS providers]({{% ref "dns" %}})
- Register with CA
- Obtain certificates, both from scratch or with an existing CSR
- Renew certificates
diff --git a/providers/dns/allinkl/allinkl.go b/providers/dns/allinkl/allinkl.go
index 7e8f5ab4e..4a0aadd2b 100644
--- a/providers/dns/allinkl/allinkl.go
+++ b/providers/dns/allinkl/allinkl.go
@@ -130,7 +130,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
credential, err := d.identifier.Authentication(ctx, 60, true)
if err != nil {
- return fmt.Errorf("allinkl: %w", err)
+ return fmt.Errorf("allinkl: authentication: %w", err)
}
ctx = internal.WithContext(ctx, credential)
@@ -149,7 +149,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
recordID, err := d.client.AddDNSSettings(ctx, record)
if err != nil {
- return fmt.Errorf("allinkl: %w", err)
+ return fmt.Errorf("allinkl: add DNS settings: %w", err)
}
d.recordIDsMu.Lock()
@@ -167,7 +167,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
credential, err := d.identifier.Authentication(ctx, 60, true)
if err != nil {
- return fmt.Errorf("allinkl: %w", err)
+ return fmt.Errorf("allinkl: authentication: %w", err)
}
ctx = internal.WithContext(ctx, credential)
@@ -183,7 +183,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
_, err = d.client.DeleteDNSSettings(ctx, recordID)
if err != nil {
- return fmt.Errorf("allinkl: %w", err)
+ return fmt.Errorf("allinkl: delete DNS settings: %w", err)
}
d.recordIDsMu.Lock()
diff --git a/providers/dns/autodns/autodns.go b/providers/dns/autodns/autodns.go
index fc8e793b6..8a9361bc0 100644
--- a/providers/dns/autodns/autodns.go
+++ b/providers/dns/autodns/autodns.go
@@ -130,7 +130,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
_, err := d.client.AddRecords(context.Background(), info.EffectiveFQDN, records)
if err != nil {
- return fmt.Errorf("autodns: %w", err)
+ return fmt.Errorf("autodns: add record: %w", err)
}
return nil
@@ -149,7 +149,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
_, err := d.client.RemoveRecords(context.Background(), info.EffectiveFQDN, records)
if err != nil {
- return fmt.Errorf("autodns: %w", err)
+ return fmt.Errorf("autodns: remove record: %w", err)
}
return nil
diff --git a/providers/dns/liquidweb/liquidweb_test.go b/providers/dns/liquidweb/liquidweb_test.go
index 26dc5bdc0..a34d19037 100644
--- a/providers/dns/liquidweb/liquidweb_test.go
+++ b/providers/dns/liquidweb/liquidweb_test.go
@@ -27,16 +27,16 @@ func TestNewDNSProvider(t *testing.T) {
{
desc: "minimum-success",
envVars: map[string]string{
- EnvUsername: "blars",
- EnvPassword: "tacoman",
+ EnvUsername: "user",
+ EnvPassword: "secret",
},
},
{
desc: "set-everything",
envVars: map[string]string{
- EnvURL: "https://storm.com",
- EnvUsername: "blars",
- EnvPassword: "tacoman",
+ EnvURL: "https://storm.example",
+ EnvUsername: "user",
+ EnvPassword: "secret",
EnvZone: "blars.com",
},
},
@@ -48,16 +48,16 @@ func TestNewDNSProvider(t *testing.T) {
{
desc: "missing username",
envVars: map[string]string{
- EnvPassword: "tacoman",
- EnvZone: "blars.com",
+ EnvPassword: "secret",
+ EnvZone: "blars.example",
},
expected: "liquidweb: some credentials information are missing: LIQUID_WEB_USERNAME",
},
{
desc: "missing password",
envVars: map[string]string{
- EnvUsername: "blars",
- EnvZone: "blars.com",
+ EnvUsername: "user",
+ EnvZone: "blars.example",
},
expected: "liquidweb: some credentials information are missing: LIQUID_WEB_PASSWORD",
},
@@ -148,13 +148,13 @@ func TestNewDNSProviderConfig(t *testing.T) {
func TestDNSProvider_Present(t *testing.T) {
provider := mockProvider(t)
- err := provider.Present("tacoman.com", "", "")
+ err := provider.Present("tacoman.example", "", "")
require.NoError(t, err)
}
func TestDNSProvider_CleanUp(t *testing.T) {
provider := mockProvider(t, network.DNSRecord{
- Name: "_acme-challenge.tacoman.com",
+ Name: "_acme-challenge.tacoman.example",
RData: "123d==",
Type: "TXT",
TTL: 300,
@@ -164,7 +164,7 @@ func TestDNSProvider_CleanUp(t *testing.T) {
provider.recordIDs["123d=="] = 1234567
- err := provider.CleanUp("tacoman.com.", "123d==", "")
+ err := provider.CleanUp("tacoman.example.", "123d==", "")
require.NoError(t, err)
}
@@ -181,7 +181,7 @@ func TestDNSProvider(t *testing.T) {
}{
{
desc: "expected successful",
- domain: "tacoman.com",
+ domain: "tacoman.example",
token: "123",
keyAuth: "456",
present: true,
@@ -189,7 +189,7 @@ func TestDNSProvider(t *testing.T) {
},
{
desc: "other successful",
- domain: "banana.com",
+ domain: "banana.example",
token: "123",
keyAuth: "456",
present: true,
@@ -197,16 +197,16 @@ func TestDNSProvider(t *testing.T) {
},
{
desc: "zone not on account",
- domain: "huckleberry.com",
+ domain: "huckleberry.example",
token: "123",
keyAuth: "456",
present: true,
- expPresentErr: "no valid zone in account for certificate '_acme-challenge.huckleberry.com'",
+ expPresentErr: "no valid zone in account for certificate '_acme-challenge.huckleberry.example'",
cleanup: false,
},
{
desc: "ssl for domain",
- domain: "sundae.cherry.com",
+ domain: "sundae.cherry.example",
token: "5847953",
keyAuth: "34872934",
present: true,
@@ -214,7 +214,7 @@ func TestDNSProvider(t *testing.T) {
},
{
desc: "complicated domain",
- domain: "always.money.stand.banana.com",
+ domain: "always.money.stand.banana.example",
token: "5847953",
keyAuth: "there is always money in the banana stand",
present: true,
diff --git a/providers/dns/liquidweb/servermock_test.go b/providers/dns/liquidweb/servermock_test.go
index f211e7253..4886e17f1 100644
--- a/providers/dns/liquidweb/servermock_test.go
+++ b/providers/dns/liquidweb/servermock_test.go
@@ -26,14 +26,14 @@ func mockProvider(t *testing.T, initRecs ...network.DNSRecord) *DNSProvider {
return servermock.NewBuilder(
func(server *httptest.Server) (*DNSProvider, error) {
config := NewDefaultConfig()
- config.Username = "blars"
- config.Password = "tacoman"
+ config.Username = "user"
+ config.Password = "secret"
config.BaseURL = server.URL
return NewDNSProviderConfig(config)
},
servermock.CheckHeader().
- WithBasicAuth("blars", "tacoman"),
+ WithBasicAuth("user", "secret"),
).
Route("/v1/Network/DNS/Record/delete", mockAPIDelete(recs)).
Route("/v1/Network/DNS/Record/create", mockAPICreate(recs)).
@@ -172,38 +172,38 @@ func makeMockZones() (map[int]network.DNSZoneList, map[string]int) {
Items: []network.DNSZone{
{
ID: 1,
- Name: "blars.com",
+ Name: "blars.example",
Active: 1,
DelegationStatus: "CORRECT",
- PrimaryNameserver: "ns.liquidweb.com",
+ PrimaryNameserver: "ns.example.org",
},
{
ID: 2,
- Name: "tacoman.com",
+ Name: "tacoman.example",
Active: 1,
DelegationStatus: "CORRECT",
- PrimaryNameserver: "ns.liquidweb.com",
+ PrimaryNameserver: "ns.example.org",
},
{
ID: 3,
- Name: "storm.com",
+ Name: "storm.example",
Active: 1,
DelegationStatus: "CORRECT",
- PrimaryNameserver: "ns.liquidweb.com",
+ PrimaryNameserver: "ns.example.org",
},
{
ID: 4,
- Name: "not-apple.com",
+ Name: "not-apple.example",
Active: 1,
DelegationStatus: "BAD_NAMESERVERS",
- PrimaryNameserver: "ns.liquidweb.com",
+ PrimaryNameserver: "ns.example.org",
},
{
ID: 5,
Name: "example.com",
Active: 1,
DelegationStatus: "BAD_NAMESERVERS",
- PrimaryNameserver: "ns.liquidweb.com",
+ PrimaryNameserver: "ns.example.org",
},
},
},
@@ -211,38 +211,38 @@ func makeMockZones() (map[int]network.DNSZoneList, map[string]int) {
Items: []network.DNSZone{
{
ID: 6,
- Name: "banana.com",
+ Name: "banana.example",
Active: 1,
DelegationStatus: "NXDOMAIN",
- PrimaryNameserver: "ns.liquidweb.com",
+ PrimaryNameserver: "ns.example.org",
},
{
ID: 7,
- Name: "cherry.com",
+ Name: "cherry.example",
Active: 1,
DelegationStatus: "SERVFAIL",
- PrimaryNameserver: "ns.liquidweb.com",
+ PrimaryNameserver: "ns.example.org",
},
{
ID: 8,
- Name: "dates.com",
+ Name: "dates.example",
Active: 1,
DelegationStatus: "SERVFAIL",
- PrimaryNameserver: "ns.liquidweb.com",
+ PrimaryNameserver: "ns.example.org",
},
{
ID: 9,
- Name: "eggplant.com",
+ Name: "eggplant.example",
Active: 1,
DelegationStatus: "SERVFAIL",
- PrimaryNameserver: "ns.liquidweb.com",
+ PrimaryNameserver: "ns.example.org",
},
{
ID: 10,
- Name: "fig.com",
+ Name: "fig.example",
Active: 1,
DelegationStatus: "UNKNOWN",
- PrimaryNameserver: "ns.liquidweb.com",
+ PrimaryNameserver: "ns.example.org",
},
},
},
@@ -250,31 +250,31 @@ func makeMockZones() (map[int]network.DNSZoneList, map[string]int) {
Items: []network.DNSZone{
{
ID: 11,
- Name: "grapes.com",
+ Name: "grapes.example",
Active: 1,
DelegationStatus: "UNKNOWN",
- PrimaryNameserver: "ns.liquidweb.com",
+ PrimaryNameserver: "ns.example.org",
},
{
ID: 12,
- Name: "money.banana.com",
+ Name: "money.banana.example",
Active: 1,
DelegationStatus: "UNKNOWN",
- PrimaryNameserver: "ns.liquidweb.com",
+ PrimaryNameserver: "ns.example.org",
},
{
ID: 13,
- Name: "money.stand.banana.com",
+ Name: "money.stand.banana.example",
Active: 1,
DelegationStatus: "UNKNOWN",
- PrimaryNameserver: "ns.liquidweb.com",
+ PrimaryNameserver: "ns.example.org",
},
{
ID: 14,
- Name: "stand.banana.com",
+ Name: "stand.banana.example",
Active: 1,
DelegationStatus: "UNKNOWN",
- PrimaryNameserver: "ns.liquidweb.com",
+ PrimaryNameserver: "ns.example.org",
},
},
},
diff --git a/providers/dns/neodigit/neodigit.go b/providers/dns/neodigit/neodigit.go
index eb4530479..d41846307 100644
--- a/providers/dns/neodigit/neodigit.go
+++ b/providers/dns/neodigit/neodigit.go
@@ -25,6 +25,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
+const defaultBaseURL = "https://api.neodigit.net/v1"
+
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
@@ -66,7 +68,7 @@ func NewDNSProviderConfig(config *Config) (*DNSProvider, error) {
return nil, errors.New("neodigit: the configuration of the DNS provider is nil")
}
- provider, err := tecnocratica.NewDNSProviderConfig(config, "")
+ provider, err := tecnocratica.NewDNSProviderConfig(config, defaultBaseURL)
if err != nil {
return nil, fmt.Errorf("neodigit: %w", err)
}
diff --git a/providers/dns/virtualname/virtualname.go b/providers/dns/virtualname/virtualname.go
index 6b04e8169..34637d280 100644
--- a/providers/dns/virtualname/virtualname.go
+++ b/providers/dns/virtualname/virtualname.go
@@ -25,6 +25,8 @@ const (
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
)
+const defaultBaseURL = "https://api.virtualname.net/v1"
+
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
// Config is used to configure the creation of the DNSProvider.
@@ -66,7 +68,7 @@ func NewDNSProviderConfig(config *Config) (*DNSProvider, error) {
return nil, errors.New("virtualname: the configuration of the DNS provider is nil")
}
- provider, err := tecnocratica.NewDNSProviderConfig(config, "https://api.virtualname.net/v1")
+ provider, err := tecnocratica.NewDNSProviderConfig(config, defaultBaseURL)
if err != nil {
return nil, fmt.Errorf("virtualname: %w", err)
}