-
Notifications
You must be signed in to change notification settings - Fork 76
updates to ephemeral encryption keys #1024
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
piyush-jena
merged 4 commits into
bottlerocket-os:develop
from
piyush-jena:rottweiler-update/core-kit-1
Sep 4, 2026
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
d35e312
apiserver: support ephemeral-encryption-keys in ephemeral-storage
piyush-jena adb584a
rottweiler: add support for plain mode encryption
piyush-jena 78a85de
release: provide ephemeral-encryption-keys as a sub-package
piyush-jena 4901941
docs: add documentation for ephemeral-encryption-keys
piyush-jena File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| [Unit] | ||
| After=encrypt-unlock-private-fs.service prepare-private-fs.service | ||
| Requires=prepare-private-fs.service | ||
|
|
||
| [Mount] | ||
| What=/dev/mapper/BOTTLEROCKET-PRIVATE |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| [Unit] | ||
| Description=Encrypt and Unlock Datastore (/.bottlerocket/datastore) | ||
| DefaultDependencies=no | ||
| Before=migrator.service storewolf.service | ||
| After=tpm2.target | ||
| ConditionSecurity=tpm2 | ||
| # /run/rottweiler is a tmpfs keystore; fscrypt keys must not persist to disk. | ||
| RequiresMountsFor=/.bottlerocket /run/rottweiler | ||
| RefuseManualStart=true | ||
| RefuseManualStop=true | ||
|
piyush-jena marked this conversation as resolved.
|
||
|
|
||
| [Service] | ||
| Type=oneshot | ||
| Environment=DATASTORE_DIR=/.bottlerocket/datastore | ||
| EnvironmentFile=/usr/share/bottlerocket/image-features.env | ||
|
|
||
| ExecStart=/usr/bin/rottweiler generate-key datastore | ||
| ExecStart=/usr/bin/rottweiler encrypt directory ${DATASTORE_DIR} datastore | ||
| ExecStart=/usr/bin/rottweiler unlock directory ${DATASTORE_DIR} datastore | ||
| ExecStartPost=/usr/bin/rottweiler delete-key datastore | ||
|
|
||
| UMask=0077 | ||
| RemainAfterExit=true | ||
| StandardOutput=journal+console | ||
| StandardError=inherit | ||
|
|
||
| [Install] | ||
| RequiredBy=migrator.service storewolf.service | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| [Unit] | ||
| Description=Encrypt and Unlock Local Filesystem (/local) | ||
| DefaultDependencies=no | ||
| Conflicts=umount.target | ||
| IgnoreOnIsolate=true | ||
| Wants=dev-disk-by\x2dpartlabel-BOTTLEROCKET\x2dDATA.device blockdev@dev-mapper-BOTTLEROCKET\x2dDATA.target | ||
| After=dev-disk-by\x2dpartlabel-BOTTLEROCKET\x2dDATA.device cryptsetup-pre.target systemd-udevd-kernel.socket | ||
| After=tpm2.target | ||
| ConditionSecurity=tpm2 | ||
| Before=cryptsetup.target blockdev@dev-mapper-BOTTLEROCKET\x2dDATA.target | ||
| RequiresMountsFor=/run/rottweiler | ||
| RefuseManualStart=true | ||
| RefuseManualStop=true | ||
|
|
||
| [Service] | ||
| Type=oneshot | ||
| Environment=BOTTLEROCKET_DATA=/dev/disk/by-partlabel/BOTTLEROCKET-DATA | ||
| Environment=DATA_PARTITION_BLOCK_DEVICE=/dev/mapper/BOTTLEROCKET-DATA | ||
| EnvironmentFile=/usr/share/bottlerocket/image-features.env | ||
|
|
||
| ExecStart=/usr/bin/rottweiler generate-key bottlerocket-data | ||
| ExecStart=/usr/bin/rottweiler encrypt-and-attach block-device ${BOTTLEROCKET_DATA} bottlerocket-data | ||
| ExecStart=/usr/lib/systemd/systemd-makefs ${DATA_PARTITION_FILESYSTEM} ${DATA_PARTITION_BLOCK_DEVICE} | ||
|
|
||
| # Mask repart-data-* so they don't block waiting for a partition this service already owns. | ||
| ExecStart=/usr/bin/systemctl stop repart-data-preferred repart-data-fallback --no-block | ||
| ExecStart=/usr/bin/ln -s /dev/null /etc/systemd/system/repart-data-preferred.service | ||
| ExecStart=/usr/bin/ln -s /dev/null /etc/systemd/system/repart-data-fallback.service | ||
|
|
||
| # Pass the device directly so systemd-repart resizes regardless of which disk / lives on. | ||
| ExecStart=-/usr/bin/systemd-repart --dry-run=no ${BOTTLEROCKET_DATA} | ||
| ExecStart=/usr/bin/rottweiler resize block-device /dev/disk/by-partlabel/BOTTLEROCKET-DATA bottlerocket-data | ||
| ExecStartPost=/usr/bin/rottweiler delete-key bottlerocket-data | ||
|
|
||
| ExecStop=/usr/bin/rottweiler detach block-device ${BOTTLEROCKET_DATA} | ||
|
|
||
| UMask=0077 | ||
| RemainAfterExit=yes | ||
| StandardOutput=journal+console | ||
| StandardError=inherit | ||
|
|
||
| [Install] | ||
| RequiredBy=local-fs.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| [Unit] | ||
| BindsTo=encrypt-unlock-local-fs.service | ||
| After=encrypt-unlock-local-fs.service | ||
|
|
||
| [Service] | ||
| ExecStart= | ||
| ExecStart=/usr/bin/true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.