org.objectweb.security.context.SecurityContext Class Reference

List of all members.

Public Member Functions

 SecurityContext ()
 SecurityContext (String principalName, String[] roles)
 SecurityContext (String principalName, ArrayList arrayRoles)
 SecurityContext (String principalName)
Principal getCallerPrincipal (boolean inRunAs)
String[] getCallerPrincipalRoles (boolean inRunAs)
void pushRunAsRole (String role)
void pushRunAsPrincipal (String principalName, String[] roles)
void popRunAs ()
String peekRunAsRole ()
String peekRunAsPrincipal ()
String peekLastRunAsPrincipal ()
String[] peekRunAsPrincipalRoles ()
String[] peekLastRunAsPrincipalRoles ()
ArrayList getRunAsRoleStack ()
ArrayList getRunAsPrincipalRolesStack ()
ArrayList getRunAsPrincipalStack ()
String toString ()
String getPrincipalName ()

Protected Member Functions

 SecurityContext (String principalName, ArrayList arrayRoles, ArrayList arrayRunas, ArrayList arrayRunasPrincipal, ArrayList arrayRunasPrincipalRoles)
String getPrincipalName (boolean runningRunAs)
String[] getRoles ()

Detailed Description

Implementation of the JOnAS Security Context CAUTION: Don't forget to modify the Marshalling class of this package used for IIOP protocol
Author:
Jeff Mesnil (initial developer)

Florent Benoit

Definition at line 44 of file SecurityContext.java.


Constructor & Destructor Documentation

org.objectweb.security.context.SecurityContext.SecurityContext  ) 
 

Constructor SecurityContext use the default principal name

Definition at line 76 of file SecurityContext.java.

org.objectweb.security.context.SecurityContext.SecurityContext String  principalName,
String[]  roles
 

Constructor SecurityContext

Parameters:
principalName principal name
roles the roles of the principal

Definition at line 85 of file SecurityContext.java.

org.objectweb.security.context.SecurityContext.SecurityContext String  principalName,
ArrayList  arrayRoles
 

Constructor SecurityContext

Parameters:
principalName principal name
arrayRoles the list of the roles of the principal

Definition at line 95 of file SecurityContext.java.

org.objectweb.security.context.SecurityContext.SecurityContext String  principalName,
ArrayList  arrayRoles,
ArrayList  arrayRunas,
ArrayList  arrayRunasPrincipal,
ArrayList  arrayRunasPrincipalRoles
[protected]
 

Constructor SecurityContext

Parameters:
principalName principal name
arrayRoles the list of the roles of the principal
arrayRunas the RunAs stack
arrayRunasPrincipal the RunAs stack for principal of runAs
arrayRunasPrincipalRoles the RunAs stack for roles of the principal

Definition at line 108 of file SecurityContext.java.

org.objectweb.security.context.SecurityContext.SecurityContext String  principalName  ) 
 

Constructor SecurityContext

Parameters:
principalName principal name

Definition at line 133 of file SecurityContext.java.


Member Function Documentation

Principal org.objectweb.security.context.SecurityContext.getCallerPrincipal boolean  inRunAs  ) 
 

Method getCallerPrincipal

Parameters:
inRunAs is the caller is in a runAs case in RunAs mode this function must return the caller of the bean and not the run as identity (EJB 2.1 chapter21.2.5.1)
Returns:
the Principal in the Security Context

Definition at line 145 of file SecurityContext.java.

Referenced by org.objectweb.jonas.container.PrincipalFactoryImpl.getCallerPrincipal(), org.objectweb.jonas.security.jacc.JPolicyContextHandlerData.getContainerSubject(), and org.objectweb.jonas.security.iiop.SecurityContextHelper.getIdentityToken().

String [] org.objectweb.security.context.SecurityContext.getCallerPrincipalRoles boolean  inRunAs  ) 
 

Return the roles of the principal

Parameters:
inRunAs caller is in run-as bean ?
Returns:
roles of this principal

Definition at line 154 of file SecurityContext.java.

