-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Document the experimental registry signature endpoint #4623
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
Conversation
|
@mfojtik @aweiteka This never got merged for 3.4, PTAL at my edits. Also, should this content appear in the Developer Guide "Managing Images" topic instead? https://docs.openshift.com/container-platform/3.5/dev_guide/managing_images.html Feels like it would be too buried in the Install & Config guide, especially since it doesn't seem admin-specific. FYI, I'm also going to be working on docs for https://trello.com/c/BIJBu7qi/788-5-images-fill-in-the-metadata-signature-fields-when-a-signature-is-valid so I'd probably put the content near each other. Also, there was a comment in #3556 about wanting to show how to sign images using RHEL AH doc Managing Containers - Chapter 2. Signing Container Images or KBase Article Container Image Signing Integration Guide to handle that. Thoughts/preferences? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original had a comma at the end here and in the other JSON example, which I've removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added "in the relevant project" here.
|
@openshift/team-documentation PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usually GPG-signed data ?
rest_api/index.adoc
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These examples provide a quick reference for making successful REST API calls. In these examples,
|
@adellape Just a few suggestions from me 🚀 |
d4f2e82 to
e003042
Compare
|
@ahardin-rh Thanks! Updates made. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mfojtik Ack the wording here?
070b598 to
359f774
Compare
|
@mfojtik @aweiteka I've now experimented (in a separate commit 359f774) w/ the idea of a new topic in the Dev Guide that just focuses on image signatures. Also adds sections on http://file.rdu.redhat.com/~adellape/062117/signature-endpoint/dev_guide/image_signatures.html A lot of it placeholder, but WDYT in general? |
dev_guide/image_signatures.adoc
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Policy is a big gap in the doc, probably purposefully for this audience. We do need to address it: what the defaults are and where to go for changing config. NOTE: this is a big dev usability gap that we just have to deal with now.
dev_guide/image_signatures.adoc
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
ocCLI can also be used
can be used (only supported way today)
dev_guide/image_signatures.adoc
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two angles to signature verification:
- verify with CLI (covered here)
- signatures checked during image pull to the node (the missing policy discussion). We could just call this out at a high level here and punt until we get a better story.
dev_guide/image_signatures.adoc
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add: "The atomic CLI is available on Red Hat-based distributions, Red Hat Enterprise Linux, Centos and Fedora."
dev_guide/image_signatures.adoc
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the less-than-ideal story, how about something like...
"OpenShift does not automate image signing. Signing requires a developer's private GPG key typically stored securely on a workstation. This document describes that workflow."
dev_guide/image_signatures.adoc
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"content": "<base64_encoded_signature>"
"content": "<cryptographic_signature>"
dev_guide/image_signatures.adoc
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"content": "<cryptographic_signature>"
dev_guide/image_signatures.adoc
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is a cluster-scoped role, not project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looked to me like there was both (oc adm for cluster-scoped):
# oc policy add-role-to-user system:image-signer fred -n alexd-project
role "system:image-signer" added: "fred"
# oc adm policy add-cluster-role-to-user system:image-signer alexd
cluster role "system:image-signer" added: "alexd"
If this is accurate, I figured I would add info on the cluster-scoped role to:
^ Similar to the note in there about the system:image-builder role.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on my testing you can add a project-scoped image-signer role but it doesn't actually grant priv to write signatures. Must be granted at cluster level with
oc adm policy add-cluster-role-to-user system:image-signer alexd
dev_guide/image_signatures.adoc
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above.
dev_guide/image_signatures.adoc
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe clarify one would need this role when using the --save flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out you need image-auditor with or without --save opt.
$ oc adm verify-image-signature sha256:cd29ad7799ac016c81ad3ba6a287dbb6d9aa7537ad5b091b8f11bc793025ce20 --expected-identity 172.30.1.1:5000/myproject/alpine --public-key /home/aweiteka/.gnupg/aweiteka-redhat.pub
Error from server (Forbidden): User "developer" cannot get images at the cluster scope
dev_guide/image_signatures.adoc
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$GNUPGHOME/pubring.gpg, typically in path ~/.gnupg.
ca881d7 to
f48ced3
Compare
|
Updates made per latest comments. http://file.rdu.redhat.com/~adellape/062117/signature-endpoint/dev_guide/image_signatures.html |
|
@aweiteka PTAL. And do you have a pointer on where to find more info for your comments in #4623 (comment) and #4623 (comment)? |
|
Chatted offline, merging this as-is for now. |
f48ced3 to
bae6b74
Compare
|
[rev_history] |
|
@bfallonf (tagging you since you're up for next week's release) I'm adding the dedicated and online labels to this PR even though it only actually shows up in 3.4 and 3.5 (ifdefs are in place), just to keep things in sync. Can you make sure the revhistory comment above is removed from the dedicated revhistory after the script but before publishing? Thx! |
|
@adellape - you mentioned online and dedicated, but only asked the rev history removed from the dedicated one :). Looking at the PR, I think it needed to be removed from the online rev history as well, which I have done. If it should have been kept, let me know and I can do a follow up. |
|
@vikram-redhat OK, I didn't mention Online since we don't publish revhistory for those books. Thanks tho. |
|
@adellape - ugh. Of course. Sorry! |
Picks up #3556 and continues edits.
Preview:
http://file.rdu.redhat.com/~adellape/062117/signature-endpoint/dev_guide/image_signatures.html