Skip to content
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

Update the staging TUF repo in the multi-repo example #650

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/multirepo/client/client_example.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import (
)

const (
metadataURL = "https://raw.githubusercontent.com/rdimitrov/go-tuf-metadata/main/examples/multirepo/repository/metadata"
targetsURL = "https://raw.githubusercontent.com/rdimitrov/go-tuf-metadata/main/examples/multirepo/repository/targets"
metadataURL = "https://raw.githubusercontent.com/theupdateframework/go-tuf/main/examples/multirepo/repository/metadata"
targetsURL = "https://raw.githubusercontent.com/theupdateframework/go-tuf/main/examples/multirepo/repository/targets"
verbosity = 4
)

Expand Down
30 changes: 15 additions & 15 deletions examples/multirepo/client/root.json
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
{
"signatures": [
{
"keyid": "492e4e5660058c39cae70b380750e4f8ea86d0fc2047c795af9bbbe73cedd138",
"sig": "b434f25bd61a5cb7c53883b3d91c53b94e9312cd17e19f2b1e1089d73772fad542c0a91ef109404fe4cfabbd2d4cf3b0f7eaaca4fd012555014f75a23d49460a"
"keyid": "8be9c0369e7f2e2aacd9fde0267c5ab224bd65b3e8f892f09168050c53dd1a4d",
"sig": "86e985ac792a7c92489b781e371c9c4ea0b4ba944f56f19783df8404cc7d76dc2ea44b13fd508bd70cbf9cd481e155b4a41ce0b4f030ea481bea9015fa055c06"
}
],
"signed": {
"_type": "root",
"consistent_snapshot": true,
"expires": "2033-11-28T19:51:01.794266Z",
"expires": "2034-09-30T11:29:58.188964Z",
"keys": {
"492e4e5660058c39cae70b380750e4f8ea86d0fc2047c795af9bbbe73cedd138": {
"1e0c46c0f988b6f45eb0956ed6b0836697a39dca123c56453a3d8ad57c64726b": {
"keytype": "ed25519",
"keyval": {
"public": "3b70174991642fd8cfd4b1a4d834843f785db02ad98372b24eb54d06750dd732"
"public": "a5ebf16e4bfec00df5b3a0a580ef1edf8f5c786f398ad82e4bf1b3761c39fc9b"
},
"scheme": "ed25519"
},
"8dcef43f9966d6b5c88cb10f7b5258361532de2151c65378bb8a21c281658696": {
"6ee434fdb4e723ed7d5c556a34e5fabc7412c37ce652dd1a4aeec1e06f86a44c": {
"keytype": "ed25519",
"keyval": {
"public": "2f70d3d75e50f50cf9af3adcc20754ba2d17601801f36d61cacb9f73a7f798f9"
"public": "c934af418d5a32992e5ab6e1bb1a0fddbd0d944654b9dbe53b507b1552ac7057"
},
"scheme": "ed25519"
},
"a606e603cc4974a8fa894928cb165ce38a3f9948c245414bc71ef681caae9dc5": {
"8be9c0369e7f2e2aacd9fde0267c5ab224bd65b3e8f892f09168050c53dd1a4d": {
"keytype": "ed25519",
"keyval": {
"public": "3c3769ac5f74c8f2f84748586344ab8bbda9f0096859d5f37450dec1f5675434"
"public": "e48f729e90a19ac8cf227d7a5e56dcfd52bdc30258fc426255c856959935cb9e"
},
"scheme": "ed25519"
},
"e92842caf93e6e50a64ec0a467dee5bbd06669a6474895b3d5133c69de33545b": {
"b779120edb45353d2a151004fe463ec6f10d90d83c0fa1c755e4e436e2ac8009": {
"keytype": "ed25519",
"keyval": {
"public": "6b1daebaa9b926bb38c33fd7d4edc14e2e96f8795b2ffe6ed49adee6a1251b20"
"public": "097df4cf52f263630b0e5dfac96b2955b83a253842d0e7fcaffa121a349e6efa"
},
"scheme": "ed25519"
}
},
"roles": {
"root": {
"keyids": [
"492e4e5660058c39cae70b380750e4f8ea86d0fc2047c795af9bbbe73cedd138"
"8be9c0369e7f2e2aacd9fde0267c5ab224bd65b3e8f892f09168050c53dd1a4d"
],
"threshold": 1
},
"snapshot": {
"keyids": [
"8dcef43f9966d6b5c88cb10f7b5258361532de2151c65378bb8a21c281658696"
"6ee434fdb4e723ed7d5c556a34e5fabc7412c37ce652dd1a4aeec1e06f86a44c"
],
"threshold": 1
},
"targets": {
"keyids": [
"a606e603cc4974a8fa894928cb165ce38a3f9948c245414bc71ef681caae9dc5"
"b779120edb45353d2a151004fe463ec6f10d90d83c0fa1c755e4e436e2ac8009"
],
"threshold": 1
},
"timestamp": {
"keyids": [
"e92842caf93e6e50a64ec0a467dee5bbd06669a6474895b3d5133c69de33545b"
"1e0c46c0f988b6f45eb0956ed6b0836697a39dca123c56453a3d8ad57c64726b"
],
"threshold": 1
}
Expand Down
14 changes: 13 additions & 1 deletion examples/multirepo/repository/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
# Example repository used for bootstrapping a multi repository TUF client (TAP 4)

The following is a helper TUF repository which serves several targets:
The following is a helper TUF repository that serves several targets:

- `map.json` which holds repository mappings and can be used to bootstrap a TUF client supporting multiple repositories
- A set of trusted root files for each repository listed in the `map.json` file
- The `examples/multirepo/client/client_example.go`(../client/client_example.go) is a client which uses this repository to bootstrap a multi-repository TUF client

## Usage

To regenerate the multi-repo repository,
run the following command from inside the `examples/multirepo/repository` directory:

```bash
go run .
```

This should generate the necessary metadata files in the `metadata` directory and the `map.json` file.
It will also copy the new `root.json` files to the `client` directory.
30 changes: 15 additions & 15 deletions examples/multirepo/repository/metadata/1.root.json
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
{
"signatures": [
{
"keyid": "492e4e5660058c39cae70b380750e4f8ea86d0fc2047c795af9bbbe73cedd138",
"sig": "b434f25bd61a5cb7c53883b3d91c53b94e9312cd17e19f2b1e1089d73772fad542c0a91ef109404fe4cfabbd2d4cf3b0f7eaaca4fd012555014f75a23d49460a"
"keyid": "8be9c0369e7f2e2aacd9fde0267c5ab224bd65b3e8f892f09168050c53dd1a4d",
"sig": "86e985ac792a7c92489b781e371c9c4ea0b4ba944f56f19783df8404cc7d76dc2ea44b13fd508bd70cbf9cd481e155b4a41ce0b4f030ea481bea9015fa055c06"
}
],
"signed": {
"_type": "root",
"consistent_snapshot": true,
"expires": "2033-11-28T19:51:01.794266Z",
"expires": "2034-09-30T11:29:58.188964Z",
"keys": {
"492e4e5660058c39cae70b380750e4f8ea86d0fc2047c795af9bbbe73cedd138": {
"1e0c46c0f988b6f45eb0956ed6b0836697a39dca123c56453a3d8ad57c64726b": {
"keytype": "ed25519",
"keyval": {
"public": "3b70174991642fd8cfd4b1a4d834843f785db02ad98372b24eb54d06750dd732"
"public": "a5ebf16e4bfec00df5b3a0a580ef1edf8f5c786f398ad82e4bf1b3761c39fc9b"
},
"scheme": "ed25519"
},
"8dcef43f9966d6b5c88cb10f7b5258361532de2151c65378bb8a21c281658696": {
"6ee434fdb4e723ed7d5c556a34e5fabc7412c37ce652dd1a4aeec1e06f86a44c": {
"keytype": "ed25519",
"keyval": {
"public": "2f70d3d75e50f50cf9af3adcc20754ba2d17601801f36d61cacb9f73a7f798f9"
"public": "c934af418d5a32992e5ab6e1bb1a0fddbd0d944654b9dbe53b507b1552ac7057"
},
"scheme": "ed25519"
},
"a606e603cc4974a8fa894928cb165ce38a3f9948c245414bc71ef681caae9dc5": {
"8be9c0369e7f2e2aacd9fde0267c5ab224bd65b3e8f892f09168050c53dd1a4d": {
"keytype": "ed25519",
"keyval": {
"public": "3c3769ac5f74c8f2f84748586344ab8bbda9f0096859d5f37450dec1f5675434"
"public": "e48f729e90a19ac8cf227d7a5e56dcfd52bdc30258fc426255c856959935cb9e"
},
"scheme": "ed25519"
},
"e92842caf93e6e50a64ec0a467dee5bbd06669a6474895b3d5133c69de33545b": {
"b779120edb45353d2a151004fe463ec6f10d90d83c0fa1c755e4e436e2ac8009": {
"keytype": "ed25519",
"keyval": {
"public": "6b1daebaa9b926bb38c33fd7d4edc14e2e96f8795b2ffe6ed49adee6a1251b20"
"public": "097df4cf52f263630b0e5dfac96b2955b83a253842d0e7fcaffa121a349e6efa"
},
"scheme": "ed25519"
}
},
"roles": {
"root": {
"keyids": [
"492e4e5660058c39cae70b380750e4f8ea86d0fc2047c795af9bbbe73cedd138"
"8be9c0369e7f2e2aacd9fde0267c5ab224bd65b3e8f892f09168050c53dd1a4d"
],
"threshold": 1
},
"snapshot": {
"keyids": [
"8dcef43f9966d6b5c88cb10f7b5258361532de2151c65378bb8a21c281658696"
"6ee434fdb4e723ed7d5c556a34e5fabc7412c37ce652dd1a4aeec1e06f86a44c"
],
"threshold": 1
},
"targets": {
"keyids": [
"a606e603cc4974a8fa894928cb165ce38a3f9948c245414bc71ef681caae9dc5"
"b779120edb45353d2a151004fe463ec6f10d90d83c0fa1c755e4e436e2ac8009"
],
"threshold": 1
},
"timestamp": {
"keyids": [
"e92842caf93e6e50a64ec0a467dee5bbd06669a6474895b3d5133c69de33545b"
"1e0c46c0f988b6f45eb0956ed6b0836697a39dca123c56453a3d8ad57c64726b"
],
"threshold": 1
}
Expand Down
6 changes: 3 additions & 3 deletions examples/multirepo/repository/metadata/1.snapshot.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"signatures": [
{
"keyid": "8dcef43f9966d6b5c88cb10f7b5258361532de2151c65378bb8a21c281658696",
"sig": "e0f197531eec1a8aeea48014f4459206d59546c1a6a3ab5ea18910b229b51fe6475822fae0005fd8ff611944ca6e8b5c3b286a572d1812e561d55fdeafad9704"
"keyid": "6ee434fdb4e723ed7d5c556a34e5fabc7412c37ce652dd1a4aeec1e06f86a44c",
"sig": "d585b3ee76eb84c386215ec96d4c09a1d24a895d4620b1275b68110e255604037e180deb666aae9bf62ff7cda1844a0f1ddad34e8e911833482c7fcaf6a0cd07"
}
],
"signed": {
"_type": "snapshot",
"expires": "2033-11-28T19:51:01.794264Z",
"expires": "2034-09-30T11:29:58.188962Z",
"meta": {
"targets.json": {
"version": 1
Expand Down
10 changes: 5 additions & 5 deletions examples/multirepo/repository/metadata/1.targets.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"signatures": [
{
"keyid": "a606e603cc4974a8fa894928cb165ce38a3f9948c245414bc71ef681caae9dc5",
"sig": "4c2ad791fe1b2d23b4a7292120b493c61795cb23519b2f23b9c17a25a1078b7cdf72f052fe4ddc583e45ef6ab6ca809f35c192bdf60649ba371bc063a62cbd05"
"keyid": "b779120edb45353d2a151004fe463ec6f10d90d83c0fa1c755e4e436e2ac8009",
"sig": "548ef3fb01c6def4b972444e05a5bc7a7c0e5750eb0c78dc04bd52997849185b3ec72a440157a467c42ff6dd63a808a047a0aee944855e319734bb927e9d7e05"
}
],
"signed": {
"_type": "targets",
"expires": "2033-11-28T19:51:01.793233Z",
"expires": "2034-09-30T11:29:58.187585Z",
"spec_version": "1.0.31",
"targets": {
"map.json": {
"hashes": {
"sha256": "9bb72b3c684f4e489e7fdce1afabff64b4e3f4b7877ac8cb78a684c2c65fc6d8"
"sha256": "562fc7cffe872542a430342995998546e3949dc3acbe7d37668dc76d657032ff"
},
"length": 645
"length": 596
},
"sigstore-tuf-root/root.json": {
"hashes": {
Expand Down
6 changes: 3 additions & 3 deletions examples/multirepo/repository/metadata/timestamp.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"signatures": [
{
"keyid": "e92842caf93e6e50a64ec0a467dee5bbd06669a6474895b3d5133c69de33545b",
"sig": "41670fd3ca12b41a5f3109e6537646586099108c693c913d75570a47ff72e8910b32858a80be6f2ba058c0993af84de4f26a7b5a93b3322e0cf8d10e37352609"
"keyid": "1e0c46c0f988b6f45eb0956ed6b0836697a39dca123c56453a3d8ad57c64726b",
"sig": "29e2506d14263991f9a178a2197921fc9acd33725a82705fc49fc7a22d50603e5d7faf0a8a70e70252c397ed5ad08d5632c102988741502ad26a0481f881cc07"
}
],
"signed": {
"_type": "timestamp",
"expires": "2033-11-28T19:51:01.794266Z",
"expires": "2034-09-30T11:29:58.188963Z",
"meta": {
"snapshot.json": {
"version": 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"repositories": {
"sigstore-tuf-root": ["https://tuf-repo-cdn.sigstore.dev"],
"staging": ["https://raw.githubusercontent.com/sigstore/root-signing/main/repository/repository"]
"staging": ["https://tuf-repo-cdn.sigstore.dev"]
},
"mapping": [
{
Expand Down
2 changes: 1 addition & 1 deletion examples/multirepo/repository/targets/map.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"repositories": {
"sigstore-tuf-root": ["https://tuf-repo-cdn.sigstore.dev"],
"staging": ["https://raw.githubusercontent.com/sigstore/root-signing/main/repository/repository"]
"staging": ["https://tuf-repo-cdn.sigstore.dev"]
},
"mapping": [
{
Expand Down
Loading