Skip to content
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

add API for Gandi LiveDNS #680

Merged
merged 5 commits into from Feb 28, 2017
Merged

add API for Gandi LiveDNS #680

merged 5 commits into from Feb 28, 2017

Conversation

@fcrozat
Copy link
Contributor

@fcrozat fcrozat commented Feb 27, 2017

This adds support for new API (still in beta) available from Gandi

GANDI_LIVEDNS_API="https://dns.beta.gandi.net/api/v5"

#Usage: dns_gandi_livedns_add _acme-challenge.www.domain.com "XKrxpRBosdIKFzxW_CT3KLZNf6q0HG9i01zxXp5CPBs"
dns_gandi_livedns_add() {

This comment has been minimized.

@Neilpang

Neilpang Feb 27, 2017
Member

why not name it dns_gandi instead of dns_gandi_livedns ?

Do you mean gandi has other dns system ?

This comment has been minimized.

@fcrozat

fcrozat Feb 27, 2017
Author Contributor

Gandi DNS is redoing their DNS infrastructure. Their old infrastructure (and API) was making DNS-01 validation very hard to implement (minimum of 20mins for DNS zone push, and sometime, it was even longer). Their new infrastructure (called LiveDNS) is only available as beta, uses a REST api and supports "instant" push of DNS changes. That is why I named it gandi_livedns.. I think they will phase out their "old" API in the near future but I don't know when.

But I can rename it to gandi instead, of course.

This comment has been minimized.

@Neilpang

Neilpang Feb 27, 2017
Member

ok, keep it there.

_err "Create your key and export it as GANDI_LIVEDNS_KEY"
return 1
fi

This comment has been minimized.

@Neilpang

Neilpang Feb 27, 2017
Member

please save the gandi api key, the future auto renewal will use the key again.

_saveaccountconf GANDI_LIVEDNS_KEY   "$GANDI_LIVEDNS_KEY"
# Requires GANDI API KEY set in GANDI_LIVEDNS_KEY set as environment variable
#
#Author: Frédéric Crozat <fcrozat@suse.com>
#Report Bugs here: https://github.com/fcrozat/acme.sh

This comment has been minimized.

@Neilpang

Neilpang Feb 27, 2017
Member

add your repository here to report bugs.

This comment has been minimized.

@fcrozat

fcrozat Feb 27, 2017
Author Contributor

hmm, it is my repository (fcrozat/acme.sh)

This comment has been minimized.

@Neilpang

Neilpang Feb 27, 2017
Member

Sorry, my eyes broken. :)

_debug domain "$_domain"
_debug sub_domain "$_sub_domain"

_gandi_livedns_rest POST "domains/$_domain/records/$_sub_domain/TXT" "{\"rrset_ttl\": 300, \"rrset_values\":[\"$txtvalue\"]}"

This comment has been minimized.

@baloo

baloo Feb 27, 2017
Contributor

You may use PUT here which will overwrite any existing TXT record here. This is also idempotent.

This comment has been minimized.

@baloo

baloo Feb 27, 2017
Contributor

The ttl is also optional, it will default to the soa value

This comment has been minimized.

@fcrozat

fcrozat Feb 28, 2017
Author Contributor

POST vs PUT: the specific API in the doc for creating a record was mentionning POST by default. I'll switch to PUT.
For TTL, draft-ietf-acme-acme-01 is suggesting a TTL of 300.

@Neilpang
Copy link
Member

@Neilpang Neilpang commented Feb 28, 2017

@Neilpang Neilpang merged commit fab2d9d into acmesh-official:dev Feb 28, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Neilpang
Copy link
Member

@Neilpang Neilpang commented Feb 28, 2017

I was not able to use this api.
Do I need to do something to enable this live dns api ?

@fcrozat
Copy link
Contributor Author

@fcrozat fcrozat commented Feb 28, 2017

You need to migrate your account to Gandi v5 and switch to their new DNS servers: https://news.beta.gandi.net/en/10215-Gandi-s-new-platform-it-s-here and

@Neilpang
Copy link
Member

@Neilpang Neilpang commented Feb 28, 2017

trying.

@Neilpang
Copy link
Member

@Neilpang Neilpang commented Feb 28, 2017

Merged. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.