Use Cases

User Case 1: Granting Access to Friends in FOAF Profile

Overview

A user called Alice has some photos of her birthday party. The photos are stored on Flickr and are assigned some tags such as alice, birthday, and party. Bob, a friend of Alice, was in Alice's party and he wants to access the photos owned by Alice. We assume that both users have their own OpenID and have properly included this information in their FOAF profile. We also assume that the URIs of Alice and Bob are as follows.

http://alice.example.com/foaf.rdf#me
http://bob.example.com/foaf.rdf#me

In addition, we assume that Alice has mentioned in her own FOAF profile that Bob is her friend by using the "foaf:knows" property.

<http://alice.example.com/foaf.rdf#me>
     foaf:openid <http://alice.example.com/openid> .
<http://bob.example.com/foaf.rdf#me>
     foaf:openid <http://bob.example.com/openid> .

We also assume both users have installed the Tabulator extension in their browsers.


Importing Metadata of Photos

In order to make use of the access control function of our system, Alice needs to import the metadata of her photos from Flickr. Firstly, she authenticates herself using her OpenID by providing her FOAF profile URI. After receiving her OpenID, the system redirects Alice to the corresponding Web site for authentication.

After the authentication process is finished, Alice can create a new album in the system, and choose from her collection in Flickr photos which are to be included in the album. All the tags assigned to the photos will also be identified. The system creates an RDF file storing all the metadata of the photos Alice has imported. Part of the data file in N3 is shown as follows.

:pa01 a pac:PhotoAlbum;
     pac:Contains <http://www.flickr.com/alice/photo01.jpg> .
:pa01 pac:Owner
     <http://alice.example.com/foaf.rdf#me> .

<http://www.flickr.com/alice/photo01.jpg> pac:hasTagging :tagging01 .

:tagging01
     a tags:Tagging .
     tags:associatedTag :t_alice, :t_birthday ;
     tags:associatedTag :t_party, :t_bob ;
     tags:taggedBy <http://alice.example.com/foaf.rdf#me> ;
     tags:taggedResource <http://www.flickr.com/alice/photo01.jpg> .

Alice will be given a URI of this photo album, so that she can tell her friends how they can access her photos. Note that the true URL of the RDF file should not be disclosed and that only the server side script should be able to access the file, otherwise other users can bypass the access control and browse the photos directly. The URI of the above photo album may look something like this:

http://alice.example.com/photoalbum/pa01

Creating Access Control Rules

After importing the photo metadata, Alice can go on to specify the access control rules associated with the photo album. Our user interface which is an extension of Tabulator will allow Alice to create the rules without writing them in the AIR Policy Language by herself. In this case, Alice creates a rule as follows: photos with the tags alice, birthday and party can only be accessed by her friends who are mentioned in her FOAF profile. The system should generate an RDF file in N3 format which contains the following policy.

:R a air:Policy;
     air:rule [
          air:pattern {
               :E pac:AccessPerson :U .
               :E pac:AccessedPhoto :P .
               :A pac:Contains :P .
               :P pac:hasTagging :T .
               :T tags:taggedBy :O;
                    tags:associatedTag :t_alice .
                    tags:associatedTag :t_birthday .
                    tags:associatedTag :t_party .
               :O foaf:knows :U . };
          air:description (:E " is compliant with " :R);
          air:assert {:E air:compliant-with :R.};
     ].

In other words, for any event which involves a user U trying to access a photo P assigned the three tags to be compliant with the access control policy, U has to be "known" by the owner O of P, who is Alice in this case. In addition, the system will attach this policy to the photo album by inserting the following triple into the photo album RDF file.

:pa01 pac:ACRules :R .

Accessing the Photos

After Alice has finished all the preparations, she can send the URI of the photo album to her friends. Bob receives the URI and enters it into the browser. He first goes through the OpenID authentication process by providing his FOAF URI. When the server receives a request of the URI, it actually redirects the browser to the server side script with the owner of the photo album (Alice) and the name of the photo album (pa01) as input parameters.

The server side script retrieves the RDF file containing the photo album and checks if there are any associated access control rules. It then constructs a temporary RDF file by combining the owner's FOAF profile, the metadata of the photos, and some triples created to describe the instances of AccessEvent. For example, in this scenario the following triples will be created.

:AccessEvent1 a pac:AccessEvent;
     pac:AccessPerson <http://bob.example.com/foaf.rdf#me/>;
     pac:AccessedPhoto <http://www.flickr.com/alice/photo01.jpg> .

The server side script then forwards the URLs of this file and the file containing the policies to the AIR Reasoner. The reasoner returns a response coded in N3 which indicates which of the access events are compliant with the access control rules. For example, the response from the reasoner in this case looks something like the following, as Alice has mentioned in her FOAF profile that she knows Bob.

:AccessEvent1 air:compliant-with :R .

The server side script, on receiving this response, creates a new instance of PhotoAlbum, attaches to it photos with can be accessed by Bob, and then sends the data in RDF format to the browser. Finally, Tabulator in the browser reads the data and presents Bob with the photos he is allowed to see.


Relevant Files

  1. Alice's FOAF File
  2. Bob's FOAF File
  3. Alice's Photo Album
  4. Alice's Policy
  5. RDF Data with Access Events
  6. Reasoning Result


Back to Top