You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: model_signing/readme.md
+60-19Lines changed: 60 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,9 +46,32 @@ All you needed to verify was an identity and its provider. No cryptographic keys
46
46
### End-to-end model signing and verification
47
47
48
48
#### Mode training
49
-
TODO: download ready-made or instruction to run it.
50
49
51
-
This will take 10mn or so. You can download a pre-trained model if you prefer.
50
+
Training will take up to 15mn. You can use the pre-trained model from the previous section instead.
51
+
52
+
Ensure you are running in the [python virtal environment](https://github.com/slsa-framework/oss-na24-slsa-workshop/blob/main/INSTALLATION.md#sigstore-python) where you installed the tooling:
What just happened? What is this link? Sigstore is asking you to authenticate to you email provider via [OIDC Connect](https://openid.net/developers/how-connect-works/). At the time of writing, Sigstore supports [three identity providers](https://github.com/sigstore/model-transparency/blob/main/model_signing/README.md): Google, Microsoft and GitHub. Copy the weblink that is presented to you in your web browser and follow the steps. You'll get a token. Copy it in the terminal and press Enter.
96
+
You shoud be prompted with a verification code. If you do not, re-run the same command but additionally pass the `--disable-ambient` flag.
97
+
98
+
WWHat is the verification code? Sigstore is asking you to authenticate to your email provider via [OIDC Connect](https://openid.net/developers/how-connect-works/). At the time of writing, Sigstore supports [three identity providers](https://github.com/sigstore/model-transparency/blob/main/model_signing/README.md): Google, Microsoft and GitHub. Copy the weblink that is presented to you in your web browser and follow the steps. You'll get a token. Copy it in the terminal and press Enter.
75
99
76
100
```shell
77
101
Enter verification code: .....
@@ -92,8 +116,7 @@ To verify, you need to know both the identity of the signer and its identity pro
Try editing, deleting or adding files to your model and re-run the verification.
@@ -105,10 +128,9 @@ The signature file is in a format called a [Sigstore bundle](https://github.com/
105
128
Let's take a look at the signature file. Make sure [jq](https://github.com/slsa-framework/oss-na24-slsa-workshop/blob/main/INSTALLATION.md#jq) and [openssl](https://github.com/slsa-framework/oss-na24-slsa-workshop/blob/main/INSTALLATION.md#openssl) are installed on your machine.
106
129
107
130
```shell
108
-
$ model=path/to/model/
109
-
$ jq <"${model}model.sig"
131
+
$ jq <"${model_path}/model.sig"
110
132
# Visualize the certificate Sigstore created for your identity
You see a list of files present in the model, each with their path and digest. Notice the digest is of type `sha256-p1`. Model files can be several hundreds of gigabytes in size. So to speed up hash computation, each file is split into multiple chunks that are hashes separately. `p` stands for parallel, because multiple hashing routine work in parallel to compute a file digest.
179
+
You see a list of files present in the model, each with their corresponding path and digest. Notice the digest is of type `sha256-p1`. Model files can be several hundreds of gigabytes in size. So to speed up hash computation, each file is split into multiple chunks that are hashes separately. `p` stands for "parallel", because multiple hashing routines work in parallel to compute a file digest.
147
180
148
181
### Future work
149
182
150
-
#### Support other protection types
183
+
#### Sign on publication
184
+
185
+
Try signinng your models before uploading them to your favorite hub, [Huggingface](https://huggingface.co/), [Tensorflow hub](https://www.tensorflow.org/hub), [PyTorch hub](https://pytorch.org/hub/), etc.
186
+
187
+
#### Support workoad identities
151
188
152
189
Signing with Sigstore not only supports human identity (email addresses), but also workflow identity. For automated signing using a workload identity, the following platforms are currently supported, shown with their expected identities:
153
190
@@ -158,6 +195,10 @@ Buildkite CI (`https://buildkite.com/ORGANIZATION_SLUG/PIPELINE_SLUG`)
158
195
159
196
Try that out and let us know how it goes!
160
197
198
+
#### Sign other data
199
+
200
+
You can use the same CLI / API to sign datasets, checkpoints, etc.
201
+
161
202
## Take the quizz!
162
203
163
204
After completing this activity, you should be able to answer the following questions:
0 commit comments