Skip to content
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

install: Add block to config, disable tpm2-luks unless opted-in #445

Merged
merged 2 commits into from
Apr 3, 2024

Conversation

cgwalters
Copy link
Collaborator

tests: Use ..Default::default() for install config

To make adding a new field not require touching all the tests.

Signed-off-by: Colin Walters walters@verbum.org


install: Add block to config, disable tpm2-luks unless opted-in

This allows the container image builder more control over
bootc install to-disk in the installation config. Per discussion in
#421
this one definitely requires integration by the base image,
and not all of them will want it.

(Or if the do want LUKS, they may want more control over it)

The default value is block: ["direct"] which only enables
the simple filesystem install.

This change allows two different things:

block: []

With this, bootc install to-disk will just error out. It's
a way to effectively disable it for those that want to use
an external installer always.

Another possibility is:

block: ["direct", "tpm2-luks"]

To explicitly re-enable the builtin tpm2-luks flow.

Or, one could do just block: ["tpm2-luks"] to enforce encrypted installs.

Signed-off-by: Colin Walters walters@verbum.org


To make adding a new field not require touching all the tests.

Signed-off-by: Colin Walters <walters@verbum.org>
Copy link
Contributor

@jeckersb jeckersb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good, just a couple minor nits/suggestions!

lib/src/install/config.rs Outdated Show resolved Hide resolved
lib/src/install/config.rs Show resolved Hide resolved
lib/src/install/config.rs Show resolved Hide resolved
This allows the container image builder more control over
`bootc install to-disk` in the installation config.  Per discussion in
containers#421
this one definitely requires integration by the base image,
and not all of them will want it.

(Or if the do want LUKS, they may want more control over it)

The default value is `block: ["direct"]` which only enables
the simple filesystem install.

This change allows two different things:

`block: []`

With this, `bootc install to-disk` will just error out.  It's
a way to effectively disable it for those that want to use
an external installer always.

Another possibility is:

`block: ["direct", "tpm2-luks"]`

To explicitly re-enable the builtin tpm2-luks flow.

Or, one could do just `block: ["tpm2-luks"]` to enforce encrypted installs.

Signed-off-by: Colin Walters <walters@verbum.org>
@jeckersb jeckersb merged commit 631e6bf into containers:main Apr 3, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants