-
Notifications
You must be signed in to change notification settings - Fork 135
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
v0.2.2 nil pointer dereference #594
Comments
I am also seeing this issue. We are beginning our journey to implement binary authorization and are hoping to run Grafeas/Kritis standalone in our own cluster. To begin our learning, we are following the standalone docs. The error @zapman449 indicated happens when running Expected BehaviorWhen I run Actual Behavior
When looking at the logs, I can see the same logs as OP of this issue. and indicates there is some issue at https://github.com/grafeas/kritis/blob/master/pkg/kritis/secrets/pgpkey.go#L69 Steps to ReproduceFollow https://github.com/grafeas/kritis/blob/master/docs/standalone/README.md |
I'm having the same issue, and my working theory at the moment is that the interface on I'll be going through the same routine described in Compare the interface of apiVersion: kritis.grafeas.io/v1beta1
kind: AttestationAuthority
metadata:
name: kritis-authority
namespace: default
spec:
noteReference: v1beta1/projects/standalone
privateKeySecretName: attestor
publicKeyData: $PUBLIC_KEY to what it currently is on apiVersion: kritis.grafeas.io/v1beta1
kind: AttestationAuthority
metadata:
name: kritis-authority
namespace: default
spec:
noteReference: v1beta1/projects/standalone
publicKeys:
- keyType: PGP
keyId: $KEY_FINGERPRINT
asciiArmoredPgpPublicKey: $PUBLIC_KEY |
Working through the |
I'm able to get past the issue described in #384 now. The Two approaches for getting past that:
kubectl create secret generic attestor --from-file=public=gpg.pub --from-file=private=gpg.priv and can be updated to the following to capture the passphrase used if you encrypted the keys kubectl create secret generic attestor --from-file=public=gpg.pub --from-file=private=gpg.priv --from-literal=passphrase=<password provided to gpg during creation> After that I was also getting an error related to an invalid Note reference on the AttestationAuthority, and had to change the Note reference to apiVersion: kritis.grafeas.io/v1beta1
kind: AttestationAuthority
metadata:
name: kritis-authority
namespace: default
spec:
noteReference: projects/kritis
privateKeySecretName: attestor
publicKeyData: $PUBLIC_KEY I'm now able to POST the occurrence and attestation signature to Grafeas using I0107 22:14:29.314411 1 admission.go:172] Starting admission review handler
version: v0.2.2
commit: bea073f2a2f299af94363dc399b7780fde8f2afc
I0107 22:14:29.315323 1 admission.go:137] handling pod java in...
I0107 22:14:29.315348 1 admission.go:258] Reviewing images for &Pod{ ... removed ... }
I0107 22:14:29.319934 1 admission.go:269] Found 1 Generic Attestation Policies
I0107 22:14:29.320693 1 review.go:68] Check if gcr.io/kritis-tutorial/java-with-vulnz@sha256:358687cfd3ec8e1dfeb2bf51b5110e4e16f6df71f64fba01986f720b2fcba68a has valid Attestations.
I0107 22:14:29.320725 1 review.go:71] Validating against GenericAttestationPolicy my-gap
I0107 22:14:29.371644 1 validating_transport.go:65] Cannot base64 decode signature: illegal base64 data at input byte 0
I0107 22:14:29.371673 1 strategy.go:49] Handling attestation via LoggingStrategy
I0107 22:14:29.371680 1 strategy.go:53] No valid attestations found for image gcr.io/kritis-tutorial/java-with-vulnz@sha256:358687cfd3ec8e1dfeb2bf51b5110e4e16f6df71f64fba01986f720b2fcba68a. Proceeding with next checks
I0107 22:14:29.371709 1 admission.go:319] Denying &Pod{ ... removed ... }
I0107 22:14:29.375552 1 admission.go:281] No ISPs found in namespace default |
@frayer Thanks for the investigation, it looks like the bug might be due to schema change in AttestationAuthority. I'll look into a fix. |
I got through that last Base64 decoding hurdle for at least v0.2.2 of Kritis. Kritis was expecting the PGP Signature to be Base64 encoded, so I made that change in All the changes I did can be viewed in this diff: v0.2.2...frayer:v0.2.2-standalone-install I also updated to Helm 3 and Grafeas v0.1.6 along the way. I'm not sure it's merge-worthy for a PR at this point since, as you mentioned, some of the Schemas may have evolved since the v0.2.2 release. It could help those trying to get v0.2.2 to work though. I'd be happy to help with updating the docs in Are the new Schema types captured in |
Expected Behavior
not panic
Actual Behavior
panic
Steps to Reproduce the Problem
not sure
Environment, commands
n/a
Additional info
Add any other context about the problem here (e.g. screenshots, links)
The text was updated successfully, but these errors were encountered: