<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="http://toubsen.de/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://toubsen.de/feed.php">
        <title>toubsen.de appfuse:acls</title>
        <description></description>
        <link>http://toubsen.de/</link>
        <image rdf:resource="http://toubsen.de/lib/images/favicon.ico" />
       <dc:date>2010-09-05T23:48:47+02:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://toubsen.de/appfuse/acls/acl-performance?rev=1190506144&amp;do=diff"/>
                <rdf:li rdf:resource="http://toubsen.de/appfuse/acls/change-personmanager?rev=1190506228&amp;do=diff"/>
                <rdf:li rdf:resource="http://toubsen.de/appfuse/acls/change-references?rev=1267382205&amp;do=diff"/>
                <rdf:li rdf:resource="http://toubsen.de/appfuse/acls/how-to-use-acls?rev=1267382205&amp;do=diff"/>
                <rdf:li rdf:resource="http://toubsen.de/appfuse/acls/new-acegi-managers?rev=1190506834&amp;do=diff"/>
                <rdf:li rdf:resource="http://toubsen.de/appfuse/acls/new-daos?rev=1267382205&amp;do=diff"/>
                <rdf:li rdf:resource="http://toubsen.de/appfuse/acls/new-managers?rev=1267382205&amp;do=diff"/>
                <rdf:li rdf:resource="http://toubsen.de/appfuse/acls/new-models?rev=1267382205&amp;do=diff"/>
                <rdf:li rdf:resource="http://toubsen.de/appfuse/acls/start?rev=1267382205&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://toubsen.de/lib/images/favicon.ico">
        <title>toubsen.de</title>
        <link>http://toubsen.de/</link>
        <url>http://toubsen.de/lib/images/favicon.ico</url>
    </image>
    <item rdf:about="http://toubsen.de/appfuse/acls/acl-performance?rev=1190506144&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2007-09-23T02:09:04+02:00</dc:date>
        <title>appfuse:acls:acl-performance</title>
        <link>http://toubsen.de/appfuse/acls/acl-performance?rev=1190506144&amp;do=diff</link>
        <description>Finally some performance considerations when using ACLs.

Fundamental rules

ACLs get read for each single object - for this reason the number of accesses to an ACL-secured object should be minimized as far as possible. A good idea might be, to apply ACLs only to the top level of your object hierarchy, and allow access to the child objects only through a secured parent object. ACLs will only perform well for a narrow number of objects, above this limit the application will perform very badly.</description>
    </item>
    <item rdf:about="http://toubsen.de/appfuse/acls/change-personmanager?rev=1190506228&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2007-09-23T02:10:28+02:00</dc:date>
        <title>appfuse:acls:change-personmanager</title>
        <link>http://toubsen.de/appfuse/acls/change-personmanager?rev=1190506228&amp;do=diff</link>
        <description>To use the ACL capabilities for an object, the manager for this object has to be changed, too. It has to take care of creating ACLs for a new object, as well as deleting them if an existing object gets deleted.

Reference AclManager in the PersonManager

For the PersonManager to be able to change ACLs, it needs a reference to the ACL-manager. This results in the following method definition:</description>
    </item>
    <item rdf:about="http://toubsen.de/appfuse/acls/change-references?rev=1267382205&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-02-28T19:36:45+02:00</dc:date>
        <title>appfuse:acls:change-references</title>
        <link>http://toubsen.de/appfuse/acls/change-references?rev=1267382205&amp;do=diff</link>
        <description>For using the new secure manager, the references in the config files have to be changed. Basically, there are two possibilities:

Rename the basic manager

Change the name of the PersonManager from 'personManager' to something like 'personManagerInsecure'. Then the value of the 'ref'-Attribute of the 'personManagerSecure' has to be changed as well.</description>
    </item>
    <item rdf:about="http://toubsen.de/appfuse/acls/how-to-use-acls?rev=1267382205&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-02-28T19:36:45+02:00</dc:date>
        <title>appfuse:acls:how-to-use-acls</title>
        <link>http://toubsen.de/appfuse/acls/how-to-use-acls?rev=1267382205&amp;do=diff</link>
        <description>This page contains some hints on how to use ACLs in an application.


Values for permissions

