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

Report bugs to OpenProvider dns api #2104

Open
TheLastProject opened this issue Feb 22, 2019 · 17 comments
Open

Report bugs to OpenProvider dns api #2104

TheLastProject opened this issue Feb 22, 2019 · 17 comments
Labels
3rd party api report bugs to dns api, deploy hooks and notification hooks

Comments

@TheLastProject
Copy link
Contributor

This is the place to report bugs in the OpenProvider DNS API.

If you experience a bug, please report it in this issue.

Thanks!

@Neilpang Neilpang added the 3rd party api report bugs to dns api, deploy hooks and notification hooks label Mar 20, 2019
@weyert
Copy link

weyert commented Sep 7, 2019

How do I use the Openprovider API? I am trying to use it the following way:
docker run --rm -it -e OPENPROVIDER_USER="username" -e OPENPROVIDER_PASSWORDHASH="passwordhash" -v "$(pwd)/out":/acme.sh neilpang/acme.sh --issue -d '*.domain.co' --dns dns_openprovider -k ec-384 --debug

Only now I am getting into a finite loop. Do I have to have my DNS records in a specific way to make this work? I am having the following zone file at OpenProvider:

  | www.domain.co | A | 1.2.3.4 |   | 15 minutes | Wijzig Verwijder
-- | -- | -- | -- | -- | -- | --
  | vpn.domain.co | A | 1.2.3.4 |   | 15 minutes | Wijzig Verwijder
  | *.domain.co | A | 1.2.3.4 |   | 15 minutes | Wijzig Verwijder
  | domain.co | SOA | ns1.openprovider.nl dns.openprovider.eu 2019090701 10800 3600 604800 3600 |   | 1 day |  
  | domain.co | NS | ns1.openprovider.nl |   | 1 hours |  
  | domain.co | NS | ns2.openprovider.be |   | 1 hours |  
  | domain.co | NS | ns3.openprovider.eu |   | 1 hours |  
  | domain.co | A | 1.2.3.4 |   | 15 minutes | Wijzig Verwijder

@TheLastProject
Copy link
Contributor Author

Do you have the debug output? I sadly no longer have anything hosted at OpenProvider so it's hard for me to guess what it could be.

@weyert
Copy link

weyert commented Sep 7, 2019

Appears to work when I don't have any A records. Let me try to get a debug log for you :)
@TheLastProject Please find the log here: https://gist.github.com/weyert/08d55ce124263d6ef99d90167006d992

@TheLastProject
Copy link
Contributor Author

The error is on https://github.com/Neilpang/acme.sh/blob/master/dnsapi/dns_openprovider.sh#L62, the sed statement doesn't seem to see the match and thus the list of records never changes. Not sure yet why this is the case...

@weyert
Copy link

weyert commented Sep 7, 2019

Sorry, my shell scripting skill is like non-existent. Anyway I could assist you? I did notice that when I don't have any A records (e.g. *.domain.co) it's working fine. Could it be falling over the case that A record for *.domain.co exists for which I am also requesting a certificate?

@TheLastProject
Copy link
Contributor Author

Nah, it's just not marking an item it dealt with as "done", and thus gets stuck in that loop. The sed statement is supposed to remove the item that it just dealt with from the list of items, but somehow that isn't working. May be some special characters weirdness, not quite sure why, probably someone whose POSIX shell scripting is less rusty could solve it in a second.

@weyert
Copy link

weyert commented Sep 7, 2019

Oh okay, I hope someone can help us then :)

@weyert
Copy link

weyert commented Sep 9, 2019

Not sure, how to progress this.

@markoetie
Copy link

markoetie commented Apr 2, 2020

I'm having the same loop problem as @weyert.
The API is constantly looping over the existing A records and not adding the challenge records. Only when removing existing A records and re-running acme.sh the challenges are added.

It would be nice if someone could fix it.

Ritbit added a commit to Ritbit/acme.sh that referenced this issue Apr 27, 2020
acmesh-official#2104  Fix wildcard handling & custom NS config for OpenProvider DNS
@Ritbit
Copy link
Contributor

Ritbit commented Apr 27, 2020

Hi all,
I Fixed the looping and a setting with custom NS servers, works like a charm :-)

Also lowered the TTL for the temporary acme record to 10 min, so you can retry after 10 minutes if it fails and you don't have to wait for a day until the records times out from dns-caches.

