nginx-proxy-manager icon indicating copy to clipboard operation
nginx-proxy-manager copied to clipboard

Gandi DNS challenge fails: Invalid sharing_id: SHARINGID.

Open Raptime opened this issue 2 years ago • 2 comments

Checklist

  • Have you pulled and found the error with jc21/nginx-proxy-manager:latest docker image?
    • Yes
  • Are you sure you're not using someone else's docker image?
    • Yes
  • Have you searched for similar issues (both open and closed)?
    • Yes

Describe the bug Gandi DNS challenge fails: Invalid sharing_id: SHARINGID.

Error: Command failed: certbot certonly --config "/etc/letsencrypt.ini" --cert-name "npm-4" --agree-tos --email "[email protected]" --domains "grafana.home.yopyop.org" --authenticator dns-gandi --dns-gandi-credentials "/etc/letsencrypt/credentials/credentials-4"
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Invalid sharing_id: SHARINGID.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

    at ChildProcess.exithandler (node:child_process:399:12)
    at ChildProcess.emit (node:events:526:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)

Nginx Proxy Manager Version v2.9.18

To Reproduce Steps to reproduce the behavior:

  1. Go to 'SSL Certificates'
  2. Add a new Certificate
  3. Toggle 'Use a DNS Challenge'
  4. Use 'Gandi Live DNS' as a provider
  5. Enter Credentials File Content
  6. Toggle the agreement button
  7. Click 'Save'
  8. See error

Expected behavior A new Certificate is generated

Operating System Docker compose on debian stable

Additional context Looks like the issue is the inclusion of this line, which is actually optional and can't be filled via the web interface anyway:

# optional organization id, remove it if not used
dns_gandi_sharing_id=SHARINGID

Looking at the log file:

[9/18/2022] [2:32:28 PM] [SSL      ] › ℹ  info      Requesting Let'sEncrypt certificates via Gandi Live DNS for Cert #4: grafana.home.<redacted>.org
[9/18/2022] [2:32:28 PM] [SSL      ] › ℹ  info      Command: mkdir -p /etc/letsencrypt/credentials 2> /dev/null; echo '# live dns v5 api key
dns_gandi_api_key=<redacted>

# optional organization id, remove it if not used
dns_gandi_sharing_id=SHARINGID' > '/etc/letsencrypt/credentials/credentials-4' && chmod 600 '/etc/letsencrypt/credentials/credentials-4' && pip install certbot_plugin_gandi~=1.3.2  && certbot certonly --config "/etc/letsencrypt.ini" --cert-name "npm-4" --agree-tos --email "<redacted>@<redacted>.org" --domains "grafana.home.<redacted>.org" --authenticator dns-gandi --dns-gandi-credentials "/etc/letsencrypt/credentials/credentials-4"
[9/18/2022] [2:32:36 PM] [Nginx    ] › ℹ  info      Reloading Nginx
[9/18/2022] [2:32:36 PM] [Express  ] › ⚠  warning   Command failed: certbot certonly --config "/etc/letsencrypt.ini" --cert-name "npm-4" --agree-tos --email "<redacted>@<redacted>.org" --domains "grafana.home.<redacted>.org" --authenticator dns-gandi --dns-gandi-credentials "/etc/letsencrypt/credentials/credentials-4"
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Invalid sharing_id: SHARINGID.

Step 2 adds the api_key and the sharing ID when just adding the API key should suffice (especially since the webUI doesn't give us control over the content of the SHARINGID)

Raptime avatar Sep 18 '22 14:09 Raptime

Also, I confirmed that going into the docker container and running the same steps without the SHARINGID into the credential file works and generates a certificate

Raptime avatar Sep 18 '22 15:09 Raptime

I don't have a gandi account so can't do a full test, but I can simply highlight the SHARINGID line and delete it, try and save the SSL creation screen and the credentials file written does not have the SHARINGID line so would not fail due to the line being left in. The field "credentials file content" is fully editable and saves correctly, not sure what is stopping you. I'm using google chrome is that makes a difference.

the1ts avatar Sep 18 '22 19:09 the1ts

Issue is now considered stale. If you want to keep it open, please comment :+1:

github-actions[bot] avatar Feb 09 '24 01:02 github-actions[bot]