-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preserve raw signed json segments in TUF metadata
Signed-off-by: Appu Goundan <[email protected]>
- Loading branch information
1 parent
51f9270
commit cc32d4b
Showing
9 changed files
with
206 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
...src/test/resources/dev/sigstore/tuf/synthetic/root-update-with-unknown-fields/4.root.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{ | ||
"signed": { | ||
"_type": "root", | ||
"spec_version": "1.0", | ||
"version": 4, | ||
"expires": "2029-03-05T22:50:21Z", | ||
"keys": { | ||
"314ae73abd3012fc73bfcc3783e31d03852716597642b891d6a33155c4baf600": { | ||
"keytype": "ecdsa-sha2-nistp256", | ||
"scheme": "ecdsa-sha2-nistp256", | ||
"keyid_hash_algorithms": [ | ||
"sha256", | ||
"sha512" | ||
], | ||
"keyval": { | ||
"public": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEXMZ7rD8tWDE4lK/+naJN7INMxNC7\nbMMANDqTQE7WpzyzffWOg59hc/MwbvJtvuxhO9mEu3GD3Cn0HffFlmVRiA==\n-----END PUBLIC KEY-----\n" | ||
} | ||
}, | ||
"c8e09a68b5821b75462ae0df52151c81deb7f1838246dc1da8c34cc91ec12bda": { | ||
"keytype": "ecdsa-sha2-nistp256", | ||
"scheme": "ecdsa-sha2-nistp256", | ||
"keyid_hash_algorithms": [ | ||
"sha256", | ||
"sha512" | ||
], | ||
"keyval": { | ||
"public": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEL3vL/VeaH6nBbo4rekyO4cc/QthS\n+nlyJXCXSnyIMAtLmVTa8Pf0qG6YIVaR0TmLkyk9YoSVsZakxuMTuaEwrg==\n-----END PUBLIC KEY-----\n" | ||
} | ||
} | ||
}, | ||
"roles": { | ||
"root": { | ||
"keyids": [ | ||
"c8e09a68b5821b75462ae0df52151c81deb7f1838246dc1da8c34cc91ec12bda" | ||
], | ||
"threshold": 1 | ||
}, | ||
"snapshot": { | ||
"keyids": [ | ||
"314ae73abd3012fc73bfcc3783e31d03852716597642b891d6a33155c4baf600" | ||
], | ||
"threshold": 1 | ||
}, | ||
"targets": { | ||
"keyids": [ | ||
"c8e09a68b5821b75462ae0df52151c81deb7f1838246dc1da8c34cc91ec12bda" | ||
], | ||
"threshold": 1 | ||
}, | ||
"timestamp": { | ||
"keyids": [ | ||
"314ae73abd3012fc73bfcc3783e31d03852716597642b891d6a33155c4baf600" | ||
], | ||
"threshold": 1 | ||
} | ||
}, | ||
"consistent_snapshot": true | ||
}, | ||
"signatures": [ | ||
{ | ||
"keyid": "c8e09a68b5821b75462ae0df52151c81deb7f1838246dc1da8c34cc91ec12bda", | ||
"sig": "3044022006fe8fff51d18753aeff141f81a962b8ac33f49831bbbec1334b2733ea96890002206e6f343c9c7b98a2ebd1f0b51aa5286ed3a4d48e271c77d88ea77499231bff5c" | ||
} | ||
] | ||
} |
82 changes: 82 additions & 0 deletions
82
...src/test/resources/dev/sigstore/tuf/synthetic/root-update-with-unknown-fields/5.root.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ | ||
"signatures": [ | ||
{ | ||
"keyid": "c8e09a68b5821b75462ae0df52151c81deb7f1838246dc1da8c34cc91ec12bda", | ||
"sig": "3045022016f788e5c90b169b4a9b28c56bf73df988b67c2d73f4e49205db50f9f0ae8066022100b4aabd9298ff12205724bae48bf9118a262581a7ca4b5d1a1b4c68498bd5fdde" | ||
}, | ||
{ | ||
"keyid": "762cb22caca65de5e9b7b6baecb84ca989d337280ce6914b6440aea95769ad93", | ||
"sig": "3045022100f5a9447b9d240905408106e183ef90914d248a43a869585e5f2001570663f51002207b359b6a39b7ee45c98aca93ba90043bc1f14f9f1223d0cc19eba1c9841e2e82" | ||
} | ||
], | ||
"signed": { | ||
"_type": "root", | ||
"consistent_snapshot": true, | ||
"expires": "2034-01-06T09:35:12Z", | ||
"keys": { | ||
"762cb22caca65de5e9b7b6baecb84ca989d337280ce6914b6440aea95769ad93": { | ||
"keytype": "ecdsa", | ||
"keyval": { | ||
"public": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEohqIdE+yTl4OxpX8ZxNUPrg3SL9H\nBDnhZuceKkxy2oMhUOxhWweZeG3bfM1T4ZLnJimC6CAYVU5+F5jZCoftRw==\n-----END PUBLIC KEY-----\n" | ||
}, | ||
"scheme": "ecdsa-sha2-nistp256", | ||
"x-tuf-on-ci-keyowner": "@jku" | ||
}, | ||
"858f105a894358684339a8d05f7f07d09010b35bcb0808ac8b09c26fce5434b6": { | ||
"keytype": "ecdsa", | ||
"keyval": { | ||
"public": "-----BEGIN PUBLIC KEY-----\nMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEs+efoKU658vT/rNOsCalHpNadxVtbAei\n0xpIP4bpszlnrYYflOrdDr53rNiQJ33O4eR6Zv1NE6nauR7CKvfuuCNGrtJNEToU\nvWd0uw0zv2ZcL/s7ybmje3qvhhMcN5Ot\n-----END PUBLIC KEY-----\n" | ||
}, | ||
"scheme": "ecdsa-sha2-nistp384", | ||
"x-tuf-on-ci-online-uri": "gcpkms:projects/projectsigstore-staging/locations/global/keyRings/tuf-keyring/cryptoKeys/tuf-staging-key/cryptoKeyVersions/1" | ||
}, | ||
"c8e09a68b5821b75462ae0df52151c81deb7f1838246dc1da8c34cc91ec12bda": { | ||
"keyid_hash_algorithms": [ | ||
"sha256", | ||
"sha512" | ||
], | ||
"keytype": "ecdsa-sha2-nistp256", | ||
"keyval": { | ||
"public": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEL3vL/VeaH6nBbo4rekyO4cc/QthS\n+nlyJXCXSnyIMAtLmVTa8Pf0qG6YIVaR0TmLkyk9YoSVsZakxuMTuaEwrg==\n-----END PUBLIC KEY-----\n" | ||
}, | ||
"scheme": "ecdsa-sha2-nistp256", | ||
"x-tuf-on-ci-keyowner": "@-repo-import" | ||
} | ||
}, | ||
"roles": { | ||
"root": { | ||
"keyids": [ | ||
"c8e09a68b5821b75462ae0df52151c81deb7f1838246dc1da8c34cc91ec12bda", | ||
"762cb22caca65de5e9b7b6baecb84ca989d337280ce6914b6440aea95769ad93" | ||
], | ||
"threshold": 1 | ||
}, | ||
"snapshot": { | ||
"keyids": [ | ||
"858f105a894358684339a8d05f7f07d09010b35bcb0808ac8b09c26fce5434b6" | ||
], | ||
"threshold": 1, | ||
"x-tuf-on-ci-expiry-period": 3650, | ||
"x-tuf-on-ci-signing-period": 365 | ||
}, | ||
"targets": { | ||
"keyids": [ | ||
"762cb22caca65de5e9b7b6baecb84ca989d337280ce6914b6440aea95769ad93" | ||
], | ||
"threshold": 1 | ||
}, | ||
"timestamp": { | ||
"keyids": [ | ||
"858f105a894358684339a8d05f7f07d09010b35bcb0808ac8b09c26fce5434b6" | ||
], | ||
"threshold": 1, | ||
"x-tuf-on-ci-expiry-period": 14, | ||
"x-tuf-on-ci-signing-period": 7 | ||
} | ||
}, | ||
"spec_version": "1.0", | ||
"version": 5, | ||
"x-tuf-on-ci-expiry-period": 3650, | ||
"x-tuf-on-ci-signing-period": 365 | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
.../resources/dev/sigstore/tuf/synthetic/root-update-with-unknown-fields/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Setup test data | ||
|
||
There are generated by root-signing-staging and were tests that may not exist on the main branch anymore | ||
|
||
`4.root.json` : https://github.com/sigstore/root-signing-staging/blob/fecfda76bb9a1721b37dd581f713b72e41270447/metadata/root_history/4.root.json | ||
`5.root.json` : https://github.com/sigstore/root-signing-staging/blob/fecfda76bb9a1721b37dd581f713b72e41270447/metadata/root_history/5.root.json |