~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

Adding a key to a group the host no longer controls says `TooManyKeys`

Closed
Closed chadtmiller.com opened this issue 0 comments

What happened

once the document no longer names the host's key, stewards is every rotation key, up to five. With four or more, addRecoveryKey answers TooManyKeys. With an existing key it answers AlreadyAdded. Only otherwise does it reach NotController. removeRecoveryKey likewise answers HostKey or UnknownKey before NotController. recovery.md:44-47 says adding and removing "are refused with NotController" once the host's key is gone.

How to see it

Read against docs/fresh at 4636e6d, the code at: recovery.rs:208-223 (add_recovery_key), recovery.rs:243-262 (remove_recovery_key), with NotController raised only at recovery.rs:141. Paths are under crates/group-host/src unless they say otherwise. Severity: low.

What you expected

Check keys.host_holds() right after rotation_keys in both handlers, before the other checks.

Where

The host, as built from 4636e6d. Found while checking the docs against the code.