Skip to content

nix: harden custom data directory ownership#65

Merged
fosskar merged 8 commits into
mainfrom
deployment-storage-hardening
Jul 22, 2026
Merged

nix: harden custom data directory ownership#65
fosskar merged 8 commits into
mainfrom
deployment-storage-hardening

Conversation

@fosskar

@fosskar fosskar commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • preserve systemd StateDirectory=ssync for the default data path
  • create custom services.ssync.dataDir paths as mode 0700 for the configured user and grant only that path through ReadWritePaths
  • keep external age identity, node key, and cluster artifact paths pre-provisioned and read-only
  • verify normalized hardening properties across NixOS and Home Manager renderers
  • bump ssync to 0.19.2

Security and performance

  • custom storage no longer depends on an undeclared writable path outside the sandbox
  • external secret parents are never added to the writable allow-list
  • daemon hot paths are unchanged; all added work happens during Nix evaluation, activation, or tests

Verification

  • nix build .#checks.x86_64-linux.vm-module
  • nix build .#checks.x86_64-linux.module-contract
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace (235 tests across 13 suites)
  • nix fmt -- --ci

@fosskar
fosskar merged commit f6e2c83 into main Jul 22, 2026
2 checks passed
@fosskar
fosskar deleted the deployment-storage-hardening branch July 22, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant