-
Notifications
You must be signed in to change notification settings - Fork 71
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
Investigate admin role and admin-level operations #292
Comments
Similarly to the other question I asked in #293, then specifying the admin in the configuration file with just a string might not be enough, because multiple authentication methods can have the same application name.
So that one client would have admin privilege in the service if both the authentication type and the application name are correct. |
Do you think it's a good idea to try and make that admin = [ { name = "admin_1" }, { name = "admin_2" } ] |
I would agree with allowing multiple admins. What is the advantage of using:
instead of
|
What I quoted from Paul's proposal - it allows us to add functionality in the future to those entries, without breaking compatibility with older versions. Say you want to set what calls an admin can make: admin = [ { name = "admin_1" }, { name = "admin_2", allowed_calls = ["ListClients"] } ] |
Ah I see, yes I think that would be a clever choice! |
Alternatively, maybe we should do what we do for KIM and create a separate list of admins and their "properties", and then for each |
How would that look like? Would that then allow mutliple authenticators to use the same admin names? |
[[admin]]
name = "admin_1"
role = "DeleteAllTheStuff"
[[admin]]
name = "admin_2"
role = "JustCheckOnThings"
[[authenticator]]
#...
admins = [ "admin_1" ]
[[authenticator]]
#...
admins = ["admin_1", "admin_2"] For KIM we had to invent a name to reference from other parts of the config, but for admins it's a natural property |
I see. That could be an option but I would prefer what we said before first for simplicity in the service builder and then for the fact that the |
Design proposalHere are my thoughts on how the implementation could look like. Please give your opinion 😃 In the config fileWe add under the
The type of In the service builderWhen building the authenticator structure (implementing In the front-end handlerThe front-end handler calls the In the back-end handlerBefore calling the appropriate TestingWe could use the multitenancy test and use one of the two clients as an admin. The admin one must execute Documentation
Threat model updates
Split in issues
|
I assume you mean the "meaning" of the name is authenticator-dependent, not the type of the field.
Is that just the name or the whole structure that contains I wish we could somehow stop non-admin app ids from being used for admin calls without having to do an explicit |
Well I also meant the type, for example the SPIFFE ID is a string while the UID could be a u32? Could also be a String I was thinking it might be more efficient to compare integers than strings together but maybe it's easier to maintain if they are all the same type.
I guess only the names for now, the other things might not belong in the authenticator maybe 🤔 |
I think a new error would be better, though I don't think it makes that much of a difference.
At least it only allows deletion of keys, not exposure/usage!
Yeah, that makes sense! |
Summary
A use case has been identified where it would be valuable to have an admin-level role within Parsec, such that a subset of API opcodes could be classed as admin-only operations and only be permitted when the calling user can prove itself to be one of a limited number of admin-level clients.
Scope
The intention here is not necessarily to create a full Role-Based Access Control (RBAC) mechanism for Parsec. The use case is quite straightforward: a small number of housekeeping operations can only be called by an admin user. All other operations can be called by any user. So there are only two levels (admin and regular), and it is permissible to hard-code the operations that fall into each level, rather than allow that to be configurable.
It is expected that admin users would be identified within service config, relative to whatever application identity mechanism is in effect (for example it could be a system UID or a SPIFFE identity).
For future-proofing, it might be prudent to consider a config design that scales to a more general-purpose RBAC system in the future, but this is not a strict requirement.
Admin users would be expected to call the service on the same socket/endpoint as regular users. There is no requirement at this stage to have a privileged endpoint.
Definition of Done
This issue can be considered done when we have a design proposal (perhaps as a PR against the
parsec-book
) and a corresponding set of broken-down GitHub issues for the required engineering tasks to provide the implementation, including a threat model update. The implementation work must include the tasks needed to fully test and prove the configuration and enforcement for an admin-level user. It does not need to include any admin-specific operations, however it might be difficult to do an e2e test without at least one such operation for demonstration purposes. This operation can either be one that has been identified as being useful later, or just something very minimal like anAdminPing
(with the same semantics asPing
except that it is only permitted when called by an admin client).The text was updated successfully, but these errors were encountered: