Class HttpAuthorizationProvider

  • All Implemented Interfaces:
    AuthorizationProvider

    public class HttpAuthorizationProvider
    extends Object
    implements AuthorizationProvider
    HTTPAuthorizationProvider uses an external HTTP service for authorizing requests. Please see auth/src/main/resources/api.yaml for the API specification of this external service.
    • Constructor Detail

      • HttpAuthorizationProvider

        public HttpAuthorizationProvider​(Map<String,​String> options)
        Initializes the HTTPAuthorizationProvider
        Parameters:
        options - String K/V pair of options to initialize the provider with. Expects at least a "basePath" for the provider URL
    • Method Detail

      • checkAccessToProject

        @Cacheable(value="authorization",
                   keyGenerator="authKeyGenerator")
        public AuthorizationResult checkAccessToProject​(String projectId,
                                                        org.springframework.security.core.Authentication authentication)
        Validates whether a user has access to a project. @Cacheable is using CacheConfiguration settings to cache output of the method AuthorizationResult for a specified duration set in cache settings.
        Specified by:
        checkAccessToProject in interface AuthorizationProvider
        Parameters:
        projectId - Name of the Feast project
        authentication - Spring Security Authentication object
        Returns:
        AuthorizationResult result of authorization query