Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/release/encrypt-datastore.service
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ExecCondition=/usr/bin/rottweiler check directory ${DATASTORE_DIR} unencrypted
ExecStart=/usr/sbin/tune2fs -O encrypt /dev/disk/by-partlabel/BOTTLEROCKET-PRIVATE

# Generate key and encrypt directory.
ExecStart=/usr/bin/rottweiler generate-key datastore
ExecStart=/usr/bin/rottweiler generate key datastore
ExecStart=/usr/bin/rottweiler encrypt directory ${DATASTORE_DIR} datastore

UMask=0077
Expand Down
2 changes: 1 addition & 1 deletion packages/release/encrypt-local-fs.service
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Environment=BOTTLEROCKET_DATA=/dev/disk/by-partlabel/BOTTLEROCKET-DATA
ExecCondition=/usr/bin/rottweiler check block-device ${BOTTLEROCKET_DATA} unencrypted

# Generate key and encrypt block device.
ExecStart=/usr/bin/rottweiler generate-key bottlerocket-data
ExecStart=/usr/bin/rottweiler generate key bottlerocket-data
ExecStart=/usr/bin/rottweiler encrypt block-device ${BOTTLEROCKET_DATA} bottlerocket-data

UMask=0077
Expand Down
48 changes: 48 additions & 0 deletions sources/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions sources/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ aws-smithy-runtime-api = "1"
aws-smithy-types = "1"
aws-smithy-async = "1"
aws-types = "1"
binrw = "0.14"
bit_field = "0.10"
bon = "2"
bytes = "1"
Expand Down
2 changes: 1 addition & 1 deletion sources/api/apiserver/src/server/ephemeral_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ fn encrypt_ephemeral_device(device: &str) -> Result<String> {

if !is_encrypted {
run_rottweiler_checked(
&["generate-key", EPHEMERAL_STORAGE_KEY_ID],
&["generate", "key", EPHEMERAL_STORAGE_KEY_ID],
EPHEMERAL_DATA_LINK,
)?;
run_rottweiler_checked(
Expand Down
1 change: 1 addition & 0 deletions sources/deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ allow = [
]

exceptions = [
{ name = "rottweiler", allow = ["LGPL-2.1"], version = "*" },
]

# https://github.com/hsivonen/encoding_rs The non-test code that isn't generated from the WHATWG data in this crate is
Expand Down
10 changes: 9 additions & 1 deletion sources/rottweiler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,29 @@
name = "rottweiler"
version = "0.1.0"
edition = "2024"
license = "Apache-2.0 OR MIT"
license = "(Apache-2.0 OR MIT) AND LGPL-2.1-or-later"
publish = false

[dependencies]
argh.workspace = true
base64.workspace = true
binrw.workspace = true
bottlerocket-image-features.workspace = true
envy.workspace = true
hex.workspace = true
hex-literal.workspace = true
hkdf = { workspace = true, features = ["std"] }
nix = { workspace = true, features = ["fs", "ioctl", "mount"] }
serde = { workspace = true, features = ["derive"] }
serde_plain.workspace = true
serde_json.workspace = true
sha2.workspace = true
snafu.workspace = true
walkdir.workspace = true
zeroize = { workspace = true, features = ["alloc", "derive"] }

[dev-dependencies]
test-case.workspace = true

[build-dependencies]
generate-readme.workspace = true
4 changes: 3 additions & 1 deletion sources/rottweiler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ interface for encrypting and managing encrypted storage resources including:
### Commands

#### Key Management
- `generate-key <key-id>` - Generate an encryption key
- `generate key <key-id>` - Generate an encryption key
- `dump key <key-id>` - Dump encrypted key structure

#### Block Device Operations
- `encrypt block-device <path> <key-id>` - Encrypt a block device using LUKS
Expand All @@ -28,6 +29,7 @@ interface for encrypting and managing encrypted storage resources including:
- `lock directory <path>` - Lock an encrypted directory (remove key)
- `unlock directory <path> <key-id>` - Unlock an encrypted directory (add key)
- `check directory <path> encrypted|unencrypted` - Check directory encryption state
- `check directory <path> locked|unlocked` - Check directory lock state

#### TPM Measurement Operations
- `measure settings` - Measure OS settings into PCR 8
Expand Down
Loading
Loading