Metadata API: Delegation role names validation
See original GitHub issueDescription of issue or feature request:
Delegation role names are not restricted in any way in the spec, but they are targets metadata role names.
They could be "."
, "../../filename"
or 1.role
.
The problem is that at some point those delegation role names are used when constructing an URL used
to download the delegated target metadata file:
https://github.com/theupdateframework/tuf/blob/e9106b59cdb5bbfb4260c5ffc3144e79f8f9596a/tuf/ngclient/updater.py#L287 which is likely to be a problem.
Current behavior: No validation is used for Delegation role names.
Expected behavior:
Escape special symbols like .
or \
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (11 by maintainers)
Top Results From Across the Web
Metadata API Developer Guide
Some metadata, such as Apex, executes in system context, so be careful how you delegate the Modify Metadata Through Metadata API.
Read more >Modify Metadata Through Metadata API Functions Permission
Modify Metadata Through Metadata API Functions Permission. Users must have the Customize Application permission to create, update, and delete metadata records.
Read more >IAM roles for Amazon EC2 - Amazon Elastic Compute Cloud
Instead of creating and distributing your AWS credentials, you can delegate permission to make API requests using IAM roles as follows: Create an...
Read more >Roles - Ansible Documentation
tasks/main.yml - the main list of tasks that the role executes. ... metadata for the role, including role dependencies and optional Galaxy metadata...
Read more >IAM basic and predefined roles reference - Google Cloud
Granting the Owner role at the organization level doesn't allow you to update the organization's metadata. However, it allows you to modify all...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
And also, obviously, this becomes a https://github.com/theupdateframework/specification rather than implementation-specific issue
Maybe this should be part of the filesystem API? That way
.
and/
’ could be disallowed for unix-like filesystems, but could be allowed, with restrictions for sigstore delegations to git repo urls.Although, these role names are in signed metadata, so it might be reasonable to just trust the delegator to know what a reasonable role name is for a particular situation.