Skip to content

trustedcoin: keep the bitcoind RPC password out of the Core Lightning journal - #362

Merged
prusnak merged 3 commits into
masterfrom
pr-193
Nov 30, 2026
Merged

prusnak merged 3 commits into
masterfrom
pr-193

Conversation

@prusnak

@prusnak prusnak commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

TrustedCoin logs its bitcoind RPC settings at startup, including the password Core Lightning uses to authenticate. Anyone with access to the clightning journal can read that credential.

Apply the redaction commit from upstream PR 43 to the pinned TrustedCoin package. The startup log still shows the RPC user, host, and port, with in the password field. The existing PR 44 patches already include PR 43’s connection-error formatting fix. Upstream PR 43 · Upstream PR 44

The regression test waits for the redacted startup line and checks the full clightning journal for the actual RPC password.

Verification

  • Built TrustedCoin on ARM64 Linux and passed the test-runner check.
  • Started the rebuilt plugin with a test password and confirmed its output contained and no copy of the password.
  • Skipped the VM integration test because KVM was unavailable.

@github-actions github-actions Bot added area: ci .github/, test/, dev/ area: docs docs/, README, examples/, SECURITY.md, book.toml, assets area: packages pkgs/ and flake pins size: S 10–29 changed lines (additions + deletions) labels Nov 30, 2026
@seberm seberm added this to the v0.2.2 milestone Nov 30, 2026
When trustedcoin finds bitcoin-rpcuser and bitcoin-rpcpassword in the
Core Lightning config, it logs both at startup together with the host
and port. With the plugin enabled, Core Lightning's bitcoind RPC password
ends up in the lightningd journal, which the operator account can read
because it is in systemd-journal.

Pin the redaction commit from nbd-wtf/trustedcoin#43 with fetchpatch.
The existing patches from nbd-wtf/trustedcoin#44 also include PR 43's
connection-error formatting fix.

Assisted-by: Codex (GPT-6)
The trustedcoin test only checked that RPC works, so the password could
come back into the startup line without anything failing. Wait for the
redacted settings line and check the clightning journal for the bitcoind
RPC password used by Core Lightning.

Assisted-by: Codex (GPT-6)
@github-actions github-actions Bot added size: XS 0–9 changed lines (additions + deletions) and removed size: S 10–29 changed lines (additions + deletions) labels Nov 30, 2026

@sebsgent sebsgent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix and test look good; one item before merge.

Must

  • No release-note draft. Per AGENTS.md, package-only changes go in docs/release-notes/0.2.2/<title>.md. This one matters to users: on any node that ran trustedcoin before this fix, the clightning bitcoind RPC password is still in the existing clightning journal, readable by the operator account and any journal shipping. The patch only stops new entries, so users need to be told the old ones exist and what they can do about them.

Tested: CI signet (trustedcoin enabled) ran the new check on the previous push (run 46506914096, reused from cache on 51045b3): the startup line shows password: <redacted> and the journal grep passes. Upstream main.go has no other log of pass.

Assisted-by: Claude Code (Claude Opus 5.5)

@github-actions github-actions Bot added size: S 10–29 changed lines (additions + deletions) and removed size: XS 0–9 changed lines (additions + deletions) labels Nov 30, 2026
@prusnak
prusnak merged commit 2c58930 into master Nov 30, 2026
23 checks passed
@prusnak
prusnak deleted the pr-193 branch November 30, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci .github/, test/, dev/ area: docs docs/, README, examples/, SECURITY.md, book.toml, assets area: packages pkgs/ and flake pins size: S 10–29 changed lines (additions + deletions)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

trustedcoin: the plugin logs the public bitcoind RPC password at startup, so it ends up in the journal

4 participants