[HLD] SSD Wipe - #2449
Conversation
|
/azp run |
|
No pipelines are associated with this pull request. |
6f317cc to
991b743
Compare
|
/azp run |
|
No pipelines are associated with this pull request. |
|
|
||
| ### 7.3 CLI design | ||
|
|
||
| **Command:** `config sed wipe-ssd` |
There was a problem hiding this comment.
Why is the command under "config".
This is not going to be a configuration. Its a one time execution. right?
There was a problem hiding this comment.
I put it under config as this feature extends the existing SED command group, which already provides the one-time config sed change-password and config sed reset-password operations. Keeping wipe-ssd in the same group provides a consistent SED management interface.
|
Was HLD discussed in SONiC community? |
Add SedMgmtBase.wipe_ssd() and abstract get_psid() to provide platform-agnostic support for wiping the switch SSD (crypto erase + NVMe block erase). It will be used by the new relevant CLI. We want to be able to securely wipe the switch SSD via SONiC CLI, for example as part of RMA / decommission workflows. HLD: sonic-net/SONiC#2449 Signed-off-by: Shauli Taragin <staragin@nvidia.com>
Add a CLI to securely wipe the switch SSD (crypto + block erase). The wipe-ssd command is added under the existing 'config sed' group, using the platform chassis. It displays an irreversibility warning prompt (bypassable with -y) and delegates to SedMgmt.wipe_ssd(). HLD: sonic-net/SONiC#2449 Depends on: sonic-net/sonic-platform-common#712 Signed-off-by: Shauli Taragin <staragin@nvidia.com>
Add the High-Level Design document for the SSD Wipe feature (config sed wipe-ssd), which securely erases the switch boot SSD in three sequential stages: 1. Ramdisk pivot - relocate rootfs to tmpfs so the physical SSD can be unmounted while the OS keeps running. 2. Crypto Erase (PSID revert) - destroy the SED media encryption key via sedutil-cli (fast, key-based wipe). 3. NVMe Block Erase - overwrite all user data blocks via nvme sanitize --sanact=0x02 (slower, NAND-level overwrite). The feature extends the SED framework adding: - SedMgmtBase.wipe_ssd() + abstract get_psid() - ssd_erase.sh orchestrator (ramdisk pivot + crypto erase + block erase) - check_sed_crypto_erase_prereqs helper in the shared sed_pw_utils.sh - rsync added to the image (needed by the ramdisk pivot) Builds on the SED framework from sonic-net#2171 (change/reset SED password). Signed-off-by: Shauli Taragin <staragin@nvidia.com>
991b743 to
9c60a03
Compare
|
/azp run |
|
No pipelines are associated with this pull request. |
Support the SONiC CLI to securely wipe the SSD (crypto + block erase). - Add ssd_erase.sh: bash orchestrator that pivots the OS to a tmpfs ramdisk, unmounts the boot SSD, then performs sedutil-cli PSID revert (crypto erase) followed by nvme sanitize --sanact=0x02 (block erase). - Add sed_pw_utils.sh helper for SED prerequisite checks. - Install rsync in the base image (required for the tmpfs pivot). HLD: sonic-net/SONiC#2449 Depends on: sonic-net/sonic-platform-common#712 Signed-off-by: Shauli Taragin <staragin@nvidia.com>
Not yet. Presentation is in community slot tomorrow( September 1st) |
Support the SONiC CLI to securely wipe the SSD (crypto + block erase). - Add ssd_erase.sh: bash orchestrator that pivots the OS to a tmpfs ramdisk, unmounts the boot SSD, then performs sedutil-cli PSID revert (crypto erase) followed by nvme sanitize --sanact=0x02 (block erase). - Add sed_pw_utils.sh helper for SED prerequisite checks. - Install rsync in the base image (required for the tmpfs pivot). HLD: sonic-net/SONiC#2449 Depends on: sonic-net/sonic-platform-common#712 Signed-off-by: Shauli Taragin <staragin@nvidia.com>
|
The current design logs to journalctl on a tmpfs that does not survive the reboot that follows the wipe. For any deployment with audit or compliance requirements, the wipe operation should produce a persistent, structured sanitization report that outlives the erase. Pre-Erase Snapshot: ssd_erase.sh should capture drive and OPAL state before any destructive operation begins. This data is unrecoverable after the PSID revert, so it must be collected in the prereq/preparation phase and held in a shell variable or temp file on the tmpfs. Fileds(Drive serial number,Drive model,Switch hostname,Chassis serial,SONiC version,Operator user, timestamp,etc ) Post-Erase Verification: after crypto_erase and block_erase both return, the drive and TPM are still queryable from the ramdisk. The script should collect Sanitize State, TPM bank state, etc The boot SSD is wiped and the tmpfs disappears on reboot, so the report must be sent out of the box before the operator reboots. At least two independent channels syslog or printing in serial console should be supported to publish pre/post erase state . Without a persistent sanitization report, there is no auditable proof that the wipe occurred, what it covered, or whether it succeeded. The ramdisk environment has everything needed to generate and deliver this report |
The SSD erase is a general procedure to run a disk wipe and clean process. The auditing process to ensure disk erasure mentioned here is one thing, other vendors/auditors might require additional data that is not depicted here. If we would like to expand this to conform with auditing requirements - then I think this is a separate feature where we define the auditing process. One vendor might claim that the report is sent prior to reboot and another vendor will require this report remain persistent throughout the wipe process. I believe that these 2 should not be coupled and if a customer would like to ensure erasure and the correct auditing process complacency - its on the customer's side to develop and deploy this on top of the SSD wipe functionality instead of trying to enforce a uniform approach here that is not entirely covered and not 100% defined. |
Additionally, I want to clarify that the current journal does survive the SSD unmount and erase. systemd-journald remains active in the ramdisk and records the operation through PSID revert, sanitize-status verification, and final completion. The operator is explicitly instructed to monitor the journal and reboot only after completion, allowing the execution record to be captured externally before reboot. |
Summary
Adds the High-Level Design document for the SSD Wipe feature (
config sed wipe-ssd), which securely erases the switch boot SSD in three sequential stages:tmpfsso the physical SSD can be unmounted while the OS keeps running.sedutil-cli(fast, key-based wipe).nvme sanitize --sanact=0x02(slower, NAND-level overwrite).The feature extends the SED framework adding:
SedMgmtBase.wipe_ssd()+ abstractget_psid()ssd_erase.shorchestrator (ramdisk pivot + crypto erase + block erase)check_sed_crypto_erase_prereqshelper in the sharedsed_pw_utils.shrsyncadded to the image (needed by the ramdisk pivot)