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: Verify target image fetch by default #182

Merged
merged 2 commits into from
Nov 6, 2023

Conversation

cgwalters
Copy link
Collaborator

install: Compute target image reference upfront

Prep for verifying it before we do an install.

Signed-off-by: Colin Walters [email protected]


install: Verify target image fetch by default

Now that we've dropped the --net=none by default, let's
avoid two major footguns by verifying the target image specification
by default.

  • Forgetting to use --target-no-signature-verification (most people are going to need this in demos right now)
  • When the target OS requires an authenticated pull, but one didn't embed the pull secret in the target OS

Signed-off-by: Colin Walters [email protected]


Prep for verifying it before we do an install.

Signed-off-by: Colin Walters <[email protected]>
@cgwalters cgwalters force-pushed the install-check-sigverify branch from ebefeb9 to e6f92ee Compare November 6, 2023 19:20
@cgwalters
Copy link
Collaborator Author

Nov 06 19:20:24 qemu0 kola-runext-install[1401]: ERROR Verifying fetch: Preparing import: Fetching manifest: containers-policy.json specifies a default of insecureAcceptAnything; refusing usage

Hooray, CI successfully failed

Now that we've dropped the `--net=none` by default, let's
avoid two major footguns by verifying the target image specification
by default.

- Forgetting to use `--target-no-signature-verification` (most people are going to need this in demos right now)
- When the target OS requires an authenticated pull, but one didn't embed the pull secret in the target OS

Signed-off-by: Colin Walters <[email protected]>
@cgwalters cgwalters force-pushed the install-check-sigverify branch from e6f92ee to be35678 Compare November 6, 2023 19:27
Copy link
Member

@jmarrero jmarrero left a comment

Choose a reason for hiding this comment

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

/lgtm

@jmarrero jmarrero merged commit 084e5af into containers:main Nov 6, 2023
7 checks passed
If you are pushing an unsigned image, you must specify `bootc install --target-no-signature-verification`.

Additionally note that to perform an install from an authenticated registry, you must also embed
the pull secret into the image to pass this check. If you are fetching
Copy link
Member

Choose a reason for hiding this comment

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

The last sentence is incomplete.

What does it mean in detail to "embed the pull secret into the image to pass this check"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for catching that! I think it was sufficiently embarrassing state of things that I context switched to look at improving it and didn't switch back. Finished the doc comment in #186

cgwalters added a commit to cgwalters/bootc that referenced this pull request Nov 7, 2023
cgwalters added a commit to cgwalters/bootc that referenced this pull request Nov 7, 2023
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.

3 participants