Skip to content

Conversation

@adellape
Copy link
Contributor

@adellape adellape commented Jun 20, 2017

@adellape
Copy link
Contributor Author

@adellape
Copy link
Contributor Author

adellape commented Jun 20, 2017

@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 atomic sign or atomic push. I'd like to still do that, though I may ultimately link to either:

RHEL AH doc Managing Containers - Chapter 2. Signing Container Images

or KBase Article Container Image Signing Integration Guide to handle that. Thoughts/preferences?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@adellape
Copy link
Contributor Author

@openshift/team-documentation PTAL.

Copy link
Contributor

Choose a reason for hiding this comment

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

usually GPG-signed data ?

Copy link
Contributor

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,

@ahardin-rh
Copy link
Contributor

@adellape Just a few suggestions from me 🚀

@adellape adellape force-pushed the signature-endpoint branch from d4f2e82 to e003042 Compare June 20, 2017 21:57
@adellape
Copy link
Contributor Author

@ahardin-rh Thanks! Updates made.

Copy link
Contributor Author

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?

@adellape adellape force-pushed the signature-endpoint branch from 070b598 to 359f774 Compare June 21, 2017 21:41
@adellape
Copy link
Contributor Author

@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 atomic push/sign and oc adm verify-image-signatures. Separate preview build here:

http://file.rdu.redhat.com/~adellape/062117/signature-endpoint/dev_guide/image_signatures.html

A lot of it placeholder, but WDYT in general?

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.

Choose a reason for hiding this comment

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

The oc CLI can also be used

can be used (only supported way today)

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.

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."

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."

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>"

Choose a reason for hiding this comment

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

"content": "<cryptographic_signature>"

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.

Copy link
Contributor Author

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:

https://docs.openshift.com/container-platform/3.5/install_config/registry/accessing_registry.html#access-user-prerequisites

^ Similar to the note in there about the system:image-builder role.

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

Choose a reason for hiding this comment

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

See above.

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.

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

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.

See openshift/origin#15080

@adellape adellape force-pushed the signature-endpoint branch 2 times, most recently from ca881d7 to f48ced3 Compare July 13, 2017 15:54
@adellape
Copy link
Contributor Author

adellape commented Jul 13, 2017

@adellape
Copy link
Contributor Author

@aweiteka PTAL. And do you have a pointer on where to find more info for your comments in #4623 (comment) and #4623 (comment)?

@adellape
Copy link
Contributor Author

Chatted offline, merging this as-is for now.

@adellape adellape force-pushed the signature-endpoint branch from f48ced3 to bae6b74 Compare July 13, 2017 18:50
@adellape
Copy link
Contributor Author

[rev_history]
|xref:../dev_guide/image_signatures.adoc#dev-guide-image-signatures[Image Signatures]
|New topic about signing and verifying container image signatures.
%

@adellape
Copy link
Contributor Author

@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!

@vikram-redhat vikram-redhat modified the milestones: Next Release, Staging Jul 18, 2017
@vikram-redhat
Copy link
Contributor

@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 vikram-redhat modified the milestones: Staging, Published - 18/July/2017 Jul 18, 2017
@adellape
Copy link
Contributor Author

adellape commented Jul 24, 2017

@vikram-redhat OK, I didn't mention Online since we don't publish revhistory for those books. Thanks tho.

@vikram-redhat
Copy link
Contributor

@adellape - ugh. Of course. Sorry!

@adellape adellape deleted the signature-endpoint branch November 9, 2017 20:29
@adellape adellape restored the signature-endpoint branch November 9, 2017 21:08
@adellape adellape deleted the signature-endpoint branch November 9, 2017 21:11
@adellape adellape restored the signature-endpoint branch November 10, 2017 13:57
@adellape adellape deleted the signature-endpoint branch November 10, 2017 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants