Forensic logging, active defense, and SIEM integration. The security-first middleware that makes your application compliant by design.
Structured JSON/CEF logs signed with HMAC-SHA256. PII encryption built-in for GDPR compliance.
Rate limiting, Tor exit node blocking, and Session Guard to prevent hijacking attempts.
Out-of-the-box integration with Elasticsearch, Splunk, and QRadar. Includes Docker dashboard.
Add the package to your Django project using pip. No complex dependencies.
Add the middleware to your settings.py and define your encryption keys.
Your app is now generating forensic logs and actively defending against threats.
MIDDLEWARE = [ 'django.contrib.sessions.middleware.SessionMiddleware', # Just add this line! 'django_nis2_shield.middleware.Nis2GuardMiddleware', 'django.middleware.common.CommonMiddleware', ] NIS2_SHIELD = { 'INTEGRITY_KEY': 'your-secret-key', 'ANONYMIZE_IPS': True, 'ENABLE_RATE_LIMIT': True, 'BLOCK_TOR_EXIT_NODES': True, }