Skip to content

Fix parsing errors while using IPv6 URLs. #6327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

Maddi-cisco
Copy link

Problem

When using an IPv6 address instead of a domain name for the server url, enrollment fails with an error "_authorizations_seg not found".

See issue #6326

Rootcause

Issue with parsing the URL containing IPv6 addresses. during the enrollment process.

Sample Logs:

[Tue Apr 22 19:21:16 UTC 2025] code='201'
[Tue Apr 22 19:21:16 UTC 2025] original='{"id":"qfst0PFCO2RexOQhIqGVwgvAdDpMPm0K","status":"pending","expires":"2025-04-23T19:21:17Z","identifiers":[{"type":"dns","value":"maddi-asa"}],"notBefore":"2025-04-22T19:20:17Z","notAfter":"2025-04-23T19:21:17Z","authorizations":["https://[2001:420:2c7f:11:10:86:92:243]/acme/acme/authz/NKLZIFVVTltOWpKEvoAvT5nfjf52haDb"],"finalize":"https://[2001:420:2c7f:11:10:86:92:243]/acme/acme/order/qfst0PFCO2RexOQhIqGVwgvAdDpMPm0K/finalize"}'
[Tue Apr 22 19:21:16 UTC 2025] response='{"id":"qfst0PFCO2RexOQhIqGVwgvAdDpMPm0K","status":"pending","expires":"2025-04-23T19:21:17Z","identifiers":[{"type":"dns","value":"maddi-asa"}],"notBefore":"2025-04-22T19:20:17Z","notAfter":"2025-04-23T19:21:17Z","authorizations":["https://[2001:420:2c7f:11:10:86:92:243]/acme/acme/authz/NKLZIFVVTltOWpKEvoAvT5nfjf52haDb"],"finalize":"https://[2001:420:2c7f:11:10:86:92:243]/acme/acme/order/qfst0PFCO2RexOQhIqGVwgvAdDpMPm0K/finalize"}'
[Tue Apr 22 19:21:16 UTC 2025] Le_LinkOrder='https://[2001:420:2c7f:11:10:86:92:243]/acme/acme/order/qfst0PFCO2RexOQhIqGVwgvAdDpMPm0K'
[Tue Apr 22 19:21:17 UTC 2025] Le_OrderFinalize='https://[2001:420:2c7f:11:10:86:92:243]/acme/acme/order/qfst0PFCO2RexOQhIqGVwgvAdDpMPm0K/finalize'
[Tue Apr 22 19:21:17 UTC 2025] _authorizations_seg
[Tue Apr 22 19:21:17 UTC 2025] _authorizations_seg not found.
[Tue Apr 22 19:21:17 UTC 2025] pid
[Tue Apr 22 19:21:17 UTC 2025] No need to restore nginx config, skipping.
[Tue Apr 22 19:21:17 UTC 2025] _clearupdns
[Tue Apr 22 19:21:17 UTC 2025] dns_entries
[Tue Apr 22 19:21:17 UTC 2025] Skipping dns.
[Tue Apr 22 19:21:17 UTC 2025] _on_issue_err
[Tue Apr 22 19:21:17 UTC 2025] Please add '--debug' or '--log' to see more information.
[Tue Apr 22 19:21:17 UTC 2025] See: https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh
[Tue Apr 22 19:21:17 UTC 2025] _chk_vlist
[Tue Apr 22 19:21:17 UTC 2025] socat doesn't exist.
[Tue Apr 22 19:21:17 UTC 2025] Diagnosis versions:

Solution

Fix the logic to parse authorization url properly.

Tests Executed

Certificate enrollment with a Step-ca server using IPv4, IPv6, domain name in the server url.

@Maddi-cisco
Copy link
Author

hi @Neilpang, can you please look into this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant