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

Client aborts on root key rotation when either the old key set or new key set has an unmet threshold #42

Closed
heartsucker opened this issue May 18, 2017 · 7 comments

Comments

@heartsucker
Copy link
Contributor

heartsucker commented May 18, 2017

This was partially covered by #32, but I don't think the current test case is good enough.

TODO

Case 1:

  • 1.root.json has threshold 3 and keys 1, 2, and 3
  • 2.root.json has threshold 3 and keys 4, 5, 6
  • 2.root.json is signed with 1, 2, 4, 5, 6
  • client aborts

Case 2:

  • 1.root.json has threshold 3 and keys 1, 2, and 3
  • 2.root.json has threshold 3 and keys 4, 5, 6
  • 2.root.json is signed with 1, 2, 3, 5, 6
  • client aborts

Case 3:

  • 1.root.json has threshold 3 and keys 1, 2, and 3
  • 2.root.json has threshold 3 and keys 1, 2, and 4
  • 2.root.json is signed with 1, 2, 3
  • client aborts

Case 4:

  • 1.root.json has threshold 3 and keys 1, 2, and 3
  • 2.root.json has threshold 3 and keys 1, 2, and 4
  • 2.root.json is signed with 1, 2, 4
  • client aborts

Case 5:

  • 1.root.json has threshold 3 and keys 1, 2, and 3
  • 2.root.json has threshold 2 and keys 3, 4, and 5
  • 2.root.json is signed with 1, 2, 3, 4, 5
  • client continues
@heartsucker
Copy link
Contributor Author

@trishankkarthik Can you let me know if my interpretation of the spec is correct with these test cases?

@heartsucker
Copy link
Contributor Author

Upstream issue for test cases: advancedtelematic/tuf-test-vectors#38

@vladimir-v-diaz
Copy link

The indicated client behaviour for all these test cases seems correct to me!

The root file must be signed by a threshold of keys for both the current and previous versions.

1.root.json = keys A, B, C
2.root.json = keys D, E, F; threshold = 3

2.root.json must be signed by keys A, B, C, D, E, F

Root must include a threshold of signatures for the previous version so that clients with the previous version of Root can validate it, and clients with access to only the current version must be able to validate it on its own (so it must be signed with a threshold of currently trusted keys).

@heartsucker
Copy link
Contributor Author

@vladimir-v-diaz Great, thanks :D

@heartsucker
Copy link
Contributor Author

@vladimir-v-diaz Wait, follow up actually. To clear up some ambiguity in the spec, it sounds like 2.root.json can specify a threshold of 1 and have only 1 key from 1.root.json sign it even if 1.root.json has a threshold of 3. I think the spec should clarify that this is not the case.

@vladimir-v-diaz
Copy link

Good point! The specification probably does not clarify that this is not the case.

@awwad
Copy link

awwad commented May 18, 2017

Yeah, if that's not clear in the spec, it certainly should be. At a high level, the rules for validating new metadata files come exclusively from already-validated metadata files. We don't care what the new file's threshold is when we're validating that new file.

(Caveat: you might additionally expect the new file's signature to be valid per the new file, but this must come only after it is validated per rules from the old, trusted file.)

vladimir-v-diaz added a commit to theupdateframework/python-tuf that referenced this issue May 18, 2017
Client's should validate new root.json according to the threshold and keys set by its previous version.

See @heartsucker comment [here](theupdateframework/rust-tuf#42 (comment))
vladimir-v-diaz added a commit to theupdateframework/python-tuf that referenced this issue May 18, 2017
Client's should validate new root.json according to the threshold and keys set by its previous version.

See @heartsucker comment [here](theupdateframework/rust-tuf#42 (comment))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants