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 Summary
Modifier and TypeMethodDescriptionbooleanisAttributeReadAllowed(ObjectName pName, String pAttribute) Check whether reading of an attribute is allowedbooleanisAttributeWriteAllowed(ObjectName pName, String pAttribute) Check whether writing of an attribute is allowedbooleanisHttpMethodAllowed(HttpMethod pMethod) Check whether the HTTP method with which the request was sent is allowed.booleanisOperationAllowed(ObjectName pName, String pOperation) Check whether execution of an operation is allowedbooleanisOriginAllowed(String pOrigin, boolean pOnlyWhenStrictCheckingIsEnabled) Check whether cross browser access via CORS is allowed.booleanisRemoteAccessAllowed(String... pHostOrAddress) Check whether access from the connected client is allowed.booleanisTypeAllowed(RequestType pType) Check whether the provided command type is allowed in principal
-
Method Details
-
isHttpMethodAllowed
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
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
Check whether reading of an attribute is allowed- Parameters:
pName- MBean namepAttribute- attribute to check- Returns:
- true if access is allowed
-
isAttributeWriteAllowed
Check whether writing of an attribute is allowed- Parameters:
pName- MBean namepAttribute- attribute to check- Returns:
- true if access is allowed
-
isOperationAllowed
Check whether execution of an operation is allowed- Parameters:
pName- MBean namepOperation- attribute to check- Returns:
- true if access is allowed
-
isRemoteAccessAllowed
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
Check whether cross browser access via CORS is allowed. See the CORS specification for details- Parameters:
pOrigin- the "Origin:" header provided within the requestpOnlyWhenStrictCheckingIsEnabled- whether by-pass check when strict checking is disabled- Returns:
- true if this cross browser request allowed, false otherwise
-