add support for hw keys certs and attestations - #2622
Conversation
5a3166c to
4a5d445
Compare
Dry-run check results |
4a5d445 to
0e05902
Compare
marcoieni
left a comment
There was a problem hiding this comment.
Thanks! Some initial comments 👍
AI disclosure
I used GPT5.6-Sol with the codex harness to find 6/7 of these findings
| } | ||
| Ok(()) | ||
| }); | ||
| } |
There was a problem hiding this comment.
we could also add the following validation: "Enforce that a key is only owned by exactly one person" to avoid duplicates and orphans
There was a problem hiding this comment.
I tried adding hardware-keys = ["36011225"] (your key) to my account and cargo run -- check pass.
There was a problem hiding this comment.
Hopefully here this additional check is fixed. I ran a small test using our test fixtures and it should work as expected!
| wrapper(data.people(), errors, |person, _| { | ||
| let all_declared_keys = data | ||
| .people() | ||
| .flat_map(|p| p.hardware_keys().iter().map(|k| k.to_string())) | ||
| .collect::<BTreeSet<_>>(); |
There was a problem hiding this comment.
this function runs in a loop (wrapper takes person as an argument), so you are collecting all declared keys for every person. You can extract line 591-608 outside of the wrapper function.
Towards #2501. Context here.
This PR introduces a new
hardware-keysfolder and assumes a convention that each subfolder corresponds to attestation files and (f9) certificates derived from a single Yubikey.There is a minimal TOML schema addition + validation to link a team member with these folders and files. We don't expose any information from these files through
teamAPI for now.Documentation on how to generate these files to rollow on Forge.
In general we can expect
That means a few dozens of files a few Kbs each stored at this repo, which sounds doable.
I added two for myself related to PIV 9a (auth) as an example of these files.