References org.objectweb.security.context.SecurityContext.peekLastRunAsPrincipalRoles(), and org.objectweb.security.context.SecurityContext.peekRunAsPrincipalRoles().

Referenced by org.objectweb.jonas_ejb.container.PermissionManager.checkSecurity(), and org.objectweb.jonas_ejb.container.PermissionManager.isCallerInRole().

Here is the call graph for this function:

String org.objectweb.security.context.SecurityContext.getPrincipalName  ) 
 

Returns:
the principal Name.

Definition at line 342 of file SecurityContext.java.

Referenced by org.objectweb.security.context.SecurityContext.InternalPrincipal.equals(), org.objectweb.security.context.SecurityContext.InternalPrincipal.getName(), org.objectweb.security.context.SecurityContext.InternalPrincipal.hashCode(), and org.objectweb.security.context.SecurityContext.InternalPrincipal.toString().

String org.objectweb.security.context.SecurityContext.getPrincipalName boolean  runningRunAs  )  [protected]
 

Parameters:
runningRunAs bean is currently running with run-as enabled
Returns:
the principal name.

Definition at line 325 of file SecurityContext.java.

References org.objectweb.security.context.SecurityContext.peekLastRunAsPrincipal(), and org.objectweb.security.context.SecurityContext.peekRunAsPrincipal().

Referenced by org.objectweb.jonas.security.iiop.SecurityContextHelper.getInitialContextToken(), and org.objectweb.security.context.Marshalling.marshallSecurityContext().

Here is the call graph for this function:

String [] org.objectweb.security.context.SecurityContext.getRoles  )  [protected]
 

Returns:
the roles.

Definition at line 349 of file SecurityContext.java.

Referenced by org.objectweb.security.context.Marshalling.marshallSecurityContext().

ArrayList org.objectweb.security.context.SecurityContext.getRunAsPrincipalRolesStack  ) 
 

Gets the stack which manages the roles of the current run-as principal

Returns:
the stack which manages the roles of the current run-as principal

Definition at line 282 of file SecurityContext.java.

Referenced by org.objectweb.security.context.Marshalling.marshallSecurityContext(), org.objectweb.security.context.SecurityContext.peekLastRunAsPrincipalRoles(), org.objectweb.security.context.SecurityContext.peekRunAsPrincipalRoles(), org.objectweb.security.context.SecurityContext.popRunAs(), and org.objectweb.security.context.SecurityContext.pushRunAsPrincipal().

ArrayList org.objectweb.security.context.SecurityContext.getRunAsPrincipalStack  ) 
 

Gets the stack which manages the run-as principal

Returns:
the stack which manages the run-as principal

Definition at line 293 of file SecurityContext.java.

Referenced by org.objectweb.security.context.Marshalling.marshallSecurityContext(), org.objectweb.security.context.SecurityContext.peekLastRunAsPrincipal(), org.objectweb.security.context.SecurityContext.peekRunAsPrincipal(), org.objectweb.security.context.SecurityContext.popRunAs(), and org.objectweb.security.context.SecurityContext.pushRunAsPrincipal().

ArrayList org.objectweb.security.context.SecurityContext.getRunAsRoleStack  ) 
 

Gets the stack which manages the run-as

Returns:
the stack which manages the run-as

Definition at line 271 of file SecurityContext.java.

Referenced by org.objectweb.security.context.Marshalling.marshallSecurityContext(), org.objectweb.security.context.SecurityContext.peekRunAsRole(), org.objectweb.security.context.SecurityContext.popRunAs(), and org.objectweb.security.context.SecurityContext.pushRunAsRole().

String org.objectweb.security.context.SecurityContext.peekLastRunAsPrincipal  ) 
 

Peek : Looks at the object at the top of this stack without removing it from the stack.

Returns:
the principal at the top of the stack

Definition at line 233 of file SecurityContext.java.

References org.objectweb.security.context.SecurityContext.getRunAsPrincipalStack().

Referenced by org.objectweb.security.context.SecurityContext.getPrincipalName().

Here is the call graph for this function:

