acme.sh icon indicating copy to clipboard operation
acme.sh copied to clipboard

Feature: DNS API for IONOS cloud

Open zak905 opened this issue 1 year ago • 5 comments

This change set extends the existing DNS API script for IONOS dns_ionos.sh to support the IONOS Cloud API. IONOS users have two alternatives for managing their DNS zones: the IONOS Cloud API and the IONOS DNS API (which is supported by the current implementation). The objective is to allow users of the IONOS Cloud API to also use the script.

As explained in the script header comment, the script decides which API to use based on the provided credentials. If IONOS_PREFIX and IONOS_SECRET are provided, the script will use the IONOS DNS API, else if IONOS_TOKEN is provided the script will use the IONOS Cloud API.

Note: This contribution is done by IONOS DNS cloud team, the team responsible directly for the service.

zak905 avatar Apr 24 '24 14:04 zak905

Welcome First thing: don't send PR to the master branch, please send to the dev branch instead. Please make sure you've read our DNS API Dev Guide and DNS-API-Test. Then reply on this message, otherwise, your code will not be reviewed or merged. We look forward to reviewing your Pull request shortly ✨ 注意: 必须通过了 DNS-API-Test 才会被 review. 无论是修改, 还是新加的 dns api, 都必须确保通过这个测试.

github-actions[bot] avatar Apr 24 '24 14:04 github-actions[bot]

Hi @Neilpang,

can you please take a look when you have a chance ?

The DNS tests are passing successfully: https://github.com/ionos-cloud/acme.sh/actions/runs/8941008104

To make the tests pass, I had to make some changes to the acmetest project so that the TXT record content is randomized: https://github.com/acmesh-official/acmetest/pull/26

For now, this PR uses my own fork, as you can see here: https://github.com/ionos-cloud/acme.sh/blob/add_ionos_cloud_script/.github/workflows/DNS.yml#L70. I have created a PR in the acmetest repo as well: https://github.com/acmesh-official/acmetest/pull/26

Also how can I update the documentation?

zak905 avatar May 06 '24 09:05 zak905

remove this change please: image

Neilpang avatar May 06 '24 10:05 Neilpang

@Neilpang it's removed now. However, as I mentioned above, this will make DNS tests fail. https://github.com/acmesh-official/acmetest/pull/26 is needed to make them pass, because it seems like somehow a test case starts before the previous one removes the TXT record. Inserting a TXT record with the same name and the same content is not allowed by our API ( maybe it's not the case for other DNS providers), so a non OK response is returned.

zak905 avatar May 06 '24 12:05 zak905

Thanks for merging the acmetest PR. Here is the successful run for the latest triggered action: https://github.com/ionos-cloud/acme.sh/actions/runs/8969436076

zak905 avatar May 07 '24 08:05 zak905

@Neilpang I just wanted to draw your attention to this PR. Any thoughts ?

zak905 avatar Jun 07 '24 15:06 zak905