Skip to content

fix(config): restore LIGHTNING_API_CERTIFICATE fallback when no cert path is set#202

Closed
Danswar wants to merge 1 commit into
developfrom
fix/restore-lightning-cert-env-fallback
Closed

fix(config): restore LIGHTNING_API_CERTIFICATE fallback when no cert path is set#202
Danswar wants to merge 1 commit into
developfrom
fix/restore-lightning-cert-env-fallback

Conversation

@Danswar

@Danswar Danswar commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Counterpart of DFXswiss/api#3868, follow-up to #200 per David's 06-11 note on the cert PRs: hosts without the LND lightning volume (prod dfx-api today is hosted off DFX servers; the same fragility applies here) were left with no cert source after the env-var removal.

  • readCert(): unset LIGHTNING_API_CERTIFICATE_PATH → fall back to LIGHTNING_API_CERTIFICATE (same <br>→newline handling as before feat(config): load LND TLS cert from file with env fallback #200); set path → read-or-throw, unchanged — a broken mount still fails loudly and is never masked by the fallback, which is only consulted when no path is configured.

nest build clean, 22/22 tests pass.

…path is set

Per review on #200: environments without the LND lightning volume (e.g. prod
hosted off DFX servers) have no file to mount, so dropping the env var left
them without a cert source. Restore it as the fallback when
LIGHTNING_API_CERTIFICATE_PATH is unset; a set-but-unreadable path still
throws (fail-loud mount check unchanged).
@Danswar

Danswar commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator Author

Not needed: LDS is fully migrated to DFX servers, so the cert file mount is always available and the read-or-throw path in #200 is the right behavior here. The fallback was only required for dfx-api on Azure (solved by DFXswiss/api#3867).

@Danswar Danswar closed this Jun 11, 2026
@Danswar Danswar deleted the fix/restore-lightning-cert-env-fallback branch June 11, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant