Class AccessControlInterceptor
java.lang.Object
com.predic8.membrane.core.interceptor.AbstractInterceptor
com.predic8.membrane.core.interceptor.acl.AccessControlInterceptor
- All Implemented Interfaces:
Interceptor
- Description
- Blocks requests whose origin TCP/IP address (hostname or IP address) is not allowed to access the requested resource.
- Topic
- 6. Security
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.predic8.membrane.core.interceptor.Interceptor
Interceptor.Flow -
Field Summary
Fields inherited from class com.predic8.membrane.core.interceptor.AbstractInterceptor
name, router -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFile()handleRequest(Exchange exc) voidinit()Called after parsing is complete and this has been added to the object tree (whose root is Router).booleanprotected AccessControlvoidvoidvoidsetUseXForwardedForAsClientAddr(boolean useXForwardedForAsClientAddr) Methods inherited from class com.predic8.membrane.core.interceptor.AbstractInterceptor
getDisplayName, getFlow, getHelpId, getLongDescription, getMessage, getRouter, getRule, handleAbort, handleResponse, init, setDisplayName, setFlow
-
Constructor Details
-
AccessControlInterceptor
public AccessControlInterceptor()
-
-
Method Details
-
handleRequest
- Specified by:
handleRequestin interfaceInterceptor- Overrides:
handleRequestin classAbstractInterceptor- Throws:
Exception
-
isUseXForwardedForAsClientAddr
public boolean isUseXForwardedForAsClientAddr() -
setUseXForwardedForAsClientAddr
public void setUseXForwardedForAsClientAddr(boolean useXForwardedForAsClientAddr) - Default
- false
- Description
- whether to use the last value of the last "X-Forwarded-For" header instead of the remote IP address
-
setFile
- Description
- Location of the ACL file.
- Example
- acl/acl.xml
-
getFile
-
init
Description copied from class:AbstractInterceptorCalled after parsing is complete and this has been added to the object tree (whose root is Router).- Overrides:
initin classAbstractInterceptor- Throws:
Exception
-
setAccessControl
-
getAccessControl
-
parse
- Throws:
Exception
-
getShortDescription
- Specified by:
getShortDescriptionin interfaceInterceptor- Overrides:
getShortDescriptionin classAbstractInterceptor
-