[foaf-protocols] ANN: RDF::ACL - access control lists for the semantic web
Peter Williams
home_pw at msn.com
Wed Jan 27 01:41:48 CET 2010
Any change of making that into a service, so I can call it (remotely)?
I've added Microsoft's provider model for (role based) access control to my
FOAF+SSL demonstrator. Rather than learn perl or learn to wrap a perl
process in that provider API, I'd rather just call the services remotely...
-----Original Message-----
From: foaf-protocols-bounces at lists.foaf-project.org
[mailto:foaf-protocols-bounces at lists.foaf-project.org] On Behalf Of Toby
Inkster
Sent: Tuesday, January 26, 2010 6:41 AM
To: foaf-protocols at lists.foaf-project.org; dev
Subject: [foaf-protocols] ANN: RDF::ACL - access control lists for the
semantic web
http://search.cpan.org/dist/RDF-ACL/
(Uploaded 15 minutes ago, but may take a while to appear.)
The RDF::ACL Perl module implements access control lists using the ACL
vocab <http://www.w3.org/ns/auth/acl>. It works quite nicely with my
FOAF+SSL module; something like this...
### First you load up your access control list:
my $acl = RDF::ACL->new('acl.turtle');
# Or even... $acl = RDF::ACL->new('http://example.com/sparql');
### Then you need to authenticate your user.
### Using FOAF+SSL is a sensible method:
my $webid = 'http://example.net/anon#me'; # default
my $authentication = CGI::Auth::FOAF_SSL->new_from_cgi( CGI->new );
if ($authentication->is_secure)
{
$webid = $authentication->agent->identity;
}
### Then, let's assume they're trying to access
### <https://example.com/private/document>
my $document = 'https://example.com/private/document';
if ( $acl->check($webid,$document,'read') )
{
# output document
}
else
{
# output error message
}
--
Toby A Inkster
<mailto:mail at tobyinkster.co.uk>
<http://tobyinkster.co.uk>
_______________________________________________
foaf-protocols mailing list
foaf-protocols at lists.foaf-project.org
http://lists.foaf-project.org/mailman/listinfo/foaf-protocols
More information about the Dev
mailing list