shibayan / keyvault-acmebot

Automated ACME SSL/TLS certificates issuer for Azure Key Vault (App Service / Container Apps / App Gateway / Front Door / CDN / others)
Apache License 2.0
921 stars 237 forks source link

Custom DNS configuration for AliDNS #775

Open xibzhang opened 1 week ago

xibzhang commented 1 week ago

Discussed in https://github.com/shibayan/keyvault-acmebot/discussions/774

Originally posted by **xibzhang** November 8, 2024 Hello, I face a problem when I config the custom dns environments variables following the below wiki. https://github.com/shibayan/keyvault-acmebot/wiki/DNS-Provider-Configuration#custom-dns Acmebot:CustomDns:ApiKey AliDNS Key Secret Acmebot:CustomDns:ApiKeyHeaderName X-Api-Key Acmebot:CustomDns:ApiKeyId AliDNS API key ID Acmebot:CustomDns:Endpoint https://alidns.aliyuncs.com/ Acmebot:CustomDns:PropagationSeconds 180 but it get below error ![image](https://github.com/user-attachments/assets/ceb55eb7-b437-41a2-bf5b-56ff8bac231d) I tried to change the endpoint or delete the apikeyid app service name. Both faild. Could you tell me what i should config for AliDNS, Thanks!

Is it a issue for ACMEBot? The API key has the dnsfullaccess.

shibayan commented 1 week ago

The Custom DNS option requires you to create your own API for the DNS Provider.

xibzhang commented 5 days ago

Hi, Shibamura,

I have created my own API for the Ali DNS provider. And I set below

Acmebot:CustomDns:ApiKey AliDNS Key Secret Acmebot:CustomDns:ApiKeyHeaderName X-Api-Key Acmebot:CustomDns:ApiKeyId AliDNS API key ID Acmebot:CustomDns:Endpoint https://alidns.aliyuncs.com/ Acmebot:CustomDns:PropagationSeconds 180

Is the environment name right? or if the APIKEYID is not needed for AliDNS?

shibayan commented 5 days ago

App Settings specifies authentication information for the implemented Custom DNS Provider. I have documented a sample assuming Azure Functions; I am not familiar with AliDNS, please use the following sample code as a basis for your implementation.

https://github.com/shibayan/keyvault-acmebot/tree/master/samples/CustomDns