Class PolicyEnforcementPoint.EndpointPolicySpec

java.lang.Object
org.gcube.informationsystem.resourceregistry.pep.PolicyEnforcementPoint.EndpointPolicySpec
Enclosing class:
PolicyEnforcementPoint

public static class PolicyEnforcementPoint.EndpointPolicySpec extends Object
Specification for an entire HTTP endpoint's policy.
  • Constructor Details

    • EndpointPolicySpec

      public EndpointPolicySpec(String operationName, Set<String> allowedRoles, PolicyEnforcementPoint.TokenScopeRule tokenScopeRule, boolean requiresActiveContext, Map<String,PolicyEnforcementPoint.QueryParamSpec> queryParams)
      Creates a new endpoint policy specification.
      Parameters:
      operationName - the descriptive name of the operation
      allowedRoles - the set of allowed roles
      tokenScopeRule - the token binding rule
      requiresActiveContext - whether the context must be active
      queryParams - the map of query parameter policies
  • Method Details

    • getOperationName

      public String getOperationName()
      Returns the descriptive operation name.
      Returns:
      the operation name
    • getAllowedRoles

      public Set<String> getAllowedRoles()
      Returns the set of roles authorized to access the endpoint.
      Returns:
      the authorized roles
    • getTokenScopeRule

      public PolicyEnforcementPoint.TokenScopeRule getTokenScopeRule()
      Returns the token binding/scoping rule.
      Returns:
      the scope rule
    • isRequiresActiveContext

      public boolean isRequiresActiveContext()
      Returns whether the endpoint requires the context to be active.
      Returns:
      true if active context is required, false otherwise
    • getQueryParams

      Returns the map of query parameter policy specifications.
      Returns:
      the query parameter policies