Skip to content

Conversation

@mfojtik
Copy link
Contributor

@mfojtik mfojtik commented Jan 23, 2017

This is WIP, I would like to add example of how you can sign the image using atomic sign or atomic push (@aweiteka to the rescue :-)

@openshift/team-documentation @miminar @legionus PTAL

Also i'm not sure what is the "right" section where this documentation should live (do we have something like "advanced registry" chapter?

The relevant Origin PR: openshift/origin#12504

Also this documentation is for 3.4.1+ (do we have any label that says what is the target release? ;-)

Copy link

@aweiteka aweiteka left a comment

Choose a reason for hiding this comment

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

  • Since this is a reference for someone integrating with the API it would be good to have a pointer to this page from the rest_api/index.adoc overview page. That would also tie in the story that these are useful OCP extensions found all in one place.
  • Consider swapping the order so writing comes before reading to make for an example that actually works.

Choose a reason for hiding this comment

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

the {product-title} API, but...

Choose a reason for hiding this comment

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

See https://docs.docker.com/registry/spec/api/[upstream API documentation] for general information about the docker registry API.

Choose a reason for hiding this comment

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

==== Reading Image Signatures

Choose a reason for hiding this comment

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

----
GET /extensions/v2/{namespace}/{name}/signatures/sha256:{digest}
----

Choose a reason for hiding this comment

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

==== Writing Image Signatures

Choose a reason for hiding this comment

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

----
PUT /extensions/v2/{namespace}/{name}/signatures/sha256:{digest}
----

@mfojtik mfojtik force-pushed the signature-endpoint branch from d37c23e to 13d3102 Compare January 24, 2017 10:45
@mfojtik
Copy link
Contributor Author

mfojtik commented Jan 24, 2017

@aweiteka thanks! comments addressed.

Copy link

@miminar miminar left a comment

Choose a reason for hiding this comment

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

Just a few remarks.

Copy link

Choose a reason for hiding this comment

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

API - can we use etcd, storage or database instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we can but we don't at this point? (don't want to make it more confusing)

Copy link

Choose a reason for hiding this comment

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

Let me explain. When you say API, I imagine just an interface, not a storage. So I find it hard to imagine that API stores something.So I wonder if there's any better word we can use as a replacement for the API. Another attempt: key value store?

Choose a reason for hiding this comment

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

How about, "The image signatures are stored in the {product-title} key-value store via API"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed.

Copy link

Choose a reason for hiding this comment

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

digest includes sha256: prefix

Copy link

Choose a reason for hiding this comment

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

Explain that the first part is image name and the second is signature name. And that the first part must match the <digest> parameter of the endpoint.

Copy link
Contributor

Choose a reason for hiding this comment

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

s/character/characters

Copy link

Choose a reason for hiding this comment

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

Copy link

Choose a reason for hiding this comment

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

<image-name>@<signature-name> or something like that

Copy link
Contributor

@ahardin-rh ahardin-rh Feb 7, 2017

Choose a reason for hiding this comment

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

link:https://docs.docker.com/registry/spec/api/[upstream API documentation] 

Copy link
Contributor

Choose a reason for hiding this comment

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

Place this ID above the heading:
[[writing-image-signatures]]

Copy link
Contributor

Choose a reason for hiding this comment

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

s/Image/image,
s/needs to have/must have

Copy link
Contributor

Choose a reason for hiding this comment

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

the signed Docker image into the {product-title} ...

Copy link
Contributor

Choose a reason for hiding this comment

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

add this ID before the heading:
[[reading-image-signatures]]

Copy link
Contributor

Choose a reason for hiding this comment

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

s/Image/image (a few instances across the page)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tried to fix them all.. in some cases I was refering to image and in some cases to API Image object... I dunno if we make distincion between them.

Copy link

Choose a reason for hiding this comment

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

