Class DefaultActiveRolesProvider

java.lang.Object
org.apache.polaris.service.auth.DefaultActiveRolesProvider
All Implemented Interfaces:
ActiveRolesProvider

@RequestScoped @Identifier("default") public class DefaultActiveRolesProvider extends Object implements ActiveRolesProvider
Default implementation of the ActiveRolesProvider looks up the grant records for a principal to determine roles that are available. AuthenticatedPolarisPrincipal.getActivatedPrincipalRoleNames() is used to determine which of the available roles are active for this request.
  • Constructor Details

    • DefaultActiveRolesProvider

      public DefaultActiveRolesProvider()
  • Method Details

    • getActiveRoles

      public Set<String> getActiveRoles(org.apache.polaris.core.auth.AuthenticatedPolarisPrincipal principal)
      Description copied from interface: ActiveRolesProvider
      Returns the active roles for the given principal.
      Specified by:
      getActiveRoles in interface ActiveRolesProvider
      Parameters:
      principal - the currently authenticated principal
      Returns:
      the active roles
    • loadActivePrincipalRoles

      protected List<org.apache.polaris.core.entity.PrincipalRoleEntity> loadActivePrincipalRoles(Set<String> tokenRoles, org.apache.polaris.core.entity.PolarisEntity principal, org.apache.polaris.core.persistence.PolarisMetaStoreManager metaStoreManager)