This repository was archived by the owner on Nov 10, 2026. It is now read-only.
Repository navigation
v1.4.3: verify outbound TLS; distrust eMudhra roots - #46
Merged
Merged
Conversation
- Remove the process-wide NODE_TLS_REJECT_UNAUTHORIZED='0' and every rejectUnauthorized:false in pc2-node. - Supernode IPs verify against their Let's Encrypt *.ela.city cert via SNI/servername; Host header and nginx routing unchanged. - Filter the roots distrusted after the eMudhra compromise (by SPKI) out of the trust store used by fetch and the default https agent. - Drop NODE_TLS_REJECT_UNAUTHORIZED=0 from the supernode gateway unit. - CI guard against reintroducing a bypass; unit tests.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
pc2-node accepted any certificate on outbound HTTPS.
UsernameService.tssetNODE_TLS_REJECT_UNAUTHORIZED='0'for the whole process at import, and three call sites usedrejectUnauthorized: false. This turns verification back on everywhere and also handles the eMudhra root compromise (20 Oct 2026).Approach. Both supernodes (69.164.241.210, 38.242.211.112) already serve the Let's Encrypt
*.ela.citycertificate on their IPs. The only thing that failed was the hostname check. pc2-node keeps connecting by IP and keeps the sameHostheader, so nginx routing is unchanged, but it verifies the chain againstsupernode.ela.citythrough SNI. No DNS or server change is needed.Changes
pc2-node/src/utils/tlsTrust.ts:supernode.ela.city,installOutboundTlsPolicy()applies both to globalfetch(undici dispatcher) and to the defaulthttpsagent. It's called at boot inindex.ts.UsernameService.ts: removes the global switch.api/index.ts(ESC RPC proxy),ConnectivityService.ts(supernode discovery) andchipotle-client.ts(provisioning fetch only): replacerejectUnauthorized:falsewith the supernodeservername.http-client.ts: the per-request pinned dispatcher uses the filtered roots.deploy/supernode-bootstrap.sh: no longer writesNODE_TLS_REJECT_UNAUTHORIZED=0into the gateway unit. Neither live gateway has it set today.pc2-node/srcreintroduces either bypass. Newtests/unit/tls-trust.test.js.Security policy note.
chipotle-client.tsis on the review checklist. The only change there is the TLS options on the provisionhttpsGet. The provision envelope signature check, sessions and CEK paths are untouched.Verified locally (Node 20, built module)
/api/health, ESC RPC,/api/ddrm/provision,/api/supernodesand cluster-pin verify,fetchandhttps.Not in this PR (tooling, low priority):
curl -kindeploy/supernode-bootstrap.shcron lines and inscripts/*.sh, andrejectUnauthorized:falseintests/api-tester,tools/comment-writerandpc2-node/scripts/*.mjs.Do not merge until it has been tested on zzz.ela.city.