|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.openejb.core.security.AbstractSecurityService
public abstract class AbstractSecurityService
This security service chooses a UUID as its token as this can be serialized to clients, is mostly secure, and can be deserialized in a client vm without addition openejb-core classes.
Nested Class Summary | |
---|---|
static class |
AbstractSecurityService.Group
|
protected static class |
AbstractSecurityService.Identity
|
protected static class |
AbstractSecurityService.SecurityContext
|
static class |
AbstractSecurityService.User
|
Field Summary | |
---|---|
protected static ThreadLocal<AbstractSecurityService.Identity> |
clientIdentity
|
protected AbstractSecurityService.SecurityContext |
defaultContext
|
protected Subject |
defaultSubject
|
protected String |
defaultUser
|
Constructor Summary | |
---|---|
AbstractSecurityService()
|
|
AbstractSecurityService(String jaccProvider)
|
Method Summary | |
---|---|
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 runAsRole)
|
protected Subject |
createSubject(String name)
|
UUID |
disassociate()
Active |
Principal |
getCallerPrincipal()
Active |
Set<String> |
getLogicalRoles(Principal[] principals,
Set<String> logicalRoles)
|
String |
getRealmName()
|
protected Subject |
getRunAsSubject(CoreDeploymentInfo callingDeploymentInfo)
|
void |
init(Properties props)
|
protected static void |
installJacc()
|
boolean |
isCallerAuthorized(Method method,
InterfaceType interfaceType)
Active |
boolean |
isCallerInRole(String role)
Active |
UUID |
login(String username,
String password)
|
void |
logout(UUID securityIdentity)
Active |
protected UUID |
registerSubject(Subject subject)
|
void |
setRealmName(String realmName)
|
protected void |
unregisterSubject(Object securityIdentity)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.openejb.spi.SecurityService |
---|
login |
Field Detail |
---|
protected static final ThreadLocal<AbstractSecurityService.Identity> clientIdentity
protected final String defaultUser
protected final Subject defaultSubject
protected final AbstractSecurityService.SecurityContext defaultContext
Constructor Detail |
---|
public AbstractSecurityService()
public AbstractSecurityService(String jaccProvider)
Method Detail |
---|
public String getRealmName()
public void setRealmName(String realmName)
public void init(Properties props) throws Exception
init
in interface Service
Exception
public UUID login(String username, String password) throws LoginException
login
in interface SecurityService<UUID>
LoginException
public Set<String> getLogicalRoles(Principal[] principals, Set<String> logicalRoles)
getLogicalRoles
in interface BasicPolicyConfiguration.RoleResolver
public void contextEntered(ThreadContext oldContext, ThreadContext newContext)
ThreadContextListener
contextEntered
in interface ThreadContextListener
oldContext
- the old context that was associated with the threadnewContext
- the new context that is now associated with the threadprotected Subject getRunAsSubject(CoreDeploymentInfo callingDeploymentInfo)
protected Subject createRunAsSubject(String runAsRole)
public void contextExited(ThreadContext exitedContext, ThreadContext reenteredContext)
ThreadContextListener
contextExited
in interface ThreadContextListener
exitedContext
- the context that was exitedreenteredContext
- the context that is not associated with the threadprotected UUID registerSubject(Subject subject)
public void logout(UUID securityIdentity) throws LoginException
SecurityService
logout
in interface SecurityService<UUID>
LoginException
protected void unregisterSubject(Object securityIdentity)
public void associate(UUID securityIdentity) throws LoginException
SecurityService
associate
in interface SecurityService<UUID>
LoginException
public UUID disassociate()
SecurityService
disassociate
in interface SecurityService<UUID>
public boolean isCallerInRole(String role)
SecurityService
isCallerInRole
in interface SecurityService<UUID>
public Principal getCallerPrincipal()
SecurityService
getCallerPrincipal
in interface SecurityService<UUID>
public boolean isCallerAuthorized(Method method, InterfaceType interfaceType)
SecurityService
isCallerAuthorized
in interface SecurityService<UUID>
protected static void installJacc()
protected Subject createSubject(String name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |