Conversation
556332d to
04d5e9f
Compare
2c32eb7 to
a7de265
Compare
b4cc648 to
e83e669
Compare
dc1c5c3 to
40bfdf4
Compare
|
Work is done, pre-built packages for Debian 12 and amd64 arch are available here https://github.com/oldium/clevis/releases/tag/v20_tpm1 |
000c78a to
b79a306
Compare
|
Rebased to latest master to fix the build. |
sergio-correia
left a comment
There was a problem hiding this comment.
@oldium: Thanks, I finally had a chance to review this again. Looks very nice, but I pointed a few small issues to fix. Please, also rebase on top of the current master. Also, are you going to autosquash those fixup commits?
|
Thanks @sergio-correia for the review, I now feel like a kid. I saw the code so many times and have not noticed that 😅. I will fix all your findings and auto-squash it. |
|
The issue with Dracut 110 is reported here #545 |
|
I commented this in #545 as well, but clevis 20-1ubuntu2 was uploaded with a patch that fixes the ordering issue. |
|
I will rebase onto #549 to create a non-conflicting branch. |
Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
The DefaultDependencies=yes option adds conflicting dependency on the shutdown.target automatically to ensure the service is terminated during the shutdown, so add it when we use DefaultDependencies=no. Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
Current Dracut integration for bootup without Systemd ignores all cryptsetup options, which are usually handled by Dracut itself (like reading /etc/crypttab). We need to hook into the Dracut cryptsetup process in order to allow Dracut handling the options and us handling the password only. Dracut uses generated udev rules to create cryptsetup unlocking scripts in initqueue/settled dynamically when the corresponding device appears. The unlocking tries to unlock by the key file first and then by password read from user. We can hook into the key file reading stage by providing our own pipe and send the password via the pipe similarly to how the initramfs-tools clevisloop is doing it. There is one difference, though, we have only one try to unlock, but that should be enough. For the network pins (tang and sss/tang at the moment) we can move the generated Dracut cryptsetup unlocking scripts to initqueue/online to ensure the unlocking happens at the right time. Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
This is useful during testing. Signed-off-by: Oldřich Jedlička <oldium.pro.gmail.com>
Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
|
Updated, rebased, autosquashed. Ready to be merged 😊 |
|
Latest release v22_tpm1 is here https://github.com/oldium/clevis/releases/tag/v22_tpm1 as usual. Built images:
|
Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
This is a weak requirement, so when TCSD is missing, it does not influence the Clevis askpass service startup. Similarly if the TCSD startup fails, it does not affect the Clevis askpass service startup. Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
The command fails in Docker or otherwise limited environments, so skip the test when it is not usable. Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
Fix usage of uninitialized ${orig} value. Also test exactly the string
without having newlines added by echo.
Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
|
New packages with fixed PCR validation will arrive soon. |
sergio-correia
left a comment
There was a problem hiding this comment.
Very nice job, thank you! I will merge this.
|
One small step for a man, one giant leap for mankind 😁 Thank you very much! |
|
Thank you @oldium , now we can run our old gear for another 15 years! |

This patch series adds TPM 1.2 support and fixes few other things (I can split this into multiple Pull Requests if you wish):
DefaultDependencies=no.Status:
clevis-encrypt-tpm1Example usage:
clevis luks bind -d /dev/<device> tpm1 '{"pcr_ids":"0,4,7"}'echo test | clevis encrypt tpm1 '{"pcr_ids":"0,4,7"}' | clevis decryptTested:
"fail":trueto test success and failed unlockingrd.neednetthe unlocking happens after network gets online.Fixes: #84, #456