org.objectweb.jonas.security.realm.web.catalina50.JACC Class Reference

Collaboration diagram for org.objectweb.jonas.security.realm.web.catalina50.JACC:

Collaboration graph
[legend]
List of all members.

Public Member Functions

String getInfo ()
String getResourceName ()
void setResourceName (String resourceName)
void setPermissionManager (PermissionManager permissionManager)
SecurityConstraint[] findSecurityConstraints (HttpRequest request, Context context)
boolean hasResourcePermission (HttpRequest request, HttpResponse response, SecurityConstraint[] constraints, Context context) throws IOException
boolean hasRole (Principal principal, String role)
boolean hasUserDataPermission (HttpRequest request, HttpResponse response, SecurityConstraint[] constraints) throws IOException
Principal authenticate (String username, String credentials)
Principal authenticate (X509Certificate[] cert)
void setContext (Context context)
synchronized void start () throws LifecycleException
synchronized void stop () throws LifecycleException
Object clone () throws CloneNotSupportedException

Protected Member Functions

String getName ()
String getPassword (String username)
Principal getPrincipal (String username)
void log (String message)

Detailed Description

Implementation of a Realm. (by a wrapper) Use any JOnAS realm by specifying the resource name This implementation manages the security with JACC specification It implements Cloneable to allow clones. Each context must have its own Realm. A realm can not be shared across different contexts or an engine. This is because each realm is associated to a permission manager

Extends the Realmbase class of the Tomcat Server.

Author:
Florent Benoit

Definition at line 73 of file JACC.java.


Member Function Documentation

Principal org.objectweb.jonas.security.realm.web.catalina50.JACC.authenticate X509Certificate[]  cert  ) 
 

Return the Principal associated with the specified chain of X509 client certificates. If there is none, return null.

Parameters:
cert Array of client certificates, with the first one in the array being the certificate of the client itself.
Returns:
the associated Principal

Definition at line 534 of file JACC.java.

References org.objectweb.jonas.security.realm.web.catalina50.JACC.authenticate().

Here is the call graph for this function:

Principal org.objectweb.jonas.security.realm.web.catalina50.JACC.authenticate String  username,
String  credentials
 

Return the Principal associated with the specified username and credentials, if there is one; otherwise return null.

Parameters:
username Username of the Principal to look up
credentials Password or other credentials to use in authenticating this username
Returns:
the principal associated

Definition at line 480 of file JACC.java.

References org.objectweb.jonas.security.realm.principals.User.getName(), org.objectweb.jonas.security.realm.principals.User.getPassword(), and org.objectweb.security.context.SecurityCurrent.setSecurityContext().

Referenced by org.objectweb.jonas.security.realm.web.catalina50.JACC.authenticate().

Here is the call graph for this function:

Object org.objectweb.jonas.security.realm.web.catalina50.JACC.clone  )  throws CloneNotSupportedException
 

Creates and returns a copy of this object.

Returns:
copy of this object.
Exceptions:
CloneNotSupportedException if the copy fails

Definition at line 638 of file JACC.java.

References org.objectweb.jonas.security.realm.web.catalina50.JACC.setResourceName().

Referenced by org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.doRegisterWar().

Here is the call graph for this function:

SecurityConstraint [] org.objectweb.jonas.security.realm.web.catalina50.JACC.findSecurityConstraints HttpRequest  request,
Context  context
 

Return the SecurityConstraints configured to guard the request URI for this request, or null if there is no such constraint.

Parameters:
request Request we are processing
context Context the Request is mapped to
Returns:
security constraints configured to guard the request URI

Definition at line 176 of file JACC.java.

String org.objectweb.jonas.security.realm.web.catalina50.JACC.getInfo  ) 
 

Return descriptive information about this Realm implementation and the corresponding version number, in the format <description>/<version>.

Returns:
the info.

Definition at line 135 of file JACC.java.

String org.objectweb.jonas.security.realm.web.catalina50.JACC.getName  )  [protected]
 

Return a short name for this Realm implementation.

Returns:
the name

Definition at line 544 of file JACC.java.

String org.objectweb.jonas.security.realm.web.catalina50.JACC.getPassword String  username  )  [protected]
 

Return the password associated with the given principal's user name.

Parameters:
username the given principal's user name.
Returns:
the password associated.

Definition at line 554 of file JACC.java.

Principal org.objectweb.jonas.security.realm.web.catalina50.JACC.getPrincipal String  username  )  [protected]
 

Return the Principal associated with the given user name.

Parameters:
username the given principal's user name.
Returns:
the Principal associated

