-
Notifications
You must be signed in to change notification settings - Fork 1.4k
gha: add signed cache support #6397
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
base: master
Are you sure you want to change the base?
Conversation
dff6323 to
96bbfdb
Compare
| } | ||
|
|
||
| type VerifyPolicy struct { | ||
| TimestampTreshold int `toml:"timestampTreshold"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
| TimestampTreshold int `toml:"timestampTreshold"` | |
| TimestampThreshold int `toml:"timestampThreshold"` |
| type SignConfig struct { | ||
| Command []string `toml:"command"` | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess in the future we could have some kind of Backend attribute so we can choose different kind of backend if we have built-in ones supported like sigstore:
type SignConfig struct {
Backend string `toml:"backend"`
Sigstore *SigstoreBackend `toml:"sigstore,omitempty"`
Command *CommandBackend `toml:"command,omitempty"`
}
type SigstoreBackend struct {
OIDCProvider string `toml:"oidc-provider"`
TLogUpload bool `toml:"tlog-upload"`
}
type CommandBackend struct {
Commands []string `toml:"commands"`
}There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need the extra params? Isn't the command args flexible enough to do whatever you need to do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean if one day we have signing with sigstore built-in in buildkit (similar to remote cache backends) we would not need to copy the cosign binary in the build container and shell out. Maybe better through the gateway as an image?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future maybe, but I don't know how it would look like then.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
6de68ba to
cc983e7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md update with new sections or maybe a new "signing" page under https://github.com/moby/buildkit/tree/master/docs but we can do it later when we expand on signing in our code base. (cc @dvdksn)
Currently this is tested in the Docker GitHub Builder: docker/github-builder-experimental#60
Add an option to use signed cache with Github backend. Signing needs to happen by an external program set in the toml config (eg. cosign via github OIDC) and is verified against the policy specified in the toml config. This allows reusable workflow running in Github actions environment to ensure that cache can not be modified outside of the workflow, even if full access to cache storage is available.
ref docker/github-builder-experimental#56