obynio / certbot-plugin-gandi

Certbot plugin for authentication using Gandi LiveDNS

Home Page:https://pypi.org/project/certbot-plugin-gandi/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

improvement: sharing ID parameter

gbaudot opened this issue · comments

Hello.
After a little while running with home made manual hooks, I decided to try and use "official" plugin, but as my case requires the use of sharing ID, I forked your project and made the required changes. Then my question is: would you want this to be merged (or redo it your own way: since I am not really used to Python programming, I may have made it the wrong way... even if it happens to work) or should I just keep it for my personal use ?

Regards,
GB

Hello,

Yes I saw your changes when you forked the project and it seems to be a good feature to add.
I'll take a look at your work to add your changes on this project 🙂

For people looking at this issue, the SHARING_ID is mentionned in the LiveDNS documentation https://doc.livedns.gandi.net/

There is some description of it here:
https://api.gandi.net/docs/reference/#Sharing-ID

Feel free to mention me if you need help with that feature.

Hello.
If still willing to implement the change I made, I think most of it is harmless but for the URL parameter addition (which is dirty, indeed / quite sure there is a proper python way, just don't know it).

Regards,
GB

Thank you, I just drafted a new release with your changes. I think it's cleaner to pass the sharing_id directly to the request lib which will discard it if set to None.

It's seem not to be optional... Cannot obtain certificate without sharing id

sudo certbot certonly -a certbot-plugin-gandi:dns --certbot-plugin-gandi:dns-credentials /etc/letsencrypt/gandi.ini -m XXXXX@timotheegirard.com --agree-tos -n -d \*.timotheegirard.com -d timotheegirard.com

[sudo] password for timothee: 
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator certbot-plugin-gandi:dns, Installer None
Obtaining a new certificate
Performing the following challenges:
dns-01 challenge for timotheegirard.com
dns-01 challenge for timotheegirard.com
Cleaning up challenges
Missing property in credentials configuration file /etc/letsencrypt/gandi.ini:
 * Property "certbot_plugin_gandi:dns_sharing_id" not found (should be Optional Gandi organization ID).

gandi.ini :

certbot_plugin_gandi:dns_api_key=XXXXXXXXXXXXXXX

Well, apparently the params passed to request (gandi_api.py, line 39) should be conditioned to the actual parameter presence.
Anyway, I wish you all a happy new year, cheers!

Thanks !

It's work with this gandi.ini :

certbot_plugin_gandi:dns_api_key=XXXXXXXXXXXX
certbot_plugin_gandi:dns_sharing_id=None

Thanks @Titome, I'll publish a new release to correct this issue

I misread the certbot api and wrongly assumed the parameters could be optional. The issue should be fixed in the latest release 1.2.5. I hope it won't break anything.

Many thanks.
I guess it is time for me now to get rid of my fork and fix my deps.

++
Gi)