Definition at line 564 of file JACC.java.

String org.objectweb.jonas.security.realm.web.catalina50.JACC.getResourceName  ) 
 

Return the resource name we will be using.

Returns:
the resource name.

Definition at line 144 of file JACC.java.

boolean org.objectweb.jonas.security.realm.web.catalina50.JACC.hasResourcePermission HttpRequest  request,
HttpResponse  response,
SecurityConstraint[]  constraints,
Context  context
throws IOException
 

Perform access control based on the specified authorization constraint.

Returns:
true if this constraint is satisfied and processing should continue, or false otherwise.
Parameters:
request Request we are processing
response Response we are creating
constraints Security constraint we are enforcing
context The Context to which client of this class is attached.
Exceptions:
IOException if an input/output error occurs

Definition at line 194 of file JACC.java.

References org.objectweb.jonas.security.realm.web.catalina50.JACC.hasResourcePermission().

Referenced by org.objectweb.jonas.security.realm.web.catalina50.JACC.hasResourcePermission().

Here is the call graph for this function:

boolean org.objectweb.jonas.security.realm.web.catalina50.JACC.hasRole Principal  principal,
String  role
 

Returns:
true if the specified Principal has the specified security role, within the context of this Realm; otherwise return false. This method can be overridden by Realm implementations, but the default is adequate when an instance of GenericPrincipal is used to represent authenticated Principals from this Realm.
Parameters:
principal Principal for whom the role is to be checked
role Security role to be checked

Definition at line 268 of file JACC.java.

References org.objectweb.jonas.security.realm.web.catalina50.JACC.hasRole().

Referenced by org.objectweb.jonas.security.realm.web.catalina50.JACC.hasRole().

Here is the call graph for this function:

boolean org.objectweb.jonas.security.realm.web.catalina50.JACC.hasUserDataPermission HttpRequest  request,
HttpResponse  response,
SecurityConstraint[]  constraints
throws IOException
 

Enforce any user data constraint required by the security constraint guarding this request URI.

Returns:
true if this constraint was not violated and processing should continue, or false if we have created a response already.
Parameters:
request Request we are processing
response Response we are creating
constraints Security constraints being checked
Exceptions:
IOException if an input/output error occurs

Definition at line 377 of file JACC.java.

References org.objectweb.jonas.security.realm.web.catalina50.JACC.hasUserDataPermission().

Referenced by org.objectweb.jonas.security.realm.web.catalina50.JACC.hasUserDataPermission().

Here is the call graph for this function:

void org.objectweb.jonas.security.realm.web.catalina50.JACC.log String  message  )  [protected]
 

Log a message on the Logger associated with our Container (if any)

Parameters:
message Message to be logged

Definition at line 628 of file JACC.java.

Referenced by org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.doRegisterWar().

void org.objectweb.jonas.security.realm.web.catalina50.JACC.setContext Context  context  ) 
 

Set the context of this Realm. This is used to retrieve xml information of the web.xml file

Parameters:
context Context for this realm

Definition at line 574 of file JACC.java.

Referenced by org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.doRegisterWar().

void org.objectweb.jonas.security.realm.web.catalina50.JACC.setPermissionManager PermissionManager  permissionManager  ) 
 

Set the permission manager used by this realm

Parameters:
permissionManager the permission manager to use

Definition at line 163 of file JACC.java.

Referenced by org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.doRegisterWar().

void org.objectweb.jonas.security.realm.web.catalina50.JACC.setResourceName String  resourceName  ) 
 

Set the resource name we will be using.

Parameters:
resourceName The new resource name

Definition at line 153 of file JACC.java.

Referenced by org.objectweb.jonas.security.realm.web.catalina50.JACC.clone().

synchronized void org.objectweb.jonas.security.realm.web.catalina50.JACC.start  )  throws LifecycleException
 

Prepare for active use of the public methods of this Component.

Exceptions:
LifecycleException if this component detects a fatal error that prevents it from being started

Definition at line 584 of file JACC.java.

References org.objectweb.jonas.security.SecurityService.getJResource().

Here is the call graph for this function:

synchronized void org.objectweb.jonas.security.realm.web.catalina50.JACC.stop  )  throws LifecycleException
 

Gracefully shut down active use of the public methods of this Component.

Exceptions:
LifecycleException if this component detects a fatal error that needs to be reported

Definition at line 615 of file JACC.java.


The documentation for this class was generated from the following file:
Generated on Tue Feb 15 15:07:58 2005 for JOnAS by  doxygen 1.3.9.1