-
Notifications
You must be signed in to change notification settings - Fork 278
Metadata API: prevent Delegation role names to be one of top level metadata roles #1558
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
Comments
I wonder if this kind of logic and role name sanitisation more generally belongs in metadata API? Perhaps it should be part of the (as yet undesigned) repository interface? |
same check does make sense in a client: we would not want to accidentally overwrite our local root.json because a targets decides to delegate to a "root" role version 9000. I don't think there are practical risks of that -- the client would have to succeed in downloading and verifying the file as a targets metadata before it would be written to local disk but this still seems like a reasonable check for a client to make |
the legacy client also prevents empty string as rolename -- this seems like a reasonable take for ngclient too |
When solving this issue please add tests in |
I am working on this issue. |
Description of issue or feature request:
Current behavior:
Delegation role names are not restricted in any way in the spec, but they are targets metadata role names.
That could lead to a problem if delegation role names are one of
root
,timestamp
,snapshot
ortargets
.Expected behavior:
Make sure that delegation role names aren't one of the top-level metadata roles.
The text was updated successfully, but these errors were encountered: