-
Notifications
You must be signed in to change notification settings - Fork 22
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
Allow specifying custom checksum verification logic #72
Comments
Hi @malt3 This may feel vague as a statement and there is some room for interpretation, which we stepped into when implementing a CLI for Side-stepping On that note, I wonder if treating Terraform the same way as the other dependencies would be beneficial to you? Then you could avoid HashiCorp maintains various repositories for popular package managers, so installation of Terraform that way shouldn't be a burden for an operator who is already familiar with the process for other software. If the above doesn't meet your requirements - I would appreciate if you could share the reasons or concerns. Coming back to " https://pkg.go.dev/github.com/hashicorp/[email protected]/product#Product type VerifyChecksumFunc func(ctx context.Context, calculatedChecksum []byte) error
type Product struct {
VerifyChecksum VerifyChecksumFunc
// GetVersion represents how to obtain the version of the product
// reflecting any output or CLI flag differences
GetVersion func(ctx [context](https://pkg.go.dev/context).[Context](https://pkg.go.dev/context#Context), execPath [string](https://pkg.go.dev/builtin#string)) (*version.Version, [error](https://pkg.go.dev/builtin#error)) One assumption I'm making is that you'd verify the signature on your end, and store the checksums somewhere and then only compare those checksums via Another assumption here is that type VerifyChecksumFunc func(ctx context.Context, archiveReader io.Reader, os, arch string, version *version.Version) error or we could attach that to the context. Nothing is set in stone here, but before we go down this route of expanding the API I would like you to consider the other solution. |
Thank you for this detailed response. Let me try to explain our concerns first. With Constellation, we aim to make every operation done by our tools reproducible and verifiable for our users. We do this to build trust in our tools. If our software is open source, can be build in a reproducible way and we pin all of our binary dependencies with a hash, we can prevent many common supply chain attacks. Regarding possible resolutions of the feature request you mentioned:
Thanks again for the response. I would be happy to assist with further input, an attempt to implement this, testing or more. |
I am using hc-install and terraform-exec and am pleased to see that terraform binary hashes are signed and the signature is checked when downloading terraform binaries.
For supply chain security, I would like to be able to pin expected hashes for terraform binaries (similar to terraform providers lock and the dependency lock file).
The text was updated successfully, but these errors were encountered: