Commit 92a409a
fix!: use Fulcio certificate instead of public key and upgrade Sigstore Cosign from v2 to v3 (#1726)
On-behalf-of: Gerald Morrison (SAP) <[email protected]>
<!-- markdownlint-disable MD041 -->
This PR introduces two breaking changes:
## Breaking change 1: Correct Sigstore bundle content in signatures
OCM now bundles the short‑lived Fulcio certificate instead of just a raw
public key into signatures when using keyless signing. To preserve
backwards compatibility for existing components, we introduced a new
signing algorithm `sigstore-v2` and retain the legacy `sigstore`
algorithm:
- `sigstore`: Stores only the public key in the Rekor entry. Existing
signatures remain verifiable.
- `sigstore-v2`: Stores the Fulcio certificate in the Rekor entry,
conforming to the Sigstore Bundle spec. Recommended algorithm to be used
for new signatures.
### OCM CLI Examples
Create a new signature using `sigstore-v2`:
`ocm sign componentversion --signature mysig --algorithm sigstore-v2
--keyless <component-version>`
Verify a signature (correct algorithm is determined from signature name
`mysig`)
`ocm verify componentversion --signature mysig --keyless
<component-version>`
## Breaking change 2: Cosign v3 changes OIDC token handling in GitHub
Actions
GitHub no longer auto‑injects an ID token when `SIGSTORE_ID_TOKEN` is
missing; workflows must explicitly request and export it.
Typical CI error if `SIGSTORE_ID_TOKEN` is missing:
`getting ID token: executing OIDC flow: failed to start browser`
### Migration on GitHub Actions
Add `id-token: write` permission and explicitly request an OIDC ID token
with audience `sigstore`, then export it as `SIGSTORE_ID_TOKEN` prior to
any `ocm sign componentversion --keyless` steps.
Below you find a snippet from an example workflow step that gets an OIDC
token and exports it to the GitHub env for further use.
```yaml
- name: Acquire GitHub OIDC ID token
shell: bash
run: |
TOKEN=$(curl -sSf \
-H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
"${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=sigstore" \
| jq -r '.value')
echo "::add-mask::$TOKEN"
echo "SIGSTORE_ID_TOKEN=$TOKEN" >> "$GITHUB_ENV"
```
### Other CI platforms are not affected
This problem is specific to GitHub Actions. Other CI/CD platforms have
always required explicit handling of OIDC tokens and environment
variables for Sigstore keyless flows. Therefore, no migration is needed
outside GitHub Actions.
## Recommended path forward
- Continue to verify existing `sigstore` signatures — they remain valid.
- For new signatures, use `sigstore-v2` to ensure Sigstore Bundle
compliance.
- On GitHub Actions, add explicit OIDC token handling and export
`SIGSTORE_ID_TOKEN` as shown above.
## References
- Sigstore OIDC Documentation: https://docs.sigstore.dev/cosign/oidc/
- Cosign v3 Release Notes:
https://github.com/sigstore/cosign/releases/tag/v3.0.0
---------
Signed-off-by: Gerald Morrison (SAP) <[email protected]>
Co-authored-by: Gerald Morrison (SAP) <[email protected]>1 parent e408963 commit 92a409a
File tree
11 files changed
+441
-60
lines changed- .github/config
- api/tech/signing/handlers
- sigstore
- attr
- testdata
- docs/reference
11 files changed
+441
-60
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
311 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
48 | 54 | | |
49 | 55 | | |
50 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
35 | 44 | | |
36 | 45 | | |
37 | 46 | | |
38 | 47 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | 48 | | |
43 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
44 | 53 | | |
45 | 54 | | |
46 | 55 | | |
47 | 56 | | |
48 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
49 | 61 | | |
50 | 62 | | |
51 | 63 | | |
52 | | - | |
| 64 | + | |
53 | 65 | | |
54 | 66 | | |
55 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
56 | 71 | | |
57 | 72 | | |
58 | | - | |
| 73 | + | |
59 | 74 | | |
60 | 75 | | |
61 | 76 | | |
| |||
113 | 128 | | |
114 | 129 | | |
115 | 130 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | 131 | | |
135 | 132 | | |
136 | 133 | | |
137 | 134 | | |
138 | 135 | | |
139 | 136 | | |
140 | | - | |
141 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
142 | 164 | | |
143 | 165 | | |
144 | 166 | | |
| |||
169 | 191 | | |
170 | 192 | | |
171 | 193 | | |
| 194 | + | |
172 | 195 | | |
173 | 196 | | |
174 | 197 | | |
175 | | - | |
| 198 | + | |
176 | 199 | | |
177 | 200 | | |
178 | 201 | | |
| |||
238 | 261 | | |
239 | 262 | | |
240 | 263 | | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
| 264 | + | |
247 | 265 | | |
248 | | - | |
| 266 | + | |
249 | 267 | | |
250 | 268 | | |
251 | 269 | | |
252 | | - | |
| 270 | + | |
253 | 271 | | |
254 | 272 | | |
255 | 273 | | |
| |||
270 | 288 | | |
271 | 289 | | |
272 | 290 | | |
273 | | - | |
274 | | - | |
| 291 | + | |
275 | 292 | | |
276 | 293 | | |
277 | 294 | | |
| |||
295 | 312 | | |
296 | 313 | | |
297 | 314 | | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
0 commit comments