|
||||||||||
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 java.lang.ThreadLocal<AbstractSecurityService.Identity> |
clientIdentity
|
protected AbstractSecurityService.SecurityContext |
defaultContext
|
protected javax.security.auth.Subject |
defaultSubject
|
protected java.lang.String |
defaultUser
|
Constructor Summary | |
---|---|
AbstractSecurityService()
|
|
AbstractSecurityService(java.lang.String jaccProvider)
|
Method Summary | |
---|---|
void |
associate(java.util.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 javax.security.auth.Subject |
createRunAsSubject(java.lang.String runAsRole)
|
protected javax.security.auth.Subject |
createSubject(java.lang.String name)
|
java.util.UUID |
disassociate()
Active |
java.security.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. |
java.lang.String |
getDefaultUser()
|
java.util.Set<java.lang.String> |
getLogicalRoles(java.security.Principal[] principals,
java.util.Set<java.lang.String> logicalRoles)
|
java.lang.String |
getRealmName()
|
protected javax.security.auth.Subject |
getRunAsSubject(DeploymentInfo callingDeploymentInfo)
|
void |
init(java.util.Properties props)
|
protected static void |
installJacc()
|
boolean |
isCallerAuthorized(java.lang.reflect.Method method,
InterfaceType type)
Active |
boolean |
isCallerInRole(java.lang.String role)
Active |
java.util.UUID |
login(java.lang.String username,
java.lang.String password)
|
void |
logout(java.util.UUID securityIdentity)
Active |
protected java.util.UUID |
registerSubject(javax.security.auth.Subject subject)
|
void |
setDefaultUser(java.lang.String defaultUser)
|
void |
setRealmName(java.lang.String realmName)
|
protected void |
unregisterSubject(java.lang.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 java.lang.ThreadLocal<AbstractSecurityService.Identity> clientIdentity
protected java.lang.String defaultUser
protected javax.security.auth.Subject defaultSubject
protected AbstractSecurityService.SecurityContext defaultContext
Constructor Detail |
---|
public AbstractSecurityService()
public AbstractSecurityService(java.lang.String jaccProvider)
Method Detail |
---|
public java.lang.String getRealmName()
public void setRealmName(java.lang.String realmName)
public java.lang.String getDefaultUser()
public void setDefaultUser(java.lang.String defaultUser)
defaultUser
- the defaultUser to setpublic void init(java.util.Properties props) throws java.lang.Exception
init
in interface Service
java.lang.Exception
public java.util.UUID login(java.lang.String username, java.lang.String password) throws javax.security.auth.login.LoginException
login
in interface SecurityService<java.util.UUID>
javax.security.auth.login.LoginException
public java.util.Set<java.lang.String> getLogicalRoles(java.security.Principal[] principals, java.util.Set<java.lang.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 javax.security.auth.Subject getRunAsSubject(DeploymentInfo callingDeploymentInfo)
protected javax.security.auth.Subject createRunAsSubject(java.lang.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 java.util.UUID registerSubject(javax.security.auth.Subject subject)
public void logout(java.util.UUID securityIdentity) throws javax.security.auth.login.LoginException
SecurityService
logout
in interface SecurityService<java.util.UUID>
javax.security.auth.login.LoginException
protected void unregisterSubject(java.lang.Object securityIdentity)
public void associate(java.util.UUID securityIdentity) throws javax.security.auth.login.LoginException
SecurityService
associate
in interface SecurityService<java.util.UUID>
javax.security.auth.login.LoginException
public java.util.UUID disassociate()
SecurityService
disassociate
in interface SecurityService<java.util.UUID>
public boolean isCallerInRole(java.lang.String role)
SecurityService
isCallerInRole
in interface SecurityService<java.util.UUID>
public java.security.Principal getCallerPrincipal()
SecurityService
getCallerPrincipal
in interface SecurityService<java.util.UUID>
public boolean isCallerAuthorized(java.lang.reflect.Method method, InterfaceType type)
SecurityService
isCallerAuthorized
in interface SecurityService<java.util.UUID>
protected static void installJacc()
protected javax.security.auth.Subject createSubject(java.lang.String name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |