acmesh-official / acme.sh

A pure Unix shell script implementing ACME client protocol
https://acme.sh
GNU General Public License v3.0
39.45k stars 4.98k forks source link

Report MailinaBox DNS API Bugs #2550

Open billgertz opened 5 years ago

billgertz commented 5 years ago

This is the place to report bugs in the MailinaBox DNS API (dns_miab.sh)

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

Thanks!

draft13 commented 1 year ago

image

[Tue Jun 20 11:00:07 AM EDT 2023] Using miab challange add
[Tue Jun 20 11:00:07 AM EDT 2023] ERROR fetching domain list
[Tue Jun 20 11:00:07 AM EDT 2023] missing-totp-token

Not really a bug, but perhaps add the ability to use the one-time-password.

lifeboy commented 3 months ago

I use the acme plugin from pfSense and I get this error:

[Mon Aug 19 20:35:20 SAST 2024] Using CA: https://acme-v02.api.letsencrypt.org/directory
[Mon Aug 19 20:35:20 SAST 2024] Using pre generated key: /tmp/acme/Primary/fw.fast.za.net/fw.fast.za.net.key.next
[Mon Aug 19 20:35:20 SAST 2024] Generate next pre-generate key.
[Mon Aug 19 20:35:21 SAST 2024] Multi domain='DNS:fw.fast.za.net,DNS:fw-1a.fast.za.net,DNS:fw-1b.fast.za.net'
[Mon Aug 19 20:35:21 SAST 2024] Getting domain auth token for each domain
[Mon Aug 19 20:35:26 SAST 2024] Getting webroot for domain='fw.fast.za.net'
[Mon Aug 19 20:35:26 SAST 2024] Getting webroot for domain='fw-1a.fast.za.net'
[Mon Aug 19 20:35:26 SAST 2024] Getting webroot for domain='fw-1b.fast.za.net'
[Mon Aug 19 20:35:26 SAST 2024] Adding txt value: AoNbz13SoEUZU9o7_4nbn6ljq7gx9vT87YgZekkXa1w for domain:  _acme-challenge.fw.fast.za.net
[Mon Aug 19 20:35:26 SAST 2024] Using miab challange add
[Mon Aug 19 20:35:27 SAST 2024] Error encountered during record add
[Mon Aug 19 20:35:27 SAST 2024] No value for the record provided.
[Mon Aug 19 20:35:27 SAST 2024] Error add txt for domain:_acme-challenge.fw.fast.za.net
[Mon Aug 19 20:35:27 SAST 2024] Please check log file for more details: /tmp/acme/Primary/acme_issuecert.log

It seems that in the API call to MiaB the text should be quoted and the format changed. See this post: https://github.com/ddavness/power-mailinabox/issues/121#issuecomment-1524339349

In essense the txt record needs to be of the form: ""value=some text here&ttl=300".

It looks like this API call needs to be updated?

draft13 commented 1 month ago

This line doesn't not work for me. https://github.com/acmesh-official/acme.sh/blob/d4b8f9700b1a885a73086b33df91f04732cc0878/dnsapi/dns_miab.sh#L20

If I change it to txtvalue=$2 then everything is fine. The comment above the mentioned line reads as:

Added "value=" and "&ttl=300" to accomodate the new TXT record format used by the MIAB/PMIAB API

Not sure what this is reference two, but it isn't working as published and I am running the most recent version of MIAB. I can do a PR if that is preferred to revert this change.

lifeboy commented 1 month ago

I added those "value=" and "&ttl=300" parts into the script because of this: https://github.com/ddavness/power-mailinabox/issues/121

I have a suspicion though that this change in the API was only made to Power-Mailinabox and was not merged back into Mailinabox. I'm waiting for confirmation of this, and it this is indeed the case, I will create a new dns_pmiab.sh for this.

lifeboy commented 1 month ago

I have gone ahead and created a separate dns api for Power-Mailinabox, called dns_pmiab.sh and have issued a PR for it.

I will remove my changes to dns_miab.sh and will issue a PR for that as well.

skoszewski commented 1 week ago

@lifeboy when will you revert the patch mentioned by @draft13?

lifeboy commented 6 days ago

I believe I have done a PR, waiting for it to be accepted. Let me check up on that.

On Mon, 11 Nov 2024 at 19:03, Slawomir Koszewski @.***> wrote:

@lifeboy https://github.com/lifeboy when will you revert the patch mentioned by @draft13 https://github.com/draft13?

— Reply to this email directly, view it on GitHub https://github.com/acmesh-official/acme.sh/issues/2550#issuecomment-2468646538, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEZPJ7FFTPJ5NO2CFKQLT32ADPN7AVCNFSM6AAAAABMYL4HD6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRYGY2DMNJTHA . You are receiving this because you were mentioned.Message ID: @.***>

lifeboy commented 6 days ago

I believe I have done a PR, waiting for it to be accepted. Let me check up on that. Yes, indeed, https://github.com/acmesh-official/acme.sh/pull/5330, which creates a new DNS API for power-mail-in-a-box and reverts the change to mail-in-a-box.

@Neilpang, is there anything that is holding this back from being accepted?

lifeboy commented 6 days ago

I don't get it! My code changes were fully tested and passed all tests. When I viewed the status of the fork a couple of minutes ago it showed that I was a behind the acme master, so I requested a re-sync. Now the tests start and fail on docker right away. But again, it's not possible to see why, since the critical parts are all just rendered as asterisks in the log!

How is one expected to fix a problem without being able to see the nature of the problem??

skoszewski commented 6 days ago

Maybe it was a mistake to merge those fixes in one PR. I would do one for fix in original MIAB plugin, and another one for a new plugin.

lifeboy commented 6 days ago

The original MIAB plugin is literally one line that was added and now removed (although I did also include fixing some typos).

I still don't get how one is supposed to figure out why a test run fails though, when github hides the details with '****'.

lifeboy commented 6 days ago

I just checked the code. The change (revert) has been merged into master. Please check it @skoszewski

skoszewski commented 6 days ago

Look good. Thanks.