November 2025 Changelog
Detailed changes from November 2025, listed in reverse chronological order.
2025-11-20
Updated Foundations Page with Namespace Configuration References
Branch: copilot/update-documentation-for-namespaces
Summary: Enhanced the "Foundations" (key-documents) page with comprehensive references to the latest namespace configuration work, including RFC-047 (Namespace Reservation), RFC-056 (Unified Configuration Model), and the namespace-request documentation.
Changes:
- Added new "Phase 2.5: Namespace Configuration Deep Dive" (12 min) section
- Included RFC-056 (Unified Configuration Model) with key concepts
- Added practical Namespace Configuration documentation reference
- Included RFC-047 (Namespace Reservation with Lease Management)
- Updated "New to Prism" reading path from 35 min to 47 min
- Enhanced "Implementing a Feature" reading path with namespace configuration step
- Updated Quick Reference table to include namespace configuration documents
- Added "Namespace Management" category to Additional Deep Dives section
- Updated timestamp to 2025-11-20
Documents Referenced:
- RFC-056: Unified Configuration Model
- Namespace Configuration Documentation
- RFC-047: Namespace Reservation with Lease Management
- RFC-048: Cross-Proxy Partition Strategies
- ADR-006: Namespace and Multi-Tenancy
Impact: New users and implementers now have clear guidance on how namespace configuration has evolved, making it easier to understand the complete configuration story from user requests through platform provisioning.
2025-11-19
Pattern Proxy Integration Tests with Proper Layer Isolation
Branch: feature/vault-integration-phase2
Summary: Implemented proper integration tests that validate complete data flow through prism-proxy using pattern-level gRPC APIs. Tests connect to proxy (NOT backends directly), ensuring proper layer isolation and security. All backend services (Kafka, NATS, Redis, PostgreSQL) have no external port mappings - access is exclusively through prism-proxy.
Key Architectural Fix: Previous approach bypassed the proxy and connected tests directly to backends. This violated production architecture where backends are internal-only. New tests properly validate the entire stack: Test Client → Proxy (gRPC) → Pattern Runner → Pattern → Driver → Backend.
Security Model:
- Backend Isolation: No external ports on Kafka (9092), NATS (4222), Redis (6379), PostgreSQL (5432)
- Single Entry Point: Only prism-proxy exposed via localhost:50090 (gRPC), localhost:50091 (metrics)
- Internal Networks: Backends accessible only within Docker network
- Debugging: Use Prometheus metrics and container exec, not direct backend access
Test Architecture:
Test gRPC Client
↓
prism-proxy:50090 (ONLY exposed port)
↓ routes request
Pattern Runner (internal)
↓ executes pattern
Driver (internal)
↓ connects to backend
Backend (internal, no external ports)
Test Scenarios:
1. KeyValue Round-Trip with Random Data
- Generate random test data (UUID, timestamp, random int)
- Store via
KeyValue.Store()gRPC call to proxy - Retrieve via
KeyValue.Retrieve()gRPC call to proxy - Validate exact field-by-field match
- Proves: Data integrity through Client → Proxy → Pattern → Redis → Pattern → Proxy → Client
2. Producer/Consumer Message Flow
- Generate unique topic and random message
- Publish via
Producer.Publish()with metadata - Consume via
Consumer.Consume()with timeout - Validate message payload and envelope metadata
- Proves: Message flow through Client → Proxy → Producer → Kafka → Consumer → Proxy → Client
3. Session Context Propagation
- Publish message with session context (user_id, tenant_id, roles)
- Session credentials flow through envelope headers
- Pattern runners can access session for authorization
Test Execution:
# Start complete stack (proxy waits for backends)
docker-compose -f docker-compose.test.yml up -d
# Verify ONLY proxy is accessible
nc -zv localhost 50090 # ✓ Should succeed
nc -zv localhost 4222 # ✗ Should FAIL (NATS internal)
nc -zv localhost 6379 # ✗ Should FAIL (Redis internal)
# Run integration tests
go test -v ./tests/integration/patterns -run TestPatternProxyIntegration
Infrastructure Changes:
- docker-compose.test.yml: Removed all
ports:mappings from backends - Only prism-proxy and prism-admin have external ports
- Healthchecks run inside containers, not from host
New Files:
tests/integration/patterns/pattern_proxy_integration_test.go(238 lines) - Proxy integration testpkg/patterns/common/envelope.go(185 lines) - Universal envelope formatpkg/patterns/common/audit.go(175 lines) - Audit logging interfaces
Updated Files:
docker-compose.test.yml- Removed external ports from kafka, nats, redis, postgres, localstacktests/integration/patterns/README.md- Updated with proper architecture diagrams and troubleshootingtests/integration/patterns/namespace_integration_test.go- Marked as DEPRECATED (bypassed proxy)
Benefits:
- Production-Like Testing: Tests mirror actual deployment architecture
- Security Validation: Proves backends are not externally accessible
- Complete Stack Coverage: Validates proxy routing, pattern execution, driver operation
- No False Positives: Random test data ensures proper validation
- Observability Focus: Debugging via metrics/logs, not direct backend access
Debugging Approach:
# Check proxy health
docker logs prism-proxy
# Verify backend connectivity (from inside container)
docker exec prism-proxy sh -c "nc -zv prism-kafka 9092"
# View metrics endpoint
curl localhost:50091/metrics
# Execute commands in containers
docker exec prism-nats nats server info
docker exec prism-redis redis-cli info
Next: E2E testing with local Vault + Dex for authentication through proxy
2025-11-18
Phase 3: Pattern Runner Authentication Integration ✅
Branch: feature/vault-integration-phase2
Summary: Extended authentication support to all three pattern runners (KeyValue, Consumer, Producer). Each pattern runner now supports optional Vault-based dynamic credential management with dual-mode operation (auth enabled/disabled).
Implementation Details:
Consumer Pattern Runner:
- Added SessionManager and service identity authentication
- Implemented
initializeAuth()method with full Vault integration - Updated lifecycle methods (Initialize/Stop) for session management
- Built successfully: 23MB binary
- Example configs:
consumer-auth-disabled.yaml,consumer-auth-enabled.yaml
Producer Pattern Runner:
- Refactored to ProducerRunner struct with auth support
- Created RunnerConfig wrapper for auth configuration
- Implemented complete auth lifecycle (Initialize/Start/Stop)
- Built successfully: 28MB binary
- Example configs:
producer-auth-disabled.json,producer-auth-enabled.json
KeyValue Pattern Runner (completed earlier):
- Per-request authentication with SessionMiddleware
- gRPC interceptor for JWT validation
- Session-based credential injection
- Example configs:
keyvalue-auth-disabled.yaml,keyvalue-auth-enabled.yaml
New Files:
examples/configs/consumer-auth-disabled.yaml- Consumer without authexamples/configs/consumer-auth-enabled.yaml- Consumer with Vault integrationexamples/configs/producer-auth-disabled.json- Producer without authexamples/configs/producer-auth-enabled.json- Producer with Vault integrationdocs-cms/memos/memo-091-local-vault-dex-setup.md- Local development setup guide
Modified Files:
patterns/consumer/cmd/consumer-runner/main.go- Added auth support (320+ lines)patterns/consumer/cmd/consumer-runner/go.mod- Added authz dependencypatterns/producer/cmd/producer-runner/main.go- Complete refactor with auth (330+ lines)patterns/producer/go.mod- Added authz dependencygo.work- Added producer pattern to workspace
Architecture Models:
- KeyValue: Per-request authentication (users send JWT with each request)
- Consumer/Producer: Service identity authentication (single session for service lifetime)
Authentication Flow:
Service Startup
↓
initializeAuth() → Create TokenValidator + VaultClient + SessionManager
↓
Service obtains JWT (from K8s SA or environment)
↓
JWT validated → Exchange for Vault token
↓
Fetch dynamic credentials (database/creds/role)
↓
Backend connections use dynamic credentials
↓
Background renewal every lease_duration/2
↓
On shutdown: Revoke credentials via Vault
Features:
- ✅ All 3 patterns support Vault authentication
- ✅ Dual-mode operation (auth enabled/disabled)
- ✅ Dynamic credential fetching and renewal
- ✅ Automatic credential revocation on shutdown
- ✅ Session caching to avoid repeated Vault calls
- ✅ TLS support for Vault connections
- ✅ Configurable session TTL and idle timeout
- ✅ JWT validation with OIDC provider integration
- ✅ Support for K8s and AWS service identities
Local Development Setup:
- MEMO-091 provides complete Docker Compose setup
- Includes Dex (OIDC), Vault (dev mode), Redis, NATS
- Step-by-step configuration and testing guide
- Full end-to-end authentication flow examples
Next: E2E testing with local infrastructure, production operator guide (MEMO-092), troubleshooting guide (MEMO-093)
Phase 2: Vault Integration and Session Management ✅
Branch: feature/vault-integration-phase2
Summary: Implemented complete Vault integration for dynamic credential management. The pkg/authz package now provides session lifecycle management with automatic credential renewal, JWT token validation with OIDC providers, and Vault client operations.
Core Components:
Session Management (pkg/authz/session_manager.go):
- CreateSession: JWT → Vault token → Backend credentials
- GetSession: Retrieve active session by ID
- CloseSession: Revoke credentials and clean up
- CleanupExpiredSessions: Background cleanup task
- Session caching with TTL and idle timeout support
Vault Client (pkg/authz/vault_client.go, vault_credentials.go, vault_renewal.go):
- AuthenticateWithJWT: Exchange JWT for Vault token
- GetBackendCredentials: Fetch dynamic credentials from secret paths
- RenewCredentials: Background renewal worker
- RevokeCredentials: Explicit lease revocation
- TLS support with CA cert validation
Token Validation (pkg/authz/token_validator.go):
- OIDC provider integration with JWKS fetching
- JWT signature verification
- Issuer and audience claim validation
- Expiry checking with configurable skip flags
Service Identity (pkg/authz/k8s_auth.go, aws_auth.go):
- Kubernetes service account token authentication
- AWS IAM role authentication
- Automatic service identity detection
Session Middleware (pkg/plugin/session_middleware.go):
- gRPC interceptors (unary and streaming)
- Automatic JWT extraction from metadata
- Session creation and caching
- Credential injection into context
- 32.8% test coverage
New Files:
pkg/authz/session_manager.go(350+ lines) - Core session lifecyclepkg/authz/vault_client.go(280+ lines) - Vault SDK wrapperpkg/authz/vault_credentials.go(120+ lines) - Credential operationspkg/authz/vault_renewal.go(150+ lines) - Background renewalpkg/authz/token_validator.go(180+ lines) - JWT validationpkg/authz/k8s_auth.go(90+ lines) - K8s service identitypkg/authz/aws_auth.go(85+ lines) - AWS service identitypkg/plugin/session_middleware.go(200+ lines) - gRPC interceptorsdocs-cms/memos/memo-083-phase2-vault-integration-plan.md- Implementation plandocs-cms/memos/memo-089-session-middleware-integration-guide.md- Integration guide
Security Features:
- ✅ JWT signature verification with JWKS
- ✅ Dynamic credentials from Vault (1h TTL default)
- ✅ Automatic credential renewal (every 30min default)
- ✅ Credential revocation on session end
- ✅ TLS for Vault connections with CA validation
- ✅ Per-session credential isolation
- ✅ Token expiry validation
- ✅ Issuer and audience claim checks
Integration Tests:
pkg/authz/integration_test.go- Full authentication flow- Uses Vault testcontainer for realistic testing
- JWT → Vault token → Dynamic credentials
- Currently blocked by Go module dependencies
Next: Pattern runner integration (Phase 3), E2E testing with local Vault + Dex
Control Plane RPC Handler (Namespace Management Complete) ✅
Branch: feature/vault-integration-phase2
Summary: Implemented complete namespace creation RPC handler with pattern selection (Layer 3) and backend assignment (Layer 4). Control plane now fully supports unified namespace model.
New Files:
-
cmd/prism-admin/pattern_selection.go(126 lines):- Layer 3: Pattern selection logic
- Validates pattern registry (SessionManager, KeyValue, Producer, etc.)
- Assigns pattern versions and metadata
- Marks session-aware patterns
-
cmd/prism-admin/backend_assignment.go(177 lines):- Layer 4: Backend assignment logic
- Maps slots to backend instances (Redis, Postgres, Kafka, NATS, etc.)
- Generates connection info and Vault credential paths
- Default local dev endpoints
-
cmd/prism-admin/namespace_handler.go(195 lines):- Complete namespace lifecycle (Create, Get, Update, Delete)
- Unified creation flow: Validate → Pattern Selection → Backend Assignment → Persist
- Returns NamespaceResponse with assigned patterns and slot bindings
- Ready for launcher integration
Modified:
cmd/prism-admin/control_plane.go:- CreateNamespace RPC now uses
configv1.NamespaceRequest(not old CreateNamespaceRequest) - Returns
configv1.NamespaceResponsewith full assignments - Integrated with NamespaceHandler
- CreateNamespace RPC now uses
Complete Pipeline:
Client: NamespaceRequest (protobuf)
↓
Control Plane: Validate (business rules)
↓
Layer 3: Pattern Selection (choose implementations)
↓
Layer 4: Backend Assignment (assign backend instances to slots)
↓
Storage: Persist namespace configuration
↓
Response: NamespaceResponse (assigned patterns, slot bindings, partition)
Supported Backends:
- Redis (localhost:6379)
- PostgreSQL (localhost:5432)
- Kafka (localhost:9092)
- NATS (localhost:4222)
- SQLite (/tmp/prism.db)
- MemStore (memory://)
- S3/MinIO (localhost:9000)
- ClickHouse (localhost:9000)
Features:
- ✅ Multi-pattern composition
- ✅ Slot-based backend dependencies
- ✅ Vault dynamic credential paths (vault://secret/data/prism/...)
- ✅ Session-aware pattern handling
- ✅ Partition assignment (consistent hashing)
- ✅ Pattern version management
- ✅ Metadata tracking
Next: Integration tests and prism-launcher deployment
Protobuf-First YAML Loader (Phase 2 Complete) ✅
Branch: feature/vault-integration-phase2
Summary: Implemented protobuf-first configuration loading where YAML is an import format only, not the source of truth. Protobuf types are canonical.
New Files:
-
pkg/config/protobuf_loader.go(240 lines):- LoadNamespaceProto: YAML file → protobuf NamespaceRequest
- ParseNamespaceYAML: YAML bytes → protobuf with validation
- FormatNamespaceYAML: protobuf → YAML (export/preview)
- Multi-namespace configuration support
-
pkg/config/validation.go(260 lines):- Business logic validation (cross-field rules)
- SessionManager requirements enforcement
- Session-aware pattern constraints
- Slot naming conventions ({purpose}-{type})
- Credential detection (vault:// allowed, static credentials flagged)
Test Coverage:
pkg/config/protobuf_loader_test.go: 14 test cases, YAML round-trip testingpkg/config/validation_test.go: 24 test cases, validation rules- Total: 38 tests, all passing (0.571s)
Key Features:
- ✅ YAML → JSON → protobuf conversion pipeline
- ✅ Validates all business rules (SessionManager, session-aware, slots)
- ✅ Round-trip support (YAML ↔ protobuf)
- ✅ Multi-namespace config files
- ✅ Static credential detection in session-aware patterns
- ✅ Vault dynamic credential support (vault:// paths)
Benefits:
- Single source of truth: Protobuf (ADR-003)
- YAML as human-friendly import/export format only
- Type-safe construction via protobuf
- Multi-language support (Go, Python, Rust, Java)
Next: Phase 3 - Implement CreateNamespace RPC handler in control plane
Protobuf Import Cycle Resolution 🔧
Branch: feature/vault-integration-phase2
Summary: Fixed import cycle between prism and prism.config.v1 packages by moving shared field options to new prism.common package.
Problem: Import cycle prevented compilation:
prismpackage (control_plane.proto) importedprism.config.v1packageprism.config.v1importedprismpackage for field options (prism.validation, prism.required, etc.)- Go compiler: "import cycle not allowed"
Solution: Created prism.common package for shared annotations:
- Moved
proto/prism/options.proto→proto/prism/common/options.proto - Changed package from
prismtoprism.common - Updated all field option references:
prism.*→prism.common.* - Fixed go_package paths:
proto/gen→pkg/plugin/gen
Files Modified:
proto/prism/common/options.proto(new location)- All proto files updated with correct imports and option references
examples/client/namespace_client.go(import paths)
Result:
- ✅ All protobuf code compiles without errors
- ✅ No import cycles
- ✅ Example client compiles successfully
- ✅ Generated code in
pkg/plugin/gen/prism/andpkg/plugin/gen/prism/config/v1/
Unified Namespace Model with Protobuf 🎯
Branch: feature/vault-integration-phase2
Summary: Established the UNIFIED namespace model where ALL namespaces natively support multi-pattern composition, slot-based backends, and authentication. No "simple" vs "composable" split - just ONE namespace type that does it right.
New Documents:
- MEMO-092: Unified Namespace Model with Protobuf:
- Protobuf as canonical format (ADR-003, ADR-002)
- ONE
NamespaceRequesttype (no backward compat needed - Prism is new) - Patterns, slots, auth built into core namespace model
- YAML/JSON as export/preview format only
- Client SDK examples (Go, Python, Rust)
Enhanced Proto Files:
proto/prism/config/v1/namespace_request.proto- Enhanced with patterns, slots, auth (550 lines)Patternmessage for multi-pattern compositionSlotmessage for backend dependenciesAuthConfig,VaultConfig,JWTConfigfor authenticationDeploymentPreferencesfor topology hintsNamespaceResponsewith assigned patterns and slot bindings
proto/prism/control_plane.proto- SimplifiedCreateNamespaceRPC
Client Example:
examples/client/namespace_client.go- Unified namespace construction
Key Improvements:
- Removed unnecessary complexity (no "composable" prefix)
- ONE namespace type that supports everything
- Type-safe construction with protobuf
- Multi-language client SDKs (Go, Python, Rust, Java)
- No schema drift (protobuf is canonical)
Updated Documents:
- MEMO-083 - Added Phase 2 completion status (85% complete, code done)
- MEMO-089 - Fixed broken ADR link
2025-11-17
Phase 2 Vault Integration Plan (MEMO-094) 🔐
Branch: feature/vault-integration-phase2
Summary: Detailed 6-week implementation plan for Phase 2 of Prism's authentication system. Builds on Phase 1 (JWT auth, completed) to add HashiCorp Vault integration for per-session, dynamic backend credentials.
New Document:
- MEMO-083: Phase 2 Vault Integration Implementation Plan:
- Week-by-week implementation breakdown (6 weeks total)
- Core Vault infrastructure (JWT → Vault token exchange)
- Credential lifecycle (fetch, renew, revoke)
- Session management with per-user isolation
- Service identity authentication (K8s SA, AWS IAM, Azure MI, GCP SA)
- Integration testing strategy with Vault testcontainer
- Vault operator setup guide (auth methods, secrets engines, policies)
Key Benefits:
- Per-session credential isolation (each user gets unique backend username)
- Automatic credential rotation (every 1 hour)
- Zero shared credentials (breach of one session doesn't compromise others)
- Per-user audit trails in backend logs (e.g.,
v-jwt-alice-abc123)
Current State:
- Phase 1 Complete ✅: JWT authentication, namespace authorization, auth context pass-through
- Phase 2 Not Implemented ❌: Vault integration is design-only (MEMO-008), zero code exists
Netflix Video Reference: Database Migrations at Scale
Summary: Added AWS re:Invent 2023 video reference featuring Netflix engineers discussing strategies for safely migrating databases that handle millions of requests per second.
New Document:
- Video: Database Migrations at Millions RPS: Zero-downtime migration patterns, dual-write strategies, and shadow traffic validation
Updates:
- Netflix index page now includes direct links to all three video references
2025-11-16
Documentation Feedback Mechanism
Branch: docs/manual-testing-readme-and-memo-049-fix
Summary: Added documentation feedback mechanism to improve user engagement with docs.
Pattern Proxy Integration Tests with Proper Layer Isolation
Branch: feature/namespace-integration-test
Summary: Implemented proper integration tests that validate complete data flow through prism-proxy using pattern-level gRPC APIs. Tests connect to proxy (NOT backends directly), ensuring proper layer isolation and security. All backend services (Kafka, NATS, Redis, PostgreSQL) have no external port mappings - access is exclusively through prism-proxy.
Key Architectural Fix: Previous approach bypassed the proxy and connected tests directly to backends. This violated production architecture where backends are internal-only. New tests properly validate the entire stack: Test Client → Proxy (gRPC) → Pattern Runner → Pattern → Driver → Backend.
Security Model:
- Backend Isolation: No external ports on Kafka (9092), NATS (4222), Redis (6379), PostgreSQL (5432)
- Single Entry Point: Only prism-proxy exposed via localhost:50090 (gRPC), localhost:50091 (metrics)
- Internal Networks: Backends accessible only within Docker network
- Debugging: Use Prometheus metrics and container exec, not direct backend access
Test Architecture:
Test gRPC Client
↓
prism-proxy:50090 (ONLY exposed port)
↓ routes request
Pattern Runner (internal)
↓ executes pattern
Driver (internal)
↓ connects to backend
Backend (internal, no external ports)
Test Scenarios:
1. KeyValue Round-Trip with Random Data
- Generate random test data (UUID, timestamp, random int)
- Store via
KeyValue.Store()gRPC call to proxy - Retrieve via
KeyValue.Retrieve()gRPC call to proxy - Validate exact field-by-field match
- Proves: Data integrity through Client → Proxy → Pattern → Redis → Pattern → Proxy → Client
2. Producer/Consumer Message Flow
- Generate unique topic and random message
- Publish via
Producer.Publish()with metadata - Consume via
Consumer.Consume()with timeout - Validate message payload and envelope metadata
- Proves: Message flow through Client → Proxy → Producer → Kafka → Consumer → Proxy → Client
3. Session Context Propagation
- Publish message with session context (user_id, tenant_id, roles)
- Session credentials flow through envelope headers
- Pattern runners can access session for authorization
Test Execution:
# Start complete stack (proxy waits for backends)
docker-compose -f docker-compose.test.yml up -d
# Verify ONLY proxy is accessible
nc -zv localhost 50090 # ✓ Should succeed
nc -zv localhost 4222 # ✗ Should FAIL (NATS internal)
nc -zv localhost 6379 # ✗ Should FAIL (Redis internal)
# Run integration tests
go test -v ./tests/integration/patterns -run TestPatternProxyIntegration
Infrastructure Changes:
- docker-compose.test.yml: Removed all
ports:mappings from backends - Only prism-proxy and prism-admin have external ports
- Healthchecks run inside containers, not from host
New Files:
tests/integration/patterns/pattern_proxy_integration_test.go(238 lines) - Proxy integration testpkg/patterns/common/envelope.go(185 lines) - Universal envelope formatpkg/patterns/common/audit.go(175 lines) - Audit logging interfaces
Updated Files:
docker-compose.test.yml- Removed external ports from kafka, nats, redis, postgres, localstacktests/integration/patterns/README.md- Updated with proper architecture diagrams and troubleshootingtests/integration/patterns/namespace_integration_test.go- Marked as DEPRECATED (bypassed proxy)
Benefits:
- Production-Like Testing: Tests mirror actual deployment architecture
- Security Validation: Proves backends are not externally accessible
- Complete Stack Coverage: Validates proxy routing, pattern execution, driver operation
- No False Positives: Random test data ensures proper validation
- Observability Focus: Debugging via metrics/logs, not direct backend access
Debugging Approach:
# Check proxy health
docker logs prism-proxy
# Verify backend connectivity (from inside container)
docker exec prism-proxy sh -c "nc -zv prism-kafka 9092"
# View metrics endpoint
curl localhost:50091/metrics
# Execute commands in containers
docker exec prism-nats nats server info
docker exec prism-redis redis-cli info
Next: E2E testing with local Vault + Dex for authentication through proxy
2025-11-18
Phase 3: Pattern Runner Authentication Integration
Branch: feature/namespace-integration-test
Summary: Extended authentication support to all three pattern runners (KeyValue, Consumer, Producer). Each pattern runner now supports optional Vault-based dynamic credential management with dual-mode operation (auth enabled/disabled).
Implementation Details:
Consumer Pattern Runner:
- Added SessionManager and service identity authentication
- Implemented
initializeAuth()method with full Vault integration - Updated lifecycle methods (Initialize/Stop) for session management
- Built successfully: 23MB binary
- Example configs:
consumer-auth-disabled.yaml,consumer-auth-enabled.yaml
Producer Pattern Runner:
- Refactored to ProducerRunner struct with auth support
- Created RunnerConfig wrapper for auth configuration
- Implemented complete auth lifecycle (Initialize/Start/Stop)
- Built successfully: 28MB binary
- Example configs:
producer-auth-disabled.json,producer-auth-enabled.json
KeyValue Pattern Runner (completed earlier):
- Per-request authentication with SessionMiddleware
- gRPC interceptor for JWT validation
- Session-based credential injection
- Example configs:
keyvalue-auth-disabled.yaml,keyvalue-auth-enabled.yaml
New Files:
examples/configs/consumer-auth-disabled.yaml- Consumer without authexamples/configs/consumer-auth-enabled.yaml- Consumer with Vault integrationexamples/configs/producer-auth-disabled.json- Producer without authexamples/configs/producer-auth-enabled.json- Producer with Vault integrationdocs-cms/memos/memo-091-local-vault-dex-setup.md- Local development setup guide
Modified Files:
patterns/consumer/cmd/consumer-runner/main.go- Added auth support (320+ lines)patterns/consumer/cmd/consumer-runner/go.mod- Added authz dependencypatterns/producer/cmd/producer-runner/main.go- Complete refactor with auth (330+ lines)patterns/producer/go.mod- Added authz dependencygo.work- Added producer pattern to workspace
Architecture Models:
- KeyValue: Per-request authentication (users send JWT with each request)
- Consumer/Producer: Service identity authentication (single session for service lifetime)
Authentication Flow:
Service Startup
↓
initializeAuth() → Create TokenValidator + VaultClient + SessionManager
↓
Service obtains JWT (from K8s SA or environment)
↓
JWT validated → Exchange for Vault token
↓
Fetch dynamic credentials (database/creds/role)
↓
Backend connections use dynamic credentials
↓
Background renewal every lease_duration/2
↓
On shutdown: Revoke credentials via Vault
Features:
- ✅ All 3 patterns support Vault authentication
- ✅ Dual-mode operation (auth enabled/disabled)
- ✅ Dynamic credential fetching and renewal
- ✅ Automatic credential revocation on shutdown
- ✅ Session caching to avoid repeated Vault calls
- ✅ TLS support for Vault connections
- ✅ Configurable session TTL and idle timeout
- ✅ JWT validation with OIDC provider integration
- ✅ Support for K8s and AWS service identities
Local Development Setup:
- MEMO-091 provides complete Docker Compose setup
- Includes Dex (OIDC), Vault (dev mode), Redis, NATS
- Step-by-step configuration and testing guide
- Full end-to-end authentication flow examples
Next: E2E testing with local infrastructure, production operator guide (MEMO-092), troubleshooting guide (MEMO-093)
Phase 2: Vault Integration and Session Management ✅
Branch: feature/vault-integration-phase2
Summary: Implemented complete Vault integration for dynamic credential management. The pkg/authz package now provides session lifecycle management with automatic credential renewal, JWT token validation with OIDC providers, and Vault client operations.
Core Components:
Session Management (pkg/authz/session_manager.go):
- CreateSession: JWT → Vault token → Backend credentials
- GetSession: Retrieve active session by ID
- CloseSession: Revoke credentials and clean up
- CleanupExpiredSessions: Background cleanup task
- Session caching with TTL and idle timeout support
Vault Client (pkg/authz/vault_client.go, vault_credentials.go, vault_renewal.go):
- AuthenticateWithJWT: Exchange JWT for Vault token
- GetBackendCredentials: Fetch dynamic credentials from secret paths
- RenewCredentials: Background renewal worker
- RevokeCredentials: Explicit lease revocation
- TLS support with CA cert validation
Token Validation (pkg/authz/token_validator.go):
- OIDC provider integration with JWKS fetching
- JWT signature verification
- Issuer and audience claim validation
- Expiry checking with configurable skip flags
Service Identity (pkg/authz/k8s_auth.go, aws_auth.go):
- Kubernetes service account token authentication
- AWS IAM role authentication
- Automatic service identity detection
Session Middleware (pkg/plugin/session_middleware.go):
- gRPC interceptors (unary and streaming)
- Automatic JWT extraction from metadata
- Session creation and caching
- Credential injection into context
- 32.8% test coverage
New Files:
pkg/authz/session_manager.go(350+ lines) - Core session lifecyclepkg/authz/vault_client.go(280+ lines) - Vault SDK wrapperpkg/authz/vault_credentials.go(120+ lines) - Credential operationspkg/authz/vault_renewal.go(150+ lines) - Background renewalpkg/authz/token_validator.go(180+ lines) - JWT validationpkg/authz/k8s_auth.go(90+ lines) - K8s service identitypkg/authz/aws_auth.go(85+ lines) - AWS service identitypkg/plugin/session_middleware.go(200+ lines) - gRPC interceptorsdocs-cms/memos/memo-083-phase2-vault-integration-plan.md- Implementation plandocs-cms/memos/memo-089-session-middleware-integration-guide.md- Integration guide
Security Features:
- ✅ JWT signature verification with JWKS
- ✅ Dynamic credentials from Vault (1h TTL default)
- ✅ Automatic credential renewal (every 30min default)
- ✅ Credential revocation on session end
- ✅ TLS for Vault connections with CA validation
- ✅ Per-session credential isolation
- ✅ Token expiry validation
- ✅ Issuer and audience claim checks
Integration Tests:
pkg/authz/integration_test.go- Full authentication flow- Uses Vault testcontainer for realistic testing
- JWT → Vault token → Dynamic credentials
- Currently blocked by Go module dependencies
Next: Pattern runner integration (Phase 3), E2E testing with local Vault + Dex
Control Plane RPC Handler (Namespace Management Complete) ✅
Branch: feature/vault-integration-phase2
Summary: Implemented complete namespace creation RPC handler with pattern selection (Layer 3) and backend assignment (Layer 4). Control plane now fully supports unified namespace model.
New Files:
-
cmd/prism-admin/pattern_selection.go(126 lines):- Layer 3: Pattern selection logic
- Validates pattern registry (SessionManager, KeyValue, Producer, etc.)
- Assigns pattern versions and metadata
- Marks session-aware patterns
-
cmd/prism-admin/backend_assignment.go(177 lines):- Layer 4: Backend assignment logic
- Maps slots to backend instances (Redis, Postgres, Kafka, NATS, etc.)
- Generates connection info and Vault credential paths
- Default local dev endpoints
-
cmd/prism-admin/namespace_handler.go(195 lines):- Complete namespace lifecycle (Create, Get, Update, Delete)
- Unified creation flow: Validate → Pattern Selection → Backend Assignment → Persist
- Returns NamespaceResponse with assigned patterns and slot bindings
- Ready for launcher integration
Modified:
cmd/prism-admin/control_plane.go:- CreateNamespace RPC now uses
configv1.NamespaceRequest(not old CreateNamespaceRequest) - Returns
configv1.NamespaceResponsewith full assignments - Integrated with NamespaceHandler
- CreateNamespace RPC now uses
Complete Pipeline:
Client: NamespaceRequest (protobuf)
↓
Control Plane: Validate (business rules)
↓
Layer 3: Pattern Selection (choose implementations)
↓
Layer 4: Backend Assignment (assign backend instances to slots)
↓
Storage: Persist namespace configuration
↓
Response: NamespaceResponse (assigned patterns, slot bindings, partition)
Supported Backends:
- Redis (localhost:6379)
- PostgreSQL (localhost:5432)
- Kafka (localhost:9092)
- NATS (localhost:4222)
- SQLite (/tmp/prism.db)
- MemStore (memory://)
- S3/MinIO (localhost:9000)
- ClickHouse (localhost:9000)
Features:
- ✅ Multi-pattern composition
- ✅ Slot-based backend dependencies
- ✅ Vault dynamic credential paths (vault://secret/data/prism/...)
- ✅ Session-aware pattern handling
- ✅ Partition assignment (consistent hashing)
- ✅ Pattern version management
- ✅ Metadata tracking
Next: Integration tests and prism-launcher deployment
Protobuf-First YAML Loader (Phase 2 Complete) ✅
Branch: feature/vault-integration-phase2
Summary: Implemented protobuf-first configuration loading where YAML is an import format only, not the source of truth. Protobuf types are canonical.
New Files:
-
pkg/config/protobuf_loader.go(240 lines):- LoadNamespaceProto: YAML file → protobuf NamespaceRequest
- ParseNamespaceYAML: YAML bytes → protobuf with validation
- FormatNamespaceYAML: protobuf → YAML (export/preview)
- Multi-namespace configuration support
-
pkg/config/validation.go(260 lines):- Business logic validation (cross-field rules)
- SessionManager requirements enforcement
- Session-aware pattern constraints
- Slot naming conventions ({purpose}-{type})
- Credential detection (vault:// allowed, static credentials flagged)
Test Coverage:
pkg/config/protobuf_loader_test.go: 14 test cases, YAML round-trip testingpkg/config/validation_test.go: 24 test cases, validation rules- Total: 38 tests, all passing (0.571s)
Key Features:
- ✅ YAML → JSON → protobuf conversion pipeline
- ✅ Validates all business rules (SessionManager, session-aware, slots)
- ✅ Round-trip support (YAML ↔ protobuf)
- ✅ Multi-namespace config files
- ✅ Static credential detection in session-aware patterns
- ✅ Vault dynamic credential support (vault:// paths)
Benefits:
- Single source of truth: Protobuf (ADR-003)
- YAML as human-friendly import/export format only
- Type-safe construction via protobuf
- Multi-language support (Go, Python, Rust, Java)
Next: Phase 3 - Implement CreateNamespace RPC handler in control plane
Protobuf Import Cycle Resolution 🔧
Branch: feature/vault-integration-phase2
Summary: Fixed import cycle between prism and prism.config.v1 packages by moving shared field options to new prism.common package.
Problem: Import cycle prevented compilation:
prismpackage (control_plane.proto) importedprism.config.v1packageprism.config.v1importedprismpackage for field options (prism.validation, prism.required, etc.)- Go compiler: "import cycle not allowed"
Solution: Created prism.common package for shared annotations:
- Moved
proto/prism/options.proto→proto/prism/common/options.proto - Changed package from
prismtoprism.common - Updated all field option references:
prism.*→prism.common.* - Fixed go_package paths:
proto/gen→pkg/plugin/gen
Files Modified:
proto/prism/common/options.proto(new location)- All proto files updated with correct imports and option references
examples/client/namespace_client.go(import paths)
Result:
- ✅ All protobuf code compiles without errors
- ✅ No import cycles
- ✅ Example client compiles successfully
- ✅ Generated code in
pkg/plugin/gen/prism/andpkg/plugin/gen/prism/config/v1/
Unified Namespace Model with Protobuf 🎯
Branch: feature/vault-integration-phase2
Summary: Established the UNIFIED namespace model where ALL namespaces natively support multi-pattern composition, slot-based backends, and authentication. No "simple" vs "composable" split - just ONE namespace type that does it right.
New Documents:
- MEMO-092: Unified Namespace Model with Protobuf:
- Protobuf as canonical format (ADR-003, ADR-002)
- ONE
NamespaceRequesttype (no backward compat needed - Prism is new) - Patterns, slots, auth built into core namespace model
- YAML/JSON as export/preview format only
- Client SDK examples (Go, Python, Rust)
Enhanced Proto Files:
proto/prism/config/v1/namespace_request.proto- Enhanced with patterns, slots, auth (550 lines)Patternmessage for multi-pattern compositionSlotmessage for backend dependenciesAuthConfig,VaultConfig,JWTConfigfor authenticationDeploymentPreferencesfor topology hintsNamespaceResponsewith assigned patterns and slot bindings
proto/prism/control_plane.proto- SimplifiedCreateNamespaceRPC
Client Example:
examples/client/namespace_client.go- Unified namespace construction
Key Improvements:
- Removed unnecessary complexity (no "composable" prefix)
- ONE namespace type that supports everything
- Type-safe construction with protobuf
- Multi-language client SDKs (Go, Python, Rust, Java)
- No schema drift (protobuf is canonical)
Updated Documents:
- MEMO-083 - Added Phase 2 completion status (85% complete, code done)
- MEMO-089 - Fixed broken ADR link
2025-11-17
Phase 2 Vault Integration Plan (MEMO-083) 🔐
Branch: feature/vault-integration-phase2
Summary: Detailed 6-week implementation plan for Phase 2 of Prism's authentication system. Builds on Phase 1 (JWT auth, completed) to add HashiCorp Vault integration for per-session, dynamic backend credentials.
New Document:
- MEMO-083: Phase 2 Vault Integration Implementation Plan:
- Week-by-week implementation breakdown (6 weeks total)
- Core Vault infrastructure (JWT → Vault token exchange)
- Credential lifecycle (fetch, renew, revoke)
- Session management with per-user isolation
- Service identity authentication (K8s SA, AWS IAM, Azure MI, GCP SA)
- Integration testing strategy with Vault testcontainer
- Vault operator setup guide (auth methods, secrets engines, policies)
Key Benefits:
- Per-session credential isolation (each user gets unique backend username)
- Automatic credential rotation (every 1 hour)
- Zero shared credentials (breach of one session doesn't compromise others)
- Per-user audit trails in backend logs (e.g.,
v-jwt-alice-abc123)
Current State:
- Phase 1 Complete ✅: JWT authentication, namespace authorization, auth context pass-through
- Phase 2 Not Implemented ❌: Vault integration is design-only (MEMO-008), zero code exists
Netflix Video Reference: Database Migrations at Scale
Summary: Added AWS re:Invent 2023 video reference featuring Netflix engineers discussing strategies for safely migrating databases that handle millions of requests per second.
New Document:
- Video: Database Migrations at Millions RPS: Zero-downtime migration patterns, dual-write strategies, and shadow traffic validation
Updates:
- Netflix index page now includes direct links to all three video references
2025-11-16
Unified Authentication and Session Management (RFC-062)
Branch: massive-scale-graph-rfcs
Summary: Comprehensive RFC unifying Prism's authentication and session management across human users, service identities, and admin operations.
Key Document:
Implementation Status:
- Phase 1 Complete: JWT validation, namespace-based authorization, auth context injection
- Pending: Vault integration, service identity auth, distributed session store
Remove Manual Testing Directory
Branch: docs/manual-testing-readme-and-memo-049-fix
Summary: Removed testing/manual/ directory and associated documentation. Manual testing should be performed using actual Prism tooling (prismctl, acceptance tests) rather than standalone bash scripts.
Changes:
- Removed
testing/manual/directory and README - Updated
prism-proxy/TRANSPARENT_PROXY.mdto reference automated tests - Redirected users to proper testing infrastructure
Rationale:
- Manual bash scripts lacked assertions and proper error handling
- Not integrated with CI/CD pipeline
- Duplicated functionality covered by automated tests
- See MEMO-040 for historical context
2025-11-15
Massive-Scale Graph RFCs for 100B Vertices
Branch: massive-scale-graph-rfcs
Summary: 5 RFCs defining distributed graph architecture for massive-scale graphs with 100B vertices.
Key RFCs:
- RFC-057: Massive-Scale Graph Sharding
- RFC-058: Multi-Level Graph Indexing
- RFC-059: Hot/Cold Storage Tiers with S3 Snapshots
- RFC-060: Distributed Gremlin Query Execution
- RFC-061: Graph Authorization with Vertex Labels
Graph Implementation Readiness Assessment (MEMO-081)
Branch: massive-scale-graph-rfcs
Summary: Readiness assessment identifying 15 critical gaps across 5 implementation phases with 16-20 week timeline.
Key Document: MEMO-081: Graph Implementation Readiness Assessment
20-Week Implementation Plan (MEMO-050 through MEMO-080)
Branch: massive-scale-graph-rfcs
Summary: 24 MEMOs documenting 20 weeks of work on massive-scale graph architecture, including production readiness analysis, RFC editing, and production preparation.
2025-11-07
ADR-061: Framework-Less Web UI with Go Templates and HTMX
Status: Accepted Supersedes: ADR-028
Summary: Prism adopts a framework-less web UI approach for all web interfaces (Operations Dashboard and Admin UI), eliminating JavaScript build pipelines and framework dependencies. Uses Go templates (server-side rendering) + HTMX (interactivity) + D3.js (visualization) for a fast, simple, maintainable web stack.
Key Decisions:
- Backend: Go HTTP server (not Python/FastAPI)
net/http+gorilla/mux+gorilla/websocket- Single binary deployment with
//go:embedassets - 10-100x faster than Python, ~20MB memory footprint
- Frontend: HTMX + D3.js + Mermaid.js (NO React/Vue/Svelte)
- HTMX: 14KB, replaces React for interactivity
- D3.js: 70KB, best-in-class visualization
- Mermaid.js: 200KB, text-to-diagram rendering
- Total: ~300KB (vs 2-5MB React bundle)
- NO Build Step: No npm, no webpack, instant reload
- Change template → refresh browser (instant)
- Download JS libraries via CDN or
curl
- Server-Side Rendering: Go
html/template(type-safe, auto-escaping)
Benefits:
- ✅ Fast iteration: Instant reload (no build step)
- ✅ Minimal dependencies: 5 total (vs 500+ npm packages)
- ✅ Small bundles: 300KB (vs 2-5MB)
- ✅ Single binary: 15MB executable (includes templates + assets)
- ✅ Language consistency: Go for backend + templates
- ✅ Simple deployment: No Node.js runtime needed
Example (HTMX auto-refresh):
<!-- React: 50+ lines of JavaScript -->
<!-- HTMX: 1 line -->
<div hx-get="/api/health" hx-trigger="load, every 2s" hx-swap="innerHTML">
Loading...
</div>
Inspired by: HashiCorp internal tools (Consul, Nomad early versions)
Related Documents:
- ADR-061: Framework-Less Web UI
- RFC-050: Operations Dashboard (HUD) - Uses this architecture
- ADR-028: Admin UI with FastAPI and gRPC-Web - Superseded
RFC-050: Operations Dashboard (HUD) 📊
Status: Draft
Summary: Comprehensive RFC defining the Prism Operations Dashboard (HUD - Heads-Up Display), a real-time web interface providing unified visibility into proxy health, pattern status, backend connectivity, and system performance. Designed to detect issues before users notice them through proactive monitoring of high-probability failure indicators.
Key Features (8 prioritized views):
- System Health (99% detection): Overall status, success rate, pattern health grid, critical metrics
- Performance Monitoring (95% detection): Latency percentiles, throughput, SLO compliance tracking
- Backend Health (92% detection): Connection pool status, acquisition times, backend-specific metrics
- Messaging Flow (88% detection): PubSub message delivery, subscriber lag, dropped messages
- Multi-Tenancy (85% detection): Per-namespace RPS, latency, error rates, traffic distribution
- Security Monitoring (80% detection): JWT validation, authentication failures, authorization denials
- Observability Health (75% detection): OpenTelemetry pipeline status, trace coverage
- System Resources (70% detection): CPU, memory, goroutines per proxy/pattern
Architecture (Framework-less, see ADR-061):
- Backend: Go HTTP server, WebSocket for real-time push (2s updates)
- Frontend: Go templates + HTMX (14KB) + D3.js (70KB) + Mermaid.js (200KB)
- Data Sources: Prometheus metrics, gRPC health checks, Signoz API, Admin API
- Deployment: Single Go binary (15MB with embedded assets), instant reload, NO build step
Technology Stack:
Browser (Go templates + HTMX + D3.js)
↕ WebSocket + HTMX
Dashboard (Go :8095)
↓ Poll/Query
├─ Proxy /metrics (Prometheus)
├─ Pattern gRPC HealthCheck()
├─ Signoz API (traces/metrics)
└─ Admin API (namespaces)
Hub-and-Spoke Layout:
- Hub: System Health view (always visible) with drill-down capabilities
- Spokes: 7 additional views accessed via tabs/clicks for detailed analysis
- Goal: Single pane of glass for all operational concerns
Success Metrics:
- MTTR reduction: 50% faster issue identification
- Proactive detection: 95% issues caught before user reports
- Developer adoption: 80% daily usage
- Dashboard performance: <2s end-to-end latency (metric → UI)
Implementation Phases (6 weeks):
- Phase 1: MVP (System Health view, WebSocket backend, React frontend)
- Phase 2: Performance & Backend views with Signoz integration
- Phase 3: Messaging & Multi-Tenancy views
- Phase 4: Security & Observability views
- Phase 5: Polish, dark mode, mobile responsive, Docker deployment
Related Documents:
- RFC-050: Operations Dashboard (HUD)
- RFC-016: Local Development Infrastructure - Signoz/Dex integration
- RFC-018: POC Implementation Strategy - POC 1-3 provide metrics
- ADR-048: Local Signoz Observability - OpenTelemetry data source
- ADR-028: Admin UI (FastAPI + Ember) - Admin UI (different from HUD)