Commit 137679b
committed
Add support for Buildkite OIDC tokens
Add minimal support required to generate attestations for rubygems
trusted publisher support in a Buildkite job
1. Teach sigstore-cli gem how to detect when it's running in a Buildkite
job, and how to request a Buildkite OIDC token automatically
2. Teach sigstore gem how to parse an Buildkite OIDC token and generate
the identity that fulcio uses for the x509 common name in
certificates for Buildkite OIDC tokens
With these changes, the following command works in a Buildkite job:
bundle exec sigstore-cli sign <somefile> --bundle bundle.sigstore.json
I've tested this using the pipeline defined in a gist:
https://gist.github.com/yob/512f079e0586d49d125547ad548c08b5
The pipeline is private [1], however an example rekor log for a bundle
created using this branch is at [2]
[1] https://buildkite.com/yob-opensource/sigstore-ruby-test/
[2] https://search.sigstore.dev/?logIndex=176164097
Signed-off-by: James Healy <james@yob.id.au>1 parent 27d8b53 commit 137679b
2 files changed
+48
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | | - | |
| 14 | + | |
| 15 | + | |
13 | 16 | | |
14 | | - | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
88 | 118 | | |
89 | 119 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | | - | |
51 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
52 | 65 | | |
53 | 66 | | |
54 | 67 | | |
| |||
0 commit comments