-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DNS API env variables are not per domain so you cant use different accounts for different domains #799
Comments
yes, that is known limitation. for most of the users, there is only one cloudflare account, they just need to save the api key one time. All the the domains will get benefit. As a workaround, you can run acme.sh with different
you will need to add another cronjob to auto-renew the certs:
|
I've made a Cloudflare PM promise me that they would have keys per domain, not full accounts. so in the future, this is something @Neilpang might have to address |
@FernandoMiguel |
Thanks @Neilpang and good to know @FernandoMiguel |
Just bumping this up. Is there any update on this? I'd prefer to avoid the different config-home workaround. |
maybe store the dns api env into per domain conf? |
It makes sense to use the per-domain conf rather than account for exactly this issue. Perhaps this wasn't possible when the issue was raised but it certainly is now. The documentation DNS-API-Dev-Guide is such:
Couldn't we just use the following functions instead?
it would make sense to store the requisite details in the same place as the auth method and hooks are stored (i.e.
Is this feasible? |
This is meant to address acmesh-official#799 and acmesh-official#2091
Update to acmesh-official#799 for per-domain auth conf storage. _readdnsapiconf() <Item Key> - Prefers the values stored in the domainconf over the accountconf[_mutable] if it exists in both places. - After first new/update save with _savednsapiconf() it will be stored in the domainconf (and the original acctconf* location if applicable) that's where this function will find the value and the entry in the accountconf* will be obsolete/unused. _savednsapiconf() <Item Key> <Item Value> - "Migrate"/save the auth provided by env var or from accountconf[_mutable] to domainconf for future use. Update it in the original account location for backward compatibility if necessary. 1. These wrappers don't update the environment variable like the _getdeployconf(), they read from arg, emit text. 2. The keys saved through the save wrapper are named in mutable form with "SAVED_" prefix. 3. The DNS API Dev Guide (https://github.com/acmesh-official/acme.sh/wiki/DNS-API-Dev-Guide) will need to be updated for the new functions dns_cf.sh dnsapi script for cloudflare updated as an example.
Any updates? |
To add some info, I want to implement DNS-01 verification for ISPConfig, but with the current storing of credentials this would not work. |
DNS API env variables are not able to be set per domain, meaning you can only use a single account for all domains. IE: you can't have 2 Cloudflare accounts one for example.com and a different account for other.com
Steps to reproduce
set variables for Cloudflare:
export CF_Key="sdfdxxxxxxxosdfgje"
export CF_Email="email@example.com"
issue a cert for example.com
acme.sh --issue -d example.com --dns dns_cf
install cert
acme.sh --install-cert -d example.com (etc etc etc)
set variables for DIFFERENT Cloudflare account:
export CF_Key="wgdsyyyyyyyyyykghtysd"
export CF_Email="email@other.com"
issue a cert for other.com
acme.sh --issue -d other.com --dns dns_cf
install cert
acme.sh --install-cert -d other.com (etc etc etc)
the .acme.sh/account.conf file structure does not work with/allow different DNS API variables for the same DNS provider for different domains.
Can the required DNA API variables (currently saved using "_saveaccountconf") be saved to the .acme.sh/example.com/example.com.conf file instead? This would allow different domains to use different accounts.
Debug log
n/a
The text was updated successfully, but these errors were encountered: