-
Notifications
You must be signed in to change notification settings - Fork 89
Update Snapshot and Timestamp #1163
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
Conversation
Signed-off-by: GitHub <[email protected]>
| "keys": { | ||
| "25a0eb450fd3ee2bd79218c963dce3f1cc6118badf251bf149f0bd07d5cabe99": { | ||
| "keytype": "ecdsa-sha2-nistp256", | ||
| "1e1d65ce98b10addad4764febf7dda2d0436b3d3a3893579c0dddaea20e54849": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is Santiago's key. The diff looks larger than it is as the order has been changed with the new key ids, so both public key (PEM encoded) and the key id is different.
| }, | ||
| "2e61cd0cbf4a8f45809bda9f7f78c0d33ad11842ff94ae340873e2664dc843de": { | ||
| "keytype": "ecdsa-sha2-nistp256", | ||
| "230e212616274a4195cdc28e9fce782c20e6c720f1a811b40f98228376bdd3ac": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the snapshot key
| }, | ||
| "45b283825eb184cabd582eb17b74fc8ed404f68cf452acabdad2ed6f90ce216b": { | ||
| "keytype": "ecdsa-sha2-nistp256", | ||
| "3c344aa068fd4cc4e87dc50b612c02431fbc771e95003993683a2b0bf260cf0e": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is Dan's key
| }, | ||
| "7f7513b25429a64473e10ce3ad2f3da372bbdd14b65d07bbaf547e7c8bbbe62b": { | ||
| "keytype": "ecdsa-sha2-nistp256", | ||
| "923bb39e60dd6fa2c31e6ea55473aa93b64dd4e53e16fbe42f6a207d3f97de2d": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the timestamp key.
| }, | ||
| "e1863ba02070322ebc626dcecf9d881a3a38c35c3b41a83765b6ad6c37eaec2a": { | ||
| "keytype": "ecdsa-sha2-nistp256", | ||
| "e2f59acb9488519407e18cbfc9329510be03c04aca9929d2f0301343fec85523": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is Bob's key.
| }, | ||
| "f5312f542c21273d9485a49394386c4575804770667f2ddb59b3bf0669fddd2f": { | ||
| "keytype": "ecdsa-sha2-nistp256", | ||
| "ec81669734e017996c5b85f3d02c3de1dd4637a152019fe1af125d2f9368b95e": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is Marina's key.
| }, | ||
| "ff51e17fcf253119b7033f6f57512631da4a0969442afcf9fc8b141c7f2be99c": { | ||
| "keytype": "ecdsa-sha2-nistp256", | ||
| "fdfa83a07b5a83589b87ded41f77f39d232ad91f7cce52868dacd06ba089849f": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is Joshua's key.
| "f5312f542c21273d9485a49394386c4575804770667f2ddb59b3bf0669fddd2f", | ||
| "7f7513b25429a64473e10ce3ad2f3da372bbdd14b65d07bbaf547e7c8bbbe62b", | ||
| "2e61cd0cbf4a8f45809bda9f7f78c0d33ad11842ff94ae340873e2664dc843de" | ||
| "3c344aa068fd4cc4e87dc50b612c02431fbc771e95003993683a2b0bf260cf0e", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The expected keys are listed, and in targets too. For comparison look in the README for new an old key ids.
|
I cross referenced all keys in root.json, by comparing looking at the new key id, which PEM encoded key it referred to, then looked at the previous key id for that and made sure it was correct, see README for the details. |
./verify repository \
--repository `pwd`/repository \
--root `pwd`/repository/repository/root.json \
--targets registry.npmjs.org/keys.json,trusted_root.json
VERIFYING TUF CLIENT UPDATE
Client successfully initialized, updating and downloading targets...
Client updated to...
root.json version 9, expires 2024/09/12
timestamp.json version 166, expires 2024/03/20
snapshot.json version 130, expires 2024/04/03
targets.json version 9, expires 2024/09/12
Retrieved target registry.npmjs.org/keys.json...
{
"keys": [
... |
|
Verify cosign initialization: $ ./cosign initialize --mirror http://localhost:8081 --root /Users/kommendorkapten/git/root-signing/repository/repository/5.r
oot.json
Root status:
{
"local": "/Users/kommendorkapten/.sigstore/root",
"remote": "http://localhost:8081",
"metadata": {
"root.json": {
"version": 9,
"len": 6766,
"expiration": "12 Sep 24 06:53 UTC",
"error": ""
},
"snapshot.json": {
"version": 130,
"len": 2304,
"expiration": "03 Apr 24 06:41 UTC",
"error": ""
},
"targets.json": {
"version": 9,
"len": 5478,
"expiration": "12 Sep 24 06:13 UTC",
"error": ""
},
"timestamp.json": {
"version": 166,
"len": 721,
"expiration": "20 Mar 24 06:41 UTC",
"error": ""
}
},
...And the repository side: kommendorkapten@m1m14:~/git/root-signing/repository/repository % python3 -m http.server 8081
Serving HTTP on :: port 8081 (http://[::]:8081/) ...
::1 - - [13/Mar/2024 08:05:11] "GET /6.root.json HTTP/1.1" 200 -
::1 - - [13/Mar/2024 08:05:11] "GET /7.root.json HTTP/1.1" 200 -
::1 - - [13/Mar/2024 08:05:11] "GET /8.root.json HTTP/1.1" 200 -
::1 - - [13/Mar/2024 08:05:11] "GET /9.root.json HTTP/1.1" 200 -
::1 - - [13/Mar/2024 08:05:11] code 404, message File not found
::1 - - [13/Mar/2024 08:05:11] "GET /10.root.json HTTP/1.1" 404 -
::1 - - [13/Mar/2024 08:05:11] "GET /timestamp.json HTTP/1.1" 200 -
::1 - - [13/Mar/2024 08:05:11] "GET /130.snapshot.json HTTP/1.1" 200 -
::1 - - [13/Mar/2024 08:05:11] "GET /9.targets.json HTTP/1.1" 200 - |
|
I will look into the failing client tests now. |
Sign snapshot and timestamp files