From zero to NIS2-compliant in 15 minutes. Backend, frontend, and infrastructure.
For Django backend
For React frontend
For infrastructure
Security middleware with forensic logging
# Install the package
pip install django-nis2-shield
# In settings.py, add the middleware
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django_nis2_shield.middleware.Nis2GuardMiddleware',
# ... other middleware
]
# Configure NIS2 Shield
NIS2_SHIELD = {
'LOG_FORMAT': 'JSON',
'ANONYMIZE_IPS': True,
'ENFORCE_MFA_ROUTES': ['/admin/'],
}
# Run the audit command
python manage.py check_nis2
Client-side security and telemetry
# Install the package
npm install @nis2shield/react-guard
# In your App.tsx
import { Nis2Provider, SessionWatchdog, AuditBoundary } from '@nis2shield/react-guard';
function App() {
return (
<Nis2Provider config={{ auditEndpoint: '/api/nis2/telemetry/' }}>
<SessionWatchdog idleTimeout={15} />
<AuditBoundary>
<YourApp />
</AuditBoundary>
</Nis2Provider>
);
}
Hardened containers, log segregation, backups
# Clone the infrastructure repo
git clone https://github.com/nis2shield/infrastructure.git
cd infrastructure
# Configure environment
cp .env.example .env
nano .env # Set your passwords
# Start the base stack
docker-compose up -d
# Or with ELK observability
./scripts/elk-setup.sh
# Or with Prometheus/Grafana
./scripts/monitoring-setup.sh
# Test disaster recovery
./scripts/restore-test.sh
@nis2shield/react-guard • Session, Storage, Telemetry
django-nis2-shield • Logging, Rate Limiting, Audit
Fluent Bit → SIEM • Backups • Prometheus/Grafana