openwrt / packages

Community maintained packages for OpenWrt. Documentation for submitting pull requests is in CONTRIBUTING.md
GNU General Public License v2.0
4.01k stars 3.49k forks source link

acme dns_loopia #18539

Open qwuille opened 2 years ago

qwuille commented 2 years ago

Maintainer: @\tohojo Environment: OpenWrt 21.02.1 r16325-88151b8303 / LuCI openwrt-21.02 branch git-22.119.37126-a993714

Description: Everything worked fine until Loopia updated their PAI service, but they said it sohuld not affect present functionality. But apparently something broke and i have been retrying, testing and goooogling alot for the issue, but i can not find a solution :/

This is my --debug 2

Log was too long, so posted it here.
https://paste-bin.xyz/57836

The red marked parts are these from the debug 2

[Sat May 14 21:43:01 CEST 2022] Error
[Sat May 14 21:43:01 CEST 2022] Error add txt for domain:_acme-challenge.SOMEDOMAIN.EU
[Sat May 14 21:43:01 CEST 2022] _on_issue_err
[Sat May 14 21:43:01 CEST 2022] Please add '--debug' or '--log' to check more details.
[Sat May 14 21:43:01 CEST 2022] See: https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh

This is my config

config acme
        option state_dir '/etc/acme'
        option account_email 'SOMEGMAILUSERNAME@gmail.com'
        option debug '1'

config cert 'qdomains'
        option keylength '2048'
        option update_uhttpd '1'
        option update_nginx '1'
        option enabled '1'
        list domains 'SOMEDOMAIN.EU'
        list domains '*.SOMEDOMAIN.EU'
        list domains '*.home.SOMEDOMAIN.EU'
        list domains 'SOMEOTHERDOMAIN.EU'
        list domains '*.SOMEOTHERDOMAIN.EU'
        list domains '*.home.SOMEOTHERDOMAIN.EU'
        option validation_method 'dns'
        option dns 'dns_loopia'
        option days '85'
        option use_staging '1'
        list credentials 'LOOPIA_Api="https://api.loopia.se/RPCSERV"'
        list credentials 'LOOPIA_User="SOMEUSERNAME@loopiaapi"'
        list credentials 'LOOPIA_Password="PASSWORD_WITH_UPPERCASE_LOWERCASE_NO_WIERD_CHARACTERS"'
aggut commented 1 year ago

The method call for set txt record used is malformed. Loopia API expects the record_obj parameter to have a tag around the which is missing, add this in the dns_loopia.sh somewhere around line 212, or update with latest acme dns api as this was fixed in a commit on mar 4 2022