org.jboss.security.plugins
Class JBossSecurityContext

java.lang.Object
  extended by org.jboss.security.plugins.JBossSecurityContext
All Implemented Interfaces:
Serializable, Cloneable, org.jboss.security.SecurityContext, org.jboss.security.SecurityManagerLocator

public class JBossSecurityContext
extends Object
implements org.jboss.security.SecurityContext, org.jboss.security.SecurityManagerLocator

Implementation of the Security Context for the JBoss AS

Since:
Aug 30, 2006
Version:
$Revision$
Author:
Anil Saldhana
See Also:
Serialized Form

Field Summary
protected  CallbackHandler callbackHandler
           
protected  Map<String,Object> contextData
           
protected  org.jboss.security.RunAs incomingRunAs
           
protected  org.jboss.security.ISecurityManagement iSecurityManagement
           
protected static org.jboss.logging.Logger log
           
protected  org.jboss.security.RunAs outgoingRunAs
           
protected  String securityDomain
           
protected  org.jboss.security.SubjectInfo subjectInfo
           
protected  boolean trace
           
protected  org.jboss.security.SecurityContextUtil util
           
 
Constructor Summary
JBossSecurityContext(String securityDomain)
           
 
Method Summary
 Object clone()
           
 org.jboss.security.audit.AuditManager getAuditManager()
           
 org.jboss.security.AuthenticationManager getAuthenticationManager()
           
 org.jboss.security.AuthorizationManager getAuthorizationManager()
           
 Map<String,Object> getData()
           
 org.jboss.security.identitytrust.IdentityTrustManager getIdentityTrustManager()
           
 org.jboss.security.RunAs getIncomingRunAs()
           
 org.jboss.security.mapping.MappingManager getMappingManager()
           
 org.jboss.security.RunAs getOutgoingRunAs()
           
 String getSecurityDomain()
          Get the security domain name
 org.jboss.security.ISecurityManagement getSecurityManagement()
           
 org.jboss.security.SubjectInfo getSubjectInfo()
           
 org.jboss.security.SecurityContextUtil getUtil()
           
 void setCallbackHandler(CallbackHandler callbackHandler)
          Set the CallbackHandler for the Managers in the SecurityContext
 void setIncomingRunAs(org.jboss.security.RunAs runAs)
           
 void setOutgoingRunAs(org.jboss.security.RunAs runAs)
           
 void setRoles(Group roles, boolean replace)
           
 void setSecurityManagement(org.jboss.security.ISecurityManagement ism)
           
 void setSubjectInfo(org.jboss.security.SubjectInfo si)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static final org.jboss.logging.Logger log

trace

protected boolean trace

contextData

protected Map<String,Object> contextData

securityDomain

protected String securityDomain

subjectInfo

protected org.jboss.security.SubjectInfo subjectInfo

incomingRunAs

protected org.jboss.security.RunAs incomingRunAs

outgoingRunAs

protected org.jboss.security.RunAs outgoingRunAs

iSecurityManagement

protected org.jboss.security.ISecurityManagement iSecurityManagement

callbackHandler

protected transient CallbackHandler callbackHandler

util

protected transient org.jboss.security.SecurityContextUtil util
Constructor Detail

JBossSecurityContext

public JBossSecurityContext(String securityDomain)
Method Detail

getSecurityManagement

public org.jboss.security.ISecurityManagement getSecurityManagement()
Specified by:
getSecurityManagement in interface org.jboss.security.SecurityContext
Throws:
SecurityException - Under a security manager, caller does not have RuntimePermission("org.jboss.security.plugins.JBossSecurityContext.getSecurityManagement")
See Also:
SecurityContext.getSecurityManagement()

setSecurityManagement

public void setSecurityManagement(org.jboss.security.ISecurityManagement ism)
Specified by:
setSecurityManagement in interface org.jboss.security.SecurityContext
Throws:
SecurityException - Under a security manager, caller does not have RuntimePermission("org.jboss.security.plugins.JBossSecurityContext.setSecurityManagement")
See Also:
SecurityContext.setSecurityManagement(ISecurityManagement)

getData

