Enable dual-stack Nebula mesh and router exit #307
No reviewers
Labels
No labels
area:authentication
area:flake-utilities
area:performance
area:tbd
host:chaos
host:cosmos
host:electra
host:fleet
host:lena
host:lyra
host:mass-storage
host:media1
host:nimmog-de
host:nova
host:pangolin
host:pangolin-vps
host:phone
host:router
host:vega
investigation
phase:cutover
phase:deploy
phase:mcp
phase:module
phase:packaging
phase:prep
phase:validation
priority:high
priority:medium
project:attic-postgres-lyra-rollout
project:auto-update-reliability
project:auto-update-remediation
project:declarative-purity-cleanup
project:external-review
project:fleet-boundary-cleanup
project:host-facts-refactor
project:lyra-nixos-deploy
project:lyra-service-stack-migration
project:nebula-mesh-network
project:nix-idioms-hygiene
project:nixos-build-deployment-pipeline
project:security-hardening
project:service-stack-migration
project:vega-sillytavern-cutover
project:wiki-rebuild
repo:numtide/flake-utils
repo:numtide/nix-auth
repo:numtide/nixos-passthru-cache
repo:numtide/nix-relay
service:auto-update
service:gitlab
service:hermes
service:mem0
service:nix
service:sillytavern
service:slskd
service:synthseek
service:tdarr
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
nimmo/nixos-config!307
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/router-nebula"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The mesh needs dual-stack addressing, a router lighthouse/relay, and a phone internet exit that no longer uses Vega. This change adds shared NixOS wiring, paired credentials and certificate retirement controls; native deployments remain maintained in the separate ~/Projects/router-nebula project.
Validation: full nix flake check passed after the Nix changes/rebase. Provisioning, revocation and expanded bundle regressions plus ShellCheck pass in the external project. Bundle cases include IPv4/IPv6-only/dual-stack certificates, populated/empty/absent registries, missing/malformed exit metadata, and Nebula config tests for generated configs/imports. The latest automated review on
a4ca4eareports Ready to merge and its CI test passed; the final documentation-only follow-up50a3e7cclarifies intentional certificate overlap and has focused review/git diff --check validation. Final CI test at50a3e7cpassed. Its automated review is waiting for a runner; main has no required status/approval gates. The last code review ata4ca4eareports Ready to merge;50a3e7cchanges README only and received focused review.Live canary: user-run just test at
1d9c3adpreserves Electra's igpu tier, with Nebula 1.10.3 active on both overlay addresses, two blocked fingerprints, authenticated IPv6-underlay router handshake, router IPv4/IPv6 and VPS IPv6 pings, and native-host SSH. This canary predates the review fixes/rebase; follow-ups affect provisioning/export behavior and docs while preserving its Nebula runtime settings. Upstream stdenv deprecation warnings were reviewed.Already deployed outside NixOS: router, VPS, Nova, NAS, Media1 and Nimmog-de have validated dual-address configurations/credentials and mesh connectivity. Android's rendered config includes both retired fingerprints and SSH works. NAS was recreated through Portainer with latest and no extra_hosts. Temporary plaintext bundles/staging were shredded/removed; protected rollback backups remain.
Remaining live evidence: NixOS credentials/revocations on Vega/Lyra/Lena, persistent deployment and no-op acceptance, host service/relay-path checks, retirement of Vega's superseded exit certificate, public IPv6 router bootstrap and phone IPv6 internet egress. Host/retirement issues remain open; merge alone does not establish fleet-wide revocation.
Relates to #293 and milestone 32; IPv6 follow-up #306. Review-action issue #32 tracks incomplete changed-file pagination and formal-review feedback lookup. The complete MR diff includes paired Vega/phone/router encrypted-file changes, despite their omission from review batches. Reviewer semantic questions were answered with primary sources and deployed-router evidence in comment 2978.
Automated code review
Reviewed commit:
1d9c3ad88d7120c8804c2fa579c908536e399172Verdict: Requires further work
Resolve the blocking or important findings and investigate failed deterministic checks before merging.
Overall assessment
The dual-stack Nebula wiring is internally consistent across the changed files: modules/networking/nebula.nix defines routerBootstrapAddresses/routerUnderlayAddresses/ipv6HostMap, and all four registered NixOS hosts (electra, lena, lyra, vega in hosts//default.nix, the only nixosConfigurations in flake.nix:271) set routerBootstrapAddresses = [ "router-underlay:4242" ], matching the README statement that all registered NixOS mesh hosts opt into the router bootstrap. The ipv6HostMap default matches the README inventory (pangolin-vps, nova, mass-storage, media1, nimmog-de, router, phone, electra). Every secrets/nebula/.yaml required by the module for an enabled host exists (secrets/nebula contains electra, lena, lyra, vega plus the external nodes), nebula/revoked.json is present and parses as an object of name -> fingerprint arrays, and the module's lib.flatten (builtins.attrValues ...) consumes that shape. The retired-name guards in nebula-reissue/nebula-add-host/nebula-bundle match the README claim that 'Chaos and Cosmos are retired; provisioning recipes refuse those identities', and the removed secrets/nebula/chaos.yaml is consistent with nebula-revoke's key removal. The .gitignore addition (nebula-bundle-/) matches the bundle generator's BUNDLE_DIR="nebula-bundle-$NAME" and no such directory is present in the tree. Remaining issues are confined to the new revocation recipe and to constants duplicated between the justfile and the module.
Blocking findings
None.
Important findings
nebula-revoke now runs
rm -f "secrets/nebula/$NAME.yaml"with no confirmation and no check that NAME is a registered flake host; its only guard isjq -e ... 'has($name)' nebula/revoked.json, i.e. it refuses names already recorded as retired. modules/networking/nebula.nix still declares, for every enabled host,sops.secrets."nebula/${hostname}-key" = { sopsFile = ../../secrets/nebula/${hostname}.yaml; ... }, and hosts/vega, hosts/lyra, hosts/lena and hosts/electra all setnixosConfig.nebula.enable = true. The previous recipe asked the operator to confirm and to edit the file in an editor; the new one removes it silently.Impact: A first-time
just nebula-revoke vega(or any other still-registered host) removes a file that is a Nix path literal in the module, sonix flake checkand the next deployment for that host fail on a missing file rather than on an explicit 'this host is still in the fleet' message, and the change is silent rather than the previous prompted edit.Suggested fix: Refuse (or require an explicit override flag) when NAME matches a name registered in the flake's nixosConfigurations, and tell the operator that the host must be removed from the fleet in the same change; keep the unconditional removal only for names that are not registered hosts.
Suggestions
justfiles/nebula.just hardcodes
EXIT_IP=10.10.0.10at lines 425 and 438 andNEBULA_FULL_TUNNEL_DNS := "10.10.0.10"at line 12, while modules/networking/nebula.nix owns the same value asrouterIp = "10.10.0.10"andipv6HostMap.router = "fd56:f458:569c::10"; the mesh IPv6 subnet is likewise duplicated (NEBULA_IPV6_SUBNET := "fd56:f458:569c::/64"at line 5 vs the module's ipv6HostMap prefix). The justfile already has named constants for the VPS (NEBULA_LIGHTHOUSE_PRIMARY_IP), so the router values are the only ones written as literals.Impact: Reallocating the router's overlay address requires coordinated edits in two files; a missed one makes generated native/mobile bundles route through a different node than the NixOS hosts do, with no check to catch the divergence.
Suggested fix: Introduce
NEBULA_ROUTER_IP/NEBULA_ROUTER_IPV6constants alongside the existing VPS constants and use them for EXIT_IP, NEBULA_FULL_TUNNEL_DNS and the IPv6 firewall line, or add a check that the justfile constants agree with the module's routerIp/ipv6HostMap.router.Tests and validation
Questions
just nebula-bundle <host> standardalso emit the router bootstrap (static_host_map, lighthouse hosts, relay entries), or are native/external hosts expected to keep editing those literals outside the recipe? In the current recipe ROUTER_STATIC_MAP_LINES/ROUTER_LIGHTHOUSE_LINES/ROUTER_RELAY_LINES are populated only in the mobile-router-full-tunnel branch, so standard-mode bundles omit the router while all four NixOS hosts now include it.just nebula-revokeever expected to be run for a name that is still a registered NixOS host, or is retirement of a NixOS host always done by removing it from flake.nix in the same change?just nebula-reissue router 2 "0.0.0.0/1,128.0.0.0/1,::/1,8000::/1", which would rotate the key into secrets/nebula/router.yaml in this repository, while the README states router setup is maintained in ~/Projects/router-nebula. Is that cross-project write intended?Review limitations
nix flake check, ShellCheck, any just recipe or any Nebula tooling; this is a static reading of the checked-out tree.Diff coverage
.gitignore: reviewed — included in a context-limited batchREADME.md: reviewed — included in a context-limited batchhosts/electra/default.nix: reviewed — included in a context-limited batchhosts/lena/default.nix: reviewed — included in a context-limited batchhosts/lyra/default.nix: reviewed — included in a context-limited batchhosts/vega/default.nix: reviewed — included in a context-limited batchjustfiles/nebula.just: reviewed — included in a context-limited batchmodules/networking/nebula.nix: reviewed — included in a context-limited batchnebula/certs/electra.crt: reviewed — included in a context-limited batchnebula/certs/lena.crt: reviewed — included in a context-limited batchnebula/certs/lyra.crt: reviewed — included in a context-limited batchnebula/certs/mass-storage.crt: reviewed — included in a context-limited batchnebula/certs/media1.crt: reviewed — included in a context-limited batchnebula/certs/nimmog-de.crt: reviewed — included in a context-limited batchnebula/certs/nova.crt: reviewed — included in a context-limited batchnebula/certs/pangolin-vps.crt: reviewed — included in a context-limited batchnebula/certs/phone.crt: reviewed — included in a context-limited batchnebula/certs/router.crt: reviewed — included in a context-limited batchnebula/certs/vega.crt: reviewed — included in a context-limited batchnebula/revoked.json: reviewed — included in a context-limited batchsecrets/nebula/chaos.yaml: reviewed — included in a context-limited batchsecrets/nebula/electra.yaml: reviewed — included in a context-limited batchsecrets/nebula/lena.yaml: reviewed — included in a context-limited batchsecrets/nebula/lyra.yaml: reviewed — included in a context-limited batchsecrets/nebula/mass-storage.yaml: reviewed — included in a context-limited batchsecrets/nebula/media1.yaml: reviewed — included in a context-limited batchsecrets/nebula/nimmog-de.yaml: reviewed — included in a context-limited batchsecrets/nebula/nova.yaml: reviewed — included in a context-limited batchsecrets/nebula/pangolin-vps.yaml: reviewed — included in a context-limited batchsecrets/nebula/phone.yaml: reviewed — included in a context-limited batchReview metadata
1d9c3ad88d3fe3406f2cApplied the review follow-up in
3fe3406(rebased onto current main).nebula-revokenow evaluates registerednixosConfigurationsbefore any mutation and refuses Electra/Lena/Lyra/Vega. Fleet-evaluation failure aborts without changing credentials or the registry. Retire the host's flake/config references before revoking it. Disposable regressions cover all four active hosts, evaluation failure, repeat retirement, retained public certificates and removed retired-node secrets.nebula/router.jsonnow supplies router overlay addresses to the NixOS module and bundle recipe, plus the phone exit route lists. Bundle regressions check the public router certificate against this metadata.Validation: full
nix flake check, provisioning/bundle/revocation regressions and ShellCheck pass. External tests updated in~/Projects/router-nebula; they are intentionally outside this checkout. No live keys were revoked or rotated by this follow-up. Existing Electra canary evidence is revision1d9c3ad, before the rebase/review fixes; required remaining live evidence remains in the milestone issues.Review policy currently has
formal_review: truebutallow_request_changes: falseandallow_approval: false; the action posts advisory COMMENT reviews. Workflow success records execution, not reviewer approval. That policy was not changed by these fixes.Automated code review
Reviewed commit:
3fe3406f2cb8499d2e39a2485611ce7f78e6a94bVerdict: Requires further work
Resolve the blocking or important findings and investigate failed deterministic checks before merging.
Overall assessment
Scoped review of the dual-stack Nebula rollout against the checked-out tree. The Nix side is self-consistent:
modules/networking/nebula.nixreads../../nebula/router.jsonand../../nebula/revoked.json, both of which exist and are tracked (router.json supplies ipv4 10.10.0.10 / ipv6 fd56:f458:569c::10 and the exit-route CIDRs that README restates);routerBootstrapAddresses,routerUnderlayAddressesandipv6HostMapare declared with defaults, and all four registerednixosConfigurations(flake.nix: electra, lena, lyra, vega) setrouterBootstrapAddresses = [ "router-underlay:4242" ], which the module turns into astatic_host_map/lighthouse/relay entry for10.10.0.10;router-underlayis published innetworking.hostsfromrouterUnderlayAddresses.chaoswas dropped fromhostMapwith no remaining10.10.0.9or active-chaos reference (onlypotential/chaos/, docs, and.sops.yamlrecipient rules), andnebula/revoked.jsonholds the chaos/cosmos fingerprints whilenebula/certs/{chaos,cosmos}.crtare retained for audit, matching the README. Vega'sexitNode.enable = falsekeeps the module's exitNode assertion satisfiable. The provisioning recipes guard retired names, refuse re-adding an existing cert, and publish the cert only after the key is encrypted (.sops.yamlhas asecrets/nebula/[^/]+\.yaml$admin fallback so new external-node files such as router/phone can be created). Two evidence-backed gaps remain: three re-signed certificates have no matching change to their paired node-key files, and the address normalisation guard does not cover bare IPv6 input.Blocking findings
None.
Important findings
The change replaces
nebula/certs/vega.crtandnebula/certs/phone.crtand addsnebula/certs/router.crt, but the onlysecrets/nebula/*.yamlfiles re-encrypted in the same diff are electra, lena, lyra, mass-storage, media1, nimmog-de, nova and pangolin-vps;secrets/nebula/vega.yaml,phone.yamlandrouter.yamlall exist in the checked-out tree and are untouched.nebula-add-hostalways produces the pair together:SIGN_ARGSincludes-out-key "$TMPDIR/$NAME.key", and the key is then written tosecrets/nebula/$NAME.yaml(new-file branch viasops --encrypt ... > "$TMPDIR/node-secret.yaml"; mv ... "$SECRET_FILE", existing-file branch viasops set), andnebula-reissuedelegates to that recipe. The module consumes the pair ascert = ../../nebula/certs + "/${hostname}.crt"andkey = config.sops.secrets."nebula/${hostname}-key".pathfrom../../secrets/nebula/${hostname}.yaml.Impact: Vega (a registered NixOS host) would activate a new certificate against the previously stored node key, and phone/router likewise. If those keys were not regenerated with the certificates, the cert/key pair does not verify and the node fails PKI authentication, so Vega loses mesh registration (and with it the relay/DNS paths that the other three hosts now bootstrap through), and the phone loses the router full-tunnel exit.
Suggested fix: Confirm the pairing per identity before shipping: either re-run the paired provisioning (
just nebula-reissue vega 2 none, and the equivalent for phone and router) so the new key is written into the scoped SOPS file, or record explicit live evidence that the currently stored key authenticates against the new certificate.Suggestions
-networkswith no prefix length (justfiles/nebula.just:138; medium confidence)nebula-add-hostnormalises only a bare IPv4 argument:if [[ "$IP" != */* && "$IP" != *,* && "$IP" != *:* ]]; then CERT_NETWORKS="$IP/16"; fi, then signs with-networks "$CERT_NETWORKS". A bare IPv6 overlay address matches the*:*exclusion, so it is passed through with no/64. Every IPv6 literal this rollout introduces is bare —nebula/router.json"ipv6": "fd56:f458:569c::10"andipv6HostMapvalues inmodules/networking/nebula.nix(e.g.phone = "fd56:f458:569c::30") — while README requires the prefixed formfd56:f458:569c::30/64in the phone certificate.Impact: Copying a bare IPv6 address from
router.json/ipv6HostMapinto the provisioning argument is neither rejected nor normalised, so a run can silently issue a certificate whose IPv6 network is not the intended/64, disagreeing withnebula/router.jsonandipv6HostMap.Suggested fix: Either reject a bare IPv6 address with an explicit message, or normalise it to
'<address>/64'alongside the existing IPv4/16case, so the guard covers both address families.Tests and validation
Questions
mobile-import.yml(justfiles/nebula.just, mobile branch) writesmobile_nebula:anddns_resolvers:; nothing in this repository pins Mobile Nebula's file-import schema, so the key spellings cannot be checked here.nix eval --json .#nixosConfigurations --apply builtins.attrNames(justfiles/nebula.just:686) behave as expected on every host that runsnebula-revoke?--applyis not used anywhere else in this tree, and no supplied evidence shows it being exercised.nebula-init's next-steps hint still printsjust nebula-add-host vega 10.10.0.2 lighthouse,servers; is that stale hint intentional now that Vega is configured as an ordinary mesh client with the router as the second lighthouse?Review limitations
nix flake check, ShellCheck, and the provisioning/bundle/revocation paths were not executed, so evaluation and runtime behaviour are unverified.validSinceof the reissued vega/lyra/electra/lena/phone/router certificates are unverified, and the cert/key pairing finding is inferred from which files changed rather than from decoded contents.~/Projects/router-nebulaproject are outside this repository and were not supplied.nebula/revoked.jsonare loaded by every peer remain unverified.flake.lock,lib/auto-update-policy.nix, or the Attic CI workflow for interaction with the newnebula/*.jsonfiles read at eval time bymodules/networking/nebula.nix; the review is scoped to the supplied changed files and their direct callers.Diff coverage
.gitignore: reviewed — included in a context-limited batchREADME.md: reviewed — included in a context-limited batchhosts/electra/default.nix: reviewed — included in a context-limited batchhosts/lena/default.nix: reviewed — included in a context-limited batchhosts/lyra/default.nix: reviewed — included in a context-limited batchhosts/vega/default.nix: reviewed — included in a context-limited batchjustfiles/nebula.just: reviewed — included in a context-limited batchmodules/networking/nebula.nix: reviewed — included in a context-limited batchnebula/certs/electra.crt: reviewed — included in a context-limited batchnebula/certs/lena.crt: reviewed — included in a context-limited batchnebula/certs/lyra.crt: reviewed — included in a context-limited batchnebula/certs/mass-storage.crt: reviewed — included in a context-limited batchnebula/certs/media1.crt: reviewed — included in a context-limited batchnebula/certs/nimmog-de.crt: reviewed — included in a context-limited batchnebula/certs/nova.crt: reviewed — included in a context-limited batchnebula/certs/pangolin-vps.crt: reviewed — included in a context-limited batchnebula/certs/phone.crt: reviewed — included in a context-limited batchnebula/certs/router.crt: reviewed — included in a context-limited batchnebula/certs/vega.crt: reviewed — included in a context-limited batchnebula/revoked.json: reviewed — included in a context-limited batchnebula/router.json: reviewed — included in a context-limited batchsecrets/nebula/chaos.yaml: reviewed — included in a context-limited batchsecrets/nebula/electra.yaml: reviewed — included in a context-limited batchsecrets/nebula/lena.yaml: reviewed — included in a context-limited batchsecrets/nebula/lyra.yaml: reviewed — included in a context-limited batchsecrets/nebula/mass-storage.yaml: reviewed — included in a context-limited batchsecrets/nebula/media1.yaml: reviewed — included in a context-limited batchsecrets/nebula/nimmog-de.yaml: reviewed — included in a context-limited batchsecrets/nebula/nova.yaml: reviewed — included in a context-limited batchsecrets/nebula/pangolin-vps.yaml: reviewed — included in a context-limited batchReview metadata
Follow-up to the review of
3fe3406, posted BEFORE pushing the next commit as requested.The important certificate/key finding rests on an incomplete file list. This MR has 33 changed files. The review action retrieves only the default first page (30); the omitted last three are:
Forgejo
get_fileswithper_page: 100and localgit diff --numstat origin/mainindependently confirm these changes. The action's reviewer.py:1051 fetches/pulls/{number}/filesonce without pagination, and coverage/batching use only that result. The claim that these paired encrypted key files are untouched is false; no extra reissue is justified by that claim. Router/phone deployment and phone SSH acceptance were already recorded; Vega's new pair remains pending NixOS rollout, as stated in the MR.Raised forgejo-auto-pr-review #32 with reproduction, source cause, acceptance tests and a reference back to this MR. It also notes that formal review history is not found through issue-comments lookup, which can omit human replies from re-review context.
Prepared next commit
af8f543:Validation: provisioning, bundle and revocation regressions pass; ShellCheck passes, including the actual rendered nebula-add-host recipe. Regression cases cover bare IPv4/IPv6, explicit CIDRs, dual-stack lists, rejection of unprefixed list members and v1 compatibility/rejection. These tests remain in the separate router-nebula project as requested. This follow-up changes shell/docs only; the full flake check at
3fe3406passed, with no subsequent Nix changes.Other review questions: actual
nix eval --json .#nixosConfigurations --apply builtins.attrNameswas exercised on Electra and returned [electra,lena,lyra,vega]; fixture tests cover evaluation failure. Android's imported config was accepted on the installed Defined Networking app: the user confirmed both fingerprints in rendered config and successful SSH. Mobile app version remains unspecified, so this is live acceptance rather than a version/schema pin.Automated code review
Reviewed commit:
af8f5434363a9761c4e8719ce07d9dfadfbbcc04Verdict: Ready to merge
No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.
Overall assessment
The dual-stack wiring is internally consistent across the changed files:
nebula/router.json(ipv410.10.0.10, ipv6fd56:f458:569c::10, exit routes) is read by bothmodules/networking/nebula.nix(builtins.readFile ../../nebula/router.json, used forclientStaticHostMap,clientLighthouseList,hostMap.router,ipv6HostMap.router) andjustfiles/nebula.just; all four registered NixOS hosts (electra, lena, lyra, vega) setrouterBootstrapAddresses = [ "router-underlay:4242" ], andnetworking.hostspublishesrouter-underlayfromrouterUnderlayAddressesindependently ofrouter.mesh.nebula/revoked.json(chaos, cosmos) is consumed by the module aspki.blocklist+pki.disconnect_invalid, andnebula-add-host/-reissue/-bundle/-revokeall refuse names present in it;nebula-revokeevaluatesnixosConfigurationsbefore mutating and refuses registered hosts. Vega's exit role is disabled (exitNode.enable = false, so the NAT module and the IPv6-forwarding sysctls are not emitted), andchaos/cosmoswere removed fromhostMapwhilepotential/chaos/remains unregistered in the flake, so no active NixOS configuration lost a deleted secret. The new.gitignoreentrynebula-bundle-*/matchesBUNDLE_DIR="nebula-bundle-$NAME". Two latent defects in the new bundle recipe are demonstrable from the supplied code; no evaluation-breaking or secret-exposing defect was demonstrable elsewhere.Blocking findings
None.
Important findings
None.
Suggestions
Bundle recipe emits
blocklist:with a null value when the revocation list is empty (justfiles/nebula.just:480; medium confidence)mapfile -t REVOKED_FINGERPRINT_LINES < <( if [ -f nebula/revoked.json ]; then jq -r '[.[][]] | unique[] | ...' nebula/revoked.json; fi)yields an empty array whennebula/revoked.jsonis absent, and the config builders then emit the unconditional key line" blocklist:"followed only by${REVOKED_FINGERPRINT_LINES[@]}(lines 492/493 and 549/550), with the same pattern in the mobile import at lines 611/612.nebula-revokealso initialises the file withprintf '{}\n', so an empty object is a reachable state. The NixOS module side, by contrast, evaluatespki.blocklist = lib.flatten (builtins.attrValues (fromJSON ...)), i.e. an empty list.Impact: A bundle generated with no recorded revocations carries
pki.blocklist:as YAML null rather than[], so the generatedconfig.yml/mobile-import.ymlshape diverges from the module-generated configuration for the same state; the currently committednebula/revoked.json(two fingerprints) never exercises this path.Suggested fix: Emit
blocklist: []whenREVOKED_FINGERPRINT_LINESis empty in all three emission sites, or omit theblocklistkey entirely when there are no fingerprints.Standard-mode bundle generation now hard-depends on
nebula/router.json(justfiles/nebula.just:432; medium confidence)FULL_TUNNEL_ROUTES=$(jq -er '.ipv4ExitRoutes | join(",")' nebula/router.json)andEXIT_IP=$(jq -er '.ipv4' nebula/router.json)(lines 432-433) run beforecase "$MODE" in(line 438), whosestandardbranch leavesROUTER_*_LINESempty. The recipe runs underset -euo pipefail, so a missing or malformednebula/router.jsonaborts every bundle, includingMODE=standardbundles that never use exit routes or the router exit IP.Impact: Router exit metadata becomes a hard dependency for all bundle generation rather than only for
mobile-router-full-tunnel, so ordinary native-host bundles fail if that file is removed or restructured; today the file is committed, so this is a fragility introduced by the change rather than a present failure.Suggested fix: Move the
router.jsonreads into themobile-router-full-tunnelbranch (the branch already re-reads.ipv6ExitRoutesat line 449), or default them with// emptyand fail only in router mode where the existingROUTER_ADDRScheck reports the requirement.Tests and validation
Questions
clientStaticHostMapnow maps the router overlay IP to the literal strings inrouterBootstrapAddresses, i.e.router-underlay:4242, whereas the VPS entry uses a literal195.20.255.115:4242. Is a name-valuedstatic_host_mapentry resolved by Nebula 1.10.3, or must it be a numeric address?nebula/certs/router.crtis opaque base64 in this checkout; does it carry thelighthouse/relaygroups and both10.10.0.10/16andfd56:f458:569c::10/64? Every NixOS host now registers against10.10.0.10as a lighthouse and relay, so a router certificate lacking those networks or groups would leave all four hosts dependent on the VPS alone.nebula/certs/{vega,lyra,lena}.crtwere reissued in this MR butipv6HostMap(and the README's advertised list) omits vega, lyra and lena. Is that omission deliberate until those certificates' IPv6 addresses are confirmed, per the option description's 'Add other nodes only with their certificate rollout'?Review limitations
secrets/nebula/{phone,router,vega}.yamldiffs were not supplied, so those changes were not inspected beyond confirming the files exist and are scoped by.sops.yaml'ssecrets/nebula/[^/]+\.yamlrule.nebula/certs/*.crtto verify networks, groups, unsafe networks, or the fingerprints recorded innebula/revoked.json.nix flake check,just, ShellCheck, or any repository code, so the recipe's runtime behaviour (including the two findings above) is read from the source, not observed.~/Projects/router-nebulaproject (OpenWrt service, native host configurations, phone WAN/DNS, IPv6 masquerading, regression tests) is not part of this checkout, and this repository'stests/tree contains no Nebula regressions, so the PR's provisioning, bundle and revocation claims could not be checked here.Diff coverage
.gitignore: reviewed — included in a context-limited batchREADME.md: reviewed — included in a context-limited batchhosts/electra/default.nix: reviewed — included in a context-limited batchhosts/lena/default.nix: reviewed — included in a context-limited batchhosts/lyra/default.nix: reviewed — included in a context-limited batchhosts/vega/default.nix: reviewed — included in a context-limited batchjustfiles/nebula.just: reviewed — included in a context-limited batchmodules/networking/nebula.nix: reviewed — included in a context-limited batchnebula/certs/electra.crt: reviewed — included in a context-limited batchnebula/certs/lena.crt: reviewed — included in a context-limited batchnebula/certs/lyra.crt: reviewed — included in a context-limited batchnebula/certs/mass-storage.crt: reviewed — included in a context-limited batchnebula/certs/media1.crt: reviewed — included in a context-limited batchnebula/certs/nimmog-de.crt: reviewed — included in a context-limited batchnebula/certs/nova.crt: reviewed — included in a context-limited batchnebula/certs/pangolin-vps.crt: reviewed — included in a context-limited batchnebula/certs/phone.crt: reviewed — included in a context-limited batchnebula/certs/router.crt: reviewed — included in a context-limited batchnebula/certs/vega.crt: reviewed — included in a context-limited batchnebula/revoked.json: reviewed — included in a context-limited batchnebula/router.json: reviewed — included in a context-limited batchsecrets/nebula/chaos.yaml: reviewed — included in a context-limited batchsecrets/nebula/electra.yaml: reviewed — included in a context-limited batchsecrets/nebula/lena.yaml: reviewed — included in a context-limited batchsecrets/nebula/lyra.yaml: reviewed — included in a context-limited batchsecrets/nebula/mass-storage.yaml: reviewed — included in a context-limited batchsecrets/nebula/media1.yaml: reviewed — included in a context-limited batchsecrets/nebula/nimmog-de.yaml: reviewed — included in a context-limited batchsecrets/nebula/nova.yaml: reviewed — included in a context-limited batchsecrets/nebula/pangolin-vps.yaml: reviewed — included in a context-limited batchReview metadata
Both advisory recommendations from the
af8f543review are valid and are addressed in prepared commit51345c0. This response is posted before pushing the commit.blocklist: []; populated registries retain the recorded fingerprints anddisconnect_invalid: true.mobile-router-full-tunnel. Standard bundles no longer depend on router.json. README documents that boundary.Validation: expanded external bundle regressions cover populated/empty/absent revocation registries across IPv4 and dual-stack lighthouse/client/mobile variants. Generated valid configs and mobile imports pass Nebula's config test; IPv4-only full-tunnel imports remain rejected. Missing and malformed router metadata succeed for standard bundles and fail for router full-tunnel bundles. Metadata-error probes run in independent Bash processes so errexit behavior matches the real Just recipe. ShellCheck passes for the rendered bundle recipe and external regression scripts. Tests remain in ~/Projects/router-nebula as requested.
This is a shell/docs follow-up; no Nix configuration, certificate, encrypted key or live deployment changed. The full flake check at
3fe3406and CI ataf8f543passed. Fresh CI/review will be triggered by the subsequent push.The prior review's remaining questions were previously answered with evidence: Electra's Nebula 1.10.3 authenticated to router-underlay through its maintained IPv6 address; the public router certificate has both overlay networks and lighthouse/relays groups (the role settings themselves are in native config); Vega/Lyra/Lena IPv6 hosts/DNS entries intentionally await live activation.
Automated code review
Reviewed commit:
51345c08aa2963ccf7ddb5421a8a77a5ed27a8daVerdict: Requires further work
Resolve the blocking or important findings and investigate failed deterministic checks before merging.
Overall assessment
The dual-stack wiring is internally consistent in the supplied material:
nebula/router.json(ipv410.10.0.10, ipv6fd56:f458:569c::10, split exit routes) is read both bymodules/networking/nebula.nix(routerIp,router.ipv6inipv6HostMap) and by themobile-router-full-tunnelbranch ofjust nebula-bundle; the four registered NixOS hosts (hosts/{electra,lena,lyra,vega}/default.nix) are exactly the four that setrouterBootstrapAddresses = [ "router-underlay:4242" ], matching the README claim that all registered mesh hosts opt into the bootstrap;nebula/revoked.jsonfeeds both the module'spki.blocklistand the bundle blocklist; the removedNEBULA_FULL_TUNNEL_*just constants have no remaining{{ }}references;../../nebula/router.jsonand../../nebula/revoked.jsonresolve correctly frommodules/networking/nebula.nix;exitNode.enable = falsesatisfies the module's assertion; and the.gitignorepatternnebula-bundle-*/matchesBUNDLE_DIR="nebula-bundle-$NAME". The only actionable issues I could ground in the supplied diff are in the bundle recipe's secret-handling and operator-facing output.Blocking findings
None.
Important findings
The new mobile branch embeds the key inline:
for field in ca cert key; do ... pem_file="$BUNDLE_DIR/$NAME.key" ... sed 's/^/ /' "$pem_file"; done } > "$BUNDLE_DIR/mobile-import.yml"(lines 610-624,chmod 600at 624). The only cleanup the recipe prints isecho "WARNING: $BUNDLE_DIR/$NAME.key is plaintext — scp and then shred it locally:"/echo " shred -u $BUNDLE_DIR/$NAME.key"(lines 659-660), and the recipe'strapat line 354 shreds only files under$TMPDIR(/dev/shm), never$BUNDLE_DIR. The new.gitignoreentrynebula-bundle-*/keeps the directory untracked but does not remove it.Impact: After a
mobile-router-full-tunnelrun the node's private key exists in plaintext in two working-tree files, but the operator-visible instruction names only$NAME.key;nebula-bundle-phone/mobile-import.ymltherefore persists unshredded (and is not listed in the printed file inventory at line 644 as needing destruction).Suggested fix: Extend the printed cleanup to every secret-bearing artifact, e.g.
shred -u "$BUNDLE_DIR/$NAME.key" "$BUNDLE_DIR/mobile-import.yml", and state thatmobile-import.ymlmust be consumed on the phone and then shredded.Suggestions
Lighthouse serve_dns host derivation aborts for a certificate with no IPv4 network (justfiles/nebula.just:413; medium confidence)
CERT_IP=$(printf '%s\n' "$CERT_JSON" | jq -r '.details.networks | map(select(contains(":") | not)) | .[0] | split("/")[0]')runs under the recipe'sset -euo pipefailand is consumed as" host: \"${CERT_IP}\""in the lighthouse branch. The same MR widensnebula-add-hostto accept IPv6-only input (if [[ "$IP" = *:* ]]; then CERT_NETWORKS="$IP/64"), so a v2 lighthouse certificate holding only IPv6 CIDRs yields[] | .[0]=nullandnull | split("/")is a jq error; the recipe already guards the analogous IPv6 requirement for the phone certificate (if [ -z "$CERT_IPV6_NETWORKS" ]; then echo "ERROR: ..."; exit 1).Impact:
just nebula-bundle <lighthouse> standardwould abort before writing any bundle file, with only a raw jq error as the diagnostic, for a lighthouse whose v2 certificate has no IPv4 network;serve_dnswould have no defined bind address.Suggested fix: Guard the derivation with an explicit message (or derive the bind address from the IPv6 network) instead of relying on a jq failure, mirroring the existing explicit check.
Mobile bundle mode still prints Linux systemctl/scp deployment steps (justfiles/nebula.just:647; high confidence)
The follow-up output is unconditional on mode:
echo "Deploy commands (adjust remote path/user as needed):",ssh root@<host> 'mkdir -p /etc/nebula && systemctl stop nebula || true',scp $BUNDLE_DIR/* root@<host>:/etc/nebula/,chmod 600 /etc/nebula/$NAME.key,systemctl enable --now nebula(lines 647-657). ForMODE=mobile-router-full-tunnelthe bundle additionally containsmobile-import.ymlandmobile-full-tunnel.txt(printed at line 644), whichscp $BUNDLE_DIR/*would install into/etc/nebula/.Impact: An operator following the printed steps for the phone profile is invited to run systemctl/scp against a Linux host, which would also copy the plaintext
mobile-import.ymland a note file into/etc/nebula/there.Suggested fix: Print mode-specific follow-up steps: for the mobile mode, describe the Mobile Nebula file import and the shred step instead of the systemctl/scp sequence.
Tests and validation
Questions
nebula/certs/{lena,lyra,vega}.crtare reissued as v2 certificates in this MR, butipv6HostMapdefaults publish AAAA/hosts records only for pangolin-vps, nova, mass-storage, media1, nimmog-de, router, phone and electra. If those reissued certificates now carryfd56:f458:569c::{2,3,21}, should those three hosts be added toipv6HostMap(the option description says to add nodes only with their certificate rollout)?hosts/vega/default.nixsetsexitNode.enable = falsewhile README says to passnoneas the unsafe-networks argument when reissuing a retired exit node. Did the Vega reissue drop its route authority, or doesnebula/certs/vega.crtstill carry unsafe networks?nebula-revokerecords fingerprints forchaosandcosmosand removessecrets/nebula/chaos.yaml, but.sops.yaml(not in the changed set) still declares the*chaos/*cosmoscreation rules and recipients. Should those entries be retired with the identities?Review limitations
secrets/nebula/{phone,router,vega}.yamlwere not supplied; the checked-out tree confirms the files exist but their content changes could not be inspected.nebula/certs/{router,vega,phone,chaos,cosmos}.crtare unverified; findings that depend on certificate contents are phrased as conditionals.justrecipes, or execute repository code, sonix flake check, ShellCheck and the bundle/revocation regressions reported in the PR text were not reproduced.~/Projects/router-nebularegression tests are not part of this checkout, so the router's lighthouse/relay role (assumed byROUTER_LIGHTHOUSE_LINES/ROUTER_RELAY_LINESand byrelays = ... clientLighthouseList) could not be confirmed.nebula/revoked.jsoncorrespond to the retainednebula/certs/chaos.crtandnebula/certs/cosmos.crt.Diff coverage
.gitignore: reviewed — included in a context-limited batchREADME.md: reviewed — included in a context-limited batchhosts/electra/default.nix: reviewed — included in a context-limited batchhosts/lena/default.nix: reviewed — included in a context-limited batchhosts/lyra/default.nix: reviewed — included in a context-limited batchhosts/vega/default.nix: reviewed — included in a context-limited batchjustfiles/nebula.just: reviewed — included in a context-limited batchmodules/networking/nebula.nix: reviewed — included in a context-limited batchnebula/certs/electra.crt: reviewed — included in a context-limited batchnebula/certs/lena.crt: reviewed — included in a context-limited batchnebula/certs/lyra.crt: reviewed — included in a context-limited batchnebula/certs/mass-storage.crt: reviewed — included in a context-limited batchnebula/certs/media1.crt: reviewed — included in a context-limited batchnebula/certs/nimmog-de.crt: reviewed — included in a context-limited batchnebula/certs/nova.crt: reviewed — included in a context-limited batchnebula/certs/pangolin-vps.crt: reviewed — included in a context-limited batchnebula/certs/phone.crt: reviewed — included in a context-limited batchnebula/certs/router.crt: reviewed — included in a context-limited batchnebula/certs/vega.crt: reviewed — included in a context-limited batchnebula/revoked.json: reviewed — included in a context-limited batchnebula/router.json: reviewed — included in a context-limited batchsecrets/nebula/chaos.yaml: reviewed — included in a context-limited batchsecrets/nebula/electra.yaml: reviewed — included in a context-limited batchsecrets/nebula/lena.yaml: reviewed — included in a context-limited batchsecrets/nebula/lyra.yaml: reviewed — included in a context-limited batchsecrets/nebula/mass-storage.yaml: reviewed — included in a context-limited batchsecrets/nebula/media1.yaml: reviewed — included in a context-limited batchsecrets/nebula/nimmog-de.yaml: reviewed — included in a context-limited batchsecrets/nebula/nova.yaml: reviewed — included in a context-limited batchsecrets/nebula/pangolin-vps.yaml: reviewed — included in a context-limited batchReview metadata
Prepared review-policy commit
3565e9f, posted before pushing as requested.User explicitly requested
formal_review: trueandallow_approval: truefor this repository. Formal reviews were already enabled; this changesallow_approvalfrom false to true.allow_request_changesremains false and minimum approval confidence remains high.Validation: the maintained action's
parse_configandvalidate_formal_review_configaccept the repository settings; assertions confirm both requested flags are true.git diff --checkpasses. README reviewed: the configuration header already documents that executable settings are read from the trusted PR base commit.Consequently this MR still uses main's existing approval policy until the setting change is merged. Publishing the branch does not make the MR authorize its own automated approval. No merge performed.
Automated code review
Reviewed commit:
3565e9f9ec44ed6336a3c349dd139e1fe7659133Verdict: Requires further work
Resolve the blocking or important findings and investigate failed deterministic checks before merging.
Overall assessment
Strict validation pass over the dual-stack Nebula rollout. The NixOS module (modules/networking/nebula.nix) resolves cleanly:
router = builtins.fromJSON (builtins.readFile ../../nebula/router.json)and../../nebula/revoked.jsonboth exist as tracked files added in this change, no references remain to the removedvegaLanAddr/allLighthouseMap/lighthouseList/allLighthouseIpsbindings (onlyvegaIp, still used byhostMap, survives), the four registered hosts (electra, lena, lyra, vega) set onlyrouterBootstrapAddressesandexitNode.enable = false, which satisfies the module's exitNode assertion, and the three attrsets merged intonetworking.hostsuse disjoint keys (IPv410.10.x,fd56:f458:569c::x, and the router's public addresses).potential/chaosis not inflake.nix(AGENTS.md: 'not registered in flake.nix'), so deletingsecrets/nebula/chaos.yamland droppingchaosfromhostMapleaves no consumer..gitignore's newnebula-bundle-*/matches the bundle directory name (BUNDLE_DIR="nebula-bundle-$NAME", nebula.just:350). One concrete defect survives in the bundle recipe; the remaining items are unanswerable from supplied evidence and are returned as questions.Blocking findings
None.
Important findings
nebula-bundle runs under
set -euo pipefail(nebula.just:325) and evaluatesCERT_IP=$(printf '%s\n' "$CERT_JSON" | jq -r '.details.networks | map(select(contains(":") | not)) | .[0] | split("/")[0]')unconditionally, before the mode/IS_LIGHTHOUSEbranches. For a certificate whosedetails.networksholds only IPv6 CIDRs,map(select(contains(":") | not))is[], so.[0]isnullandnull | split("/")is a jq type error; the failed command substitution makes the recipe exit beforeBUNDLE_DIR(line 350) is populated. README.md documents this input as supported: 'just nebula-add-hostaccepts a single bare IPv4 address (adds/16) or IPv6 address (adds/64)' and 'IPv6-only bootstrap additionally requires a reachable IPv6 lighthouse endpoint', and nebula-add-host buildsCERT_NETWORKS="$IP/64"for a bare IPv6 argument.CERT_IPV6_NETWORKS(line 414) already handles the empty case with a plain string test, so only the IPv4 extraction is partial.Impact: An IPv6-only v2 certificate produces no bundle at all (including
standardmode), and the operator sees a raw jq 'split input and argument must be strings' error instead of a diagnostic;CERT_IPis only consumed as the lighthousedns.hostbind address, so the abort is broader than the value's use.Suggested fix: Make the extraction total and fail where it is used, e.g.
... | (map(select(contains(":") | not)) | .[0]) // "" | split("/")[0]and then guard the$IS_LIGHTHOUSEbranch with 'lighthouse bundle requires an IPv4 overlay address', or move theCERT_IPassignment inside that branch.Suggestions
None.
Tests and validation
Questions
mobile-router-full-tunnelmode every unsafe route is emitted withvia: "$EXIT_IP", i.e.nebula/router.jsonipv4=10.10.0.10, including the IPv6 routes::/1and8000::/1fromipv6ExitRoutes, andmobile_nebula.dns_resolversis also10.10.0.10. Should the IPv6 routes userouter.ipv6(fd56:f458:569c::10) instead? Nothing in the supplied material states whether Nebula'sviamust match the route's address family.static_map.network = "ip") and both bundle branches (static_map:+network: ip) emit astatic_mapkey whose value is the literalip. Is that the intended Nebula setting? No supplied file defines a Nebula network namedip, and no other evidence in this checkout shows the key's schema, so I could not classify it as a defect.relays = ... clientLighthouseList, so all four registered NixOS clients name10.10.0.10as both a lighthouse and a relay. Does the OpenWrt router configuration declaream_relay: truefor the router? That configuration lives in~/Projects/router-nebula, which is not in this checkout..forgejo/ai-review.ymlflipsallow_approval: falsetotruewhileallow_request_changes: falseandmin_approval_confidence: highare unchanged. Is that combination intended for this repository's review bot? The option semantics are not defined in the supplied material.Review limitations
secrets/nebula/phone.yaml,secrets/nebula/router.yamlandsecrets/nebula/vega.yamlappear in the changed-file list but their diffs were not supplied, and all SOPS values are encrypted, so no secret content could be inspected.fd56:f458:569c::xCIDRs (and therefore thatipv6HostMaplists only deployed addresses, or that lena/lyra/vega deliberately lack IPv6 entries) are unverified.nix flake check,just, ShellCheck, or any regression test; every validation claim in the PR text was treated as untrusted evidence.services.nebula.networks.mesh), the sops-nix option schema, CoreDNS behaviour, and the Nebula config-key reference are not in this checkout, so I could not confirm the accepted value ranges forstaticHostMap,lighthouses,relays,listen.host = "[::]", orstatic_map.modules/common/default-config.nix,flake.nix, the external router-nebula project).Diff coverage
.forgejo/ai-review.yml: reviewed — included in a context-limited batch.gitignore: reviewed — included in a context-limited batchREADME.md: reviewed — included in a context-limited batchhosts/electra/default.nix: reviewed — included in a context-limited batchhosts/lena/default.nix: reviewed — included in a context-limited batchhosts/lyra/default.nix: reviewed — included in a context-limited batchhosts/vega/default.nix: reviewed — included in a context-limited batchjustfiles/nebula.just: reviewed — included in a context-limited batchmodules/networking/nebula.nix: reviewed — included in a context-limited batchnebula/certs/electra.crt: reviewed — included in a context-limited batchnebula/certs/lena.crt: reviewed — included in a context-limited batchnebula/certs/lyra.crt: reviewed — included in a context-limited batchnebula/certs/mass-storage.crt: reviewed — included in a context-limited batchnebula/certs/media1.crt: reviewed — included in a context-limited batchnebula/certs/nimmog-de.crt: reviewed — included in a context-limited batchnebula/certs/nova.crt: reviewed — included in a context-limited batchnebula/certs/pangolin-vps.crt: reviewed — included in a context-limited batchnebula/certs/phone.crt: reviewed — included in a context-limited batchnebula/certs/router.crt: reviewed — included in a context-limited batchnebula/certs/vega.crt: reviewed — included in a context-limited batchnebula/revoked.json: reviewed — included in a context-limited batchnebula/router.json: reviewed — included in a context-limited batchsecrets/nebula/chaos.yaml: reviewed — included in a context-limited batchsecrets/nebula/electra.yaml: reviewed — included in a context-limited batchsecrets/nebula/lena.yaml: reviewed — included in a context-limited batchsecrets/nebula/lyra.yaml: reviewed — included in a context-limited batchsecrets/nebula/mass-storage.yaml: reviewed — included in a context-limited batchsecrets/nebula/media1.yaml: reviewed — included in a context-limited batchsecrets/nebula/nimmog-de.yaml: reviewed — included in a context-limited batchsecrets/nebula/nova.yaml: reviewed — included in a context-limited batchReview metadata
Response to review of
3565e9f, posted before pushing prepared fixa4ca4ea.The important IPv6-only bundle finding is valid and fixed. Certificate address extraction now prefers an available IPv4 address and falls back to the first IPv6 address, with an explicit diagnostic if a lighthouse certificate has no DNS bind address. Thus IPv6-only clients no longer hit jq split(null), and IPv6-only lighthouses can use their IPv6 overlay DNS address rather than being rejected. README documents this behavior.
Validation: real disposable IPv4-only, IPv6-only and dual-stack v2 certificates were rendered through the bundle recipe for lighthouse/client/mobile variants. Every accepted config and inline mobile import passes Nebula -test; explicit checks verify IPv6-only lighthouse DNS uses fd56:f458:569c::10. The complete matrix retains populated/empty/absent blocklist coverage and missing/malformed router metadata probes. IPv4-only full-tunnel remains rejected. ShellCheck passes for the rendered recipe and external tests; git diff --check passes. Tests remain in ~/Projects/router-nebula as requested. These are config validation tests, not live IPv6 internet egress acceptance. No production credentials were rotated or changed.
Answers to the remaining questions:
viaidentifies the Nebula gateway peer, not the destination route's IP family. The exact deployed v1.10.3 implementation parsesviaas an address independently of route CIDR in overlay/route.go, then selects that peer for the routed packet in inside.go. From this implementation there is no same-family requirement between route and via. The official IPv6 upgrade guide likewise gives an IPv4 destination route via an IPv6 overlay gateway. Current phone DNS remains the reachable router IPv4 overlay resolver; IPv6 internet egress acceptance is still tracked separately.static_map.network: ipis a documented enum selecting both IPv4 and IPv6 underlay resolution, not the name of a Nebula network. See static_map.network reference.formal_review: trueandallow_approval: truewere explicitly requested by the user for this repository. Minimum approval confidence remains high; request-changes authority was not requested. Settings are read from the trusted base branch and become effective after merge. See prior comment and the action's formal_review_event implementation.Nebula 1.10.3 lighthouse DNS constructs its bind address with net.JoinHostPort, supporting the bare IPv6 host emitted by this fix: dns_server.go. Existing deployment/canary limitations and the review-action pagination defect remain tracked.
Automated code review
Reviewed commit:
a4ca4ea882ffd5ffe7f943074638088e9d8bc2f1Verdict: Ready to merge
No blocking or important findings were retained, and deterministic checks passed. Suggestions remain advisory.
Overall assessment
Strict validation pass over the supplied diff. The dual-stack wiring is internally consistent across the changed files:
nebula/router.jsonsuppliesipv4/ipv6/exit-route lists that both the NixOS module (modules/networking/nebula.nix:11-17,ipv6HostMap) and the bundle recipe (justfiles/nebula.just:444-452) read with matching keys; all four registerednixosConfigurationshosts (flake.nix:213-216 → electra, lena, lyra, vega) setrouterBootstrapAddresses, which the module turns into astatic_host_mapentry plus lighthouse/relay entries; the blocklist is derived identically fromnebula/revoked.jsonin both consumers (lib.flatten (attrValues …)vsjq '[.[][]] | unique[]'), andpki.disconnect_invalid/static_map.networkmatch;.gitignore:9 nebula-bundle-*/covers theBUNDLE_DIR="nebula-bundle-$NAME"output that now holds a plaintext key andmobile-import.yml. No removed binding is left dangling (vegaLanAddr,allLighthouseMap,allLighthouseIps,lighthouseList,NEBULA_FULL_TUNNEL_*,LH_SECONDARY_IPhave no remaining references), and nochaos/cosmosreference survives outsidepotential/. The initial review's four findings did not survive validation: therouter-underlay:4242reachability claim depends on Nebula's name-resolution behaviour, which is not in the supplied material and is explicitly documented as intended in README.md:126-133; thevia: "${EXIT_IP}"for IPv6 routes is self-consistent because the generated config registers onlyEXIT_IPas astatic_host_mapkey, so the IPv6 overlay address would be unresolvable; the deadnetworking.nat/sysctlblock is unchanged code with no registered user. One actionable concern remains: reissuing a certificate does not record the superseded fingerprint, so the retired Vega route authority is not actually revoked by the blocklist mechanism the README describes.Blocking findings
None.
Important findings
None.
Suggestions
nebula-reissuedeletes the old certificate (rm "$CERT", justfiles/nebula.just:100) and signs a replacement, but never writes the old fingerprint tonebula/revoked.json; onlynebula-revoke(justfiles/nebula.just:712-717) records fingerprints, andnebula/revoked.jsoncontains only thechaosandcosmosentries. Both consumers of the blocklist derive it solely from that file (modules/networking/nebula.nix:203-205 and the recipe'sREVOKED_FINGERPRINT_LINES). This MR replacesnebula/certs/vega.crt(index ed3aa65..9c68387) and setsexitNode.enable = false(hosts/vega/default.nix:137), and README.md documents that reissuing withnoneremoves the route authority while stating that the blocklist is what revokes peer network access.Impact: Peers that still hold the pre-reissue Vega credentials keep a CA-valid certificate whose unsafe-network authority was intended to be retired; nothing in the supplied changes blocks that fingerprint, so the authority removal only applies to peers that reload the new certificate.
Suggested fix: If superseded reissued credentials must stop serving traffic, have
nebula-reissueappend the pre-reissue fingerprint tonebula/revoked.json(or add an explicit superseded list consumed by the same blocklist) and redeploy; otherwise state in README.md that reissued-but-not-retired certificates are intentionally left valid.Tests and validation
Questions
static_host_mapendpoint values? All four hosts setrouterBootstrapAddresses = [ "router-underlay:4242" ](hosts/{vega,lyra,lena,electra}/default.nix), androuter-underlayexists only as a reverse /etc/hosts record built fromrouterUnderlayAddresses(modules/networking/nebula.nix:231); every previously supplied static_host_map value was numeric ("195.20.255.115:4242"). Nebula's own configuration parsing was not supplied, so this cannot be settled from the diff.fd56:f458:569c::10, already inipv6HostMap) also appear as astatic_host_map/lighthouse key for NixOS clients, given README.md:110-111 says IPv6-only bootstrap requires a reachable IPv6 lighthouse endpoint instatic_host_map? The module only ever keys the router entry byrouter.ipv4.via: "${EXIT_IP}"(justfiles/nebula.just:476) for the IPv6 unsafe routes::/1and8000::/1correct becausevianames a node rather than an address family, or must IPv6 routes reference the router's IPv6 overlay address? The generated config registers onlyEXIT_IPinstatic_host_map, so the answer determines whetherrouter.json.ipv6is intentionally unused by the recipe.nebula-reissuerefuse or warn when the resulting certificate drops unsafe-network authority (thenoneform) without a corresponding blocklist entry?allow_approval: true(.forgejo/ai-review.yml, withmin_approval_confidence: high) intended to accompany this MR, and does it interact withallow_request_changes: false?Review limitations
nebula/certs/*.crtare opaque base64 in the supplied diff; I could not decode names, networks, unsafe networks or fingerprints, so the claimed dual addresses, the router's0.0.0.0/1,128.0.0.0/1,::/1,8000::/1authority, and the phone'sfd56:f458:569c::30/64are unverified.secrets/nebula/*.yamlare sops-encrypted; I confirmed only that the files exist (including newrouter.yaml/phone.yaml) and that.sops.yaml'ssecrets/nebula/[^/]+\.yaml$rule scopes non-host nodes to the YubiKeys and provisioning identity. Key contents were not inspectable.services.nebula.networks) and Nebula's own configuration semantics are not vendored in this checkout, so option names (static_map.network,pki.blocklist,listen.host = "[::]") and their runtime effect could not be type-checked against the module schema.nix flake check, ShellCheck,just, or any repository code; all evaluation, deployment and CI claims in the PR text are unverified evidence.tests/holds only backup-restore, deploy-wrapper, pin-lifecycle and update-remediation regressions); the PR states they live in~/Projects/router-nebula, which was not supplied.Diff coverage
.forgejo/ai-review.yml: reviewed — included in a context-limited batch.gitignore: reviewed — included in a context-limited batchREADME.md: reviewed — included in a context-limited batchhosts/electra/default.nix: reviewed — included in a context-limited batchhosts/lena/default.nix: reviewed — included in a context-limited batchhosts/lyra/default.nix: reviewed — included in a context-limited batchhosts/vega/default.nix: reviewed — included in a context-limited batchjustfiles/nebula.just: reviewed — included in a context-limited batchmodules/networking/nebula.nix: reviewed — included in a context-limited batchnebula/certs/electra.crt: reviewed — included in a context-limited batchnebula/certs/lena.crt: reviewed — included in a context-limited batchnebula/certs/lyra.crt: reviewed — included in a context-limited batchnebula/certs/mass-storage.crt: reviewed — included in a context-limited batchnebula/certs/media1.crt: reviewed — included in a context-limited batchnebula/certs/nimmog-de.crt: reviewed — included in a context-limited batchnebula/certs/nova.crt: reviewed — included in a context-limited batchnebula/certs/pangolin-vps.crt: reviewed — included in a context-limited batchnebula/certs/phone.crt: reviewed — included in a context-limited batchnebula/certs/router.crt: reviewed — included in a context-limited batchnebula/certs/vega.crt: reviewed — included in a context-limited batchnebula/revoked.json: reviewed — included in a context-limited batchnebula/router.json: reviewed — included in a context-limited batchsecrets/nebula/chaos.yaml: reviewed — included in a context-limited batchsecrets/nebula/electra.yaml: reviewed — included in a context-limited batchsecrets/nebula/lena.yaml: reviewed — included in a context-limited batchsecrets/nebula/lyra.yaml: reviewed — included in a context-limited batchsecrets/nebula/mass-storage.yaml: reviewed — included in a context-limited batchsecrets/nebula/media1.yaml: reviewed — included in a context-limited batchsecrets/nebula/nimmog-de.yaml: reviewed — included in a context-limited batchsecrets/nebula/nova.yaml: reviewed — included in a context-limited batchReview metadata
Final review at
a4ca4eareports Ready to merge; CI test and review jobs pass. The one advisory suggestion is valid: certificate reissue itself does not revoke the old fingerprint.Prepared documentation-only follow-up
50a3e7cstates that explicitly in README. Replaced certificates intentionally overlap during the rolling activation, avoiding disruption to hosts that still run the previous pair. After Vega's new no-unsafe-route pair is accepted, #297 now requires explicit blocking of its superseded exit fingerprint (3d14d599e015f90b11037915aba5da932ba3221368ae20e08d324cf143849671, decoded from the public main certificate; authority 0.0.0.0/1 and 128.0.0.0/1) on all peers. That list must be separate from retired host names so active Vega remains provisionable.This implements the review's documentation alternative without prematurely revoking the still-live Vega pair. No credential, configuration or runtime change in this follow-up. Focused documentation review and git diff --check pass. Existing full flake checks, meaningful Nebula regressions, Electra canary and current green CI remain the merge evidence. User authorized merge when findings are resolved; deployment/retirement issues stay open for remaining live acceptance.
Posted before pushing
50a3e7c.