How to secure Kubernetes deployment with signature verification - Part 2

How to secure Kubernetes deployment with signature verification - Part 2

In the last article, we configured image verification to all namespaces: How to secure Kubernetes deployment with signature verification - Part 1. We can also verify images specific namespaces with Connaisseur. Namespaced validation allows restricting validation to specific namespaces. Connaisseur will only verify trust of images deployed to the configured namespaces. This can greatly support initial rollout by stepwise extending the validated namespaces or excluding specific namespaces for which signatures are unfeasible.

Namespaced validation offers two modes:

  • ignore: ignore all namespaces with label securesystemsengineering.connaisseur/webhook: ignore
  • validate: only validate namespaces with label securesystemsengineering.connaisseur/webhook: validate

The desired namespaces must be labelled accordingly, e.g. via:

kubectl label namespaces <namespace> securesystemsengineering.connaisseur/webhook=validate        

Configure namespaced validation via the namespacedValidation in helm/values.yaml:

namespacedValidation
	enabled: true
	mode: validate:        

For upgrade values.yml:

helm upgrade connaisseur helm -f helm/values.yaml -n connaisseur        

Example

In?in this example I add label for demo namespace:

kubectl label namespaces demo securesystemsengineering.connaisseur/webhook=validate        

When I deploy pod in demo namespace, pod successfully created:

kubectl run signed-image --image=muradsamadov/contenttrust:signed -n demo
pod/signed-image created        

When I deploy pod in test namespace, pod don't created. Because I don't label in test namespace:

kubectl run signed-image --image=muradsamadov/contenttrust:signed -n test
Error from server: admission webhook "connaisseur-svc.connaisseur.svc" denied the request: No trust data for image "docker.io/muradsamadov/contenttrust:unsigned".        
Mohammad Hasan Hashemi

Entrepreneurial Leader & Cybersecurity Strategist

1 年

In Part 2, your explanation of namespaced validation with Connaisseur and the two modes (ignore and validate) provides a clear understanding of how to control and restrict image verification to specific namespaces. Your step-by-step guide on how to configure namespaced validation via Helm charts and use labels to designate which namespaces should undergo validation is particularly helpful.

回复
Mohammad Hasan Hashemi

Entrepreneurial Leader & Cybersecurity Strategist

1 年

In Part 2, your explanation of namespaced validation with Connaisseur and the two modes (ignore and validate) provides a clear understanding of how to control and restrict image verification to specific namespaces. Your step-by-step guide on how to configure namespaced validation via Helm charts and use labels to designate which namespaces should undergo validation is particularly helpful.

回复

要查看或添加评论,请登录

社区洞察

其他会员也浏览了