The permissions get defined as a bit mask, the single bits representing the following permissions:
 permission  value  ADMINISTRATION  1  READ  2  WRITE  4  CREATE  8  DELETE  16 

To assign multiple permissions, the values have to be combined with a logical OR.</description>
    </item>
    <item rdf:about="http://toubsen.de/appfuse/acls/new-acegi-managers?rev=1190506834&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2007-09-23T02:20:34+02:00</dc:date>
        <title>appfuse:acls:new-acegi-managers</title>
        <link>http://toubsen.de/appfuse/acls/new-acegi-managers?rev=1190506834&amp;do=diff</link>
        <description>To hook Acegi to the secure objects, some beans have to be defined. The bean-definitions are added to 'src/main/webapp/WEB-INF/security.xml'.

Secure PersonManager

The first bean to define is a secure instance of the PersonManager, which gets secured by the acegi ACLs:</description>
    </item>
    <item rdf:about="http://toubsen.de/appfuse/acls/new-daos?rev=1267382205&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-02-28T19:36:45+02:00</dc:date>
        <title>appfuse:acls:new-daos</title>
        <link>http://toubsen.de/appfuse/acls/new-daos?rev=1267382205&amp;do=diff</link>
        <description>After defining the domain classes, we also want some DAOs to persist and delete ACLs.

New Interfaces

BasicAclObjectIdentityDao


package org.appfuse.dao;
 
import org.appfuse.model.acl.BasicAclObjectIdentity;
 
public interface BasicAclObjectIdentityDao extends GenericDao&lt;BasicAclObjectIdentity, Long&gt; {
 
	/**
	 * Saves a object identity to persistent storage
	 * 
	 * @param basicAclObjectIdentity Identity to save
	 */
	public void saveBasicAclObjectIdentity(BasicAclObjectIdentity basicAclObje…</description>
    </item>
    <item rdf:about="http://toubsen.de/appfuse/acls/new-managers?rev=1267382205&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-02-28T19:36:45+02:00</dc:date>
        <title>appfuse:acls:new-managers</title>
        <link>http://toubsen.de/appfuse/acls/new-managers?rev=1267382205&amp;do=diff</link>
        <description>For creating/changing/deleting ACLs from business code (e.g. allowing a user to modify ACLs of his objects), a manager is also needed. 

Interface


package org.appfuse.service;
 
import java.io.Serializable;
import java.util.List;
 
import org.acegisecurity.Authentication;
import org.acegisecurity.acl.AclProvider;
import org.appfuse.model.acl.BaseObjectAclAware;
import org.appfuse.model.acl.BasicAclObjectIdentity;
import org.appfuse.model.acl.BasicAclPermission;
 
public interface BasicAclProvi…</description>
    </item>
    <item rdf:about="http://toubsen.de/appfuse/acls/new-models?rev=1267382205&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-02-28T19:36:45+02:00</dc:date>
        <title>appfuse:acls:new-models</title>
        <link>http://toubsen.de/appfuse/acls/new-models?rev=1267382205&amp;do=diff</link>
        <description>To work with ACLs, we need some new domain objects.

Base class for secured objects

The class BaseObjectAclAware serves as a base class for all domain objects, we want to secure.



package org.appfuse.model.acl;
 
import java.io.Serializable;
 
import org.appfuse.model.BaseObject;
 
/**
 * Base object for all ACL aware model objects
 */
public abstract class BaseObjectAclAware extends BaseObject {
 
  /**
   * This methods returns the unique key of the object (the primary key)
   * 
   * @retu…</description>
    </item>
    <item rdf:about="http://toubsen.de/appfuse/acls/start?rev=1267382205&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2010-02-28T19:36:45+02:00</dc:date>
        <title>appfuse:acls:start</title>
        <link>http://toubsen.de/appfuse/acls/start?rev=1267382205&amp;do=diff</link>
        <description>The pages listed below describe, how to integrate domain based security into your application by the use of the Acegi ACL package. This Howto was mainly written by Peter Schneider-Manzell for AppFuse-1.9.x. I ported it over to AppFuse-2 and made some minor modifications to make it work again with the current APIs.</description>
    </item>
</rdf:RDF>
