constellation/disk-mapper
renovate[bot] 53ae065329
deps: update golangci/golangci-lint to v1.62.2 (#3511)
* deps: update golangci/golangci-lint to v1.62.2

* deps: tidy all modules

* chore: align with new golangci-lint rules

golangci-lint added some linters in this version upgrade that require fixes on our side. These are done in this commit.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: edgelessci <edgelessci@users.noreply.github.com>
Co-authored-by: Moritz Sanft <58110325+msanft@users.noreply.github.com>
2024-12-02 13:24:34 +01:00
..
cmd disk-mapper: write failure message to syslog and sleep before reboot 2024-03-07 11:47:51 +01:00
internal deps: update golangci/golangci-lint to v1.62.2 (#3511) 2024-12-02 13:24:34 +01:00
recoverproto deps: update Go dependencies (#3509) 2024-12-02 09:17:23 +01:00
README.md dev-docs: Go package docs (#958) 2023-01-19 15:57:50 +01:00

disk-mapper

The disk-mapper is a binary that runs during the initramfs of a Constellation node.

If running on a new node, it handles setting up the node's state disk by creating an integrity protected encrypted partition.

On a rebooting node, the disk-mapper handles recovery of the node by requesting a decryption key for its state disk. Once the disk is decrypted, the measurement salt is read from disk and used to extend a PCR to mark the node as initialized.

Testing

Integration test is available in disk-mapper/test/integration_test.go. The integration test requires root privileges since it uses dm-crypt. Build and run the test:

go test -c -tags=integration ./disk-mapper/internal/test/
sudo ./test.test