Will submit a pull-request with the changes.
Note: requesting wildcard-domain certificates still fail, investigating cause..

@weyert
Copy link

weyert commented Apr 27, 2020

Thanks @Ritbit that's great :)

Neilpang added a commit that referenced this issue Apr 29, 2020
@johanneskonst
Copy link

Tried Acme.sh with openprovider_dns, all I keep getting is a API request failed. message.
Tested with a few diffrent domains, some with A records, some without.
Adding --debug revealed response='<?xml version="1.0" encoding="UTF-8"?><openXML><reply><code>808</code><desc>Invalid record type</desc><data/></reply></openXML> even though types sent are only NS, MX and TXT types.

@sigio
Copy link

sigio commented Nov 23, 2020

Same here... I've used the dns api on openprovider with dehydrated (I wrote that backend for dehydrated), but was looking into acme.sh since it has wider support, but giving me issues with openprovider.

It seems that API failures are printed in red, but then don't trigger stopping further requests/tests if the field was added.

[Mon 23 Nov 2020 10:01:41 PM CET] existing_items='A45.11.28.1086400NSns3.openprovider.eu3600NSns2.openprovider.be3600NSns1.openprovider.nl3600MXmail.sig-io.nl1086400AAAA2a0e:5700::1086400'
[Mon 23 Nov 2020 10:01:41 PM CET] results_retrieved='7'
[Mon 23 Nov 2020 10:01:41 PM CET] item='www.jaar2038.nlCNAMEjaar2038.nl86400'
[Mon 23 Nov 2020 10:01:41 PM CET] existing_items='A45.11.28.1086400NSns3.openprovider.eu3600NSns2.openprovider.be3600NSns1.openprovider.nl3600MXmail.sig-io.nl1086400AAAA2a0e:5700::1086400wwwCNAMEjaar2038.nl86400'
[Mon 23 Nov 2020 10:01:41 PM CET] results_retrieved='8'
[Mon 23 Nov 2020 10:01:41 PM CET] item
[Mon 23 Nov 2020 10:01:41 PM CET] total='8'
[Mon 23 Nov 2020 10:01:41 PM CET] Creating acme record
[Mon 23 Nov 2020 10:01:41 PM CET] POST
[Mon 23 Nov 2020 10:01:41 PM CET] _post_url='https://api.openprovider.eu/'
[Mon 23 Nov 2020 10:01:41 PM CET] _CURL='curl -L --silent --dump-header /root/.acme.sh/http.header -g '
[Mon 23 Nov 2020 10:01:42 PM CET] _ret='0'
[Mon 23 Nov 2020 10:01:42 PM CET] response='
808Invalid record type'
[Mon 23 Nov 2020 10:01:42 PM CET] API request failed.
[Mon 23 Nov 2020 10:01:42 PM CET]

@sigio
Copy link

sigio commented Nov 24, 2020

Removing 'NS' from line 72 worked for me.... the API docs also say the allowed field types are:

One of the following data types: A, AAAA, CNAME, MX, SPF, SRV, TXT, TLSA, SSHFP, CAA
(In some cases NS records can be added after contacting Support.)

So... NS is not allowed by default... but is returned from the api (and automatically added it seems)

@sigio
Copy link

sigio commented Nov 24, 2020

It also looks like the dns_openprovider.sh just replaces the entire zone/config, instead of just adding/removing a single record:

In the control-panel:
2020-11-24 15:53:08 Records have been replaced.

As opposed to the script used in dehydrated which adds/removes individual txt records:
2020-10-09 13:01:34 Record is deleted: name: _acme-challenge.jaar2038.nl, type: TXT, value: "XXX", ttl: 600
2020-10-09 13:01:30 Record is added: name: _acme-challenge.jaar2038.nl, type: TXT, value: "XXX", ttl: 600

Doing it this way would avoid issues with unknown or not-allowed record-types, and avoid losing existing records if they might not match the regex (or simultanious updates from other api-calls)

@TheLastProject TheLastProject removed their assignment Jan 24, 2021
@ixp-nl
Copy link

ixp-nl commented Jun 17, 2021

This plugin should be rewritten to the Openprovider REST API (beta).
The REST API has the option to add and remove single records.

@WinSCaP
Copy link
Contributor

WinSCaP commented Jun 22, 2024

Created a pull request where the NS type is removed so it atleast works again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd party api report bugs to dns api, deploy hooks and notification hooks
Projects
None yet
Development

No branches or pull requests

9 participants