-
Notifications
You must be signed in to change notification settings - Fork 558
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
signing&verifying container images based on Kubernetes Secrets #398
Conversation
This looks awesome so far! What do you think about using a "-key k8s://namespace/name" prefix or something like that to help with the signer type selection logic? |
Thank you @dlorenc for giving this idea, we thought that too, to do so we should move this logic to |
That sounds great! |
Exactly! Should we add a brand-new kubernetes:// provider into kms init() function? By doing so, we are able to clean kubernetes package from cosign into sigstore, I guess. (By moving the all the K8s dependencies, maybe?) 🤔 |
I think that would make sense - cosign would still need to keep the key generation code though right? |
Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
The most suitable place for the Kubernetes provider is in the cosign project because of the key generation code. Because we have to generate key pairs before creating the actual Kubernetes secret, thus that logic belongs to cosign. Therefore, we have to keep that Kubernetes provider logic within the |
Good point. That makes sense to me. We can always move it around later if there's demand for it! |
@dlorenc, I pushed new changes to support the cc: @Dentrax |
Signed-off-by: Furkan <furkan.turkal@trendyol.com> Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
This is awesome! |
Closes #347
Known issues about the implementation:
We duplicated the Kubernetes Client logics (reducing both responsibilities to a single function?)
It's a bit hard to distinguish
namespace/name
compared to other providers (adding a new -k8s flag for signing and verifying)Ref priority refactoring? (File -> KMS -> K8s) - we're checking K8s
namespace/name
in first-order ever since a file exists in that pathWe bring a brand-new
loadPublicKey
function tocli/keys.go
due toimport cycle now allowed
problemWe haven't been checked the values of the data map of the secret whether is nil or not nil.
Use public key as a file