Skip to content

Commit b8b321a

Browse files
committed
feat: add SPIFFE/SPIRE configuration for agent identity
Add environment variables to support SPIFFE workload identity integration for AI agents and services. This enables cryptographic machine identity with configurable migration phases: - SPIFFE_ENABLED: Toggle SPIFFE integration - SPIFFE_AUTH_MODE: Migration phases (disabled→optional→preferred→required) - SPIFFE_ENDPOINT_SOCKET: SPIRE Agent Workload API socket - SPIFFE_TRUST_DOMAIN: Trust domain for identity hierarchy - SPIFFE_LEGACY_JWT_WARNING: Track legacy auth usage during migration - SPIFFE_SVID_TTL_SECONDS: Certificate lifetime configuration - SPIFFE_JWT_AUDIENCES: Allowed JWT-SVID audiences Related to: MCP Context Forge integration (PR #684)
1 parent d6d9c41 commit b8b321a

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.env.example

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,3 +180,32 @@ RERANKER_BATCH_SIZE=10
180180
BACKEND_IMAGE=ghcr.io/manavgup/rag_modulo/backend:latest
181181
FRONTEND_IMAGE=ghcr.io/manavgup/rag_modulo/frontend:latest
182182
TEST_IMAGE=ghcr.io/manavgup/rag_modulo/backend:latest
183+
184+
# ================================
185+
# SPIFFE/SPIRE IDENTITY (Agent/Machine Identity)
186+
# ================================
187+
# Enable SPIFFE workload identity for agents and services
188+
# See: https://spiffe.io/docs/latest/spire-about/spire-concepts/
189+
SPIFFE_ENABLED=false
190+
191+
# Authentication mode for migration (disabled|optional|preferred|required)
192+
# - disabled: No SPIFFE support (current default)
193+
# - optional: Accept both user JWT and SPIFFE JWT-SVID
194+
# - preferred: Prefer SPIFFE, log warning on legacy JWT
195+
# - required: Only SPIFFE JWT-SVIDs accepted for workloads
196+
SPIFFE_AUTH_MODE=disabled
197+
198+
# SPIRE Agent Workload API socket path
199+
SPIFFE_ENDPOINT_SOCKET=unix:///run/spire/agent/api.sock
200+
201+
# SPIFFE trust domain for this environment
202+
SPIFFE_TRUST_DOMAIN=rag-modulo.local
203+
204+
# Log warning when legacy JWT is used (for migration tracking)
205+
SPIFFE_LEGACY_JWT_WARNING=false
206+
207+
# Default SVID TTL in seconds (default: 3600 = 1 hour)
208+
SPIFFE_SVID_TTL_SECONDS=3600
209+
210+
# Allowed JWT-SVID audiences (comma-separated)
211+
SPIFFE_JWT_AUDIENCES=rag-modulo,mcp-gateway

0 commit comments

Comments
 (0)