-
Notifications
You must be signed in to change notification settings - Fork 35
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
Role Based Access Controls (RBAC) Schema & Design #1367
Comments
@eeyun @krasnow First design iteration mockup: https://chef.invisionapp.com/share/M7X9HIZFP5Z#/417375859_origin-Members |
Dang, that is 🔥. So good @apriofrost! |
After chatting with @krasnow , we decided to move forward with this design direction with the UI team for implementation. I'm working on fleshing out some of the design details for a complete user journey. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you. |
This issue has been automatically closed after being stale for 400 days. We still value your input and contribution. Please re-open the issue if desired and leave a comment with details. |
Role-Based Access Controls
Builder users have very little flexibility in the operational concerns and controls for any origins that they own. Currently there only exist 2 types of builder users: Owners, and Non-Owners. What's more, the only difference in these users permissions is that Owners can delete the origin, can transfer ownership of the origin, and can remove current users. Non-Owners retain all other authorizations including uploading/rolling keys and packages and adding users. This is clearly less than ideal since it limits the ways that users can leverage the tools.
A goal of this work (and this doc) is to provide more control over various operations in builder in a way that supports several different use-cases. *Primarily any output from this work should resolve #1149 as the principle target, preferably any implementation would be flexible enough that extending it to cover other use cases.
Motivation
As a user of both SaaS and On-prem builder I want to be able to control who has access to the multitude of available operations that can be performed from package uploads to key visibility and membership management.
Specification
For the sake of an initial implementation the primary goal is to get a backend architecture that can be extended past a single "role" however our initial goal and expected output for this work is to provide the 'Origin Member' role listed below and any crud operations associated with the new primitive of 'Roles'. It is most likely that this design doc will generate MULTIPLE tickets and an overarching epic.
In our early discovery we're looking at extending our authz function https://github.com/habitat-sh/builder/blob/master/components/builder-api/src/server/authorize.rs#L26-L77 as the entrypoint for any types of behaviors.
We know at the database layer that
origin_members
will need a new column ofrole
that exists as an enum with the possible entries ofowner, administrator, maintainer, member
. For current users, any migration that comes as an outcome of this work should not alter existing authorizations, all currently existing origin members today align with the listedorigin administrator
role listed below so all existing users will be assigned that role. Origin owners will have to manually alter their members to reduce their permissions to the neworigin member
role.Roles
We wanted to break down the list of potential user identity "roles" here before we determine architecturally what the implementation looks like. This should inform the implementation really.
unstable
unstable
unstable
build jobAnother way to look at it:
*As a follow on PR these roles will be differentiated further. As noted in the rest of this doc we are, for our initial slice, focusing on the member role and an extensible privilege system.
Downstream Impact
Theoretically, any changes made in the initial implementation should be entirely transparent to end-users. In fact, since the UI work to fully support this featureset won't have been implemented, even the ability leverage the change will be fairly hidden from those end-users.
Validation of downstream impact will be partially determined through our functional test suite. All of existing tests are expected to work top to bottom. A new suite of tests will need to be added to validate that the new
origin member
role does not have access to all of the actions and resources that theorigin owner/administrator
does.Finally, we will want to verify all end-user behaviours and functionality in acceptance before a release is cut.
Related Issues
#1149
#1142
#1301
#835
The text was updated successfully, but these errors were encountered: