In WebAC you can use the
acl:agentClass property of an Authorization to point to a resource that holds a list of usernames. This allows you to create and manage groups of users within Fedora, and to assign different permissions to different groups. This how-to will guide you through the process of creating a resource, creating an
agentClass group, and limiting access to that resource through an ACL that references that
- a running Fedora 4 with the WebAC module enabled, at http://localhost:8080/fcrepo (an easy way to get this is to run the Fedora 4 Vagrant)
Create these four files:
Upload these resources into Fedora:
(Note: The order you upload these in is important, since
testusercan read the
The first request should respond with 200 OK, while the second should be 403 Forbidden.
adminuserto also read the
fooresource, we can add
adminuserto the members of the group.
Create group.sparql with the following contents:
Run this command to update the group and add
You should receive a 204 No Content response on success.
Now you should be able to repeat the command from step 3 and successfully retrieve the
This time, you should get a 200 OK response.
- For it to be useful, the names listed in the
foaf:memberproperties of an authorization need to be names that your authentication system will provide to Fedora. Remember, Fedora does no authentication of its own.
- The purpose of the
acl:agentClassgroups is distinct from any group mechanism your existing authentication system may have (e.g., LDAP or ActiveDirectory groups). The groups provided by the authentication system would be passed to Fedora as security principals, which the WebAC module compares against the
acl:agentproperty. In other words, externally defined groups are opaque to Fedora, thus it treats them as simple agents.