security/acme-client: Add custom DNS API script support #5143
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for custom acme.sh DNS API scripts in the ACME Client plugin, enabling users to integrate with DNS providers not already supported by the plugin.
Features:
contrib/examples/directoryCompliance
This PR follows OPNsense development guidelines:
Maintainer Commitment
I am committed to maintaining this feature and will respond to user feedback and QA issues.
Use Case
This feature is particularly useful for:
Example Scripts Included
This PR includes ready-to-use example scripts in
security/acme-client/contrib/examples/:dns_myinternal.shdns_myapi.shREADME.mdInstallation & Usage
Step 1: Deploy an Example Script
Copy the example script to OPNsense:
scp dns_myinternal.sh root@opnsense:/usr/local/share/examples/acme.sh/dnsapi/ ssh root@opnsense "chmod 644 /usr/local/share/examples/acme.sh/dnsapi/dns_myinternal.sh"Step 2: Configure the ACME Plugin
dns_myinternalormyinternalDNS_SERVER_HOST,DNS_SERVER_USER)Step 3: Create Certificate
Creating Custom Scripts
Custom scripts must implement two functions:
Scripts can use acme.sh helper functions:
_info,_debug,_errfor logging.Test Plan
Files Changed
New files:
security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeValidation/DnsCustom.phpsecurity/acme-client/contrib/examples/dns_myinternal.shsecurity/acme-client/contrib/examples/dns_myapi.shsecurity/acme-client/contrib/examples/README.mdModified files:
security/acme-client/src/opnsense/mvc/app/models/OPNsense/AcmeClient/AcmeClient.xmlsecurity/acme-client/src/opnsense/mvc/app/controllers/OPNsense/AcmeClient/forms/dialogValidation.xmlsecurity/acme-client/pkg-descr🤖 Generated with Claude Code