Package org.apache.polaris.service.auth
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetActiveRoles(org.apache.polaris.core.auth.AuthenticatedPolarisPrincipal principal) Returns the active roles for the given principal.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)
-
Constructor Details
-
DefaultActiveRolesProvider
public DefaultActiveRolesProvider()
-
-
Method Details
-
getActiveRoles
public Set<String> getActiveRoles(org.apache.polaris.core.auth.AuthenticatedPolarisPrincipal principal) Description copied from interface:ActiveRolesProviderReturns the active roles for the given principal.- Specified by:
getActiveRolesin interfaceActiveRolesProvider- Parameters:
principal- the currently authenticated principal- Returns:
- the active roles
-
loadActivePrincipalRoles
-