-
Notifications
You must be signed in to change notification settings - Fork 53
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
Revisiting Access Control #839
Comments
ExampleOnly Tiled admins can create "access tags" and define their policies: c.context.admin.set_policy(
# name of access tag
"proposal-12345",
# Who can apply this access tag to datasets that they create?
owners=["group:proposal-12345-users"],
# What access does it confer?
entitlements=[
{"groups": ["proposal-12345-users", "smi-beamline-staff", "data-admins"], "scopes": ["read"]}
{"subjects": ["data-admins"], "scopes": ["write"]}
],
) Users create data and can tag it to share it: # By default, data is accessible (read/write) only by the user who created it.
x = c.write_array([1,2,3])
# Later, a user can apply tags that they are a 'tag owner' on.
# They might share a processed data result like this:
x.access_tags.add("proposal-12345")
# This could also just be done at creation time:
y = c.write_array([1,2,3], access_tags=["proposal-12345"]) Other tags like |
Your proposal matches what we (and I guess you) are currently doing with adding metadata about what proposal/ purpose/tag this data being made is related to, and then leaving it to some other system later to decide who can do what and access given tags. If you remove this from the scientific metadata and put it somewhere else, where will you put it? Will it still be searchable? The tag which might be the proposal name, a commissioning project name, or some other thing is in with the scientific metadata, but it is somehow scientific. It's giving useful context to the data. I think I agree with the argument you are making and your conclusion about what should be stored as this tag, but I am not sure I agree with the original premise that
Can you elaborate on why? |
Administrative information may (likely should) also be stored in
|
I'm curious whether @garryod has given thought to this or encountered this interpretation of RBAC before. |
This interpretation of RBAC is new to me - it appears to be more powerful than typical RBAC implementations, I would be tempted to say it's more akin to many Relation Based Access Control (ReBAC) policies and would lend itself well to being expressed in such a way. Unfortunately due to some requirements from @keithralphs and @coretl - specifically around use of network locations and times in authorization decisions - we've had to opt for fully fledged Attribute Based Access Control (ABAC). This has taken us down the route of Rego and a central Open Policy Agent instance for our Authorization, with some preliminary policy residing in the policy directory of our AuthZ repo. If you can constrain your authorization requirements such that ReBAC (or even RBAC) are viable then I would strongly recommend doing so - with a suggestion of using an off the shelf ReBAC solution such as those derived from Google's Zanzibar. |
Thanks, that's useful feedback. I think where @nmaytan are landing is this:
This model enables:
In short, we create a dedicated space for AccessControlPolicies to store and access state per-node, and continue to leave it up to AccessControlPolicies to implement whatever authorization model fits best with facility requirements. It may make sense to ship implementations in Tiled itself for two or three popular modes. |
I like this field. For reference something similar was added to the |
It's interesting that that was a compromise based on:
Years later, we rediscovered that we have the same divergent requirements/preferences. The proposed field may be used for one or the other, as controlled by the respective AccessControlPolicy. |
Tiled needs first-class support for authorization
We currently support a pluggable Access Control Policy interface that derives access controls from
metadata
. This pushes a security concern into a space that was intended to be for science. It would be better to have a dedicated field in Tiled for access control information associated with each node, separate from itsmetadata
.This prompts the question, what should that field contain?
Of course, the security policy itself must still be customizable, to integrate with various facilities existing systems and policies. Tiled can ship some policies for common use cases.
RBAC fits our use case and scale
Claim: RBAC as it was originally formulated1 makes frequent operations easier to reason about and lower-risk than "users and groups".
Building up layers of indirection...
The most direct thing we could do is assign a list of users to each dataset, with associated rights (e.g. read-only, read-write). This is sufficiently expressive to describe anything we might want to do! It's more or less how access controls work in Sharepoint. But it is difficult to manage correctly at large scales.
A layer of indirection helps make this more manageable. We could assign a list of groups to each data set---again with associated rights. This is how filesystem ACLs work. It is, again, technically sufficient to describe anything we might want to do. In many common cases, it is easier to manage than lists of users.
As an example, suppose we assign these groups with these rights to 1000 datasets:
{"proposal-12345": "r", "smi": "r", "csx": "r", "data-admins": "rw"}
. Now consider some use cases:Adding "groups" made the system easier to operate correctly. Adding more layer of indirection makes it even easier. Instead of assigning groups to datasets, we assign one or more access tags to data sets, and defined a security policy that resolves each user's rights from these tags. (This is RBAC as originally proposed.)
Suppose we assign the access tags
["proposal-12345"]
to all 1000 datasets and define a security policy that mapsproposal-12345
to{"proposal-12345": "r", "smi": "r", "csx": "r", "data-admins": "rw"}
. Notice that the groups in this policy have different permissions, so we cannot just make a new groupproposal-12345
.Again, all of these could be expressed using lists of users and groups---or just lists of users!---but RBAC makes operations easier to manage at scale and puts responsibility where it belongs. Users tag data using the tags that they "own", and the data admin team manages the details of how that maps onto the organizations groups and permissions.
(Aside: As a thought exercise, should we keep going, adding a layer of indirection beyond RBAC? The next level up from here might be groups of access tags. It's not clear that this makes anything easier to reason about.)
Footnotes
The 10-page 1992 paper that introduced RBAC, from authors at NIST (incidentally, at a conference in Baltimore). See a nice explanation in a blog post by Avery Pennarun, co-founder of Tailscale ↩
The text was updated successfully, but these errors were encountered: