oGGy990 / certbot-dns-inwx

INWX DNS authenticator plugin for certbot
Apache License 2.0
105 stars 16 forks source link

INWX login failed: Parameter value syntax error (Error code 2005) #18

Closed aaronk6 closed 3 years ago

aaronk6 commented 3 years ago

Hi,

Thanks for your work!

For some reason, I’m getting the following error when trying to request a certificate:

Plugins selected: Authenticator dns-inwx, Installer None
Performing the following challenges:
dns-01 challenge for test.example.com
Cleaning up challenges
Encountered exception during recovery: certbot.errors.PluginError: INWX login failed:
    ('There was a problem: Parameter value syntax error (Error code 2005)',
    {'code': 2005, 'msg': 'Parameter value syntax error',
     'reasonCode': 'INVALID_PASS', 'reason': 'The following parameter is invalid: pass',
     'details': [{'code': 'PARAM_INVALID', 'msg': \"The parameter '' is invalid\"}], 'svTRID': '20210403-3659852973', 'runtime': 0.0027})

(Added line breaks for readability and replaced my domain name by test.example.com.)

My config looks like this:

dns_inwx_url = https://api.domrobot.com/xmlrpc/
dns_inwx_username = myusername
dns_inwx_password = my,super,secure,password
dns_inwx_shared_secret = your_shared_secret optional

And this is the command:

certbot certonly -a dns-inwx -d "*.test.example.com"

Thanks!

aaronk6 commented 3 years ago

OK, I think I’ve found the bug. My INWX account password contained a comma (,). I’ve just changed it to a string that does not contain any commas and now it’s working fine.

oGGy990 commented 3 years ago

Hi aaronk6,

the certbot configuration files support comma-separated lists as configuration values. If your password contains such a character, wrap it between quotes: "my pass,word". See also https://configobj.readthedocs.io/en/latest/configobj.html#the-config-file-format.

This is unfortunately not very well documented/referenced by the certbot devs. Guess I could simply wrap it in the examples using triple quotes.

aaronk6 commented 3 years ago

Hi @oGGy990,

Ah, that makes sense. I didn’t expect the config file format to be that powerful 😃 Just had a look at the docs and saw it also supports sub sections, multi-line strings, etc. Updating the example to always have triple quotes around the password is a good idea, I think. This should prevent others from running into the same issue.

Again, thanks for your work. This project is exactly what I was looking for and after solving the password issue, it worked perfectly for me!

oGGy990 commented 3 years ago

You're welcome. :-)

I did those changes and added my link from above to the README. But I'm delaying a new release until some more worthy changes come up. It's at least visible on the Github "front-page".

aaronk6 commented 3 years ago

That’s great! Thanks for the quick reply!