Repository navigation
lndconnect: give the operator onion access only when the operator role is enabled - #170
Conversation
seberm
left a comment
There was a problem hiding this comment.
Could we go back to keying on nix-bitcoin.operator.enable, as the first commit did? onion-services.nix already gives the operator onion access with mkIf config.nix-bitcoin.operator.enable, and the wireguard preset checks the same option, so a user-existence check makes lndconnect the only place where a hand-defined operator user gets onion access. The documented way to reuse an existing user is operator.enable = true plus operator.name, which merges into that user.
Keying on the option also keeps access an explicit choice instead of depending on whether some module happens to define a user named operator.name, and avoids reading users.users while onionAddresses.access is being built.
The new eval-time check in onion-addresses.nix seems the right place for the existence test and already prevents the boot failure; the branch also needs a rebase onto master.
viberaven
left a comment
There was a problem hiding this comment.
No additional code defects found at 64999ca.
Five focused Nix evaluations passed: lndconnect without an operator, with an enabled operator, with operator.name equal to the LND user, lnconnect onion mode without an operator, and onion access naming an undefined user. These checks confirm the expected access users and assertion messages.
The branch still conflicts with master in test/configuration.nix and needs that conflict resolved. This review does not resolve the existing maintainer feedback about using operator.enable versus user existence.
The full module-config suite exceeded the local memory limit. VM tests were not run because /dev/kvm is unavailable.
Review performed with Codex (GPT-6 Astra).
64999ca to
e9a758c
Compare
sebsgent
left a comment
There was a problem hiding this comment.
The operator.enable gating fixes #166, but the documented role-off migration doesn't give a working lnconnect-clnrest.
Must fix
- The explicit
clnrestgrant passes evaluation, but the helper fails at runtime.lnconnect-clnresthas no run-as shebang and readsadmin-runedirectly. The rune is0640 clightning:clightningin a0710dir, and only the operator role adds theclightninggroup. In a VM withaliceas operator, the role off andaccess.alice = [ "clnrest" ],alicecan read the onion address, butrunuser -u alice -- lnconnect-clnrest --urlfails withcat: .../admin-rune: Permission denied. The same command works as root, and asalicewith theclightninggroup added. This was already broken before this PR, but the PR now presents the grant as the way to keep this working. Either document the missing step (users.users.<name>.extraGroups = [ "clightning" ];, noting that the group gives read access to the admin rune and to the RPC socket) or say that without the role the helper only works as root. Updatedocs/services.md, the second bullet indocs/upgrading.md, the assertion message inmodules/lndconnect.nixand the 0.1.4 message inmodules/versioning.nix.testOperatorAccountExplicitAccessonly checks that evaluation passes, so it doesn't cover this.
Should fix
- The lnd half of the 0.1.4 entry blocks evaluation for a small loss.
lndconnectreads${lnd.user}/lnd-restand runs as the lnd user, so it doesn't use the operator's copy. The only reader in the tree is nodeinfo'sonion_rest_address. Gate that half of the condition onnix-bitcoin.nodeinfo.enable, or drop it. Say indocs/upgrading.mdthatlndconnectitself doesn't need the grant.
Nit
- With no operator account, the assertion's second hint (add
clnresttoaccess.operator) only leads to the undefined-user assertion. Say that the user must exist, or offer that hint only when it does.
Tested: module-config passes on the PR merged with master. Five of the six new tests fail on master, and the operator-enabled one has nothing to catch there. The toplevel drvPath of a role-on lndconnect and lnconnect onion config is identical to master, so role-on nodes don't change. One VM run of the role-off explicit grant, as above. I did not re-run the full scenario.
Review performed with Claude Code (Claude Opus 5.5).
e9a758c to
d1b46ab
Compare
|
Thanks, all three are in. Rebased on master and squashed into one commit. Must fix: confirmed. The rune is Should fix: dropped the lnd half. Nit: the assertion offers the explicit grant only when the operator user exists. If the user doesn't exist, it says to define the user and points to the docs. Config version: 0.1.4 shipped without this change, so the entry, the upgrade section and the example config now use 0.1.5. Tested on master plus this commit: |
viberaven
left a comment
There was a problem hiding this comment.
Reviewed c1e4bc0 against its merge base, including the previous review discussion. The operator.enable gating, separate LND grant, explicit clnrest access, login-name checks, and group-access guidance address the earlier concerns. One P2 migration gap remains, described inline: the generic access-user assertion introduces a second compatibility break that the 0.1.5 versioning entry does not cover.
Validation:
- All 10 added configuration tests passed in separate Nix evaluations using the PR's pinned inputs.
- Additional evaluation confirmed that the explicit grant works with an account whose attribute name differs from its login name.
- The new lnconnectNoOperatorRole scenario evaluates without failed assertions, with the operator role disabled, only the clightning group, and the explicit clnrest grant.
- All 9 test-runner tests passed against the assembled suite.
- Compared the externally managed recipient case with the pre-PR configuration: the new generic assertion rejects it, while the 0.1.4 version check still passes.
Full flake and VM tests were not run locally; this host has no /dev/kvm.
Review performed with Codex (GPT-6 Astra).
|
I pushed a second commit, c1e4bc0, on top of d1b46ab.
Tests:
Codex GPT-5.6 Sol (xhigh) and GPT-6 Astra (xhigh) reviewed it, and their last round found nothing more. GLM 5.3 ran over c1e4bc0 and Astra checked its report. Nothing came up in the files this PR touches. |
|
Thanks, that's a real gap. Fixed in fadefe6.
module-config passes with 71 checks, and the Codex GPT-6 Astra and GPT-5.6 Sol (both at max) reviewed it over six rounds and found several holes in the migration advice and wording. All are fixed, and Astra's last round found no defects. Kimi K3, DeepSeek V4.1 Flash and GLM 5.3 (all at max) ran over fadefe6, and Astra and Sol checked their report. Nothing came up in the files this PR touches. |
viberaven
left a comment
There was a problem hiding this comment.
Reviewed fadefe6 against its merge base and the previous review discussion. No additional code defects found. The latest commit addresses the missing migration notice for externally managed recipients. The operator grants, login-name validation, and explicit-access migration look consistent.
Validation on this PR head:
- module-config passed.
- All nine test-runner checks passed.
- The lnconnectNoOperatorRole VM scenario passed under KVM.
Before merging:
- Resolve the current conflicts with master in docs/upgrading.md and modules/versioning.nix, preserving both sets of 0.1.5 changes.
- Add the Assisted-by: commit trailers required by AGENTS.md. All three PR commits currently lack them; the AI-assistance disclosure in the PR description does not satisfy the commit-trailer policy.
The complete flake/VM matrix was not run locally.
Review performed with Codex (GPT-6 Astra).
|
Merged master in 8e6ed56, with no rebase. Master's three 0.1.5 entries come first, then the two from this PR, and Master's clnrest notice fires for every config with clnrest enabled at 0.1.4. So a pass/fail version check could no longer tell whether this PR's clnrest notice fires. c1d527a adds an internal read-only option, module-config passes with 74 checks, and Kimi K3, DeepSeek V4.1 Flash and GLM 5.3 (all at max) ran over e36b5e0, and Astra checked their report. Nothing came up in the files this PR touches. |
|
v0.1.5 is released, so this PR's versioning entries can no longer target 0.1.5: users who already set
Thanks! |
e36b5e0 to
5e396e2
Compare
|
Rebased onto master and moved everything to 0.1.6 as you listed. One extra: |
5e396e2 to
101cb54
Compare
|
Rebased onto master again, because today's merges made it conflict. I also added the |
viberaven
left a comment
There was a problem hiding this comment.
Reviewed 101cb54 against the merge base and the previous review discussion. No blocking correctness findings. The operator-role gating, separate LND grant, login-name validation, and explicit clnrest access are consistent with the surrounding modules. Both compatibility breaks now have 0.1.6 notices and migration guidance, and all five PR commits have Assisted-by trailers.
Validation on this head:
- module-config: all 81 configuration tests passed.
- test-runner: all nine checks passed.
- lnconnectNoOperatorRole: passed under KVM, including lightning-cli getinfo and lnconnect-clnrest --url as the operator with the role disabled.
- git diff --check passed.
Small non-blocking documentation follow-up: please add a short entry under 0.1.6 in docs/release-notes.md describing the onion-address publication fix and linking to the 0.1.6 upgrading section, as requested by AGENTS.md. The migration details are already documented there.
The complete flake and VM matrix was not rerun locally. GitHub reports the current ci_gate as successful.
Review performed with Codex (GPT-6 Astra).
…ded (#188) The WireGuard preset binds the REST ports of the enabled `*connect` helpers to 0.0.0.0 and guards them, and `restrictPeer`, only through `networking.firewall.extraCommands`. Its assertion required the iptables backend, but some layouts pass that check and still end with no firewall. This is the same kind of gap #175 closed for netns-isolation. What changed, one commit on current master: - **Package check.** `networking.firewall.package` defaults to `pkgs.nftables` whenever `networking.nftables` is enabled, whatever the backend says. The firewall service then has no `iptables` binary and fails at its first rule. The assertion now rejects the nftables package unless `networking.firewall.extraPackages` holds iptables, which the service also puts on its PATH. - **flushRuleset check.** `pkgs.iptables` is iptables-nft, so the rules live in the nftables ruleset. With `networking.nftables.flushRuleset`, every start or reload of `nftables.service` runs `flush ruleset` and deletes them while `firewall.service` stays active. NixOS turns it on by default when `ruleset` or `rulesetFile` is set or `system.stateVersion` is older than 23.11. A separate assertion rejects it and points to `networking.nftables.tables` with `flushRuleset = false`. - **Table name check.** `nftables.service` deletes and recreates every table in `networking.nftables.tables`. A table named `filter` in the `ip` or `ip6` family is the one iptables-nft keeps `nixos-fw` in, so that's rejected too. `inet filter` still passes. Raw `flush` or `delete` lines in `ruleset`, `rulesetFile` or `extraDeletions` aren't checked. - The messages say to restart `firewall.service` once after a fix, since the first nftables reload still runs the old deletions file. - `docs/services.md` lists the preset's firewall requirements in the WireGuard setup step. - Configuration checks: nftables with the iptables backend fails, the iptables package or `extraPackages` passes, `ruleset` set fails, `system.stateVersion = lib.mkForce "23.05"` fails, tables only passes, an `ip filter` table fails. ## Tested - `module-config` on my KVM host on top of master: 67 tests pass. With master's preset and the new tests, the four rejection tests fail. With the previous PR head's preset, the `ruleset` and `stateVersion` tests fail. - In the pinned nixpkgs, `nftables.nix` sets the `flushRuleset` default to `mkDefault (versionOlder stateVersion "23.11" || rulesetFile != null || ruleset != "")`, and recreates each table in `tables` on reload. - The `wireguard-lndconnect` VM scenario passes. DeepSeek V4.1 Flash 1017 (max) found the package gap in the gate runs on #170 and #184 and Codex (GPT-6 Astra, xhigh) confirmed it both times. @sebsgent found the flushRuleset hole. Claude Opus 5.5 wrote this version. Codex (GPT-5.6 Sol, xhigh) reviewed it in two passes and found two real issues: the `ip filter` table clash, and that the first reload after a fix still applies the old deletions. Both are in. Its point that any package not named `nftables` passes is by design, the same check as #175. DeepSeek V4.1 Flash 1017 (max) and GLM 5.3 (max) audited the tree at 1cea5a7 with Codex (GPT-6 Astra, xhigh) as the second opinion: seven findings, none in the files this PR touches. They're in RTL, mempool settings, the shared Tor SOCKS port and the netns source filter, and Astra marked the three netns ones false positives. netns-isolation has the same flushRuleset and table-name hole: a flush deletes `nb-netns-bridge`'s MASQUERADE rule and the host's `nixos-fw`, while the per-namespace rules survive. That's a separate PR.
8594cfa to
554954c
Compare
554954c to
16f30a1
Compare
|
@ostermayer I tried to rebase the PR on top of current master, but now it fails in the CI. Can you please have a look? |
…e is enabled lndconnect and lnconnect added nix-bitcoin.onionAddresses.access entries for the operator user whenever their onion variant was on. With nix-bitcoin.operator.enable at its default of false, that user usually doesn't exist. The onion-addresses service then failed at its chown and published no onion address for anyone, which took down a public bitcoind and the Lightning daemons behind it. The operator entries now depend on nix-bitcoin.operator.enable, like the operator access in onion-services.nix and the WireGuard preset. Access stays an explicit choice and doesn't depend on whether some module defines a user with the operator's name. The lnd user's own entry stays, and it is a separate definition, so an operator named like the lnd user is not a duplicate attribute key. lnconnect-clnrest reads the clnrest onion address from the operator's directory, so its onion option asserts that the operator has clnrest access. A config can grant it explicitly without enabling the whole operator role. The helper also reads the admin rune, which only the clightning group can read. Without the role, the user must be added to that group or run the helper as root. The docs, the assertion and the versioning message say so, and note that the group can read the admin rune and use the RPC socket. The assertion offers the explicit grant only when the operator user exists. onion-addresses asserts at evaluation time that every access user is defined, so a typo fails the build instead of every address at boot. An existing account named as the operator with the role disabled used to get the clnrest access implicitly and now loses it. The 0.1.5 versioning entry and the upgrade notes tell those users to enable the operator role or to declare the access explicitly. The entry doesn't check the operator's lnd-rest access. lndconnect reads the lnd user's copy, and the only reader of the operator's copy is nodeinfo, which enables the operator role itself. Configuration checks cover lndconnect with and without the operator, lnconnect without it, an existing account with the role disabled, the same account with explicit access, the assertion hints, the versioning entry and an unknown access user. The new lnconnectNoOperatorRole VM scenario runs lnconnect-clnrest --url as an operator account that has only the explicit grant and the clightning group. Fixes bitcoinix#166 Assisted-by: Claude Code (Claude Opus 5.5)
onion-addresses chowns each access directory to the access key, which is a login name. The new checks looked for a `users.users` attribute with that key instead, so an account whose attribute name differs from its `name` was rejected, and an account with `enable = false` passed and broke the chown at boot. Compare with the login names of the enabled accounts in onion-addresses, lndconnect and the 0.1.5 versioning check. The extraGroups hints in the lnconnect assertion and the versioning message now name the attribute that defines the account. Naming the login, as before, would create a second, invalid entry for an account like `users.users.account.name = "alice"`. The docs call it the operator account for the same reason. The lnconnect-onion-clnrest test now waits for onion-addresses before it reads the address, since nothing orders clightning after that service. Assisted-by: Claude Code (Claude Opus 5.5)
…sers The onion-addresses assertion rejects access keys that aren't login names of enabled users.users accounts. Configs that named users created with useradd, provided by LDAP or disabled in users.users passed before and now fail evaluation. Report them as a 0.1.5 change and document the migration in the upgrade guide. The clnrest operator entry no longer requires the operator to be defined in users.users, so an operator from useradd or LDAP is reported too. Assisted-by: Claude Code (Claude Opus 5.5)
Other notices for the same config version can apply to the same config, so a test can't tell from the whole version check whether one notice fires. Add an internal, read-only option that lists the messages of the applying changes, and match each test case against it. Also mention the onion access notices in the 0.1.5 upgrade intro. Assisted-by: Claude Code (Claude Opus 5.5)
v0.1.5 is released, so configs that already set `configVersion = "0.1.5"` would never see the two onion access notices. Move both entries to 0.1.6 and put their upgrade notes in a new 0.1.6 section. The released 0.1.5 section is back to its released text, without the onion access mention in its intro. The example config sets 0.1.6. The notice tests now evaluate a 0.1.5 config, so they check that users of the released version get each notice. Assisted-by: Claude Code (Claude Opus 5.5)
16f30a1 to
b825c06
Compare
|
Thanks for the rebase. It put the new I rebased again from the head viberaven reviewed and kept both scenarios. The result differs from your push only by that |
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [bitcoinix/bitcoinix](https://github.com/bitcoinix/bitcoinix) | patch | `v0.1.5` → `v0.1.6` | --- ### Release Notes <details> <summary>bitcoinix/bitcoinix</summary> ### [`v0.1.6`](https://github.com/bitcoinix/bitcoinix/releases/tag/v0.1.6): bitcoinix 0.1.6 [Compare Source](bitcoinix/bitcoinix@v0.1.5...v0.1.6) **Security release with breaking changes.** Narrows Tor enforcement to local addresses, closes a netns-isolation bypass, hardens RTL and the custom lnd macaroons, and updates lnd to 0.21.8-beta. All users should upgrade. Evaluation fails with a message for each breaking change that affects your config; act on it, then set `nix-bitcoin.configVersion = "0.1.6";`. Deploying restarts every netns-isolated service and each RTL backend once. #### Security - **Tor enforcement allowed more than Tor.** Services with `tor.enforce` and charge-lnd could reach every link-local address `169.254.0.0/16`, including a cloud provider's metadata service, and could resolve names through the host's resolver sockets. They now reach only localhost and, with netns-isolation, the namespace subnet, and can't use the nscd, systemd-resolved, D-Bus and Avahi sockets ([#​264](bitcoinix/bitcoinix#264), [GHSA-cgh8-4w2p-8fr8](GHSA-cgh8-4w2p-8fr8)). - **netns-isolation:** with `br_netfilter` loaded, which Docker does, a service without `tor.enforce` could reach the listeners of namespaces it isn't connected to. Traffic between namespaces is no longer masqueraded ([#​239](bitcoinix/bitcoinix#239)). - **RTL verifies its backends.** RTL sent the lnd admin macaroon and the clightning admin rune to any server on a backend's port. It now requires the backend's pinned TLS certificate ([#​258](bitcoinix/bitcoinix#258)) and stops when lnd or clightning stops, instead of polling a port that another local user could take over ([#​250](bitcoinix/bitcoinix#250)). - **RTL two-factor authentication survives restarts.** Before, each restart turned 2FA off without a warning. `RTL-Config.json`, which holds the 2FA secret, is now readable only by RTL's user ([#​254](bitcoinix/bitcoinix#254)). - **Custom lnd macaroons** (`services.lnd.macaroons`, used by BTCPay Server and charge-lnd) are now readable only by their `user`. Before, the user's primary group could read them, which for `operator` is `users`, so other normal users could. If other users log in to your node, [revoke all macaroons](https://docs.bitcoinix.net/services.html#revoke-all-macaroons) ([#​255](bitcoinix/bitcoinix#255)). Each custom macaroon now has its own root key, so one can be revoked without the others ([#​236](bitcoinix/bitcoinix#236)). - **Root scripts no longer load config files from a service user's home.** The lnd user could make root's `curl` and `jq` load `~/.curlrc` and `~/.jq` from lnd's data dir ([#​241](bitcoinix/bitcoinix#241), [GHSA-cwmc-wjvh-3qp6](GHSA-cwmc-wjvh-3qp6)). - **Backups fail when a database dump fails.** Before, duplicity succeeded without the database. With `services.postgresqlBackup.compression` set to `"zstd"` or `"none"`, backups left out the BTCPay and NBXplorer databases; they are now included, so run `systemctl start duplicity` after upgrading if you use one of these ([#​225](bitcoinix/bitcoinix#225)). - **Multipath TCP:** service namespaces now copy the host's `net.mptcp.enabled`, so the setting of `hardened-extended` reaches netns-isolated services ([#​206](bitcoinix/bitcoinix#206)). - **Secrets:** `setup-secrets` rejects empty secret files, and secret generation no longer replaces an empty TLS, WireGuard or replication SSH key ([#​244](bitcoinix/bitcoinix#244)). - **WireGuard preset:** evaluation fails for firewall setups in which the preset's rules can't run or don't stay loaded ([#​188](bitcoinix/bitcoinix#188)). - **lnd [0.21.8-beta](https://github.com/lightningnetwork/lnd/blob/master/docs/release-notes/release-notes-0.21.8.md)** fixes correctness bugs in channel state persistence, gossip validation, the sweeper and HTLC recovery ([#​263](bitcoinix/bitcoinix#263)). #### Breaking changes - **Tor enforcement:** a service with `tor.enforce` that connects to a non-local address or by host name needs a change. netns-isolation rejects `addressblock` 169 and 170 ([#​264](bitcoinix/bitcoinix#264)). - **Onion address access:** `lndconnect.onion` and `clnrest.lnconnect.onion` give the operator user access only when `nix-bitcoin.operator.enable` is set. `nix-bitcoin.onionAddresses.access` accepts only users that are defined and enabled in `users.users` ([#​170](bitcoinix/bitcoinix#170)). - **Secrets:** an empty or non-regular secret file now fails `setup-secrets`, and then no service can read its secrets. Check before deploying: `find /etc/nix-bitcoin-secrets -maxdepth 1 -type f -empty`. Set `nix-bitcoin.secrets.<name>.allowEmpty = true` for a secret that may be empty ([#​244](bitcoinix/bitcoinix#244)). - **lnd wallet:** lnd stops when `wallet.db` isn't a regular file, or when its seed file is a symlink to a missing file while it has no wallet ([#​244](bitcoinix/bitcoinix#244)). - **lnd macaroons:** bitcoinix deletes unused root keys with IDs `0x6e62000000000000` to `0x6e62ffffffffffff` on each lnd start; check `lncli listmacaroonids` before deploying. lnd's `no-macaroons` option isn't supported. Restart services that read a custom macaroon only at startup ([#​236](bitcoinix/bitcoinix#236)). A program that read a custom macaroon through the group needs its own macaroon ([#​255](bitcoinix/bitcoinix#255)). - **RTL:** with both backends enabled, stopping one stops RTL for both ([#​250](bitcoinix/bitcoinix#250)). `LN_SERVER_URL`/`LND_SERVER_URL`, another `Settings.lnServerUrl`, a proxy without `no_proxy` for the backend, and servers with a self-signed certificate no longer work as before ([#​258](bitcoinix/bitcoinix#258)). - **WireGuard preset:** fails evaluation with the nftables firewall package without iptables, with `networking.nftables.flushRuleset`, and with an `ip` or `ip6` table named `filter` in `networking.nftables.tables` ([#​188](bitcoinix/bitcoinix#188)). - **extra-container [1.0.1](https://github.com/extra-container/extra-container/releases/tag/v1.0.1):** containers can no longer reach the host's Nix daemon socket, so `nix build`, `nix run`, `nix develop` and `nix-shell` fail inside them. `extra.hostNixDaemon = true;` restores the old behavior; read the security section of the extra-container README first ([#​211](bitcoinix/bitcoinix#211)). - **Packages:** `rtl` and `trustedcoin` moved to `legacyPackages.<system>.pinned`. Trezor is `nix-bitcoin.pkgs.nbPython3Packages.trezor`. `nbPython3Packages` uses the Python interpreter of nixpkgs-unstable, so build custom Python environments with `nbPython3Packages.python` ([#​245](bitcoinix/bitcoinix#245)). - **nodeinfo:** every bitcoinix update now produces a new system generation, because the revision is part of the script. Set `nix-bitcoin.revision = null;` to opt out ([#​243](bitcoinix/bitcoinix#243)). See [Upgrading to config version 0.1.6](https://docs.bitcoinix.net/upgrading.html#upgrading-to-config-version-016). #### New - **[Unbeholden Wallet](https://docs.bitcoinix.net/services.html#connect-to-unbeholden-wallet):** a watch-only wallet that runs in the browser and hands transactions to an air-gapped signer over QR codes. Enable it with `services.unbeholden-wallet.enable = true;` ([#​230](bitcoinix/bitcoinix#230)). - **nodeinfo** shows the bitcoinix revision and the package version of each service. `nodeinfo --version` prints only the revision, `nodeinfo NAME ...` only the given entries ([#​243](bitcoinix/bitcoinix#243)). #### Fixes - lnd announces its onion address with the port Tor forwards. With a `services.lnd.port` other than 9735, peers couldn't reach the node over Tor ([#​228](bitcoinix/bitcoinix#228)). - clnrest replaces an empty or `null` admin rune on start. Generate connection URLs from `lnconnect-clnrest` again if they were created with such a rune ([#​217](bitcoinix/bitcoinix#217)). - btcpayserver with the clightning backend joins `services.clightning.group`, so a custom group works ([#​238](bitcoinix/bitcoinix#238)). - The lnd seed and electrs index migration steps keep the data when an earlier step fails ([#​242](bitcoinix/bitcoinix#242)). #### Updates | Package | 0.1.5 | 0.1.6 | | ----------------------------- | ----------- | -------------------------------------------------------------------------------- | | lnd | 0.21.6-beta | [0.21.8-beta](https://github.com/lightningnetwork/lnd/releases/tag/v0.21.8-beta) | | RTL | 0.15.16 | [0.15.17](https://github.com/Ride-The-Lightning/RTL/releases/tag/v0.15.17) | | extra-container (flake input) | 0.17 | [1.0.1](https://github.com/extra-container/extra-container/releases/tag/v1.0.1) | | Unbeholden Wallet | – | [0.4.0](https://github.com/unbeholdendev/unbeholden-wallet/releases/tag/v0.4.0) | Also: mempool builds with Node.js 24 ([#​246](bitcoinix/bitcoinix#246)); the docs say what netns-isolation doesn't isolate ([#​237](bitcoinix/bitcoinix#237)) and how to close public SSH without losing access ([#​234](bitcoinix/bitcoinix#234)). Contributors: [@​msgilligan](https://github.com/msgilligan), [@​ostermayer](https://github.com/ostermayer), [@​prusnak](https://github.com/prusnak), [@​seberm](https://github.com/seberm), [@​unbeholdendev](https://github.com/unbeholdendev), [@​viberaven](https://github.com/viberaven). Full changes: <bitcoinix/bitcoinix@v0.1.5...v0.1.6> </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yNDEuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjI0MS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: agent <[email protected]> Reviewed-on: https://git.home.unbeholden.dev/unbeholden/infra/pulls/140
Fixes #166.
lndconnect and lnconnect added
nix-bitcoin.onionAddresses.accessentries for the operator user whenever their onion variant was on. Withnix-bitcoin.operator.enableat its default of false that user doesn't exist,onion-addressesfailed at itschown, and no onion address was published for anyone. A public bitcoind then started with an emptyexternalipand refused to run, and lightningd behind it did the same.One commit on current master:
lndconnect.nixadds the operator entries only whennix-bitcoin.operator.enableis set, likeonion-services.nixand the WireGuard preset do. The lnd user's own entry stays, as a separatemkMergepart, so an operator named like the lnd user isn't a duplicate attribute key.lnconnect-clnrestreads the operator's address file, soclnrest.lnconnect.onionasserts that the operator hasclnrestinnix-bitcoin.onionAddresses.access. A config can grant that by hand without the whole operator role. The helper also reads the admin rune, which only theclightninggroup can read, so running it as that user also needsusers.users.<name>.extraGroups = [ "clightning" ];. That group can read the rune and use the RPC socket. The message offers the grant only when the user exists.onion-addresses.nixasserts at evaluation time that every access user is defined and lists the missing ones, so a typo fails the build instead of every address at boot.lndconnectruns as the lnd user and reads that user's copy, and the only reader of the operator's copy is nodeinfo, which enables the role itself. v0.1.4 shipped without this change, so it's 0.1.5, with a matching section indocs/upgrading.mdandexamples/configuration.nixat 0.1.5.docs/services.mdsays the role, or the explicit grant plus the group, gives the clnrest helper what it needs, or that it runs as root.lnconnectNoOperatorRole, turns the role off and definesoperatorwith only theclightninggroup and the explicit grant, then runslightning-cli getinfoandlnconnect-clnrest --urlas that user. It's inbuildableinrun-tests.shbut not in the CI matrix.Tested
module-configon my KVM host on top of master: 68 tests pass../test/run-tests.sh -s lnconnectNoOperatorRolepasses. With the group removed it fails as expected, already atlightning-cli getinfowithPermission denied../test/run-tests.sh -s fullpasses, including thelndconnect-onion-lndandlnconnect-onion-clnresttests.Claude Fable 5.1 planned the first version and Claude Opus 5.5 wrote both. Codex (GPT-5.6 Sol, xhigh) reviewed each. On this one it found that the docs said only
lnconnect-clnrestreads the operator's directory, while nodeinfo does too, which is fixed. It also notes that the access-user assertion rejects users created at runtime (useradd, LDAP), which was in the first version too. DeepSeek V4.1 Flash 1017 (max) and GLM 5.3 (max) audited the tree at d1b46ab with Codex (GPT-6 Astra, xhigh) as the second opinion: eleven findings plus three Astra extras, none in the files this PR touches. The WireGuard firewall one is what #188 fixes.