Skip to content

Commit 0e33cdf

Browse files
authored
docs: Add docs for adding and rotating root keys (#389)
* docs: Add docs for adding and rotating root keys Signed-off-by: Marina Moore <[email protected]> * typo fix from review Signed-off-by: Marina Moore <[email protected]> Signed-off-by: Marina Moore <[email protected]>
1 parent f237d7c commit 0e33cdf

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,39 @@ $ tree .
603603
└── staged
604604
```
605605

606+
#### Adding a new root key
607+
608+
Copy `staged/root.json` to the root box and generate a new root key on the root box:
609+
610+
```bash
611+
$ tuf gen-key root
612+
$ tuf sign root.json
613+
```
614+
615+
Copy `staged/root.json` from the root box and commit:
616+
617+
```bash
618+
$ tuf commit
619+
```
620+
621+
#### Rotating root key(s)
622+
623+
Copy `staged/root.json` to the root box to do the rotation, where `abcd` is the keyid of the key that is being replaced:
624+
625+
```bash
626+
$ tuf gen-key root
627+
$ tuf revoke-key root abcd
628+
$ tuf sign root.json
629+
```
630+
631+
Note that `revoke-key` removes the old key from `root.json`, but the key remains in the `keys/` directory on the root box as it is needed to sign the next `root.json`. After this signing is done, the old key may be removed from `keys/`. Any number of keys may be added or revoked during this step, but ensure that at least a threshold of valid keys remain.
632+
633+
Copy `staged/root.json` from the root box to commit:
634+
635+
```bash
636+
$ tuf commit
637+
```
638+
606639
## Client
607640

608641
For the client package, see https://godoc.org/github.com/theupdateframework/go-tuf/client.

0 commit comments

Comments
 (0)