Problem/Justification
Native ZFS snapshots preserve historical data, but a compromised Full Administrator account or API key can release snapshot holds and delete the recovery points. Scheduled snapshot lifetimes do not prevent early administrative deletion, and S3 Object Lock does not provide a retention lock for existing native ZFS snapshots.
Please consider an optional filesystem-enforced retention lock for manually created and scheduled ZFS snapshots:
- Apply the lock atomically at snapshot creation. Allow extending the deadline, but prohibit shortening or removing an active lock, including by Full Administrators.
- Enforce it below the middleware layer. Supported UI, API, CLI and ordinary root-level ZFS operations must not bypass it through hold release, snapshot deletion, destructive rollback, or deletion of the parent dataset or pool.
- Preserve the lock across reboots, upgrades and pool import. System-clock changes must not cause early expiry.
- Require explicit opt-in and irreversible-action confirmation. Show expiry dates and capacity warnings, and allow normal cleanup after expiry.
The goal is to withstand compromised administrative credentials and normal management operations. Direct block-device corruption, malicious kernel replacement, external encryption-key destruction and physical media destruction are outside the requested guarantee. This may require upstream OpenZFS work; a middleware-only restriction would not meet the requested boundary.
Impact
This would preserve a defined local recovery window when ransomware obtains administrative credentials, helping protect business file servers and on-premises backup repositories. My immediate use case is a home NAS, but the security gap is also relevant to Enterprise deployments.
Holds with restricted administrators, independently administered backup systems and immutable object-storage targets are useful workarounds. They do not provide this specific guarantee for native snapshots on the primary system. Independent backups would remain necessary.
User Story
As a TrueNAS administrator, I want to explicitly enable a 30-day retention lock on selected snapshot tasks. Once a protected snapshot is created, even my Full Administrator credentials cannot delete it or shorten its retention through supported management operations. I can restore or clone data while it is locked, and normal retention cleanup resumes after expiry. Before enabling the feature, I see clear warnings that locked snapshots can consume space that cannot be reclaimed early.