-
Notifications
You must be signed in to change notification settings - Fork 247
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
config/internal: add clevis override support #1031
Conversation
Open question: should validation fail if both overrides & regular clevis configuration options are specified? I'm leaning towards yes but wanted to ask. Conflicting configs can be written otherwise e.x.:
|
Hmm, I wonder if we should reframe #1019 as support for "custom" pins instead? So e.g. "luks": [
{
"name": "luksroot",
"device": "/dev/md/foobar",
"clevis": {
"tpm2": true,
"custom": {
"pin": "my-custom-pin",
"config": "{\"custom-field\": \"custom-value\"}"
}
},
"label": "root"
}
], would use One thing we could do down the road then is that if |
/cc @puiterwijk -- this is about the comment you initially raised here. |
My personal (slight) leaning would be to keep it as a complete override. |
Sure, I also see the appeal in that. The reason I suggested it was so that users could still leverage Ignition's built-in In that case yes, I agree we should make it an error if any other pinning options are specified. (Though small bikeshed: I'd still call it e.g. |
I've written up a few different potential paths, do either of 2 or 3 encapsulate your proposal?
|
Sorry for the delay on this. I think just going with what you have here works. Two things:
|
If they're specified inside the config or if they're specified as the custom pin? |
The former. In a custom pin users can then just do whatever they want. |
b9dd472
to
d2c982d
Compare
Ok, this is rebased, updated, and tested. Should be good for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM generally.
7130bac
to
aecb0cc
Compare
Updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice and simple! LGTM overall, just some minor nits.
@@ -144,6 +144,10 @@ The Ignition configuration is a JSON document conforming to the following specif | |||
* **thumbprint** (string): thumbprint of a trusted signing key. | |||
* **_tpm2_** (bool): whether or not to use a tpm2 device. | |||
* **_threshold_** (int): sets the minimum number of pieces required to decrypt the device. | |||
* **_custom_** (object): overrides the clevis configuration. The `pin` & `config` will be passed directly to `clevis luks bind`. If specified, all other clevis options must be omitted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not new here so we can address this in a follow-up, but WDYT about using the proper noun "Clevis" (capitalized) in descriptions to match upstream?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WFM
Adds new custom options that allow for the direct specification of the clevis pin & configuration JSON that will be passed to `clevis luks bind`.
aecb0cc
to
776f321
Compare
Updated the error messages. Merging on green. |
Adds new override options that allow for the direct specification of the
clevis pin & configuration JSON that will be passed to
clevis luks bind
.Closes #1019