-
Notifications
You must be signed in to change notification settings - Fork 12
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
[21.05] full-disk encryption: finalisation, improvements, checks, routine tooling #1087
Merged
Conversation
This file contains 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
For streamlining the regular task of verifying whether (all) volumes of a host can still be opened with the admin key and device key, I implemented the `fc-luks keystore test-open` subcommand. As this relies on the same volume discovery logic as the `reencrypt` command, I refactored and reused that discoverly logic out into a separate method. Also includes a NixOS integration test for this, but no unit tests.
Reactivating the already-implemented, but commented-out test for successful daemon activation after reboots of encrypted ceph hosts. The test was broken due to stateful modifications of the key material in previous parts of the test, moving the subtest in front of these modifications resolved it. PL-132687
This has been unused since we dropped Ceph Jewel. Piggybacking this in this branch as FDE work is slightly related to storage and ceph.
When doing full-disk encryption, persisted encrypted data from disk can still be kept in memory in a decrypted state. When swapping memory pages to disk again, there is the danger of persisting that plaintext data to disk again, circumventing the goal of the encryption. As we do not want to use swap on physical machines anymore, we can just monitor and warn when swap is unexpectedly used. PL-131325
Establish a regular sensu check on physical hosts that checks certain LUKS header parameters of all encrypted devices, to discover unexpected diversions. - tie together the individual condition checks - integrate checks into fc-luks tooling with discovery of encrypted volumes - add sensu check - extend checks with plausibility checks for proper dump input - add unit and integration tests for checks with proper mocking
This makes sense to expose the check to potential changes in to output format of `cryptsetup luksDump`. Detailed unit tests are done against mock outputs only.
Not all physical machines actually have encrypted volumes as of now, e.g. KVM hosts. The check does not need to run on them.
osnyx
force-pushed
the
PL-131325-fde-finalise
branch
from
August 21, 2024 21:59
69b1841
to
6de0aee
Compare
By running fc-luks commands as a sensu check, we suddenly do not inherit the full system PATH anymore, breaking access to necessary external tools used like `lvs`. We can adopt the `fc-ceph.conf` approach already used by `fc-ceph` subsystems, for now even the default PATH is sufficient. Requires some extra mocking in unit tests; the NixOS integration test now explicitly empties the path beforehands.
osnyx
force-pushed
the
PL-131325-fde-finalise
branch
from
August 22, 2024 12:13
8400bfc
to
f5c854e
Compare
ctheune
approved these changes
Aug 22, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
@flyingcircusio/release-managers
This wraps up PL-131325 by adding supportive tooling for maintenance tasks:
fc-luks keystore test-open
for regularly verifying the correct key assignment of volumesThe following sensu checks are added:
fc-luks check
LUKS header parameter checkFollowing smaller regressions or cleanups are included:
Release process
Impact: internal
Changelog:
PR release workflow (internal)
Design notes
on
oroff
. Example: rate limiting.Security implications
fc-luks check
fc-luks keystore test-open
,fc-luks check