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

all images needs to sign while cosignwebhook expects signatures #33

Open
eumel8 opened this issue Dec 15, 2023 · 3 comments
Open

all images needs to sign while cosignwebhook expects signatures #33

eumel8 opened this issue Dec 15, 2023 · 3 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request
Milestone

Comments

@eumel8
Copy link
Owner

eumel8 commented Dec 15, 2023

version 4.0.3

at the moment all container and init-container (also injected init-container by istio, dynatrace) needs to sign, otherwise cosignwebhok will deny the Admission request. Also different keys seems not possible.

needs to test further

cc. @puffitos

@puffitos
Copy link
Collaborator

This happens because of the first functionality we introduced in our webhook - the default fallback secret named cosignwebhook. If someone is using this secret in their deployments, then ALL containers will be checked based on that secret (except if other environment variables are defined as public keys in the containers themselves).

I had a couple of ideas on how to handle this. One is specific to the problem (the problem is an injected dynatrace-operator container, when the user is only deploying one container originally).

  • We add a global map of known images and their public keys as a configuration parameter to the cosignwebhook. We let the webhook check for well-known signatures, if the customer hasn't provided one.
  • We introduce an IGNORE_LIST, which defines images that shouldn't be verified at all. This seems like a security problem waiting to happen (someone hijacks a tag and deploys a malicious image in a cluster)
  • We deprecate this old functionality
  • We ask for an explicit Env Variable in the deployment (like COSIGNWEBHOOK_SECRET_FALLBACK) to activate the fallback secret selection.

What do you think @eumel8?

@puffitos puffitos self-assigned this Dec 19, 2023
@puffitos puffitos added bug Something isn't working enhancement New feature or request labels Dec 19, 2023
@puffitos puffitos added this to the 4.1.0 milestone Dec 19, 2023
@eumel8
Copy link
Owner Author

eumel8 commented Jan 3, 2024

The global map seems useful but a kind of intransparent if the user want's full control over the deployment. Deprecation is an option, let's rollout the last release and collect feedback from the customer.

@puffitos
Copy link
Collaborator

puffitos commented Jan 3, 2024

@eumel8 deprecation seems like the best option to me as well going forward. OK, let's see what the users want as we'll and tackle this at a later time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants