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

Feature: adds '--allow-insecure-registry' for cosign load #3000

Merged
merged 2 commits into from
May 23, 2023

Conversation

mritunjaysharma394
Copy link
Contributor

Summary

According to the issue #2986, we need in certain cases like that of "Tactical edge deployments for the Government", to 'load' an image to a registry that is had either NO tls cert, for the ability to tell cosign to ignore the cert, or use http instead.
This PR fixes #2986

Release Note

cosign load was added with --allow-insecure-registry to disable TLS verification when interacting with insecure (e.g. self-signed) container registries

Documentation

Yes, added it in the github docs

Signed-off-by: Mritunjay <mritunjaysharma394@gmail.com>
Copy link
Contributor

@znewman01 znewman01 left a comment

Choose a reason for hiding this comment

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

Can we use the RegistryOpts directly? https://github.com/sigstore/cosign/blob/f21081a1820939cddc41c1c119632a6c489d57fd/cmd/cosign/cli/options/registry.go#LL41C1-L41C1

This means that you don't have to duplicate the code to create the Opts.

@codecov
Copy link

codecov bot commented May 22, 2023

Codecov Report

Merging #3000 (2dd42b5) into main (f21081a) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #3000      +/-   ##
==========================================
- Coverage   30.25%   30.23%   -0.02%     
==========================================
  Files         151      151              
  Lines        9473     9478       +5     
==========================================
  Hits         2866     2866              
- Misses       6162     6167       +5     
  Partials      445      445              
Impacted Files Coverage Δ
cmd/cosign/cli/load.go 0.00% <0.00%> (ø)
cmd/cosign/cli/options/load.go 0.00% <0.00%> (ø)

@mritunjaysharma394
Copy link
Contributor Author

Thanks @znewman01 , just fixed that, I (wrongly) thought that we add opts for each command separately 😅 but yes we should try to be as DRY as we can be, thanks for the review! Let me know if it needs further improvements

Signed-off-by: Mritunjay <mritunjaysharma394@gmail.com>
@znewman01 znewman01 enabled auto-merge (squash) May 23, 2023 13:06
@znewman01 znewman01 merged commit 0544abd into sigstore:main May 23, 2023
@github-actions github-actions bot added this to the v1.14.0 milestone May 23, 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.

cosign load '--allow-insecure-registry'
2 participants