Skip to content
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

ci: add a OCI registry test for referrers support #3253

Merged
merged 2 commits into from
Oct 17, 2023
Merged

Conversation

rchincha
Copy link
Contributor

zot is a strongly OCI conformant registry with referrers support.


Note the new --registry-referrers-mode flag which must be set to “oci-1-1”.

References:
https://www.chainguard.dev/unchained/building-towards-oci-v1-1-support-in-cosign

Summary

Release Note

Documentation

@codecov
Copy link

codecov bot commented Sep 20, 2023

Codecov Report

Merging #3253 (eae7a6e) into main (e78a848) will decrease coverage by 0.01%.
Report is 1 commits behind head on main.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #3253      +/-   ##
==========================================
- Coverage   30.59%   30.59%   -0.01%     
==========================================
  Files         155      155              
  Lines        9858     9859       +1     
==========================================
  Hits         3016     3016              
- Misses       6392     6393       +1     
  Partials      450      450              
Files Coverage Δ
cmd/cosign/cli/verify.go 0.00% <0.00%> (ø)

export COSIGN_PASSWORD=$pass
export COSIGN_YES="true"
export COSIGN_OCI_EXPERIMENTAL=1
export COSIGN_EXPERIMENTAL=1
Copy link
Member

Choose a reason for hiding this comment

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

this flag does not exist anymore, you can drop

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
Member

Choose a reason for hiding this comment

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

still here :)

Copy link
Contributor Author

@rchincha rchincha Sep 29, 2023

Choose a reason for hiding this comment

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

Just to be clear, this env var still exists because ...

$ ./cosign sign --allow-insecure-registry --registry-referrers-mode=oci-1-1

Error: invalid argument "oci-1-1" for "--registry-referrers-mode" flag: in order to use  mode "oci-1-1", you must set COSIGN_EXPERIMENTAL=1
main.go:74: error during command execution: invalid argument "oci-1-1" for "--registry-referrers-mode" flag: in order to use  mode "oci-1-1", you must set COSIGN_EXPERIMENTAL=1

Copy link
Member

Choose a reason for hiding this comment

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

humm, interesting, this should be all removed. ok, thanks!

-e REGISTRY_HTTP_TLS_CERTIFICATE=/insecure-certs/domain.crt \
-e REGISTRY_HTTP_TLS_KEY=/insecure-certs/domain.key \
-p $INSECURE_REGISTRY_PORT:$INSECURE_REGISTRY_PORT \
ghcr.io/project-zot/zot-minimal-linux-amd64:latest
Copy link
Member

Choose a reason for hiding this comment

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

do we need to use latest here?

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 pin a version 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.

Added a ENV var to control this instead.

@rchincha
Copy link
Contributor Author

rchincha commented Sep 28, 2023

AFAICT CI issues related to this PR should be resolved.
Currently, seeing intermittent docker registry issues during workflow setup steps.

@rchincha
Copy link
Contributor Author

Looks like the CI tests have passed.

@rchincha
Copy link
Contributor Author

cc: @jdolitsky also since

`commit 2b3ff73
Author: Josh Dolitsky 393494+jdolitsky@users.noreply.github.com
Date: Mon Feb 13 18:02:21 2023 -0600

Add COSIGN_OCI_EXPERIMENTAL, push .sig/.sbom using OCI 1.1+ digest tag (#2684)

* Add COSIGN_OCI_EXPERIMENTAL, push .sig/.sbom using OCI 1.1+ digest tag`

Copy link
Member

@cpanato cpanato left a comment

Choose a reason for hiding this comment

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

small nits

thanks!

@@ -0,0 +1,48 @@
#!/usr/bin/env bash
#
# Copyright 2021 The Sigstore Authors.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# Copyright 2021 The Sigstore Authors.
# Copyright 2023 The Sigstore Authors.

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.

# See the License for the specific language governing permissions and
# limitations under the License.

set -ex
Copy link
Member

Choose a reason for hiding this comment

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

please make that explicit

like

set -o errexit
set -o nounset
set -o pipefail

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.

export COSIGN_PASSWORD=$pass
export COSIGN_YES="true"
export COSIGN_OCI_EXPERIMENTAL=1
export COSIGN_EXPERIMENTAL=1
Copy link
Member

Choose a reason for hiding this comment

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

humm, interesting, this should be all removed. ok, thanks!

@rchincha
Copy link
Contributor Author

rchincha commented Oct 2, 2023

@github-actions
Insecure Registry KinD E2E / e2e tests (v1.24.x) (pull_request) Failing after 2m

^ appears to be a GH/setup issue - not related to the PR, pls re-run.

zot is a strongly OCI conformant registry with referrers support.

---

Note the new --registry-referrers-mode flag which must be set to
“oci-1-1”.

References:

[1] https://www.chainguard.dev/unchained/building-towards-oci-v1-1-support-in-cosign

[2] https://zotregistry.io

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
5b2d30a added a CLI option that was
never parsed.

Setting --experimental-oci11=true has no effect.

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
@rchincha
Copy link
Contributor Author

rchincha commented Oct 16, 2023

5b2d30a

^ broke OCI referrers path. Also a case for a e2e test wrt this path.

https://github.com/sigstore/cosign/actions/runs/6539098529/job/17756433097

cc: @cpanato @vaikas @jdolitsky

Fixed now.

@haydentherapper
Copy link
Contributor

Looks fine to me, I'll let @cpanato approve.

Copy link
Member

@cpanato cpanato left a comment

Choose a reason for hiding this comment

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

thanks

@cpanato cpanato merged commit da66fdd into sigstore:main Oct 17, 2023
28 checks passed
@github-actions github-actions bot added this to the v2.3.0 milestone Oct 17, 2023
@rchincha
Copy link
Contributor Author

Thanks for merging this PR.

If you run into issues, pls reach out at https://github.com/project-zot/zot

@cpanato cpanato modified the milestones: v2.3.0, v2.2.1 Nov 16, 2023
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.

None yet

3 participants