org.apache.ldap.server.authz
Class AuthorizationService

java.lang.Object
  extended by org.apache.ldap.server.interceptor.BaseInterceptor
      extended by org.apache.ldap.server.authz.AuthorizationService
All Implemented Interfaces:
Interceptor

public class AuthorizationService
extends BaseInterceptor

An ACI based authorization service.

Version:
$Rev: 327983 $
Author:
Apache Directory Project

Field Summary
static javax.naming.directory.SearchControls DEFUALT_SEARCH_CONTROLS
           
 
Constructor Summary
AuthorizationService()
           
 
Method Summary
 void add(NextInterceptor next, java.lang.String upName, javax.naming.Name normName, javax.naming.directory.Attributes entry)
          Filters DirectoryPartition.add(String, Name, Attributes) call.
 void cacheNewGroup(java.lang.String upName, javax.naming.Name normName, javax.naming.directory.Attributes entry)
           
 boolean compare(NextInterceptor next, javax.naming.Name name, java.lang.String oid, java.lang.Object value)
          Filters DirectoryPartitionNexus.compare(Name,String,Object) call.
 void delete(NextInterceptor next, javax.naming.Name name)
          Filters DirectoryPartition.delete(Name) call.
 javax.naming.Name getMatchedName(NextInterceptor next, javax.naming.Name dn, boolean normalized)
          Filters DirectoryPartitionNexus.getMatchedName(Name, boolean) call.
 boolean hasEntry(NextInterceptor next, javax.naming.Name name)
          Filters DirectoryPartition.lookup(Name, String[]) call.
 void init(DirectoryServiceConfiguration factoryCfg, InterceptorConfiguration cfg)
          Initializes this interceptor based service by getting a handle on the nexus, setting up the tupe and group membership caches and the ACIItem parser and the ACDF engine.
 javax.naming.NamingEnumeration list(NextInterceptor next, javax.naming.Name base)
          Filters DirectoryPartition.list(Name) call.
 javax.naming.directory.Attributes lookup(NextInterceptor next, javax.naming.Name name)
          Filters DirectoryPartition.lookup(Name) call.
 javax.naming.directory.Attributes lookup(NextInterceptor next, javax.naming.Name dn, java.lang.String[] attrIds)
          Filters DirectoryPartition.lookup(Name, String[]) call.
 void modify(NextInterceptor next, javax.naming.Name name, int modOp, javax.naming.directory.Attributes mods)
          Filters DirectoryPartition.modify(Name, int, Attributes) call.
 void modify(NextInterceptor next, javax.naming.Name name, javax.naming.directory.ModificationItem[] mods)
          Filters DirectoryPartition.modify(Name, ModificationItem[]) call.
 void modifyRn(NextInterceptor next, javax.naming.Name name, java.lang.String newRn, boolean deleteOldRn)
          Filters DirectoryPartition.modifyRn(Name, String, boolean) call.
 void move(NextInterceptor next, javax.naming.Name oriChildName, javax.naming.Name newParentName)
          Filters DirectoryPartition.move(Name, Name) call.
 void move(NextInterceptor next, javax.naming.Name oriChildName, javax.naming.Name newParentName, java.lang.String newRn, boolean deleteOldRn)
          Filters DirectoryPartition.move(Name, Name, String, boolean) call.
 javax.naming.NamingEnumeration search(NextInterceptor next, javax.naming.Name base, java.util.Map env, org.apache.ldap.common.filter.ExprNode filter, javax.naming.directory.SearchControls searchCtls)
          Filters DirectoryPartition.search(Name, Map, ExprNode, SearchControls) call.
 
Methods inherited from class org.apache.ldap.server.interceptor.BaseInterceptor
addContextPartition, destroy, getContext, getPrincipal, getRootDSE, getSuffix, isSuffix, listSuffixes, removeContextPartition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFUALT_SEARCH_CONTROLS

public static final javax.naming.directory.SearchControls DEFUALT_SEARCH_CONTROLS
Constructor Detail

AuthorizationService

public AuthorizationService()
Method Detail

init

public void init(DirectoryServiceConfiguration factoryCfg,
                 InterceptorConfiguration cfg)
          throws javax.naming.NamingException
Initializes this interceptor based service by getting a handle on the nexus, setting up the tupe and group membership caches and the ACIItem parser and the ACDF engine.

Specified by:
init in interface Interceptor
Overrides:
init in class BaseInterceptor
Parameters:
factoryCfg - the ContextFactory configuration for the server
cfg - the interceptor configuration
Throws:
javax.naming.NamingException - if there are problems during initialization

add

public void add(NextInterceptor next,
                java.lang.String upName,
                javax.naming.Name normName,
                javax.naming.directory.Attributes entry)
         throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.add(String, Name, Attributes) call.

Specified by:
add in interface Interceptor
Overrides:
add in class BaseInterceptor
Throws:
javax.naming.NamingException

delete

public void delete(NextInterceptor next,
                   javax.naming.Name name)
            throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.delete(Name) call.

Specified by:
delete in interface Interceptor
Overrides:
delete in class BaseInterceptor
Throws:
javax.naming.NamingException

modify

public void modify(NextInterceptor next,
                   javax.naming.Name name,
                   int modOp,
                   javax.naming.directory.Attributes mods)
            throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.modify(Name, int, Attributes) call.

Specified by:
modify in interface Interceptor
Overrides:
modify in class BaseInterceptor
Throws:
javax.naming.NamingException

modify

public void modify(NextInterceptor next,
                   javax.naming.Name name,
                   javax.naming.directory.ModificationItem[] mods)
            throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.modify(Name, ModificationItem[]) call.

Specified by:
modify in interface Interceptor
Overrides:
modify in class BaseInterceptor
Throws:
javax.naming.NamingException

hasEntry

public boolean hasEntry(NextInterceptor next,
                        javax.naming.Name name)
                 throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.lookup(Name, String[]) call.

Specified by:
hasEntry in interface Interceptor
Overrides:
hasEntry in class BaseInterceptor
Throws:
javax.naming.NamingException

lookup

public javax.naming.directory.Attributes lookup(NextInterceptor next,
                                                javax.naming.Name dn,
                                                java.lang.String[] attrIds)
                                         throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.lookup(Name, String[]) call.

Specified by:
lookup in interface Interceptor
Overrides:
lookup in class BaseInterceptor
Throws:
javax.naming.NamingException

lookup

public javax.naming.directory.Attributes lookup(NextInterceptor next,
                                                javax.naming.Name name)
                                         throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.lookup(Name) call.

Specified by:
lookup in interface Interceptor
Overrides:
lookup in class BaseInterceptor
Throws:
javax.naming.NamingException

modifyRn

public void modifyRn(NextInterceptor next,
                     javax.naming.Name name,
                     java.lang.String newRn,
                     boolean deleteOldRn)
              throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.modifyRn(Name, String, boolean) call.

Specified by:
modifyRn in interface Interceptor
Overrides:
modifyRn in class BaseInterceptor
Throws:
javax.naming.NamingException

move

public void move(NextInterceptor next,
                 javax.naming.Name oriChildName,
                 javax.naming.Name newParentName,
                 java.lang.String newRn,
                 boolean deleteOldRn)
          throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.move(Name, Name, String, boolean) call.

Specified by:
move in interface Interceptor
Overrides:
move in class BaseInterceptor
Throws:
javax.naming.NamingException

move

public void move(NextInterceptor next,
                 javax.naming.Name oriChildName,
                 javax.naming.Name newParentName)
          throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.move(Name, Name) call.

Specified by:
move in interface Interceptor
Overrides:
move in class BaseInterceptor
Throws:
javax.naming.NamingException

list

public javax.naming.NamingEnumeration list(NextInterceptor next,
                                           javax.naming.Name base)
                                    throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.list(Name) call.

Specified by:
list in interface Interceptor
Overrides:
list in class BaseInterceptor
Throws:
javax.naming.NamingException

search

public javax.naming.NamingEnumeration search(NextInterceptor next,
                                             javax.naming.Name base,
                                             java.util.Map env,
                                             org.apache.ldap.common.filter.ExprNode filter,
                                             javax.naming.directory.SearchControls searchCtls)
                                      throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartition.search(Name, Map, ExprNode, SearchControls) call.

Specified by:
search in interface Interceptor
Overrides:
search in class BaseInterceptor
Throws:
javax.naming.NamingException

compare

public boolean compare(NextInterceptor next,
                       javax.naming.Name name,
                       java.lang.String oid,
                       java.lang.Object value)
                throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartitionNexus.compare(Name,String,Object) call.

Specified by:
compare in interface Interceptor
Overrides:
compare in class BaseInterceptor
Throws:
javax.naming.NamingException

getMatchedName

public javax.naming.Name getMatchedName(NextInterceptor next,
                                        javax.naming.Name dn,
                                        boolean normalized)
                                 throws javax.naming.NamingException
Description copied from interface: Interceptor
Filters DirectoryPartitionNexus.getMatchedName(Name, boolean) call.

Specified by:
getMatchedName in interface Interceptor
Overrides:
getMatchedName in class BaseInterceptor
Throws:
javax.naming.NamingException

cacheNewGroup

public void cacheNewGroup(java.lang.String upName,
                          javax.naming.Name normName,
                          javax.naming.directory.Attributes entry)
                   throws javax.naming.NamingException
Throws:
javax.naming.NamingException