net.larsan.norna.service.user
Interface UserHandle

All Superinterfaces:
ServiceHandle

public interface UserHandle
extends ServiceHandle

The user service is intended as a thin layer on top of the JAAS specification. In particular the User service allows participating services to specify dynamic priviliges for authenticated Subjects.

Services whishing to take part of this service implements a LoginListener interface that will allow them to be informed when a Subject is authenticated.

All methods in this interface is subject to a security check using the UserPermission permission when they are called.

For service that can only verify indirect passwords (for example, hashed SASL services) the user service offers verification through indirection. The indirection object will then be used to verify the password through possible transformations. The indirections are available through an indirection factory.

The norna user service has a fixed Namespace ID, "/norna/users", which is also a static identifier in this class.

Version:
Alpha-0.2 / 2002-10-06 21:37
Author:
Lars J. Nilsson
See Also:
Authenticator, LoginEvent

Field Summary
static java.lang.String NAMESPACE_ID
          The fixed namespace ID, "/norna/users"
 
Method Summary
 Authenticator getAuthenticator(java.lang.String user)
          Get an authenicator interface for a user.
 Authenticator getAuthenticator(java.lang.String user, Indirection ind)
          Get an authentication that works by indirection.
 IndirectionFactory getIndirectionFactory()
          Get the indirection factory for the service.
 
Methods inherited from interface net.larsan.norna.base.ServiceHandle
getStatus
 

Field Detail

NAMESPACE_ID

public static final java.lang.String NAMESPACE_ID
The fixed namespace ID, "/norna/users"

See Also:
Constant Field Values
Method Detail

getAuthenticator

public Authenticator getAuthenticator(java.lang.String user)
                               throws NoSuchUserException,
                                      java.lang.SecurityException
Get an authenicator interface for a user. The authenticator will be used to validate the user and optionally to fire login events to a coosen set of listeners.

Parameters:
user - User to authenicate
Returns:
An Authenticator for the user
Throws:
NoSuchUserException - If the user name does not exist
java.lang.SecurityException - If the caller does not have permission to access this method

getAuthenticator

public Authenticator getAuthenticator(java.lang.String user,
                                      Indirection ind)
                               throws NoSuchUserException,
                                      IndirectionUnavailableException,
                                      java.lang.SecurityException
Get an authentication that works by indirection. This might fail immediately if the user service knows that indirection is not supported.

Parameters:
user - User to authenticate
ind - Indirection to use
Returns:
An Authenticator for the user
Throws:
NoSuchUserException - If the user name does not exist
IndirectionUnavailableException - If indirection is not available
java.lang.SecurityException - If the caller does not have permission to access this method

getIndirectionFactory

public IndirectionFactory getIndirectionFactory()
Get the indirection factory for the service. This factory can create new idnirection object to use for indirect authentications.

Returns:
The user service indirection factory