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

Create DNS 01 module for Plesk XML API #2562

Merged
merged 33 commits into from
Nov 12, 2019
Merged

Conversation

stilez
Copy link
Contributor

@stilez stilez commented Oct 27, 2019

Module for Plesk XML API.

Key developer-relevant details: see code header.

@stilez
Copy link
Contributor Author

stilez commented Oct 30, 2019

Tested and working with my ISP's plesk XML API, using mydomain.tld and *.mydomain.tld:

Cert success.
[Tue Oct 29 12:40:17 GMT 2019] Your cert is in  /var/etc/acme-client/home/*****/*****.cer
[Tue Oct 29 12:40:17 GMT 2019] Your cert key is in  /var/etc/acme-client/home/*****/*****.key
[Tue Oct 29 12:40:17 GMT 2019] v2 chain.
[Tue Oct 29 12:40:17 GMT 2019] The intermediate CA cert is in  /var/etc/acme-client/home/*****/ca.cer
[Tue Oct 29 12:40:17 GMT 2019] And the full chain certs is there:  /var/etc/acme-client/home/*****/fullchain.cer
[Tue Oct 29 12:40:17 GMT 2019] Installing cert to:/var/etc/acme-client/certs/*****/cert.pem
[Tue Oct 29 12:40:17 GMT 2019] Installing CA to:/var/etc/acme-client/certs/*****/chain.pem
[Tue Oct 29 12:40:17 GMT 2019] Installing key to:/var/etc/acme-client/keys/*****/private.key
[Tue Oct 29 12:40:17 GMT 2019] Installing full chain to:/var/etc/acme-client/certs/*****/fullchain.pem
[Tue Oct 29 12:40:17 GMT 2019] _on_issue_success

Please merge, or advise any other fixes needed - thanks!

dnsapi/dns_pleskxml.sh Outdated Show resolved Hide resolved
dnsapi/dns_pleskxml.sh Outdated Show resolved Hide resolved
dnsapi/dns_pleskxml.sh Outdated Show resolved Hide resolved
@stilez
Copy link
Contributor Author

stilez commented Oct 30, 2019

grep -E, sed -E, and [[:space:]] now globally replaced, and correct operation retested:

-----END CERTIFICATE-----'
[Thu Oct 31 03:18:05 GMT 2019] Found cert chain
[Thu Oct 31 03:18:05 GMT 2019] _end_n='36'
[Thu Oct 31 03:18:05 GMT 2019] Le_LinkCert='https://acme-staging-v02.api.letsencrypt.org/acme/cert/*****'
[Thu Oct 31 03:18:05 GMT 2019] Cert success.
[Thu Oct 31 03:18:05 GMT 2019] Your cert is in  /var/etc/acme-client/home/*****/*****.cer
[Thu Oct 31 03:18:05 GMT 2019] Your cert key is in  /var/etc/acme-client/home/*****/*****.key
[Thu Oct 31 03:18:05 GMT 2019] v2 chain.
[Thu Oct 31 03:18:05 GMT 2019] The intermediate CA cert is in  /var/etc/acme-client/home/*****/ca.cer
[Thu Oct 31 03:18:05 GMT 2019] And the full chain certs is there:  /var/etc/acme-client/home/*****/fullchain.cer
[Thu Oct 31 03:18:05 GMT 2019] Installing cert to:/var/etc/acme-client/certs/*****.*****/cert.pem
[Thu Oct 31 03:18:05 GMT 2019] Installing CA to:/var/etc/acme-client/certs/*****.*****/chain.pem
[Thu Oct 31 03:18:05 GMT 2019] Installing key to:/var/etc/acme-client/keys/*****.*****/private.key
[Thu Oct 31 03:18:05 GMT 2019] Installing full chain to:/var/etc/acme-client/certs/*****.*****/fullchain.pem
[Thu Oct 31 03:18:05 GMT 2019] _on_issue_success

Can merge now, or any more fixes needed? :)

