Domain Validation¶
What is implemented¶
Transport tests verify that a connection with mismatched peer domain is rejected (ErrDomainMismatch) even when TLS handshake succeeds.
Certificate Identity Mapping Rules¶
Transport identity extraction is now explicit (certIdentityFromCert):
URI SAN rule (preferred): parse URI path segments:
/.../peers/<peer-id>/...→PeerID = "uri:<peer-id>"/.../domains/<domain-id>/...→ extracted certificate domain
DNS SAN fallback:
PeerID = "dns:<first-dns-san>"CN fallback:
PeerID = "cn:<subject-cn>"Final fallback: SHA-256 fingerprint of DER certificate bytes
If a certificate domain is present and mismatches local edge_domain_id, transport rejects with ErrDomainMismatch.
Clarification¶
The previous mention of tool.http_get allowlist belongs to runtime tool policy controls, not deterministic relay transport domain validation.
Evidence¶
edge/transport/transport.go(ErrDomainMismatch,PeerIDcontract)edge/transport/tcptls.go(certIdentityFromCert,parseIdentityURI, certificate-domain enforcement)edge/transport/transport_test.go(TestTCPTLS_WrongDomain_Rejected)edge/transport/identity_test.go(TestCertIdentityFromCert_URIRules,TestCertIdentityFromCert_CNFallback)docs/_generated/test-outputs/demo-output.txt(shows documented fallback path when socket tests are unavailable)runtime/tools.go(ErrDomainNotAllowed, runtime-layer concern)