Wallarm RASP Python module
Project description
Wallarm RASP client
Introduction
Wallarm real time application security middleware (python module). Implement as WSGI application
Works on Python 2.7, 3.4, 3.5, 3.6, 3.7
How to install
pip install wallarmrasp
How to use
The WallarmRASPMiddleware
supports the following arguments:
WallarmRASPMiddleware(self, application, mode='monitoring', **kwargs):
"""
Create and initialize Wallarm RASP WSGI middleware. Options host, port
or sock are required.
Args:
application: WSGI application
mode (str, optional): Wallarm mode. (default: 'monitoring')
Keyword Args:
host (str): Wallarm RASP server hostname
port (int): Wallarm RASP server port
sock (str): Wallarm RASP server socket filename
mode_override (str, optional): Wallarm mode override. (default: 'off')
block_if_disconnected (bool, optional): Set to True if want to block page if connection to Wallarm RASP server is lost (default: False)
sock_timeout_msec (int, optional): socket connection timeout with Wallarm RASP server (default: 10 seconds)
request_max_body_size (int, optional): request max body size size that can be sent to Wallarm RASP server (default: 100MB)
response_max_body_size (int, optional): response max body size size that can be sent to Wallarm RASP server (default: 100MB)
block_headers (list of (header_name, header_value) tuples, optional): custom headers for block page
block_body (list of str, optional): custom body for block page
Returns:
WSGI application with Wallarm RASP middleware.
"""
Connect to Wallarm RASP server via TCP
from wallarmrasp.wallarmrasp import WallarmRASPMiddleware
# initialize default WSGI application
wsgi_application = WallarmRASPMiddleware(
wsgi_application,
'block',
host='WALLARM_RASP_SERVER_HOST',
port='8989')
## start WSGI application
Connect to Wallarm RASP server via UDS
from wallarmrasp.wallarmrasp import WallarmRASPMiddleware
# initialize default WSGI application
wsgi_application = WallarmRASPMiddleware(
wsgi_application,
'block',
sock='PATH_TO_WALLARM_RASP_SOCKET')
## start WSGI application
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for wallarmrasp-0.0.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d36e100f277a8652244857d788f8ee491cff55502743a48cc8d786f2f782e966 |
|
MD5 | d159aea8ef33c4090af78849ea95a092 |
|
BLAKE2b-256 | 09deef66c3cf93ddcf22dfbb011f07dd0ead1182cfd582f2b0c601a0b0277b88 |