fix(attest): parse signer_url into host/port/path#17
Open
zemo-g wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
attest.railread~/.ledatic/witness/signer_url(a full URL likehttp://HOST:9102/sign) straight intosigner_ip, sohc_connect_tcpgot the entire URL as a hostname, the connection failed, and the tool printedwitness signer returned nothing— while the Pi signer at:9102/signwas healthy the whole time.Fix
Parse the signer URL into
(host, port, path): strip the scheme, split authority/path on the first/, splithost:porton:. Robust to a bare IP (no scheme/port → falls back to the 9102 //signdefaults).SIGNER_IP/SIGNER_PORT/SIGNER_PATHenv overrides still take precedence.Verified
Signs a file and
verify.shreturnsok(pk_fpcac5f21a70564aeb) without theSIGNER_IP=workaround. Surfaced while Pi-signing the Lakes RLAR attestation artifacts.🤖 Generated with Claude Code