Skip to main content

Python connector for the Shadow Daemon web application firewall

Project description

Shadow Daemon is a collection of tools to detect, protocol and prevent attacks on web applications. Technically speaking, Shadow Daemon is a web application firewall that intercepts requests and filters out malicious parameters. It is a modular system that separates web application, analysis and interface to increase security, flexibility and expandability.

This component can be used to connect Python applications with the background server.

Documentation

For the full documentation please refer to shadowd.zecure.org.

Installation

You can install the package with easy_install or pip:

easy_install shadowd
pip install shadowd

It is also possible to clone this repository and install the package manually:

python setup.py install

You also have to create a configuration file. You can copy misc/examples/connectors.ini to /etc/shadowd/connectors.ini. The example configuration is annotated and should be self-explanatory.

CGI

To protect CGI applications you simply have to load the module:

import shadowd.cgi_connector

Django

Django applications require a small modification. It is necessary to create a hook to intercept requests. To do this create the file middleware/shadowdconnector.py in the application directory:

from shadowd.django_connector import InputDjango, OutputDjango, Connector

class ShadowdConnectorMiddleware(object):
    def process_request(self, request):
        input = InputDjango(request)
        output = OutputDjango()

        status = Connector().start(input, output)
        if not status == True:
            return status

There also has to be an empty __init__.py file in the middleware directory. Next you have to register the middleware in the settings.py file of your application:

MIDDLEWARE_CLASSES = (
    'middleware.shadowdconnector.ShadowdConnectorMiddleware',
    # ...
)

The connector should be at the beginning of the MIDDLEWARE_CLASSES list.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shadowd-1.1.1.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shadowd-1.1.1-py2-none-any.whl (9.5 kB view details)

Uploaded Python 2

File details

Details for the file shadowd-1.1.1.tar.gz.

File metadata

  • Download URL: shadowd-1.1.1.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for shadowd-1.1.1.tar.gz
Algorithm Hash digest
SHA256 651e6cfa41d07f9c93665ddba67a564c18aaea950556859fc39d96f38655b529
MD5 296bd5648f4725ef7902cfc79d3b23f5
BLAKE2b-256 209b03ccdd48c766b32a18a560593938d04c34b9fb5c9672b279d2118cfe08d2

See more details on using hashes here.

File details

Details for the file shadowd-1.1.1-py2-none-any.whl.

File metadata

File hashes

Hashes for shadowd-1.1.1-py2-none-any.whl
Algorithm Hash digest
SHA256 d3e2641c60fd4852f8ecc334bf173f2aa24520bbb9cd2068f439ba5eb380f72c
MD5 21531003943400dff3e6ccfd99f4e831
BLAKE2b-256 1bb6140f71b335a7ebf8d0488649bf7ea7b31f0fd0b2e02c014f35b0932aa574

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page