Skip to content

feat: DNS challenge for wildcard certificate - #1093

Open
speeddragon wants to merge 3 commits into
feat/tlsfrom
feat/tls-dns-challenge
Open

feat: DNS challenge for wildcard certificate#1093
speeddragon wants to merge 3 commits into
feat/tlsfrom
feat/tls-dns-challenge

Conversation

@speeddragon

@speeddragon speeddragon commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

This PR adds support for DNS challenge, which is used when a wildcard subdomain is needed.

This supports the following providers: DigitalOcean and Cloudflare.

For more details on how it works, please read the documentation.

ToDo

  • Live test it with new weave.space before merging

error, http_error, cron_error, hook_error, warning,
http_server_short, http_client_short,
compute_short, push_short, copycat_short, bundler_short
compute_short, push_short, copycat_short, bundler_short, tls

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We always want to display tls events?

@speeddragon speeddragon Aug 24, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a certain time between when we can serve traffic, and we should output at least 2 events:

  • Requesting a certificate
  • Downloaded certificate

Errors should be displayed as well. Everything else can fall into debug_tls.

Other option is to seperate into tls, debug_tls and tls_error, but I'm not sure if this will be too complex for this use case.

Comment thread src/preloaded/node/dev_tls.erl Outdated

info(_) ->
#{ exports => [<<"request">>, <<"well-known">>, <<"obtain">>] }.
#{ exports => [

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please format properly.

Comment thread src/preloaded/node/dev_tls_acme.erl Outdated
end.

wait(Delay, State) ->
?event(tls, {wait, {delay, Delay}}),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tls_wait right? Else it will just spam wait on the console without saying why we are waiting.

Comment thread docs/run/acme-dns-01.md Outdated
@@ -0,0 +1,282 @@
# ACME DNS-01 with DigitalOcean or Cloudflare

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this actually limited to DigitalOcean or Cloudflare, or a full implementation of the protocol? If the latter, we should frame the docs from the POV of the general case first, with specifics as needed for the common providers.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To support the DNS-01 challenge, we need to modify the DNS property via the provider. To do this, we need access to the API, which varies by provider. I can change this to a device so we can extend it without recompiling.

Eg.

  • dns-challenge-digitalocean@1.0
  • dns-challenge-cloudflare@1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants