Caleb Woodbine <calebwoodbine.public@gmail.com>
based in Wellington, New Zealand. Software and infrastructure engineer. Cloud & Open Source enthusiast.
simplified graph. results may vary
and from friends, comes:
Making sure your software is what it claims to be
cosign
sign
attest
verify
tree
a CLI tool from Sigstore for signing and verifying.
supports keypairs as well as keyless with OpenID Connect (OIDC) integration.
make claims through signed metadata about build environments, dependencies and artifacts.
A ValidatingWebhookConfiguration to fit your needs.
based on cosign, policy-controller verifies container images in your cluster and enforces policies based on supply chain metadata.
ValidatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and object without changing it.
e.g:
apiVersion: policy.sigstore.dev/v1alpha1
kind: ClusterImagePolicy
metadata:
name: kubernetes-signed
spec:
images:
- glob: registry.k8s.io/**
authorities:
- keyless:
url: https://fulcio.sigstore.dev
identities:
- issuer: https://accounts.google.com
subject: krel-trust@k8s-releng-prod.iam.gserviceaccount.com
ctlog:
url: https://rekor.sigstore.dev
apiVersion: policy.sigstore.dev/v1alpha1
kind: ClusterImagePolicy
metadata:
name: certmanager-signed
spec:
images:
- glob: quay.io/jetstack/cert-manager-*
authorities:
- key:
hashAlgorithm: sha512
data: |
-----BEGIN PUBLIC KEY-----
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAsZZKaaIRjOpzbiWYIDKO
yry9XGBqAfve1iOGmt5VO1jpjNoEseT6zewozHfWTM7osxayy2WjN8G+QV39MlT3
Vxo91/31g+Zcq8KcvxG+iB8GRaD9pNgLmghorv+eYDiPYMO/+fhsLImyG5WEoPct
MeCBD7umZ/A2t96U9DQxVDqQbTHlsNludno1p1wsgRnfUM3QHexNljDvJg5FcDMo
dCpVLpRNvbw0lbJVfybJ4siJ5o/MmXzy0QCJpw+yMIqvqMc8qgKJ1yooJtuTVF4t
4/luP+EG/oVIiSWCFeRMqYdbJ3R+CJi+4LN7vFNYQM1Q/NwOB52RteaR7wnqmcBz
qSYK32MM8xdPCQ5tioWwnPTRbPZuzsZsRmJsKBO9JUrBYdDntZX1xY5g4QNSufxi
QgJgJSU7E4VGMvagEzB1JzvOr6A/qNFCO1Z6JsA3jw3cJLV1rSHfxqfSXBACTLDf
6bOPWRILRKydTJA6uLKNKmo1/nFm3jvd5tHKOjy4VAQLJ/Vx9wBsAAiLa+06veun
Oz3AJ9sNh3wLp21RL11u9TuOKRBipE/TYsBYp8jpIyWPXDSV+JcD/TZqoT8y0Z6S
0damfUmspuK9DTQFL2crpeaqJSG9RA+OuPZLxGD1IMURTsPJB7kXhPtmceeirBnw
sVcRHHDitVt8oO/x4Wus1c0CAwEAAQ==
-----END PUBLIC KEY-----
apiVersion: policy.sigstore.dev/v1alpha1
kind: ClusterImagePolicy
metadata:
name: sample-ko-monorepo
spec:
images:
- glob: "ghcr.io/bobymcbobs/sample-ko-monorepo**"
authorities:
- keyless:
identities:
- issuer: https://token.actions.githubusercontent.com
subjectRegExp: "^(https://github.com/BobyMCbobs/sample-ko-monorepo/.github/workflows/build-and-release.yml@refs/(heads/main|tags/v[0-9].[0-9].[0-9]))$"
supplychain reads
check it out!
kind create cluster
DATE="$(date +%Y-%m-%d-%H-%M)"
crane cp cgr.dev/chainguard/nginx:latest ttl.sh/cgr-nginx-caleb-shows-sigstore-"$DATE":1h
cosign sign --yes ttl.sh/cgr-nginx-caleb-shows-sigstore-"$DATE":1h
cosign verify -o text --certificate-identity-regexp='.*' --certificate-oidc-issuer-regexp='.*' ttl.sh/cgr-nginx-caleb-shows-sigstore-"$DATE":1h
cosign tree ttl.sh/cgr-nginx-caleb-shows-sigstore-"$DATE":1h
helm repo add sigstore https://sigstore.github.io/helm-charts
helm repo update
kubectl create namespace cosign-system
helm install policy-controller -n cosign-system sigstore/policy-controller
kubectl -n cosign-system get pods
cat << EOF | kubectl apply -f -
apiVersion: policy.sigstore.dev/v1alpha1
kind: ClusterImagePolicy
metadata:
name: ttl-sh-is-signed
spec:
images:
- glob: "ttl.sh/**"
authorities:
- keyless:
identities:
- issuer: https://github.com/login/oauth
subjectRegExp: "calebwoodbine.public@gmail.com"
EOF
kubectl label namespace default policy.sigstore.dev/include=true
kubectl create deployment nginx-unsigned --image=cgr.dev/chainguard/nginx:latest
kubectl create deployment nginx --image=ttl.sh/cgr-nginx-caleb-shows-sigstore-"$DATE":1h
kubectl delete clusterimagepolicy ttl-sh-is-signed
helm uninstall -n cosign-system policy-controller
kubectl delete namespace cosign-system
kind delete cluster