Skip to content

Conversation

@dmitris
Copy link
Contributor

@dmitris dmitris commented Feb 21, 2025

Summary

Add the following command-line flags for cosign attest and cosign blob-attest:

  • timestamp-client-cacert
  • timestamp-client-cert
  • timestamp-client-key
  • timestamp-server-name to enable the mTLS connections to the custom TSA server using non-public CA roots. Also add the supporting fields in the AttestOptions struct.

All the added fields are optional with empty defaults - not providing them should not make any difference for those who do not need them.

The initial patch (442e0e8) is authored by my teammate Aditya Mahendrakar (@maditya) and used with the author's permission.

Release Note

  • Config changes (additions, deletions, updates)
    cosign attest and cosign blob-attest - add optional timestamp-client-cacert, timestamp-client-cert, timestamp-client-key, and
    timestamp-server-name flags to enable an mTLS connection to the custom TSA server (with the non-public CA roots),
    analogue to the existing flags for cosign sign[-blob].

Documentation

sigstore/docs#368

Add the following command-line flags for `cosign attest`:
* timestamp-client-cacert
* timestamp-client-cert
* timestamp-client-key
* timestamp-server-name
to enable the mTLS connections to the custom TSA server
using non-public CA roots. Also add the supporting fields
in the AttestOptions struct.

All the added fields are optional with empty defaults -
not providing them should not make any difference for those
who do not need them.

The patch is authored by Aditya Mahendrakar (@maditya).

Signed-off-by: Dmitry Savintsev <[email protected]>
@dmitris dmitris requested a review from a team as a code owner February 21, 2025 15:38
@codecov
Copy link

codecov bot commented Feb 21, 2025

Codecov Report

Attention: Patch coverage is 0% with 54 lines in your changes missing coverage. Please review.

Project coverage is 36.62%. Comparing base (2ef6022) to head (a6c5931).
Report is 323 commits behind head on main.

Files with missing lines Patch % Lines
cmd/cosign/cli/attest/attest_blob.go 0.00% 11 Missing and 1 partial ⚠️
cmd/cosign/cli/options/attest.go 0.00% 12 Missing ⚠️
cmd/cosign/cli/options/attest_blob.go 0.00% 12 Missing ⚠️
cmd/cosign/cli/attest/attest.go 0.00% 10 Missing ⚠️
cmd/cosign/cli/attest.go 0.00% 4 Missing ⚠️
cmd/cosign/cli/attest_blob.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4079      +/-   ##
==========================================
- Coverage   40.10%   36.62%   -3.48%     
==========================================
  Files         155      210      +55     
  Lines       10044    13436    +3392     
==========================================
+ Hits         4028     4921     +893     
- Misses       5530     7897    +2367     
- Partials      486      618     +132     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@haydentherapper haydentherapper 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 do the same for attest-blob? Otherwise, LGTM.

dmitris added a commit to dmitris/sigstore-docs that referenced this pull request Feb 21, 2025
Expand the list of commands that support the mTLS and custom CA
TSA parameters to include `cosign attest` and `cosign blob-attest`.
Related to sigstore/cosign#4079
and its issue
sigstore/cosign#4078.

Signed-off-by: Dmitry Savintsev <[email protected]>
@haydentherapper
Copy link
Contributor

Thanks!

@haydentherapper haydentherapper merged commit 8911168 into sigstore:main Feb 21, 2025
57 checks passed
@dmitris dmitris deleted the tsa-certs branch February 23, 2025 18:51
dmitris added a commit to dmitris/sigstore-docs that referenced this pull request Feb 24, 2025
Expand the list of commands that support the mTLS and custom CA
TSA parameters to include `cosign attest` and `cosign blob-attest`.
Related to sigstore/cosign#4079
and its issue
sigstore/cosign#4078.

Signed-off-by: Dmitry Savintsev <[email protected]>
haydentherapper pushed a commit to sigstore/docs that referenced this pull request Mar 4, 2025
Expand the list of commands that support the mTLS and custom CA
TSA parameters to include `cosign attest` and `cosign blob-attest`.
Related to sigstore/cosign#4079
and its issue
sigstore/cosign#4078.

Signed-off-by: Dmitry Savintsev <[email protected]>
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request May 10, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [cosign](https://github.com/sigstore/cosign) | minor | `2.4.3` -> `2.5.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>sigstore/cosign (cosign)</summary>

### [`v2.5.0`](https://github.com/sigstore/cosign/blob/HEAD/CHANGELOG.md#v250)

[Compare Source](sigstore/cosign@v2.4.3...v2.5.0)

v2.5.0 includes an implementation of the new bundle specification,
attesting and verifying OCI image attestations uploaded as OCI artifacts.
This feature is currently gated behind the `--new-bundle-format` flag
when running `cosign attest`.

#### Features

-   Add support for new bundle specification for attesting/verifying OCI image attestations ([#&#8203;3889](sigstore/cosign#3889))
-   Feat/non filename completions ([#&#8203;4115](sigstore/cosign#4115))
-   Add TSA certificate related flags and fields for cosign attest ([#&#8203;4079](sigstore/cosign#4079))

#### Fixes

-   cmd/cosign/cli: fix typo in ignoreTLogMessage ([#&#8203;4111](sigstore/cosign#4111))
-   Fix replace with compliant image mediatype ([#&#8203;4077](sigstore/cosign#4077))

#### Contributors

-   Bob Callaway
-   Carlos Tadeu Panato Junior
-   Cody Soyland
-   Dmitry Savintsev
-   Hayden B
-   Ramon Petgrave
-   Riccardo Schirone
-   Stef Graces
-   Ville Skyttä

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yNTkuMCIsInVwZGF0ZWRJblZlciI6IjM5LjI1OS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
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.

2 participants