dns: read non-string provider settings from file:

A file: value of a non-string setting, such as acme-dns config,
is the JSON in that file; checks leave it unread.

Fixes #3588
This commit is contained in:
Kristoffer Dalby committed 2026-11-11 17:54:31 +01:00
1 parent c7bfe5b4f7
commit f75c7cf059
8 files changed
+382 -22

No files matched your search

+14
View File
@@ -377,6 +377,20 @@ func TestCheckSecretsUnread(t *testing.T) {
}
})
t.Run("acme-dns registrations from file", func(t *testing.T) {
dir := t.TempDir()
missing := filepath.Join(dir, "missing")
cfg := writeServerConfig(t, dir, acmeDNS+` config: "file:`+missing+`"
`)
_, err := runCheck(t, checkConfigCmd, cfg)
require.NoError(t, err)
out, err := runCheck(t, checkAllCmd, cfg)
require.NoError(t, err)
require.Contains(t, strings.Split(out, "\n"), "skip dns.challenge.provider.config "+missing+" (secret, not read)")
})
// A URL from a file cannot be validated unread.
for name, provider := range map[string]string{
"account": acmeDNS + ` username: user