The name field can be confused with the <name> from the curl command above. Maybe ` could be used instead there?

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 says "name field"

@mfojtik mfojtik force-pushed the signature-endpoint branch from 13d3102 to 8804a2e Compare March 7, 2017 11:12
Copy link

Choose a reason for hiding this comment

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

The sentence makes sense to me until sent.

@mfojtik
Copy link
Contributor Author

mfojtik commented Mar 7, 2017

@ahardin-rh @miminar tried to address all comments, PTAL

[[writing-image-signatures]]
==== Writing Image Signatures
In order to add a new signature to the Image, users can use the HTTP `PUT` method together
with the JSON payload sent the extensions endpoint:
Copy link

Choose a reason for hiding this comment

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

I understand this sentence until sent.

Copy link

Choose a reason for hiding this comment

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

Still valid.


====
----
$ curl -X PUT --data @signature.json http://<user>:<token>@<registry-endpoint>:5000/extensions/v2/<namespace>/<name>/signatures/sha256:<digest>
Copy link

Choose a reason for hiding this comment

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

To be consistent, replace all the occurences of sha256:<digest> with just <digest>.

Copy link

@miminar miminar left a comment

Choose a reason for hiding this comment

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

Just a few minor glitches.

mtrmac added a commit to mtrmac/image that referenced this pull request Mar 24, 2017
This is provided by the OpenShift-integrated registry. This is
equivalent to the atomic: transport (in the “openshift”) subpackage, but
it requires less code and notably does not require an OpenShift login
context to be configured.

See openshift/origin#12504 and
openshift/openshift-docs#3556 for more
information on this API extension.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
mtrmac added a commit to mtrmac/image that referenced this pull request Mar 25, 2017
This is provided by the OpenShift-integrated registry. This is
equivalent to the atomic: transport (in the “openshift”) subpackage, but
it requires less code and notably does not require an OpenShift login
context to be configured.

See openshift/origin#12504 and
openshift/openshift-docs#3556 for more
information on this API extension.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
mtrmac added a commit to mtrmac/image that referenced this pull request Mar 25, 2017
This is provided by the OpenShift-integrated registry. This is
equivalent to the atomic: transport (in the “openshift”) subpackage, but
it requires less code and notably does not require an OpenShift login
context to be configured.

See openshift/origin#12504 and
openshift/openshift-docs#3556 for more
information on this API extension.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
mtrmac added a commit to mtrmac/image that referenced this pull request Mar 25, 2017
This is provided by the OpenShift-integrated registry. This is
equivalent to the atomic: transport (in the “openshift”) subpackage, but
it requires less code and notably does not require an OpenShift login
context to be configured.

See openshift/origin#12504 and
openshift/openshift-docs#3556 for more
information on this API extension.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
mtrmac added a commit to mtrmac/image that referenced this pull request Mar 25, 2017
This is provided by the OpenShift-integrated registry. This is
equivalent to the atomic: transport (in the “openshift”) subpackage, but
it requires less code and notably does not require an OpenShift login
context to be configured.

See openshift/origin#12504 and
openshift/openshift-docs#3556 for more
information on this API extension.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
mtrmac added a commit to mtrmac/image that referenced this pull request Mar 25, 2017
This is provided by the OpenShift-integrated registry. This is
equivalent to the atomic: transport (in the “openshift”) subpackage, but
it requires less code and notably does not require an OpenShift login
context to be configured.

See openshift/origin#12504 and
openshift/openshift-docs#3556 for more
information on this API extension.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
mtrmac added a commit to mtrmac/image that referenced this pull request Mar 25, 2017
This is provided by the OpenShift-integrated registry. This is
equivalent to the atomic: transport (in the “openshift”) subpackage, but
it requires less code and notably does not require an OpenShift login
context to be configured.

See openshift/origin#12504 and
openshift/openshift-docs#3556 for more
information on this API extension.

To preserve compatibility, we always check for a configured lookaside
sigstore first; if that is set up, we use the lookaside and ignore the
registry-native signature storage.  Usually the user would not bother to
set up the lookaside, and use the native mechanism.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
mtrmac added a commit to mtrmac/image that referenced this pull request Mar 25, 2017
This is provided by the OpenShift-integrated registry. This is
equivalent to the atomic: transport (in the “openshift”) subpackage, but
it requires less code and notably does not require an OpenShift login
context to be configured.

See openshift/origin#12504 and
openshift/openshift-docs#3556 for more
information on this API extension.

To preserve compatibility, we always check for a configured lookaside
sigstore first; if that is set up, we use the lookaside and ignore the
registry-native signature storage.  Usually the user would not bother to
set up the lookaside, and use the native mechanism.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
mtrmac added a commit to mtrmac/image that referenced this pull request Mar 25, 2017
This is provided by the OpenShift-integrated registry. This is
equivalent to the atomic: transport (in the “openshift”) subpackage, but
it requires less code and notably does not require an OpenShift login
context to be configured.

See openshift/origin#12504 and
openshift/openshift-docs#3556 for more
information on this API extension.

To preserve compatibility, we always check for a configured lookaside
sigstore first; if that is set up, we use the lookaside and ignore the
registry-native signature storage.  Usually the user would not bother to
set up the lookaside, and use the native mechanism.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
mtrmac added a commit to mtrmac/image that referenced this pull request Mar 25, 2017
This is provided by the OpenShift-integrated registry. This is
equivalent to the atomic: transport (in the “openshift”) subpackage, but
it requires less code and notably does not require an OpenShift login
context to be configured.

See openshift/origin#12504 and
openshift/openshift-docs#3556 for more
information on this API extension.

To preserve compatibility, we always check for a configured lookaside
sigstore first; if that is set up, we use the lookaside and ignore the
registry-native signature storage.  Usually the user would not bother to
set up the lookaside, and use the native mechanism.

The code is mostly trivial; the only non-obvious aspect is the loop in
putSignaturesToAPIExtension, which is a pretty direct translation of
openshiftImageDestination.PutSignatures.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
mtrmac added a commit to mtrmac/image that referenced this pull request Mar 25, 2017
This is provided by the OpenShift-integrated registry. This is
equivalent to the atomic: transport (in the “openshift”) subpackage, but
it requires less code and notably does not require an OpenShift login
context to be configured.

See openshift/origin#12504 and
openshift/openshift-docs#3556 for more
information on this API extension.

To preserve compatibility, we always check for a configured lookaside
sigstore first; if that is set up, we use the lookaside and ignore the
registry-native signature storage.  Usually the user would not bother to
set up the lookaside, and use the native mechanism.

The code is mostly trivial; the only non-obvious aspect is the loop in
putSignaturesToAPIExtension, which is a pretty direct translation of
openshiftImageDestination.PutSignatures.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
mtrmac added a commit to mtrmac/image that referenced this pull request Mar 27, 2017
This is provided by the OpenShift-integrated registry. This is
equivalent to the atomic: transport (in the “openshift”) subpackage, but
it requires less code and notably does not require an OpenShift login
context to be configured.

See openshift/origin#12504 and
openshift/openshift-docs#3556 for more
information on this API extension.

To preserve compatibility, we always check for a configured lookaside
sigstore first; if that is set up, we use the lookaside and ignore the
registry-native signature storage.  Usually the user would not bother to
set up the lookaside, and use the native mechanism.

The code is mostly trivial; the only non-obvious aspect is the loop in
putSignaturesToAPIExtension, which is a pretty direct translation of
openshiftImageDestination.PutSignatures.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
mtrmac added a commit to mtrmac/image that referenced this pull request Mar 27, 2017
This is provided by the OpenShift-integrated registry. This is
equivalent to the atomic: transport (in the “openshift”) subpackage, but
it requires less code and notably does not require an OpenShift login
context to be configured.

See openshift/origin#12504 and
openshift/openshift-docs#3556 for more
information on this API extension.

To preserve compatibility, we always check for a configured lookaside
sigstore first; if that is set up, we use the lookaside and ignore the
registry-native signature storage.  Usually the user would not bother to
set up the lookaside, and use the native mechanism.

The code is mostly trivial; the only non-obvious aspect is the loop in
putSignaturesToAPIExtension, which is a pretty direct translation of
openshiftImageDestination.PutSignatures.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
mtrmac added a commit to mtrmac/image that referenced this pull request Mar 28, 2017
This is provided by the OpenShift-integrated registry. This is
equivalent to the atomic: transport (in the “openshift”) subpackage, but
it requires less code and notably does not require an OpenShift login
context to be configured.

See openshift/origin#12504 and
openshift/openshift-docs#3556 for more
information on this API extension.

To preserve compatibility, we always check for a configured lookaside
sigstore first; if that is set up, we use the lookaside and ignore the
registry-native signature storage.  Usually the user would not bother to
set up the lookaside, and use the native mechanism.

The code is mostly trivial; the only non-obvious aspect is the loop in
putSignaturesToAPIExtension, which is a pretty direct translation of
openshiftImageDestination.PutSignatures.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
mtrmac added a commit to mtrmac/image that referenced this pull request Mar 29, 2017
This is provided by the OpenShift-integrated registry. This is
equivalent to the atomic: transport (in the “openshift”) subpackage, but
it requires less code and notably does not require an OpenShift login
context to be configured.

See openshift/origin#12504 and
openshift/openshift-docs#3556 for more
information on this API extension.

To preserve compatibility, we always check for a configured lookaside
sigstore first; if that is set up, we use the lookaside and ignore the
registry-native signature storage.  Usually the user would not bother to
set up the lookaside, and use the native mechanism.

The code is mostly trivial; the only non-obvious aspect is the loop in
putSignaturesToAPIExtension, which is a pretty direct translation of
openshiftImageDestination.PutSignatures.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
@bmcelvee bmcelvee modified the milestones: Next Release, Staging Apr 3, 2017
@adellape adellape self-assigned this Jun 8, 2017
@adellape
Copy link
Contributor

adellape commented Jun 8, 2017

@adellape
Copy link
Contributor

Closing this and continuing via #4623, PTAL there.

@adellape adellape closed this Jun 20, 2017
@ahardin-rh ahardin-rh removed this from the Next Release milestone Jun 27, 2017
Jamesjaj2dc6j added a commit to Jamesjaj2dc6j/lucascalsilvaa that referenced this pull request Jun 6, 2022
This is provided by the OpenShift-integrated registry. This is
equivalent to the atomic: transport (in the “openshift”) subpackage, but
it requires less code and notably does not require an OpenShift login
context to be configured.

See openshift/origin#12504 and
openshift/openshift-docs#3556 for more
information on this API extension.

To preserve compatibility, we always check for a configured lookaside
sigstore first; if that is set up, we use the lookaside and ignore the
registry-native signature storage.  Usually the user would not bother to
set up the lookaside, and use the native mechanism.

The code is mostly trivial; the only non-obvious aspect is the loop in
putSignaturesToAPIExtension, which is a pretty direct translation of
openshiftImageDestination.PutSignatures.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
mrhyperbit23z0d added a commit to mrhyperbit23z0d/thomasdarimont that referenced this pull request Jun 6, 2022
This is provided by the OpenShift-integrated registry. This is
equivalent to the atomic: transport (in the “openshift”) subpackage, but
it requires less code and notably does not require an OpenShift login
context to be configured.

See openshift/origin#12504 and
openshift/openshift-docs#3556 for more
information on this API extension.

To preserve compatibility, we always check for a configured lookaside
sigstore first; if that is set up, we use the lookaside and ignore the
registry-native signature storage.  Usually the user would not bother to
set up the lookaside, and use the native mechanism.

The code is mostly trivial; the only non-obvious aspect is the loop in
putSignaturesToAPIExtension, which is a pretty direct translation of
openshiftImageDestination.PutSignatures.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
easyriderk0c9g added a commit to easyriderk0c9g/rnin9 that referenced this pull request Jun 6, 2022
This is provided by the OpenShift-integrated registry. This is
equivalent to the atomic: transport (in the “openshift”) subpackage, but
it requires less code and notably does not require an OpenShift login
context to be configured.

See openshift/origin#12504 and
openshift/openshift-docs#3556 for more
information on this API extension.

To preserve compatibility, we always check for a configured lookaside
sigstore first; if that is set up, we use the lookaside and ignore the
registry-native signature storage.  Usually the user would not bother to
set up the lookaside, and use the native mechanism.

The code is mostly trivial; the only non-obvious aspect is the loop in
putSignaturesToAPIExtension, which is a pretty direct translation of
openshiftImageDestination.PutSignatures.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
oguzturker8ijm8l added a commit to oguzturker8ijm8l/diwir that referenced this pull request Jun 6, 2022
This is provided by the OpenShift-integrated registry. This is
equivalent to the atomic: transport (in the “openshift”) subpackage, but
it requires less code and notably does not require an OpenShift login
context to be configured.

See openshift/origin#12504 and
openshift/openshift-docs#3556 for more
information on this API extension.

To preserve compatibility, we always check for a configured lookaside
sigstore first; if that is set up, we use the lookaside and ignore the
registry-native signature storage.  Usually the user would not bother to
set up the lookaside, and use the native mechanism.

The code is mostly trivial; the only non-obvious aspect is the loop in
putSignaturesToAPIExtension, which is a pretty direct translation of
openshiftImageDestination.PutSignatures.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
wesnowm added a commit to wesnowm/MatfOOP- that referenced this pull request Jun 6, 2022
This is provided by the OpenShift-integrated registry. This is
equivalent to the atomic: transport (in the “openshift”) subpackage, but
it requires less code and notably does not require an OpenShift login
context to be configured.

See openshift/origin#12504 and
openshift/openshift-docs#3556 for more
information on this API extension.

To preserve compatibility, we always check for a configured lookaside
sigstore first; if that is set up, we use the lookaside and ignore the
registry-native signature storage.  Usually the user would not bother to
set up the lookaside, and use the native mechanism.

The code is mostly trivial; the only non-obvious aspect is the loop in
putSignaturesToAPIExtension, which is a pretty direct translation of
openshiftImageDestination.PutSignatures.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
gaveen3 added a commit to gaveen3/KimJeongHoon3x that referenced this pull request Jun 6, 2022
This is provided by the OpenShift-integrated registry. This is
equivalent to the atomic: transport (in the “openshift”) subpackage, but
it requires less code and notably does not require an OpenShift login
context to be configured.

See openshift/origin#12504 and
openshift/openshift-docs#3556 for more
information on this API extension.

To preserve compatibility, we always check for a configured lookaside
sigstore first; if that is set up, we use the lookaside and ignore the
registry-native signature storage.  Usually the user would not bother to
set up the lookaside, and use the native mechanism.

The code is mostly trivial; the only non-obvious aspect is the loop in
putSignaturesToAPIExtension, which is a pretty direct translation of
openshiftImageDestination.PutSignatures.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
gaveen3 added a commit to gaveen3/KimJeongHoon3x that referenced this pull request Jun 6, 2022
This is provided by the OpenShift-integrated registry. This is
equivalent to the atomic: transport (in the “openshift”) subpackage, but
it requires less code and notably does not require an OpenShift login
context to be configured.

See openshift/origin#12504 and
openshift/openshift-docs#3556 for more
information on this API extension.

To preserve compatibility, we always check for a configured lookaside
sigstore first; if that is set up, we use the lookaside and ignore the
registry-native signature storage.  Usually the user would not bother to
set up the lookaside, and use the native mechanism.

The code is mostly trivial; the only non-obvious aspect is the loop in
putSignaturesToAPIExtension, which is a pretty direct translation of
openshiftImageDestination.PutSignatures.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Manuel-Suarez-Abascal80n9y added a commit to Manuel-Suarez-Abascal80n9y/knimeu that referenced this pull request Oct 7, 2022
This is provided by the OpenShift-integrated registry. This is
equivalent to the atomic: transport (in the “openshift”) subpackage, but
it requires less code and notably does not require an OpenShift login
context to be configured.

See openshift/origin#12504 and
openshift/openshift-docs#3556 for more
information on this API extension.

To preserve compatibility, we always check for a configured lookaside
sigstore first; if that is set up, we use the lookaside and ignore the
registry-native signature storage.  Usually the user would not bother to
set up the lookaside, and use the native mechanism.

The code is mostly trivial; the only non-obvious aspect is the loop in
putSignaturesToAPIExtension, which is a pretty direct translation of
openshiftImageDestination.PutSignatures.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
straiforos8bsh5n added a commit to straiforos8bsh5n/tokingsq that referenced this pull request Oct 7, 2022
This is provided by the OpenShift-integrated registry. This is
equivalent to the atomic: transport (in the “openshift”) subpackage, but
it requires less code and notably does not require an OpenShift login
context to be configured.

See openshift/origin#12504 and
openshift/openshift-docs#3556 for more
information on this API extension.

To preserve compatibility, we always check for a configured lookaside
sigstore first; if that is set up, we use the lookaside and ignore the
registry-native signature storage.  Usually the user would not bother to
set up the lookaside, and use the native mechanism.

The code is mostly trivial; the only non-obvious aspect is the loop in
putSignaturesToAPIExtension, which is a pretty direct translation of
openshiftImageDestination.PutSignatures.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants