...
Gliffy Diagram name Fedora WebAC Request Authorization Flow
Example Scenarios
I want to allow a user with username "smith123" to have read, write access to resource http://localhost:8080/rest/webacl_box1.
Using these two "files" to create our Authorization and ACL resources.
Code Block title Acl.txt @prefix webac: <http://www.w3.org/ns/auth/acl#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix ldp: <http://www.w3.org/ns/ldp#> . <> a ldp:BasicContainer ; rdf:type ???:WebAcl .
Code Block title Authorization.txt @prefix webac: <http://www.w3.org/ns/auth/acl#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix ldp: <http://www.w3.org/ns/ldp#> . <> a ldp:RDFSource ; rdf:type webac:Authorization ; webac:agent "smith123" ; webac:mode acl:Read, acl:Write ; webac:accessTo <http://localhost:8080/rest/webacl_box1> .
We would execute the following commands.
Code Block > curl -X POST -H "Content-type: text/turtle" --data-binary "@Acl.txt" "http://localhost:8080/rest" http://localhost:8080/rest/new/node/acl > curl -X POST -H "Content-type: text/turtle" --data-binary "@Authorization.txt" "http://localhost:8080/rest" http://localhost:8080/rest/new/node/authorization > echo "PREFIX ldp: <http://www.w3.org/ns/ldp#> INSERT INTO { <> ldp:contains <http://localhost:8080/rest/new/node/authorization> . }" | curl -X PATCH -H "Content-type: application/sparql-update" --upload-file - "http://localhost:8080/rest/new/node/acl" > echo "PREFIX webac: <http://www.w3.org/ns/auth/acl#> INSERT INTO { <> webac:accessControl <http://localhost:8080/rest/new/node/acl> . }" | curl -X PATCH -H "Content-type: application/sparql-update" --upload-file - "http://localhost:8080/rest/webacl_box1"
- I wants this group to have write access on this collection
....