fix(lightning): remove obsolete TLS server-identity bypass for LND#3922
fix(lightning): remove obsolete TLS server-identity bypass for LND#3922TaprootFreak wants to merge 1 commit into
Conversation
|
Closing — this is not a safe cleanup. The removed It only appears removable today because, post-cutover, LNBits is reached over plain HTTP ( Correct sequence if we want the override gone (per #3899's own note): first reissue the LND cert with |
Summary
Removes the now-obsolete
checkServerIdentity: () => undefinedTLS bypass from the Lightning client'stlsAgent. This re-enables standard server-identity (SAN) verification for the LND connection while still pinning the self-signed CA.This is the correct, narrowed subset of the Lightning cleanup that was bundled into #3912 — see "Deliberately NOT changed" below.
Why this is safe now
https://lnd:8080(post-cutover, dfxprd compose). The LND certificate's SAN covers that hostname (lnd, pluslocalhost,127.0.0.1,10.0.1.4, and the legacy Azure host), so default server-identity verification passes against the pinned CA — the explicit bypass is dead code.Deliberately NOT changed (differs from #3912)
#3912's commit also removed the
Host: new URL(Config.url()).hostnameheader fromhttpLnBitsConfig. That removal is kept out here on purpose: the LNBits instance on dfxprd has no base-URL / forwarding config (LNBITS_BASEURL,FORWARDED_ALLOW_IPSare unset), so LNBits builds its LNURL callback URLs from the incomingHostheader. Dropping it would make LNURLs resolve to the internallnbits:5000host → broken LNURL pay/withdraw links. The header stays.Test plan (verify on DEV before promoting to main)
/version-adjacent health, e.g. node info / channel balance) — confirms TLS still verifies against the DEV LND cert SAN.Hostheader).