@@ -9,58 +9,71 @@ Unlike traditional AI service layers, PolicyStream embeds **policy enforcement,
99
1010## ✨ Key Features
1111
12- - ** 🔒 Security & Governance** → All requests evaluated by a Policy Enforcement Point (PEP) against organizational policies before execution.
13- - ** 📊 Observability & Auditability** → Every decision and model interaction logged into an Evidence Store for compliance reporting.
14- - ** ⚖️ Risk Awareness** → Dynamic checks against Data Protection Impact Assessments (DPIAs), risk registers, and compliance rules.
15- - ** ⚙️ Modular AI Runtime** → Supports Retrieval-Augmented Generation (RAG), tool brokers, and hosted/third-party LLMs.
16- - ** ☸️ Cloud-Native Design** → Deployable on Kubernetes (EKS, GKE, AKS, or on-prem), with GitHub Actions + GHCR pipelines.
17- - ** 🌐 Multitenancy + Regionalization** → Supports tenant-aware routing and regional data residency enforcement.
12+ - ** Security & Governance** → All requests evaluated by a Policy Enforcement Point (PEP) against organizational policies before execution.
13+ - ** Observability & Auditability** → Every decision and model interaction logged into an Evidence Store for compliance reporting.
14+ - ** Risk Awareness** → Dynamic checks against Data Protection Impact Assessments (DPIAs), risk registers, and compliance rules.
15+ - ** Modular AI Runtime** → Supports Retrieval-Augmented Generation (RAG), tool brokers, and hosted/third-party LLMs.
16+ - ** Cloud-Native Design** → Deployable on Kubernetes (EKS, GKE, AKS, or on-prem), with GitHub Actions + GHCR pipelines.
17+ - ** Multitenancy + Regionalization** → Supports tenant-aware routing and regional data residency enforcement.
1818
1919---
2020
2121## 🏗️ Architecture Overview
2222
2323``` mermaid
2424flowchart TB
25- subgraph CLIENTS[Clients]
26- Web[🌐 Web App]
27- Mobile[📱 Mobile App]
28- Partner[🤝 Partner API]
25+ %% Clients
26+ subgraph CLIENTS["Clients"]
27+ Web["Web App"]
28+ Mobile["Mobile App"]
29+ Partner["Partner API"]
2930 end
3031
31- subgraph GATEWAY[Gateway + WAF]
32- AuthN[🔑 Auth & Tokens]
33- RateLimit[⏳ Rate Limiting]
34- Validate[🧾 Schema & Payload Validation]
35- PEP[⚖️ Policy Enforcement Point]
32+ %% Edge / Gateway
33+ subgraph GATEWAY["Gateway and WAF"]
34+ AuthN["Auth and Tokens"]
35+ RateLimit["Rate Limiting"]
36+ Validate["Schema and Payload Validation"]
37+ PEP["Policy Enforcement Point (PEP)"]
3638 end
3739
38- subgraph AIMS[AIMS (Policy Decision Point)]
39- PDP[📜 Policy Rules Engine (OPA/Rego)]
40- Evidence[📂 Evidence Store (Audit Logs)]
40+ %% AIMS / PDP
41+ subgraph AIMS["AIMS - Policy Decision Point"]
42+ PDP["Policy Rules Engine (OPA/Rego)"]
43+ Evidence["Evidence Store (Audit Logs)"]
4144 end
4245
43- subgraph SERVICES[Core AI Services]
44- RAG[📚 Retrieval-Augmented Gen]
45- Tools[🛠️ Tool Broker]
46- Models[🤖 Model Service(s)]
46+ %% Core Services
47+ subgraph SERVICES["Core AI Services"]
48+ RAG["Retrieval-Augmented Generation"]
49+ Tools["Tool Broker"]
50+ Models["Model Service"]
4751 end
4852
49- subgraph OBS[Observability & Audit]
50- Logs[📑 Logs & Traces]
51- Metrics[📈 Metrics & Usage]
52- SIEM[🛡️ Security Monitoring]
53+ %% Observability
54+ subgraph OBS["Observability and Audit"]
55+ Logs["Logs and Traces"]
56+ Metrics["Metrics and Usage"]
57+ SIEM["Security Monitoring (SIEM/SOC)"]
5358 end
5459
55- CLIENTS --> GATEWAY
60+ %% Flows
61+ Web --> GATEWAY
62+ Mobile --> GATEWAY
63+ Partner --> GATEWAY
64+
5665 GATEWAY --> PEP
5766 PEP --> PDP
5867 PDP --> Evidence
59- PEP --> SERVICES
60- SERVICES --> RAG
61- SERVICES --> Tools
62- SERVICES --> Models
63- SERVICES --> Logs
68+
69+ PEP --> RAG
70+ PEP --> Tools
71+ PEP --> Models
72+
73+ RAG --> Logs
74+ Tools --> Logs
75+ Models --> Logs
76+
6477 Logs --> SIEM
6578 Logs --> Metrics
6679```
@@ -69,39 +82,39 @@ flowchart TB
6982
7083## 📦 Microservices
7184
72- ### 1. ** Gateway**
85+ ### 1. Gateway
7386- Routes client requests.
74- - Handles ** auth, rate-limiting, WAF rules, and initial request validation** .
87+ - Handles auth, basic rate-limiting, and payload validation.
7588- Forwards requests to PEP → AIMS → Services.
7689
77- ### 2. ** PEP (Policy Enforcement Point)**
90+ ### 2. PEP (Policy Enforcement Point)
7891- Intercepts every request.
79- - Calls ** AIMS PDP** for policy decisions.
80- - Supports ** allow, deny, modify** outcomes.
92+ - Calls AIMS PDP for policy decisions.
93+ - Supports allow / deny / modify outcomes.
8194
82- ### 3. ** AIMS (AI Management System)**
83- - Central ** policy decision point** (OPA/Rego).
84- - Stores ** evidence of every decision** (audit trail).
85- - Integrates with enterprise ** risk registers, DPIAs, and compliance APIs** .
95+ ### 3. AIMS (AI Management System)
96+ - Central policy decision point (OPA/Rego-ready ).
97+ - Stores evidence of every decision (audit trail).
98+ - Integrates with risk registers, DPIAs, and compliance APIs.
8699
87- ### 4. ** RAG Service**
88- - Provides ** context retrieval** ( from vector DB / knowledge base) .
100+ ### 4. RAG Service
101+ - Provides context retrieval from a knowledge base/vector DB .
89102- Adds grounding to model responses.
90103
91- ### 5. ** Tools Service**
92- - Acts as a ** broker ** for external APIs.
93- - Example: calendar integration , DB lookups, external compliance checks.
104+ ### 5. Tools Service
105+ - Broker for external APIs and system tools .
106+ - Examples: calendars , DB lookups, compliance checks.
94107
95- ### 6. ** Models Service**
96- - Simple hosted model stub (echo service for dev) .
97- - Replaceable with OpenAI, Anthropic, or NVIDIA NIM APIs.
108+ ### 6. Models Service
109+ - Simple echo model for development .
110+ - Swap for OpenAI, Anthropic, or NVIDIA NIM APIs.
98111
99112---
100113
101- ## 🚀 Quick Start
114+ ## 🚀 Quick Start (Docker Compose)
102115
103- ### Local Development (Docker Compose)
104116``` powershell
117+ # from repo root
105118docker compose up --build -d
106119```
107120
@@ -117,43 +130,50 @@ curl.exe http://localhost:8083/healthz # models
117130
118131** Test Request**
119132``` powershell
120- curl.exe -X POST http://localhost:8080/v1/route `
121- -H "Content-Type: application/json" `
122- -d "{\"user_id\":\"u1\",\"prompt\":\"Draft a friendly email (no secrets).\",\"sensitivity\":\"Public\",\"labels\":[\"Public\"]}"
133+ curl.exe -X POST http://localhost:8080/v1/route -H "Content-Type: application/json" -d "{"user_id":"u1","prompt":"Draft a friendly email (no secrets).","sensitivity":"Public","labels":["Public"]}"
123134```
124135
125136---
126137
127- ## ☸️ Kubernetes Deployment
138+ ## ☸️ Kubernetes Deployment (Helm)
128139
129140``` powershell
130- # Push to GitHub Container Registry
141+ # Push images to GHCR
131142docker login ghcr.io -u <USERNAME> -p <TOKEN>
132143$services = @("gateway","pep","aims","rag","tools","models")
133144foreach ($s in $services) {
134145 docker build -t ghcr.io/<org>/policystream/$s:dev ".\services\$s"
135146 docker push ghcr.io/<org>/policystream/$s:dev
136147}
137148
138- # Deploy via Helm
149+ # Deploy with Helm
139150helm upgrade --install policystream .\charts\policystream `
140151 -n prod --create-namespace `
141152 --set global.registry=ghcr.io/<org>/policystream `
142153 --set global.tag=dev
143154```
144155
156+ ** Verify**
157+ ``` powershell
158+ kubectl -n prod get pods
159+ kubectl -n prod get svc
160+ # optional port-forward for quick testing
161+ kubectl -n prod port-forward svc/policystream-gateway 8080:80
162+ curl.exe http://localhost:8080/healthz
163+ ```
164+
145165---
146166
147- ## 📖 Roadmap
167+ ## 📖 Roadmap
148168
149- - [ ] Add ** NVIDIA NIM API support** for accelerated inference.
150- - [ ] Integrate ** Azure Purview** for enterprise governance.
151- - [ ] Support ** multi -cluster Kubernetes federation** .
152- - [ ] Add ** policy authoring UI** for non-technical stakeholders.
169+ - Add NVIDIA NIM API support for accelerated inference.
170+ - Integrate Azure Purview-style governance connectors .
171+ - Multi -cluster federation support .
172+ - Policy authoring UI for non-technical stakeholders.
153173
154174---
155175
156- ## 📜 References (APA-style placeholders)
176+ ## 📜 References (APA-style placeholders)
157177
158178- Microsoft. (2023). * Microsoft Purview: Data governance at scale* . Microsoft Docs.
159179- Open Policy Agent. (2024). * OPA/Rego Policy Engine* . CNCF.
0 commit comments