Skip to content

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

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

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 [email protected]


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 [email protected]


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

Signed-off-by: Colin Walters <[email protected]>
Copy link
Collaborator

@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!

This allows the container image builder more control over
`bootc install to-disk` in the installation config.  Per discussion in
bootc-dev#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 <[email protected]>
@jeckersb jeckersb merged commit 631e6bf into bootc-dev:main Apr 3, 2024
15 checks passed
cgwalters pushed a commit to cgwalters/bootc that referenced this pull request Nov 6, 2024
container/store: Write final commit with timestamp
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.

2 participants