Skip to content

v1.2.12 — Dynamic Policy-as-Code (RBAC), Zero-Downtime Hot-Reloading & Enterprise Hardening

Choose a tag to compare

@ninadphalak ninadphalak released this 22 Aug 15:19
· 87 commits to main since this release
4bbec52

What's New in v1.2.12

🛡️ Dynamic Policy-as-Code (RBAC) & Zero-Downtime Hot Reloading

  • Hierarchical Role-Based Access Control: Introduced declarative policies.yaml mapping virtual_key_id identities to granular security roles (e.g., developer_tier, clinical_tier, financial_tier).
  • Zero-Downtime Hot-Reloading: Built-in background file watcher dynamically reloads and recompiles policy rules upon file modification without restarting proxy processes or interrupting active streaming connections.
  • Dynamic Thread-Safe Context Settings: Implemented DynamicSettingsProxy using Python contextvars to provide per-request, $O(1)$ setting overrides for masking modes, rate limits, PII profiling, and fail-safe behaviors.
  • Granular NER & Detection Scoping: Enables per-tenant toggling of Tier 3 ONNX/regex NER engines, custom regex patterns, and synthetic swapping behaviors.

⚡ Concurrency & Architecture Hardening

  • Thread-Safe ContextVar Propagation: Redaction workloads dispatched to CPU worker pools via loop.run_in_executor now utilize contextvars.copy_context().run to ensure thread-pool execution inherits active request policy overrides.
  • Lifecycle-Bound Event Loops: Refactored AppState.shutdown_event to bind dynamically inside FastAPI's async lifespan handler, eliminating event loop concurrency mismatches under multi-worker environments and test harnesses.
  • BetterProto Python 3.11+ Dataclass Compatibility: Decorated Envoy ext_proc gRPC protobuf definitions with @dataclass(eq=False, repr=False) to guarantee standard compliance and zero serialization overhead across Python 3.11 and 3.12 runtimes.

📖 Documentation & Compliance Hub

  • Added POLICIES.md: Exhaustive guide to RBAC configuration, custom role definitions, dynamic overrides, and audit trail schemas.
  • Updated DEPLOYMENT.md and FEATURES.md with streamlined enterprise architectural notes.
  • Updated README.md with curl verification examples and policy-as-code operational commands.

📦 Installation & Verification

Install the latest release directly from PyPI:

pip install --upgrade llm-shield-proxy==1.2.12

**Full Changelog**: https://github.com/ninadphalak/LLM-Shield-Proxy/compare/v1.2.11...v1.2.12