Skip to content
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

WIP: Support delegated targets roles in repo writer #171

Conversation

ethan-lowman-dd
Copy link
Contributor

No description provided.

Copy link
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
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
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
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