public Map<String,Object> getData()
Specified by:
getData in interface org.jboss.security.SecurityContext
Throws:
SecurityException - Under a security manager, caller does not have RuntimePermission("org.jboss.security.plugins.JBossSecurityContext.getData")
See Also:
SecurityContext.getData()

getSecurityDomain

public String getSecurityDomain()
Get the security domain name

Specified by:
getSecurityDomain in interface org.jboss.security.SecurityContext

getSubjectInfo

public org.jboss.security.SubjectInfo getSubjectInfo()
Specified by:
getSubjectInfo in interface org.jboss.security.SecurityContext
Throws:
SecurityException - Under a security manager, caller does not have RuntimePermission("org.jboss.security.plugins.JBossSecurityContext.getSubjectInfo")
See Also:
SecurityContext.getSubjectInfo()

getIncomingRunAs

public org.jboss.security.RunAs getIncomingRunAs()
Specified by:
getIncomingRunAs in interface org.jboss.security.SecurityContext
See Also:
SecurityContext.getOutgoingRunAs()

setIncomingRunAs

public void setIncomingRunAs(org.jboss.security.RunAs runAs)
Specified by:
setIncomingRunAs in interface org.jboss.security.SecurityContext
Throws:
SecurityException - Under a security manager, caller does not have RuntimePermission("org.jboss.security.plugins.JBossSecurityContext.setRunAsPermission")
See Also:
SecurityContext.setOutgoingRunAs(RunAs)

getOutgoingRunAs

public org.jboss.security.RunAs getOutgoingRunAs()
Specified by:
getOutgoingRunAs in interface org.jboss.security.SecurityContext
See Also:
SecurityContext.getOutgoingRunAs()

setOutgoingRunAs

public void setOutgoingRunAs(org.jboss.security.RunAs runAs)
Specified by:
setOutgoingRunAs in interface org.jboss.security.SecurityContext
Throws:
SecurityException - Under a security manager, caller does not have RuntimePermission("org.jboss.security.plugins.JBossSecurityContext.setRunAsPermission")
See Also:
SecurityContext.setOutgoingRunAs(RunAs)

getUtil

public org.jboss.security.SecurityContextUtil getUtil()
Specified by:
getUtil in interface org.jboss.security.SecurityContext
See Also:
SecurityContext.getUtil()

getAuditManager

public org.jboss.security.audit.AuditManager getAuditManager()
Specified by:
getAuditManager in interface org.jboss.security.SecurityManagerLocator

getAuthenticationManager

public org.jboss.security.AuthenticationManager getAuthenticationManager()
Specified by:
getAuthenticationManager in interface org.jboss.security.SecurityManagerLocator

getAuthorizationManager

public org.jboss.security.AuthorizationManager getAuthorizationManager()
Specified by:
getAuthorizationManager in interface org.jboss.security.SecurityManagerLocator

getIdentityTrustManager

public org.jboss.security.identitytrust.IdentityTrustManager getIdentityTrustManager()
Specified by:
getIdentityTrustManager in interface org.jboss.security.SecurityManagerLocator

getMappingManager

public org.jboss.security.mapping.MappingManager getMappingManager()
Specified by:
getMappingManager in interface org.jboss.security.SecurityManagerLocator

setSubjectInfo

public void setSubjectInfo(org.jboss.security.SubjectInfo si)
Specified by:
setSubjectInfo in interface org.jboss.security.SecurityContext
Throws:
SecurityException - Under a security manager, caller does not have RuntimePermission("org.jboss.security.plugins.JBossSecurityContext.setSubjectInfo")

setRoles

public void setRoles(Group roles,
                     boolean replace)
Parameters:
roles -
replace -
Throws:
SecurityException - Under a security manager, caller does not have RuntimePermission("org.jboss.security.plugins.JBossSecurityContext.setRolesPermission")

setCallbackHandler

public void setCallbackHandler(CallbackHandler callbackHandler)
Set the CallbackHandler for the Managers in the SecurityContext

Parameters:
callbackHandler -

toString

public String toString()
Overrides:
toString in class Object

clone

public Object clone()
             throws CloneNotSupportedException
Overrides:
clone in class Object
Throws:
CloneNotSupportedException


Copyright © 2009 JBoss Inc.. All Rights Reserved.