public abstract class AbstractSecurityService extends Object implements SecurityService<UUID>, ThreadContextListener, BasicPolicyConfiguration.RoleResolver
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractSecurityService.Group |
protected static class |
AbstractSecurityService.Identity |
protected static class |
AbstractSecurityService.SecurityContext |
static class |
AbstractSecurityService.User |
| Modifier and Type | Field and Description |
|---|---|
protected static ThreadLocal<AbstractSecurityService.Identity> |
clientIdentity |
protected AbstractSecurityService.SecurityContext |
defaultContext |
protected Subject |
defaultSubject |
protected String |
defaultUser |
| Constructor and Description |
|---|
AbstractSecurityService() |
AbstractSecurityService(String jaccProvider) |
| Modifier and Type | Method and Description |
|---|---|
void |
associate(UUID securityIdentity)
Active
|
void |
contextEntered(ThreadContext oldContext,
ThreadContext newContext)
A new context has been entered.
|
void |
contextExited(ThreadContext exitedContext,
ThreadContext reenteredContext)
A context has exited.
|
protected Subject |
createRunAsSubject(String runAsUser,
String runAsRole) |
protected Subject |
createSubject(String name,
String groupName) |
Object |
currentState() |
UUID |
disassociate()
Active
|
Principal |
getCallerPrincipal()
Implementors are encouraged to return a java.security.Principal
object that implements org.apache.openejb.spi.CallerPrincipal
JAAS LoginModule implementors are encouraged to use the CallerPrincipal
interface to denote the best fitting Principal for getCallerPrincipal.
|
String |
getDefaultUser() |
Set<String> |
getLogicalRoles(Principal[] principals,
Set<String> logicalRoles) |
String |
getRealmName() |
protected Subject |
getRunAsSubject(BeanContext callingBeanContext) |
void |
init(Properties props) |
protected static void |
installJacc() |
boolean |
isCallerAuthorized(Method method,
InterfaceType type)
Active
|
boolean |
isCallerInRole(String role)
Active
|
UUID |
login(String username,
String password) |
void |
logout(UUID securityIdentity)
Active
|
protected UUID |
registerSubject(Subject subject) |
void |
setDefaultUser(String defaultUser) |
void |
setRealmName(String realmName) |
void |
setState(Object o) |
protected void |
unregisterSubject(Object securityIdentity) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitloginprotected static final ThreadLocal<AbstractSecurityService.Identity> clientIdentity
protected String defaultUser
protected Subject defaultSubject
protected AbstractSecurityService.SecurityContext defaultContext
public AbstractSecurityService()
public AbstractSecurityService(String jaccProvider)
public String getRealmName()
public void setRealmName(String realmName)
public String getDefaultUser()
public void setDefaultUser(String defaultUser)
defaultUser - the defaultUser to setpublic void init(Properties props) throws Exception
public UUID login(String username, String password) throws LoginException
login in interface SecurityService<UUID>LoginExceptionpublic Set<String> getLogicalRoles(Principal[] principals, Set<String> logicalRoles)
getLogicalRoles in interface BasicPolicyConfiguration.RoleResolverpublic void contextEntered(ThreadContext oldContext, ThreadContext newContext)
ThreadContextListenercontextEntered in interface ThreadContextListeneroldContext - the old context that was associated with the threadnewContext - the new context that is now associated with the threadprotected Subject getRunAsSubject(BeanContext callingBeanContext)
public void contextExited(ThreadContext exitedContext, ThreadContext reenteredContext)
ThreadContextListenercontextExited in interface ThreadContextListenerexitedContext - the context that was exitedreenteredContext - the context that is not associated with the threadpublic void logout(UUID securityIdentity) throws LoginException
SecurityServicelogout in interface SecurityService<UUID>LoginExceptionprotected void unregisterSubject(Object securityIdentity)
public void associate(UUID securityIdentity) throws LoginException
SecurityServiceassociate in interface SecurityService<UUID>LoginExceptionpublic UUID disassociate()
SecurityServicedisassociate in interface SecurityService<UUID>public boolean isCallerInRole(String role)
SecurityServiceisCallerInRole in interface SecurityService<UUID>public Principal getCallerPrincipal()
SecurityServicegetCallerPrincipal in interface SecurityService<UUID>public boolean isCallerAuthorized(Method method, InterfaceType type)
SecurityServiceisCallerAuthorized in interface SecurityService<UUID>protected static void installJacc()
public Object currentState()
currentState in interface SecurityService<UUID>public void setState(Object o)
setState in interface SecurityService<UUID>Copyright © 1999–2014 The Apache Software Foundation. All rights reserved.