-
Notifications
You must be signed in to change notification settings - Fork 275
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
Metadata Attribute research: KEY #1438
Comments
Should I add thoughts about |
|
When does this happen? I think we do want some validation at Key init time |
The question is do we trust I agree that we should add some validation in
PS: @jku do you think we should discuss |
Now that |
My recollection is that the real validity checks in SSLib are hidden inside verify_signature() and other functions like that, so we can't really use them. We could run things like
I don't think this is true for all keytypes. I believe we should consider this just a string (content is internal implementation detail of the specific key). So maybe
As in most other cases, I think we're primarily interested in the deserialization case... Making sure the validation happens on init() should make this useful for new created keys as well (we don't have code that does that yet but that's what I imagine at least). |
I experimented with a solution testing all of the attributes reusing the |
Yeah I think that reinforces my opinion:
|
As I understand it, the source of knowledge about supported keys and schemas is |
I've not responded since I wasn't quite sure why this felt wrong, now I think I've got it: Metadata validity and our implementations ability to sign or verify signatures are two different things. For a client or even a repository implementation it might be reasonable to consider both instant failures but I do not think that applies to Metadata API. In other words, I think it is wrong for Metadata API to fail de/serialization of data just because the data contains an algorithm that our securesystemslib does not recognize: New/unknown algorithms do not make the metadata invalid in any way: they just mean we can't currently verify some specific signatures or hashes in it. |
We had a discussion with @jku and agreed that we shouldn't focus on checking if The reasons are that:
In order to consider this issue as do I see three tasks:
|
In our discussion with Jussi we come to the conclusion that we want to verify that all Key attributes contain values in the expected types, but at the same time we don't want to focus validating the semantics behind them. The reason is that having a Key instance with invalid attributes is possible and supported by the spec. That's why we have "threshold" for the roles meaning we can have up to a certain number of invalid Keys until we satisfy the required threshold. Also, for deeper semantic validation it's better to be done in securesystemslib which does the actual work with keys. For context see: theupdateframework#1438 Signed-off-by: Martin Vrachev <[email protected]>
In our discussion with Jussi we come to the conclusion that we want to verify that all Key attributes contain values in the expected types, but at the same time, we don't want to focus on validating the semantics behind them. The reason is that having a Key instance with invalid attributes is possible and supported by the spec. That's why we have a "threshold" for the roles meaning we can have up to a certain number of invalid Keys until we satisfy the required threshold. Also, for deeper semantic validation it's better to be done in securesystemslib which does the actual work with keys. For context see: theupdateframework#1438 Signed-off-by: Martin Vrachev <[email protected]>
This issue aims to document thoughts about the
KEY
attribute from theRoot
andDelegations
classes.The goal is to understand how we use that attribute, what might go wrong with it and how we can validate it.
When thinking about how we use
KEY
worth reading what is implemented in pr #1408 and pr #1436 implementing threshold validation.We want to answer/address the following 6 questions/points based on my comment here:
PS: The 7-th point is covered by documenting this issue.
The text was updated successfully, but these errors were encountered: