Class AbstractAuthorizingRealm

java.lang.Object
org.apache.shiro.realm.CachingRealm
org.apache.shiro.realm.AuthenticatingRealm
org.apache.shiro.realm.AuthorizingRealm
ddf.security.service.impl.AbstractAuthorizingRealm
All Implemented Interfaces:
org.apache.shiro.authc.LogoutAware, org.apache.shiro.authz.Authorizer, org.apache.shiro.authz.permission.PermissionResolverAware, org.apache.shiro.authz.permission.RolePermissionResolverAware, org.apache.shiro.cache.CacheManagerAware, org.apache.shiro.realm.Realm, org.apache.shiro.util.Initializable, org.apache.shiro.util.Nameable

public abstract class AbstractAuthorizingRealm extends org.apache.shiro.realm.AuthorizingRealm
Abstraction class used to perform authorization for a realm. This class contains generic methods that can be used to parse out the credentials from an incoming security token. It also handles caching tokens for later use.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Map<org.osgi.framework.ServiceReference,ddf.security.expansion.Expansion>
     
    protected Map<org.osgi.framework.ServiceReference,ddf.security.expansion.Expansion>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addMetacardExpansion(org.osgi.framework.ServiceReference<ddf.security.expansion.Expansion> expansionServiceRef)
     
    void
    addMetacardExpansion(org.osgi.framework.ServiceReference<ddf.security.expansion.Expansion> expansionServiceRef, ddf.security.expansion.Expansion expansion)
     
    void
    addUserExpansion(org.osgi.framework.ServiceReference<ddf.security.expansion.Expansion> expansionServiceRef)
     
    void
    addUserExpansion(org.osgi.framework.ServiceReference<ddf.security.expansion.Expansion> expansionServiceRef, ddf.security.expansion.Expansion expansion)
     
    protected org.apache.shiro.authz.AuthorizationInfo
    doGetAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection principalCollection)
    Takes the security attributes about the subject of the incoming security token and builds sets of permissions and roles for use in further checking.
    protected List<org.apache.shiro.authz.Permission>
    expandPermissions(List<org.apache.shiro.authz.Permission> permissions)
     
    void
    removeMetacardExpansion(org.osgi.framework.ServiceReference<ddf.security.expansion.Expansion> expansionServiceRef)
     
    void
    removeUserExpansion(org.osgi.framework.ServiceReference<ddf.security.expansion.Expansion> expansionServiceRef)
     

    Methods inherited from class org.apache.shiro.realm.AuthorizingRealm

    afterCacheManagerSet, checkPermission, checkPermission, checkPermission, checkPermissions, checkPermissions, checkPermissions, checkRole, checkRole, checkRoles, checkRoles, checkRoles, clearCachedAuthorizationInfo, doClearCache, getAuthorizationCache, getAuthorizationCacheKey, getAuthorizationCacheName, getAuthorizationInfo, getPermissionResolver, getPermissions, getRolePermissionResolver, hasAllRoles, hasRole, hasRole, hasRoles, hasRoles, isAuthorizationCachingEnabled, isPermitted, isPermitted, isPermitted, isPermitted, isPermitted, isPermitted, isPermittedAll, isPermittedAll, isPermittedAll, onInit, setAuthorizationCache, setAuthorizationCacheName, setAuthorizationCachingEnabled, setName, setPermissionResolver, setRolePermissionResolver

    Methods inherited from class org.apache.shiro.realm.AuthenticatingRealm

    assertCredentialsMatch, clearCachedAuthenticationInfo, doGetAuthenticationInfo, getAuthenticationCache, getAuthenticationCacheKey, getAuthenticationCacheKey, getAuthenticationCacheName, getAuthenticationInfo, getAuthenticationTokenClass, getCredentialsMatcher, init, isAuthenticationCachingEnabled, isAuthenticationCachingEnabled, setAuthenticationCache, setAuthenticationCacheName, setAuthenticationCachingEnabled, setAuthenticationTokenClass, setCredentialsMatcher, supports

    Methods inherited from class org.apache.shiro.realm.CachingRealm

    clearCache, getAvailablePrincipal, getCacheManager, getName, isCachingEnabled, onLogout, setCacheManager, setCachingEnabled

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.shiro.util.Initializable

    init
  • Field Details

    • userExpansionServices

      protected Map<org.osgi.framework.ServiceReference,ddf.security.expansion.Expansion> userExpansionServices
    • metacardExpansionServices

      protected Map<org.osgi.framework.ServiceReference,ddf.security.expansion.Expansion> metacardExpansionServices
  • Constructor Details

    • AbstractAuthorizingRealm

      public AbstractAuthorizingRealm()
  • Method Details

    • addUserExpansion

      public void addUserExpansion(org.osgi.framework.ServiceReference<ddf.security.expansion.Expansion> expansionServiceRef)
    • addUserExpansion

      public void addUserExpansion(org.osgi.framework.ServiceReference<ddf.security.expansion.Expansion> expansionServiceRef, ddf.security.expansion.Expansion expansion)
    • removeUserExpansion

      public void removeUserExpansion(org.osgi.framework.ServiceReference<ddf.security.expansion.Expansion> expansionServiceRef)
    • addMetacardExpansion

      public void addMetacardExpansion(org.osgi.framework.ServiceReference<ddf.security.expansion.Expansion> expansionServiceRef)
    • addMetacardExpansion

      public void addMetacardExpansion(org.osgi.framework.ServiceReference<ddf.security.expansion.Expansion> expansionServiceRef, ddf.security.expansion.Expansion expansion)
    • removeMetacardExpansion

      public void removeMetacardExpansion(org.osgi.framework.ServiceReference<ddf.security.expansion.Expansion> expansionServiceRef)
    • doGetAuthorizationInfo

      protected org.apache.shiro.authz.AuthorizationInfo doGetAuthorizationInfo(org.apache.shiro.subject.PrincipalCollection principalCollection)
      Takes the security attributes about the subject of the incoming security token and builds sets of permissions and roles for use in further checking.
      Specified by:
      doGetAuthorizationInfo in class org.apache.shiro.realm.AuthorizingRealm
      Parameters:
      principalCollection - holds the security assertions for the primary principal of this request
      Returns:
      a new collection of permissions and roles corresponding to the security assertions
      Throws:
      org.apache.shiro.authz.AuthorizationException - if there are no security assertions associated with this principal collection or if the token cannot be processed successfully.
    • expandPermissions

      protected List<org.apache.shiro.authz.Permission> expandPermissions(List<org.apache.shiro.authz.Permission> permissions)