public class JBossSecurityContext extends Object implements SecurityContext, SecurityManagerLocator
Modifier and Type | Field and Description |
---|---|
protected CallbackHandler |
callbackHandler |
protected Map<String,Object> |
contextData |
protected RunAs |
incomingRunAs |
protected ISecurityManagement |
iSecurityManagement |
protected static Logger |
log |
protected RunAs |
outgoingRunAs |
protected String |
securityDomain |
protected SubjectInfo |
subjectInfo |
protected boolean |
trace |
protected SecurityContextUtil |
util |
Constructor and Description |
---|
JBossSecurityContext(String securityDomain) |
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
AuditManager |
getAuditManager() |
AuthenticationManager |
getAuthenticationManager() |
AuthorizationManager |
getAuthorizationManager() |
Map<String,Object> |
getData()
Context Map
|
IdentityTrustManager |
getIdentityTrustManager() |
RunAs |
getIncomingRunAs()
RunAs that is being propagated into this context
by an external context
SecurityContext.setIncomingRunAs(RunAs) |
MappingManager |
getMappingManager() |
RunAs |
getOutgoingRunAs()
RunAs Representation
SecurityContext.setOutgoingRunAs(RunAs) |
String |
getSecurityDomain()
Get the security domain name
|
ISecurityManagement |
getSecurityManagement()
Get the SecurityManagement object to get hold of the various
managers
|
SubjectInfo |
getSubjectInfo()
Subject Info
|
SecurityContextUtil |
getUtil()
Return a utility that is a facade to the internal
storage mechanism of the Security Context
This utility can be used to store information like
roles etc in an implementation specific way
|
void |
setCallbackHandler(CallbackHandler callbackHandler)
Set the CallbackHandler for the Managers in the SecurityContext
|
void |
setIncomingRunAs(RunAs runAs)
Set the RunAs that is propagating into this
context.
|
void |
setOutgoingRunAs(RunAs runAs)
Set the current RunAs for the security context that will be
propagated out to other security context.
|
void |
setRoles(Group roles,
boolean replace) |
void |
setSecurityDomain(String securityDomain)
Sets the security domain.
|
void |
setSecurityManagement(ISecurityManagement securityManagement)
Set the SecurityManagement holder
|
void |
setSubjectInfo(SubjectInfo si)
Subject Info
|
String |
toString() |
protected static final Logger log
protected boolean trace
protected String securityDomain
protected SubjectInfo subjectInfo
protected RunAs incomingRunAs
protected RunAs outgoingRunAs
protected ISecurityManagement iSecurityManagement
protected transient CallbackHandler callbackHandler
protected transient SecurityContextUtil util
public JBossSecurityContext(String securityDomain)
public ISecurityManagement getSecurityManagement()
SecurityContext
getSecurityManagement
in interface SecurityContext
SecurityException
- Under a security manager, caller does not have
RuntimePermission("org.jboss.security.plugins.JBossSecurityContext.getSecurityManagement")SecurityContext.getSecurityManagement()
public void setSecurityManagement(ISecurityManagement securityManagement)
SecurityContext
setSecurityManagement
in interface SecurityContext
SecurityException
- Under a security manager, caller does not have
RuntimePermission("org.jboss.security.plugins.JBossSecurityContext.setSecurityManagement")SecurityContext.setSecurityManagement(ISecurityManagement)
public Map<String,Object> getData()
SecurityContext
getData
in interface SecurityContext
SecurityException
- Under a security manager, caller does not have
RuntimePermission("org.jboss.security.plugins.JBossSecurityContext.getData")SecurityContext.getData()
public String getSecurityDomain()
getSecurityDomain
in interface SecurityContext
public void setSecurityDomain(String securityDomain)
SecurityContext
Sets the security domain.
setSecurityDomain
in interface SecurityContext
securityDomain
- a String
representing the security domain.public SubjectInfo getSubjectInfo()
SecurityContext
getSubjectInfo
in interface SecurityContext
SecurityException
- Under a security manager, caller does not have
RuntimePermission("org.jboss.security.plugins.JBossSecurityContext.getSubjectInfo")SecurityContext.getSubjectInfo()
public RunAs getIncomingRunAs()
SecurityContext
SecurityContext.setIncomingRunAs(RunAs)
getIncomingRunAs
in interface SecurityContext
SecurityContext.getOutgoingRunAs()
public void setIncomingRunAs(RunAs runAs)
SecurityContext
setIncomingRunAs
in interface SecurityContext
runAs
- The RunAsSecurityException
- Under a security manager, caller does not have
RuntimePermission("org.jboss.security.plugins.JBossSecurityContext.setRunAsPermission")SecurityContext.setOutgoingRunAs(RunAs)
public RunAs getOutgoingRunAs()
SecurityContext
SecurityContext.setOutgoingRunAs(RunAs)
getOutgoingRunAs
in interface SecurityContext
SecurityContext.getOutgoingRunAs()
public void setOutgoingRunAs(RunAs runAs)
SecurityContext
setOutgoingRunAs
in interface SecurityContext
SecurityException
- Under a security manager, caller does not have
RuntimePermission("org.jboss.security.plugins.JBossSecurityContext.setRunAsPermission")SecurityContext.setOutgoingRunAs(RunAs)
public SecurityContextUtil getUtil()
SecurityContext
getUtil
in interface SecurityContext
SecurityContext.getUtil()
public AuditManager getAuditManager()
getAuditManager
in interface SecurityManagerLocator
public AuthenticationManager getAuthenticationManager()
getAuthenticationManager
in interface SecurityManagerLocator
public AuthorizationManager getAuthorizationManager()
getAuthorizationManager
in interface SecurityManagerLocator
public IdentityTrustManager getIdentityTrustManager()
getIdentityTrustManager
in interface SecurityManagerLocator
public MappingManager getMappingManager()
getMappingManager
in interface SecurityManagerLocator
public void setSubjectInfo(SubjectInfo si)
SecurityContext
setSubjectInfo
in interface SecurityContext
SecurityException
- Under a security manager, caller does not have
RuntimePermission("org.jboss.security.plugins.JBossSecurityContext.setSubjectInfo")SecurityContextUtil.getSubject()
,
SecurityContextUtil.createSubjectInfo(java.security.Principal, Object, javax.security.auth.Subject)
public void setRoles(Group roles, boolean replace)
roles
- replace
- SecurityException
- Under a security manager, caller does not have
RuntimePermission("org.jboss.security.plugins.JBossSecurityContext.setRolesPermission")public void setCallbackHandler(CallbackHandler callbackHandler)
callbackHandler
- public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Copyright © 2018 JBoss by Red Hat. All rights reserved.