fix(lightning): restore LIGHTNING_API_CERTIFICATE fallback when no cert path is set#3868
Closed
Danswar wants to merge 1 commit into
Closed
fix(lightning): restore LIGHTNING_API_CERTIFICATE fallback when no cert path is set#3868Danswar wants to merge 1 commit into
Danswar wants to merge 1 commit into
Conversation
…rt path is set Per review on #3861: prod dfx-api is not hosted on DFX servers yet, so it has no LND lightning volume to mount — removing the env var entirely left prod with no cert source once this code ships there. Restore the env var as the fallback for hosts without the mount; when LIGHTNING_API_CERTIFICATE_PATH is set it still reads the live file and throws if unreadable (fail-loud mount check unchanged).
Member
|
Duplicate of #3867 |
Collaborator
Author
|
Same fix, you were faster 🙂 — #3867 covers it. |
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.
Follow-up to #3861, per David's 06-11 review note: prod dfx-api is not hosted on DFX servers yet (no local
lnd/ lightning volume to mount), so removingLIGHTNING_API_CERTIFICATEentirely left prod with no cert source once this code reaches it.This restores the env var as the fallback only when
LIGHTNING_API_CERTIFICATE_PATHis unset (hosts without the mount, i.e. today's prod). The fail-loud behavior David asked for is unchanged: when the path is set, the live file is read and a missing/unreadable file still throws at startup — a broken mount can't be masked by a stale env var, because the fallback is never consulted in that case.readCert(): unset path →LIGHTNING_API_CERTIFICATE(same<br>→newline handling as before feat(lightning): support loading LND TLS certificate from file #3861); set path → read-or-throw (unchanged).env.example:LIGHTNING_API_CERTIFICATEre-added with a comment explaining the precedencetscclean.