Skip to content

Conversation

@DCChadwick
Copy link

@DCChadwick DCChadwick commented Jan 7, 2025

Version(s): 4.18

Issue: OSDOCS-10264

Link to docs preview: https://86776--ocpdocs-pr.netlify.app/openshift-enterprise/latest/nodes/nodes-sigstore-using.html#nodes-sigstore-using-validation_nodes-sigstore-using

QE review:

  • QE has approved this change.

Additional information:

@openshift-ci openshift-ci bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 7, 2025
@ocpdocs-previewbot
Copy link

🤖 Tue Jan 07 17:22:00 - Prow CI generated the docs preview:

https://86776--ocpdocs-pr.netlify.app/openshift-enterprise/latest/nodes/nodes-sigstore-using.html

@openshift-ci
Copy link

openshift-ci bot commented Jan 7, 2025

@DCChadwick: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link
Contributor

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A very brief skim

Sign the Image Using Cosign:
Sign the image using your private key and push the signature to the registry:
sh
cosign sign --key ./cosign.key --registry-username=<your-username> --registry-password=<your-password> quay.io/qiwanredhat/test-sigstoresigned:latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Push + later sign is discouraged, this is vulnerable to attacks by the malicious registry.

Use podman push --sign-by-sigstore-private-key or --sign-by-sigstore to do this securely for just-built images.

(And for the use cases where cosign sign were truly required, use --recursive to interoperate with OCP, and IIRC --sign-container-identity quay.io/qiwanredhat/test-sigstoresigned:latest is typically required.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

… I’d say that cosign sign should be extremely rarely ”truly required”. skopeo copy --sign… to promote an image from staging to production and sign, for example.

+
[source,sh]
----
cosign generate-key-pair
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skopeo generate-sigstore-key.

AFAIK we don’t ship cosign as part of RHEL; if this article should rely on cosign, it probably needs to tell users how to get it.

cosign sign --key ./cosign.key --registry-username=<your-username> --registry-password=<your-password> quay.io/qiwanredhat/test-sigstoresigned:latest
----

. Launch OpenShift Cluster ClusterBot to enable the feature gate:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh, is that something customers can use at all?

publicKey:
keyData: <base64-encoded-cosign.pub>
signedIdentity:
matchPolicy: MatchRepository
Copy link
Contributor

@mtrmac mtrmac Jan 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is generally a bad idea. It is necessary to consume third-party images signed by cosign, but cosign users should instead use --sign-container-identity to create signatures with the right tag.

----

. Enable CRI-O debug log level:
.. Create a ContainerRuntimeConfig to set the log level to debug:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not really a part of the procedure. It is useful to test that the thing works, sure, but users should not leave debug level output enabled forever. And, anyway, verifying that pulling an unsigned image fails is a better test.

@DCChadwick DCChadwick closed this Jan 7, 2025
@DCChadwick
Copy link
Author

During review, it was discovered that another PR already covers this procedure: #86087

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants