Skip to content

fix(attest): parse signer_url into host/port/path#17

Open
zemo-g wants to merge 1 commit into
masterfrom
fix/attest-signer-url-parse
Open

fix(attest): parse signer_url into host/port/path#17
zemo-g wants to merge 1 commit into
masterfrom
fix/attest-signer-url-parse

Conversation

@zemo-g

@zemo-g zemo-g commented Jun 17, 2026

Copy link
Copy Markdown
Owner

What

attest.rail read ~/.ledatic/witness/signer_url (a full URL like http://HOST:9102/sign) straight into signer_ip, so hc_connect_tcp got the entire URL as a hostname, the connection failed, and the tool printed witness signer returned nothing — while the Pi signer at :9102/sign was healthy the whole time.

Fix

Parse the signer URL into (host, port, path): strip the scheme, split authority/path on the first /, split host:port on :. Robust to a bare IP (no scheme/port → falls back to the 9102 / /sign defaults). SIGNER_IP / SIGNER_PORT / SIGNER_PATH env overrides still take precedence.

Verified

Signs a file and verify.sh returns ok (pk_fp cac5f21a70564aeb) without the SIGNER_IP= workaround. Surfaced while Pi-signing the Lakes RLAR attestation artifacts.

🤖 Generated with Claude Code

attest.rail read ~/.ledatic/witness/signer_url — which holds a full URL
(http://HOST:9102/sign) — straight into signer_ip, so hc_connect_tcp received
the entire URL as a hostname and the connection failed silently ("witness
signer returned nothing"). The Pi signer was healthy the whole time.

Parse the URL properly: scheme-strip, split authority/path on the first '/',
split host:port on ':'. Robust to a bare IP (no scheme/port). SIGNER_IP /
SIGNER_PORT / SIGNER_PATH env overrides still win. Verified end-to-end: signs
and verify.sh returns ok without the SIGNER_IP workaround.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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