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

Verify multi-arch builder SSH host keys #816

Open
jlebon opened this issue Feb 17, 2023 · 3 comments
Open

Verify multi-arch builder SSH host keys #816

jlebon opened this issue Feb 17, 2023 · 3 comments
Labels
jira For syncing to JIRA

Comments

@jlebon
Copy link
Member

jlebon commented Feb 17, 2023

Right now, we're trusting the builder's host keys on first use. Since there's no persistence between runs, we trust on first use on each run. We should instead be verifying host keys. There's tricky details there on how to implement this of course. See conversation in containers/common#1216 (comment) and following.

@dustymabe
Copy link
Member

Copying from containers/common#1216 (comment):

But yeah, we should probably tighten this up anyway. It wouldn't be too hard for our wrapper code to first add the known hosts entries (from e.g. a configmap) before calling podman remote. The harder part is reprovisioning these remote machines with the same host keys each time (secret provisioning in general is an issue). It'd probably be easier I think to just have them naturally rotate everytime we reprovision and update the configmap or equivalent. So we'd at least reduce it to a single TOFU per reprovision.

@dustymabe
Copy link
Member

dustymabe commented Feb 20, 2023

The harder part is reprovisioning these remote machines with the same host keys each time (secret provisioning in general is an issue).

Yes. This is the hard part. We could store the hostkeys in s3 and generate an expiring pre-signed URL to use in the Ignition conifg. Which makes the window of time someone would have to both access the Ignition config (with the pre-signed URL) and the actual S3 content backed by the URL much smaller.

@jlebon jlebon added the jira For syncing to JIRA label Feb 21, 2023
@dustymabe
Copy link
Member

When re-working this we could consider using a CA to establish trust too: https://jameshfisher.com/2018/03/16/how-to-create-an-ssh-certificate-authority/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira For syncing to JIRA
Projects
None yet
Development

No branches or pull requests

2 participants