dnsapi/dns_pleskxml.sh Outdated Show resolved Hide resolved
(( ... isn't it annoying that basic regex has * but not + ..... ))
Maybe BRE aren't as basic as they sound. But I'm sure `man grep` didn't list the extra syntax of "preceded by backslash" :)  So let's use it
@stilez
Copy link
Contributor Author

stilez commented Nov 4, 2019

@Neilpang - All egrep replaced by grep (basic regex), and correct operation retested:

[Mon Nov  4 19:02:45 GMT 2019] Cert success.
[Mon Nov  4 19:02:45 GMT 2019] Your cert is in  /var/etc/acme-client/home/*****/*****.cer
[Mon Nov  4 19:02:45 GMT 2019] Your cert key is in  /var/etc/acme-client/home/*****/*****.key
[Mon Nov  4 19:02:45 GMT 2019] v2 chain.
[Mon Nov  4 19:02:45 GMT 2019] The intermediate CA cert is in  /var/etc/acme-client/home/*****/ca.cer
[Mon Nov  4 19:02:45 GMT 2019] And the full chain certs is there:  /var/etc/acme-client/home/*****/fullchain.cer
[Mon Nov  4 19:02:45 GMT 2019] Installing cert to:/var/etc/acme-client/certs/*****.*****/cert.pem
[Mon Nov  4 19:02:45 GMT 2019] Installing CA to:/var/etc/acme-client/certs/*****.*****/chain.pem
[Mon Nov  4 19:02:45 GMT 2019] Installing key to:/var/etc/acme-client/keys/*****.*****/private.key
[Mon Nov  4 19:02:45 GMT 2019] Installing full chain to:/var/etc/acme-client/certs/*****.*****/fullchain.pem
[Mon Nov  4 19:02:45 GMT 2019] _on_issue_success

Should pass Travis checks.

Anything else, or can it be merged now?

dnsapi/dns_pleskxml.sh Outdated Show resolved Hide resolved
dnsapi/dns_pleskxml.sh Outdated Show resolved Hide resolved
@stilez
Copy link
Contributor Author

stilez commented Nov 5, 2019

@Neilpang -

The last issues noted are believed resolved (subject to passing Travis for formatting etc). These were grep -q and sed -r, now all replaced by > /dev/null, basic regex, or other commands.

I've also run this live on my Plesk XML API at my ISP, and it appears to work correctly:

[Tue Nov  5 21:23:43 GMT 2019] Le_LinkCert='https://acme-staging-v02.api.letsencrypt.org/acme/cert/*****'
[Tue Nov  5 21:23:43 GMT 2019] Cert success.
[Tue Nov  5 21:23:43 GMT 2019] Your cert is in  /var/etc/acme-client/home/*****/*****.cer
[Tue Nov  5 21:23:43 GMT 2019] Your cert key is in  /var/etc/acme-client/home/*****/*****.key
[Tue Nov  5 21:23:43 GMT 2019] v2 chain.
[Tue Nov  5 21:23:43 GMT 2019] The intermediate CA cert is in  /var/etc/acme-client/home/*****/ca.cer
[Tue Nov  5 21:23:43 GMT 2019] And the full chain certs is there:  /var/etc/acme-client/home/*****/fullchain.cer
[Tue Nov  5 21:23:44 GMT 2019] Installing cert to:/var/etc/acme-client/certs/*****.*****/cert.pem
[Tue Nov  5 21:23:44 GMT 2019] Installing CA to:/var/etc/acme-client/certs/*****.*****/chain.pem
[Tue Nov  5 21:23:44 GMT 2019] Installing key to:/var/etc/acme-client/keys/*****.*****/private.key
[Tue Nov  5 21:23:44 GMT 2019] Installing full chain to:/var/etc/acme-client/certs/*****.*****/fullchain.pem
[Tue Nov  5 21:23:44 GMT 2019] _on_issue_success

Is anything else needed before merging?

@Neilpang
Copy link
Member

Neilpang commented Nov 7, 2019

please create issue and updat wiki.

Read this guide carefully:
https://github.com/Neilpang/acme.sh/wiki/DNS-API-Dev-Guide

@stilez
Copy link
Contributor Author

stilez commented Nov 7, 2019

Issue created #2577 and wiki updated.

Merge now?

@stilez
Copy link
Contributor Author

stilez commented Nov 11, 2019

@Neilpang - Any news on this, or anything I need to do?

@Neilpang Neilpang merged commit ce0c6da into acmesh-official:dev Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants