Interface Restrictor

All Known Subinterfaces:
JolokiaContext
All Known Implementing Classes:
AbstractConstantRestrictor, AllowAllRestrictor, DelegatingRestrictor, DenyAllRestrictor, JolokiaContextImpl, PolicyRestrictor

public interface Restrictor
A Restrictor is used to restrict the access to MBeans based on various parameters.
Since:
Jul 28, 2009
Author:
roland
  • Method Details

    • isHttpMethodAllowed

      boolean isHttpMethodAllowed(HttpMethod pMethod)
      Check whether the HTTP method with which the request was sent is allowed.
      Parameters:
      pMethod - method to check
      Returns:
      true if there is no restriction on the method with which the request was sent, false otherwise
    • isTypeAllowed

      boolean isTypeAllowed(RequestType pType)
      Check whether the provided command type is allowed in principal
      Parameters:
      pType - type to check
      Returns:
      true, if the type is allowed, false otherwise
    • isAttributeReadAllowed

      boolean isAttributeReadAllowed(ObjectName pName, String pAttribute)
      Check whether reading of an attribute is allowed
      Parameters:
      pName - MBean name
      pAttribute - attribute to check
      Returns:
      true if access is allowed
    • isAttributeWriteAllowed

      boolean isAttributeWriteAllowed(ObjectName pName, String pAttribute)
      Check whether writing of an attribute is allowed
      Parameters:
      pName - MBean name
      pAttribute - attribute to check
      Returns:
      true if access is allowed
    • isOperationAllowed

      boolean isOperationAllowed(ObjectName pName, String pOperation)
      Check whether execution of an operation is allowed
      Parameters:
      pName - MBean name
      pOperation - attribute to check
      Returns:
      true if access is allowed
    • isRemoteAccessAllowed

      boolean isRemoteAccessAllowed(String... pHostOrAddress)
      Check whether access from the connected client is allowed. If at least one of the given parameters matches, then this method returns true.
      Parameters:
      pHostOrAddress - one or more host or address names.
      Returns:
      true is access is allowed
    • isOriginAllowed

      boolean isOriginAllowed(String pOrigin, boolean pOnlyWhenStrictCheckingIsEnabled)
      Check whether cross browser access via CORS is allowed. See the CORS specification for details
      Parameters:
      pOrigin - the "Origin:" header provided within the request
      pOnlyWhenStrictCheckingIsEnabled - whether by-pass check when strict checking is disabled
      Returns:
      true if this cross browser request allowed, false otherwise