cosign-provider

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2021 License: MIT Imports: 13 Imported by: 0

README

cosign-provider

cosign-provider is used for validating whether images are signed with cosign.

This repo is meant for testing Gatekeeper external data feature. Do not use for production.

Installation

  • Deploy Gatekeeper with external data enabled (--enable-external-data)

  • kubectl apply -f manifest

    • Update SECRET_NAME environment variable
  • kubectl apply -f policy/provider.yaml

    • Update proxyURL if it's not http://cosign-provider.default:8090
  • kubectl apply -f policy/template.yaml

  • kubectl apply -f policy/constraint.yaml

Verification

  • kubectl apply -f policy/examples/signed.yaml

    • Request should be rejected
    Error from server ([signed-image] Image gcr.io/google_containers/pause-amd64:3.0 does not contain a valid cosign signature): error when creating "policy/examples/unsigned.yaml": admission webhook "validation.gatekeeper.sh" denied the request: [signed-image] Image gcr.io/google_containers/pause-amd64:3.0 does not contain a valid cosign signature
    
  • kubectl apply -f policy/examples/unsigned.yaml

    • Request should be allowed
    deployment.apps/signed-deployment created
    

Credits

Cosign image verification is based on https://github.com/dlorenc/cosigned

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL