-
Notifications
You must be signed in to change notification settings - Fork 246
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
Try to unlock existing LUKS device with Clevis #1210
Comments
The main problem that was found during the implementation of #1016 was that we couldn't determine what exact config is set for clevis devices. As such we cannot validate that a given device matches what is specified to Ignition, purely being unlockable isn't sufficient. If a happy path method of validating that a given config is exactly implemented on a given LUKS device (whether that's from header checks or some command querying) then I'd be happy to have this implemented but without it I'm afraid that this isn't something Ignition should support natively. |
You cannot? Then maybe apply some JSON normalization and compare the result with the part ignition config. Should not that work? |
And BTW, even if you could not verify the Clevis config, you could – what I argued here initially – actually just treat it the same as with a keyfile, i.e.:
AFAIK you do the same if a keyfile is used. |
From the top of my head one of the problems was that there were additional values that are generated in the clevis versions that we don't have access to (nor do we know if it would be correct and match what would occur if we were to be creating that device from scratch). If you're up for it then feel free to submit a pull request adding the verification that the config EXACTLY matches the specified config.
Ignition's reuse semantics (filesystems and partitions for reference) is to only reuse pre-existing items when they exactly match what is specified in the config. |
Feature Request
My use case is to mount an existing LUKS clevis-encrypted device (without wiping) and integrate it into the system with a (new) Clevis config via Ignition.
Environment
bare-metal
Desired Feature
As I noticed in #1209 for existing LUKS devices, you only try to unlock them via a keyfile (i.e. password).
However, given you now support Clevis, IMHO you should also try to unlock the disk via Clevis, so in case Clevis is already configured, it can be (re)configured by Ignition.
Other Information
You should also try a Clevis unlock here:
ignition/internal/exec/stages/disks/luks.go
Lines 375 to 380 in 0cbe33f
If you do this, maybe you also need to delete that old keyslot used for unlocking via Clevis or overwrite it.(?)
Edit: Just saw in #1016 this was already mentioned, but apparently forgotten (respectively not being tracked) afterwards:
The text was updated successfully, but these errors were encountered: