|
||||||||||
| 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 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)
|
| 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 String defaultUser
protected Subject defaultSubject
protected AbstractSecurityService.SecurityContext defaultContext
| Constructor Detail |
|---|
public AbstractSecurityService()
public AbstractSecurityService(String jaccProvider)
| Method Detail |
|---|
public String getRealmName()
public void setRealmName(String realmName)
public String getDefaultUser()
public void setDefaultUser(String defaultUser)
defaultUser - the defaultUser to set
public void init(Properties props)
throws Exception
init in interface ServiceException
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 ThreadContextListeneroldContext - the old context that was associated with the threadnewContext - the new context that is now associated with the threadprotected Subject getRunAsSubject(BeanContext callingBeanContext)
protected Subject createRunAsSubject(String runAsUser,
String runAsRole)
public void contextExited(ThreadContext exitedContext,
ThreadContext reenteredContext)
ThreadContextListener
contextExited in interface ThreadContextListenerexitedContext - 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>LoginExceptionprotected void unregisterSubject(Object securityIdentity)
public void associate(UUID securityIdentity)
throws LoginException
SecurityService
associate in interface SecurityService<UUID>LoginExceptionpublic 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 type)
SecurityService
isCallerAuthorized in interface SecurityService<UUID>protected static void installJacc()
protected Subject createSubject(String name,
String groupName)
public Object currentState()
currentState in interface SecurityService<UUID>public void setState(Object o)
setState in interface SecurityService<UUID>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||