Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
root/  (default content roles, i.e. no roles for anyone)
├── object A  (everyoneEVERYONE => reader; johndoe => admin)
│   ├── datastream 1  (johndoe => admin)
│   └── object Q  (everyoneEVERYONE => reader; johndoe => admin) 
├── object B  (everyoneEVERYONE => reader; johndoe => admin)
└── object C 

...

  • Container Authentication: A user comes into the system.  They are assigned a user principal:
    • If they authenticate through some authentication gateway, then their principal may be generated from some of the person's attributes;
    • Whether they authenticate or not, the request will always acquire an "everyoneEVERYONE" principal.
  • Fedora Principal Factory Extensions: Principal factory extensions may bring in more principals after authentication, such as groups, from sources like LDAP.
  • Fedora Roles PEP Queries for Assigned Roles on Content: What roles have been assigned?
    • The authorization layer queries the requested repository object(s) for any content-assigned roles.
    • If none are found locally, then it will query each ancestor in turn until role assignments are found.
    • If no role assignments are found in the tree of objects, then a default set of role assignments is used. (see object C above)
  • Fedora Roles PEP - Role Resolution: What roles does this request have?
    • The set of principals in the request are compared to the principals in the ACLs on the object. The roles for each matching principal in the object ACL are the effective roles for the user.
    • At this point we have the effective access roles for this operation
  • Fedora Roles PEP - Policy Enforcement: Does this role have permission to perform the requested action?
    • Note: The Fedora PEP is an extension point, so enforcement will vary by the chosen implementation. We assume that installations will combine the access roles module with a roles-based PEP.
    • The effective roles, assigned to the user on the content, are used to determine if  the user has permission to perform the action on a given object.
    • Basic Roles PEP implementation does permission checks in java code:
      • Permission is determined by evaluating at a minimum the effective roles for the user on the object in question, and the action requested. 
    • In other roles-based PEP implementations, more factors may also enter into the equation to determine permission.
  • The PEP will return a response to ModeShape, which will throw an exception to Fedora if access has been denied.
  • Fedora will respond with a 403 if the given REST operation is denied.

  • The one exception to this process is the fedoraAdmin container role .  if the request has a fedoraAdmin user role (in the container), then no object checks are made. The PEP is not consulted as admins have permission to do everything. Objects will never have the fedoraAdmin role explicitly assigned to them, since it is a container role and not a content role. (e.g. a tomcat user role)

...

  1. Unauthenticated user requests to see Object A.
    1. The user is assigned the user principal "everyoneEVERYONE".
    2. The PEP intercepts the request, gets the ACLs for object A:  "everyoneEVERYONE" => "reader" and "johndoe" => "admin".
    3. The PEP compares the user principal "everyoneEVERYONE" to the principals in object A's ACLs, and sees that "everyoneEVERYONE" matches.  The effective role for this request is "reader", the role paired with the principal "everyoneEVERYONE" on the object.
    4. The PEP sees if the role "reader" can view the object;  it can.
    5. The PEP returns "yes", and the request proceeds.
  2. Unauthenticated user requests to see datastream 1 on Object A.
    1. The user is assigned the user principal "everyoneEVERYONE".
    2. The PEP intercepts the request, gets the ACLs for datastream 1: "johndoe" => "admin".
    3. The PEP compares the user principal "everyoneEVERYONE" to the principals in datastream 1's ACLs, but does not find a match.
    4. The PEP returns "no", and the request is denied.
  3. Unauthenticated user requests to delete Object B.
    1. The user is assigned the user principal "everyoneEVERYONE".
    2. The PEP intercepts the request, gets the ACLs for object A:  "everyoneEVERYONE" => "reader" and "johndoe" => "admin".
    3. The PEP compares the principal "everyoneEVERYONE" to the principals in object A's ACLs, and sees that "everyoneEVERYONE" matches.  The effective role for this request is "reader", the role paired with the principal "everyoneEVERYONE" on the object.
    4. The PEP sees if the role "reader" can delete the object;  it cannot.
    5. The PEP returns "no", and the request is denied.
  4. John Doe requests to update datastream 1 on Object A.
    1. The user is assigned the user principal "johndoe".
    2. The PEP intercepts the request, gets the ACLs for object A:  "everyoneEVERYONE" => "reader" and "johndoe" => "admin".
    3. The PEP compares the user principal "johndoe" to the principals in object A's ACLs, and sees that "johndoe" matches.  The effective role for this request is "admin", the role paired with the principal "johndoe" on the object.
    4. The PEP sees if the role "admin" can update the object;  it can.
    5. The PEP returns "yes", and the request proceeds.
     

...