Skip to content

WIP: Support delegated targets roles in repo writer#171

Closed
ethan-lowman-dd wants to merge 1 commit intotheupdateframework:masterfrom
ethan-lowman-dd:delegations-writer
Closed

WIP: Support delegated targets roles in repo writer#171
ethan-lowman-dd wants to merge 1 commit intotheupdateframework:masterfrom
ethan-lowman-dd:delegations-writer

Conversation

@ethan-lowman-dd
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor Author

@ethan-lowman-dd ethan-lowman-dd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copying over some comments from a previous draft branch

From @asraa (original comment)
fileSystemStore.GetMeta() topLevelMetadata loop doesn't account for the delegated roles

t.Delegations = &data.Delegations{}
}

t.Delegations.Keys = make(map[string]*data.PublicKey)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From @asraa (original comment)

this will nuke the delegations keys on repeated calls to AddTargetsDelegations, so this hsould move into the t.Delegations == nil branch

}
}

t.Delegations.Roles = append(t.Delegations.Roles, role)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From @asraa (original comment)

this won't check for dupes, so maybe this should have a loop that replace the role if the rolename is repeated or something

@ethan-lowman-dd
Copy link
Copy Markdown
Contributor Author

@mnm678 has added some commits here: #175

Closing in favor of that branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants