How bikram990/certbot-dns-dynu works
Project type and purpose
• This is an open-source Certbot DNS Authenticator plugin, written in Python, that enables Certbot to fulfill ACME DNS-01 challenges via the Dynu DNS provider.
File structure
• Top-level files:
• setup.py, requirements.txt, version.txt – packaging and versioning.
• release.sh, CI workflow (/.github/workflows/python-publish.yml) – release automation.
• .devcontainer/*, .vscode/* – development environment configuration (VS Code Dev Container).
• test/run_certonly.sh – integration helper to invoke Certbot with the plugin.
• src/certbot_dns_dynu/dns_dynu.py – the core Authenticator implementation.
• src/tests/dns_dynu_test.py – unit tests for the plugin’s DNS logic.
• Credentials template under test/ or user-provided .ini files.
README for additional insights
• The plugin exposes an entry point dns-dynu = certbot_dns_dynu.dns_dynu:Authenticator.
• Usage pattern: Certbot invokes the plugin, which reads a credentials .ini, then makes REST calls to the Dynu DNS API to create/delete TXT records.
a. Main components
• User / CLI (Certbot)
• Plugin Module (Authenticator implementation)
• Credentials Store (.ini file)
• Dynu DNS API (external HTTPS service)
• ACME CA Server (Let's Encrypt)
• (Optional) Test Harness / CI
b. Relationships and interactions
1. User runs certbot certonly --authenticator dns-dynu --dns-dynu-credentials creds.ini.
2. Certbot core loads the plugin via the entry_point mechanism.
3. Plugin reads credentials from creds.ini.
4. Plugin performs “present” challenge: issues an HTTPS call to Dynu API to create a TXT record under the target domain.
5. ACME CA polls the public DNS to verify the TXT record.
6. Upon success, Certbot proceeds to certificate issuance.
7. Plugin performs “cleanup”: issues another HTTPS call to Dynu API to remove the TXT record.
c. Architectural patterns / design principles
• Plugin-based architecture: plugin conforms to Certbot’s Authenticator interface.
• Single responsibility: dns_dynu.py focuses purely on DNS operations (create/delete).
• Configuration via simple INI file.
• Test-driven development: pytest tests simulate the DNS calls.
d. Key technologies / libraries
• Python 3, setuptools entry points.
• Certbot plugin API.
• Requests (or httpx) for HTTP calls.
• pytest for unit tests.
• Dev Container (Docker) for reproducible development.