String [] org.objectweb.security.context.SecurityContext.peekLastRunAsPrincipalRoles  ) 
 

Peek : Looks at the object at the top of this stack without removing it from the stack.

Returns:
the principal at the top of the stack

Definition at line 259 of file SecurityContext.java.

References org.objectweb.security.context.SecurityContext.getRunAsPrincipalRolesStack().

Referenced by org.objectweb.security.context.SecurityContext.getCallerPrincipalRoles().

Here is the call graph for this function:

String org.objectweb.security.context.SecurityContext.peekRunAsPrincipal  ) 
 

Peek : Looks at the object at the top of this stack without removing it from the stack.

Returns:
the principal at the top of the stack

Definition at line 220 of file SecurityContext.java.

References org.objectweb.security.context.SecurityContext.getRunAsPrincipalStack().

Referenced by org.objectweb.jonas.security.iiop.SecurityContextHelper.getIdentityToken(), and org.objectweb.security.context.SecurityContext.getPrincipalName().

Here is the call graph for this function:

String [] org.objectweb.security.context.SecurityContext.peekRunAsPrincipalRoles  ) 
 

Peek : Looks at the object at the top of this stack without removing it from the stack.

Returns:
the principal at the top of the stack

Definition at line 246 of file SecurityContext.java.

References org.objectweb.security.context.SecurityContext.getRunAsPrincipalRolesStack().

Referenced by org.objectweb.jonas_ejb.container.PermissionManager.checkSecurity(), and org.objectweb.security.context.SecurityContext.getCallerPrincipalRoles().

Here is the call graph for this function:

String org.objectweb.security.context.SecurityContext.peekRunAsRole  ) 
 

Peek : Looks at the object at the top of this stack without removing it from the stack.

Returns:
the role at the top of the stack

Definition at line 207 of file SecurityContext.java.

References org.objectweb.security.context.SecurityContext.getRunAsRoleStack().

Referenced by org.objectweb.jonas_ejb.container.PermissionManager.checkSecurity(), and org.objectweb.jonas.security.jacc.JPolicyContextHandlerData.getContainerSubject().

Here is the call graph for this function:

void org.objectweb.security.context.SecurityContext.popRunAs  ) 
 

Pop : Removes the object at the top of the run-as stack

Definition at line 190 of file SecurityContext.java.

References org.objectweb.security.context.SecurityContext.getRunAsPrincipalRolesStack(), org.objectweb.security.context.SecurityContext.getRunAsPrincipalStack(), and org.objectweb.security.context.SecurityContext.getRunAsRoleStack().

Referenced by org.objectweb.jonas_ejb.container.JFactory.checkSecurity(), and org.objectweb.jonas_ejb.container.JFactory.postInvoke().

Here is the call graph for this function:

void org.objectweb.security.context.SecurityContext.pushRunAsPrincipal String  principalName,
String[]  roles
 

Push : Pushes an item onto the top of this stack.

Parameters:
principalName the name of the principal to add on top of the stack.
roles list of roles of this principal.

Definition at line 182 of file SecurityContext.java.

References org.objectweb.security.context.SecurityContext.getRunAsPrincipalRolesStack(), and org.objectweb.security.context.SecurityContext.getRunAsPrincipalStack().

Referenced by org.objectweb.jonas_ejb.container.JFactory.checkSecurity().

Here is the call graph for this function:

void org.objectweb.security.context.SecurityContext.pushRunAsRole String  role  ) 
 

Push : Pushes an item onto the top of this stack.

Parameters:
role the role to add on top of the stack

Definition at line 172 of file SecurityContext.java.

References org.objectweb.security.context.SecurityContext.getRunAsRoleStack().

Referenced by org.objectweb.jonas_ejb.container.JFactory.checkSecurity().

Here is the call graph for this function:

String org.objectweb.security.context.SecurityContext.toString  ) 
 

Method toString

Returns:
String a string representation of the object

Definition at line 304 of file SecurityContext.java.

Referenced by org.objectweb.jonas.security.interceptors.iiop.SecurityInterceptor.contextString().


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