question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Metadata API: Delegation role names validation

See original GitHub issue

Description 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:closed
  • Created 2 years ago
  • Comments:15 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
trishankatdatadogcommented, Aug 24, 2021

And also, obviously, this becomes a https://github.com/theupdateframework/specification rather than implementation-specific issue

1reaction
mnm678commented, Aug 23, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found