Skip to main content

SecureLLM Bridge

License Rust Nix Docker CI Status

Zero-Trust Gateway for Large Language Model Orchestration

Enterprise-grade proxy ensuring security, compliance, and observability for generative AI integrators.


πŸ“Š By The Numbers​

MetricValueSignificance
SafetyStrict100% Rust-based memory safety guarantees
Scale~5k LOCModular Workspace with 5 decoupled crates
Performance<1msOverhead per request (excluding LLM latency)
Compliance100%Full audit trail of every input/output token

πŸš€ Strategic Value​

In a fragmented AI ecosystem, direct API consumption creates a chaotic attack surface. SecureLLM Bridge acts as a unified control plane, applying a "Defense-in-Depth" strategy to your AI infrastructure.

  • πŸ›‘οΈ Zero-Trust Architecture: Authentication (mTLS) and Authorization (RBAC) are enforced before any request touches an LLM.
  • πŸ”­ Full Observability: Unlike opaque client libraries, we provider comprehensive telemetry (Tracing, Metrics, Logs) compatible with OpenTelemetry.
  • βš–οΈ Governance & Compliance: Enforce PII sanitization (Redaction) at the gateway level, ensuring sensitive data never leaves your perimeter.
  • πŸ”Œ Vendor Agnostic: Decouples your internal logic from specific providers (OpenAI, DeepSeek, Anthropic), preventing vendor lock-in.

πŸ—οΈ Architecture​

The system utilizes a Cargo Workspace pattern to enforce separation of concerns between the core data models, security middleware, and provider adapters.

flowchart LR
Client[Internal Service] -->|mTLS| Gateway[SecureLLM Gateway]

subgraph Gateway [SecureLLM Bridge]
Auth[mTLS Auth] --> RateLimit[Rate Limiter]
RateLimit --> Audit[Audit Logger]
Audit --> Router{Provider Router}

Router -->|DeepSeek| DSAdapter[DeepSeek Adapter]
Router -->|OpenAI| OAAdapter[OpenAI Adapter]
Router -->|Local| OllamaAdapter[Ollama Adapter]
end

DSAdapter -->|HTTPS| DeepSeek[DeepSeek API]
OAAdapter -->|HTTPS| OpenAI[OpenAI API]
OllamaAdapter -->|HTTP| Ollama[Local Ollama]

Audit -.->|Async Write| SQLite[(Audit DB)]

⚑ Technical Stack​

  • Runtime: Rust (Tokio, Axum, Tower) for predictable latency and memory safety.
  • Build System: Nix Flakes for bit-for-bit reproducible development environments.
  • Containerization: Docker multi-stage builds optimized for minimal image size (Alpine based).
  • Data Consistency: SQLite / Redis for state management and distributed rate limiting.

πŸ› οΈ Deployment​

Production (Docker)​

Designed for Kubernetes sidecar or standalone deployment.

docker run -d \
-p 3000:3000 \
-v $(pwd)/config:/app/config \
-e RUST_LOG=info \
securellm/bridge

Development (Nix)​

Enter a hermetic development shell with all dependencies (Rust, Cargo, OpenSSL, SQLite) pre-configured.

nix develop
cargo run --bin securellm

πŸ›‘οΈ Security Posture​

  • Audit Logging: Immutable record of all interactions.
  • Secret Management: Integration with platform keyrings (Linux/macOS/Windows) via keyring crate.
  • Input Sanitization: Regex-based PII redaction pipeline.

🀝 Contributing​

Governance model follows standard Open Source best practices. See CONTRIBUTING.md.

πŸ“„ License​

Dual-licensed under MIT or Apache-2.0 to ensure maximum compatibility with enterprise legal requirements.