Skip to content

Metadata API: Missing key helper functions in Targets/Delegations #1469

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

Closed
jku opened this issue Jun 28, 2021 · 2 comments · Fixed by #1537
Closed

Metadata API: Missing key helper functions in Targets/Delegations #1469

jku opened this issue Jun 28, 2021 · 2 comments · Fixed by #1537
Assignees
Labels
backlog Issues to address with priority for current development goals good first issue Bite-sized items for first time contributors repository Related to the repository implementation
Milestone

Comments

@jku
Copy link
Member

jku commented Jun 28, 2021

Root class has functionality to add and remove keys for delegated metadata (add_key()/remove_key()) but the other delegator Targets does not. It should provide same/similar functionality.

Some options:

  • Add Targets.add_key(self, role: str, key: Key) and Targets.remove_key(self, role: str, keyid: str)
  • Handle the same in Delegations object

I think the former option makes sense so that the Targets API matches Root as well as possible (and Delegations remains mostly a Targets implementation detail).

@jku jku changed the title Metadata API: Missing key helper for Targets/Delegations Metadata API: Missing key helper functions in Targets/Delegations Jun 28, 2021
@joshuagl joshuagl added good first issue Bite-sized items for first time contributors repository Related to the repository implementation labels Jun 29, 2021
@jku
Copy link
Member Author

jku commented Jun 30, 2021

This could be fixed along with #1426 but also independently. In the latter case the implementation will be inefficient (as delegations.roles is just an array and lookups by rolename are not possible) but that's fine

@jku jku added the backlog Issues to address with priority for current development goals label Aug 18, 2021
@MVrachev
Copy link
Collaborator

I want to work on this and will assign myself.
I proposed a solution in the above pr #1537.

@MVrachev MVrachev self-assigned this Aug 24, 2021
@sechkova sechkova added this to the Sprint 7 milestone Sep 1, 2021
@jku jku linked a pull request Sep 8, 2021 that will close this issue
3 tasks
@sechkova sechkova modified the milestones: Sprint 7, Sprint 8 Sep 15, 2021
@jku jku closed this as completed in #1537 Sep 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Issues to address with priority for current development goals good first issue Bite-sized items for first time contributors repository Related to the repository implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants