org.apache.directory.server.core.authz
Class DefaultAuthorizationInterceptor

java.lang.Object
  extended by org.apache.directory.server.core.interceptor.BaseInterceptor
      extended by org.apache.directory.server.core.authz.DefaultAuthorizationInterceptor
All Implemented Interfaces:
Interceptor

public class DefaultAuthorizationInterceptor
extends BaseInterceptor

An Interceptor that controls access to PartitionNexus. If a user tries to perform any operations that requires permission he or she doesn't have, NoPermissionException will be thrown and therefore the current invocation chain will terminate.

Version:
$Rev: 690042 $, $Date: 2008-08-29 01:14:21 +0200 (Fr, 29 Aug 2008) $
Author:
Apache Directory Project
'XBean'

Constructor Summary
DefaultAuthorizationInterceptor()
          Creates a new instance.
 
Method Summary
 void delete(NextInterceptor nextInterceptor, DeleteOperationContext opContext)
          Filters Partition.delete( DeleteOperationContext ) call.
 void init(DirectoryService directoryService)
          This method does nothing by default.
 EntryFilteringCursor list(NextInterceptor nextInterceptor, ListOperationContext opContext)
          Filters Partition.list( ListOperationContext ) call.
 ClonedServerEntry lookup(NextInterceptor nextInterceptor, LookupOperationContext opContext)
          Filters Partition.lookup( LookupOperationContext ) call.
 void modify(NextInterceptor nextInterceptor, ModifyOperationContext opContext)
          This policy needs to be really tight too because some attributes may take part in giving the user permissions to protected resources.
 void move(NextInterceptor nextInterceptor, MoveOperationContext opContext)
          Filters Partition.move( MoveOperationContext ) call.
 void moveAndRename(NextInterceptor nextInterceptor, MoveAndRenameOperationContext opContext)
          Filters Partition.moveAndRename( MoveAndRenameOperationContext) call.
 void rename(NextInterceptor nextInterceptor, RenameOperationContext opContext)
          Filters Partition.rename( RenameOperationContext ) call.
 EntryFilteringCursor search(NextInterceptor nextInterceptor, SearchOperationContext opContext)
          Filters Partition.search( SearchOperationContext ) call.
 
Methods inherited from class org.apache.directory.server.core.interceptor.BaseInterceptor
add, addContextPartition, bind, compare, destroy, getContext, getMatchedName, getName, getPrincipal, getRootDSE, getSuffix, hasEntry, listSuffixes, removeContextPartition, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAuthorizationInterceptor

public DefaultAuthorizationInterceptor()
Creates a new instance.

Method Detail

init

public void init(DirectoryService directoryService)
          throws java.lang.Exception
Description copied from class: BaseInterceptor
This method does nothing by default.

Specified by:
init in interface Interceptor
Overrides:
init in class BaseInterceptor
Throws:
java.lang.Exception

delete

public void delete(NextInterceptor nextInterceptor,
                   DeleteOperationContext opContext)
            throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.delete( DeleteOperationContext ) call.

Specified by:
delete in interface Interceptor
Overrides:
delete in class BaseInterceptor
Throws:
java.lang.Exception

modify

public void modify(NextInterceptor nextInterceptor,
                   ModifyOperationContext opContext)
            throws java.lang.Exception
This policy needs to be really tight too because some attributes may take part in giving the user permissions to protected resources. We do not want users to self access these resources. As far as we're concerned no one but the admin needs access.

Specified by:
modify in interface Interceptor
Overrides:
modify in class BaseInterceptor
Throws:
java.lang.Exception

rename

public void rename(NextInterceptor nextInterceptor,
                   RenameOperationContext opContext)
            throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.rename( RenameOperationContext ) call.

Specified by:
rename in interface Interceptor
Overrides:
rename in class BaseInterceptor
Throws:
java.lang.Exception

move

public void move(NextInterceptor nextInterceptor,
                 MoveOperationContext opContext)
          throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.move( MoveOperationContext ) call.

Specified by:
move in interface Interceptor
Overrides:
move in class BaseInterceptor
Throws:
java.lang.Exception

moveAndRename

public void moveAndRename(NextInterceptor nextInterceptor,
                          MoveAndRenameOperationContext opContext)
                   throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.moveAndRename( MoveAndRenameOperationContext) call.

Specified by:
moveAndRename in interface Interceptor
Overrides:
moveAndRename in class BaseInterceptor
Throws:
java.lang.Exception

lookup

public ClonedServerEntry lookup(NextInterceptor nextInterceptor,
                                LookupOperationContext opContext)
                         throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.lookup( LookupOperationContext ) call.

Specified by:
lookup in interface Interceptor
Overrides:
lookup in class BaseInterceptor
Throws:
java.lang.Exception

search

public EntryFilteringCursor search(NextInterceptor nextInterceptor,
                                   SearchOperationContext opContext)
                            throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.search( SearchOperationContext ) call.

Specified by:
search in interface Interceptor
Overrides:
search in class BaseInterceptor
Throws:
java.lang.Exception

list

public EntryFilteringCursor list(NextInterceptor nextInterceptor,
                                 ListOperationContext opContext)
                          throws java.lang.Exception
Description copied from interface: Interceptor
Filters Partition.list( ListOperationContext ) call.

Specified by:
list in interface Interceptor
Overrides:
list in class BaseInterceptor
Throws:
java.lang.Exception


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.