org.apache.tomee.catalina
Class TomcatSecurityService

java.lang.Object
  extended by org.apache.openejb.core.security.AbstractSecurityService
      extended by org.apache.tomee.catalina.TomcatSecurityService
All Implemented Interfaces:
BasicPolicyConfiguration.RoleResolver, ThreadContextListener, SecurityService<UUID>, Service

public class TomcatSecurityService
extends AbstractSecurityService


Nested Class Summary
protected static class TomcatSecurityService.RunAsRole
           
static class TomcatSecurityService.TomcatUser
           
 
Nested classes/interfaces inherited from class org.apache.openejb.core.security.AbstractSecurityService
AbstractSecurityService.Group, AbstractSecurityService.Identity, AbstractSecurityService.SecurityContext, AbstractSecurityService.User
 
Field Summary
protected static ThreadLocal<LinkedList<Subject>> runAsStack
           
 
Fields inherited from class org.apache.openejb.core.security.AbstractSecurityService
clientIdentity, defaultContext, defaultSubject, defaultUser
 
Constructor Summary
TomcatSecurityService()
           
 
Method Summary
protected  Subject createRunAsSubject(String role)
           
 Object enterWebApp(org.apache.catalina.Realm realm, Principal principal, String runAs)
           
 void exitWebApp(Object state)
           
 Principal getCallerPrincipal()
           
 Set<String> getLogicalRoles(Principal[] principals, Set<String> logicalRoles)
           
protected  Subject getRunAsSubject(BeanContext callingBeanContext)
           
 boolean isCallerInRole(String role)
           
 UUID login(String realmName, String username, String password)
           
 
Methods inherited from class org.apache.openejb.core.security.AbstractSecurityService
associate, contextEntered, contextExited, createRunAsSubject, createSubject, currentState, disassociate, getDefaultUser, getRealmName, init, installJacc, isCallerAuthorized, login, logout, registerSubject, setDefaultUser, setRealmName, setState, unregisterSubject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

runAsStack

protected static final ThreadLocal<LinkedList<Subject>> runAsStack
Constructor Detail

TomcatSecurityService

public TomcatSecurityService()
Method Detail

isCallerInRole

public boolean isCallerInRole(String role)
Specified by:
isCallerInRole in interface SecurityService<UUID>
Overrides:
isCallerInRole in class AbstractSecurityService

login

public UUID login(String realmName,
                  String username,
                  String password)
           throws LoginException
Throws:
LoginException

getLogicalRoles

public Set<String> getLogicalRoles(Principal[] principals,
                                   Set<String> logicalRoles)
Specified by:
getLogicalRoles in interface BasicPolicyConfiguration.RoleResolver
Overrides:
getLogicalRoles in class AbstractSecurityService

getCallerPrincipal

public Principal getCallerPrincipal()
Specified by:
getCallerPrincipal in interface SecurityService<UUID>
Overrides:
getCallerPrincipal in class AbstractSecurityService

enterWebApp

public Object enterWebApp(org.apache.catalina.Realm realm,
                          Principal principal,
                          String runAs)

exitWebApp

public void exitWebApp(Object state)

getRunAsSubject

protected Subject getRunAsSubject(BeanContext callingBeanContext)
Overrides:
getRunAsSubject in class AbstractSecurityService

createRunAsSubject

protected Subject createRunAsSubject(String role)


Copyright © 1999–2015 The Apache Software Foundation. All rights reserved.