remilapeyre / vault-acme

Mozilla Public License 2.0
93 stars 23 forks source link

Providing Godaddy Provider DNS Challenge Information #26

Closed josephlim75 closed 3 years ago

josephlim75 commented 3 years ago

How do I provide my godaddy secret and key when registering my account into acme plugin ?

Currently acme.sh used GD_Key and GD_Secret environment variable for dns-challenge

vault write acme/accounts/company-prod \
    contact=prod@company.com \
    server_url=https://acme-staging-v02.api.letsencrypt.org/directory \
    terms_of_service_agreed=true \
    provider=godaddy
        provider_configuration ?????

  vault write acme/roles/prod-company-com \
    account=company-prod \
    allowed_domains=company.com \
    allow_bare_domains=false \
    allow_subdomains=true

Following the lego info url https://go-acme.github.io/lego/dns/godaddy/, I have exported GODADDY_API_KEY and GODADDY_API_SECRET environment variable, still got error when trying to generate certificate. Below is the error I have redacted my company domain using a dummy company.com

Error writing data to acme/certs/prod-company-com: Error making API request.

URL: PUT http://127.0.0.1:8200/v1/acme/certs/prod-company-com
Code: 400. Errors:

* Failed to validate certificate signing request: godaddy: some credentials information are missing: GODADDY_API_KEY,GODADDY_API_SECRET

Is there any documentation or guide to configure a provider ?

josephlim75 commented 3 years ago

I'm closing this issue as I know what the problem is. When I create the 2 godaddy enivronment variables, it was outside of vault running session, therefore, vault is not able to pick it up. Once i've run in the same session, it works. But unfortunately I still run into issue like it is not able to create multiple wildcards subdomain. For example my main domain is company.com. I am not able to create a subdomain wildcard like *.dev.company.com. When I was using acme.sh, it allow to generate multiple wildcard subdomain without issue.