-
Notifications
You must be signed in to change notification settings - Fork 550
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
Allow passing keys via environment variables (env://
refs)
#1794
Conversation
Lgtm when the other one lands |
Signed-off-by: Zachary Newman <[email protected]>
Signed-off-by: Zachary Newman <[email protected]>
Signed-off-by: Zachary Newman <[email protected]>
Signed-off-by: Zachary Newman <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #1794 +/- ##
==========================================
+ Coverage 32.16% 32.56% +0.40%
==========================================
Files 146 147 +1
Lines 9208 9297 +89
==========================================
+ Hits 2962 3028 +66
- Misses 5898 5915 +17
- Partials 348 354 +6
Continue to review full report at Codecov.
|
Tested manually as well: ```shell $ export COSIGN_PASSWORD=foo $ cosign generate-key-pair Enter password for private key: Enter password for private key again: Private key written to cosign.key Public key written to cosign.pub $ export MYPRIVKEY="$(cat cosign.key)" $ export MYPUBKEY="$(cat cosign.pub)" $ cosign verify-blob --key env://MYPUBKEY /dev/null --signature <(cosign sign-blob --key env://MYPRIVKEY /dev/null) Using payload from: /dev/null tlog entry created with index: 2095539 tlog entry verified with uuid: dd55086556d7ac0cded8f50961b68f7740e1435fbc5bb47460a8d78321313c7d index: 2095539 Verified OK ``` Signed-off-by: Zachary Newman <[email protected]>
The windows failure looked like a flake cleaning up tempdirs that we've seen before. Rerunning. We might need a skip. |
Windows test failures seem to be caused by: golang/go#51442 I think I'll pull these into a separate test and skip it on Windows for now. |
Jinx |
Signed-off-by: Zachary Newman <[email protected]>
…e#1794) * Bump github.com/sigstore/sigstore Signed-off-by: Zachary Newman <[email protected]> * test: add test for blob.LoadFileOrURL Signed-off-by: Zachary Newman <[email protected]> * refactor: break up LoadFileOrURL by scheme Signed-off-by: Zachary Newman <[email protected]> * feat: add "env://" scheme for blob load Signed-off-by: Zachary Newman <[email protected]> * feat: add "env://" scheme for key lookup Tested manually as well: ```shell $ export COSIGN_PASSWORD=foo $ cosign generate-key-pair Enter password for private key: Enter password for private key again: Private key written to cosign.key Public key written to cosign.pub $ export MYPRIVKEY="$(cat cosign.key)" $ export MYPUBKEY="$(cat cosign.pub)" $ cosign verify-blob --key env://MYPUBKEY /dev/null --signature <(cosign sign-blob --key env://MYPRIVKEY /dev/null) Using payload from: /dev/null tlog entry created with index: 2095539 tlog entry verified with uuid: dd55086556d7ac0cded8f50961b68f7740e1435fbc5bb47460a8d78321313c7d index: 2095539 Verified OK ``` Signed-off-by: Zachary Newman <[email protected]> * test: skip test that flakes on Windows Signed-off-by: Zachary Newman <[email protected]>
Depends on sigstore#407.
Summary
Allow passing keys via environment variables (
env://
refs)Ticket Link
Fixes #1776
Release Note