Files
pruefwerk/.env.example
T
Sharang ParnerkarandClaude Fable 5.1 e448a33778
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 5m52s
feat(agent): registry entitlements, platform endpoints, JWT aud/iss
Prüfwerk M-MIG-6 slice (PRODUCT_INTEGRATION_SPEC 2.0):

- core: tenant status ladder demo|trial|active|warning|restricted|frozen|
  halted|archived; blocks_writes()/is_halted(); status gate returns 402
  for halted on every route, 410 for archived
- core auth: JwksState::new(jwks_url, issuer, audience) — issuer pinned,
  audience validated (KEYCLOAK_AUDIENCE, default pruefwerk);
  validate_service_token() for client_credentials tokens (azp)
- agent: RegistryClient (client_credentials token cache, entitlement
  check cached 60 s fail-closed, tenant list w/ cursor, api-key verify,
  usage push); require_entitlement middleware between JWT and status
  gate; registry answer overrides the tenant_status claim
- agent: /api/v1/platform/{version,usage,tenants/{id}/provision|suspend|
  reactivate|terminate|export,tenants/{id}/data DELETE,tenants/demo/reset}
  behind service-token gate + PLATFORM_ALLOWED_CLIENTS allowlist
- agent: CORS allowlist from CORS_ALLOWED_ORIGINS (permissive only when
  unset, logged)
- agent: werkbank runner auth accepts registry API keys (bp_…, scope
  werkbank:runner) next to the static token; router mounted when either
  is available
- agent: scheduler lists tenants via the registry client and skips
  restricted/frozen/halted/archived
- smoke: use JwksState::new; .env.example documents the new variables

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
2026-09-11 17:50:10 +02:00

93 lines
3.0 KiB
Bash

# MongoDB
MONGODB_URI=mongodb://root:example@localhost:27017/compliance_scanner?authSource=admin
MONGODB_DATABASE=compliance_scanner
# LiteLLM
LITELLM_URL=http://localhost:4000
LITELLM_API_KEY=
LITELLM_MODEL=gpt-4o
# GitHub
GITHUB_TOKEN=
GITHUB_WEBHOOK_SECRET=
# GitLab
GITLAB_URL=https://gitlab.com
GITLAB_TOKEN=
GITLAB_WEBHOOK_SECRET=
# Jira
JIRA_URL=https://your-org.atlassian.net
JIRA_EMAIL=
JIRA_API_TOKEN=
JIRA_PROJECT_KEY=
# SearXNG
SEARXNG_URL=http://localhost:8888
# NVD
NVD_API_KEY=
# Agent
AGENT_PORT=3001
SCAN_SCHEDULE=0 0 */6 * * *
CVE_MONITOR_SCHEDULE=0 0 0 * * *
GIT_CLONE_BASE_PATH=/tmp/compliance-scanner/repos
# Dynamic PLC testing — ephemeral soft-PLC provisioning (#183). Off unless
# enabled; requires the agent container to have Docker access (socket mount).
# When on, a PLC/SPS target with control logic but no reachable device gets its
# logic instantiated on a throwaway OpenPLC, probed, then torn down.
PLC_RUNTIME_ENABLED=0
PLC_RUNTIME_IMAGE=repo.breakpilot.com/pruefwerk/openplc:latest
PLC_RUNTIME_NETWORK=certifai
PLC_RUNTIME_MEMORY=512m
PLC_RUNTIME_CPUS=0.5
PLC_RUNTIME_MAX_LIFETIME_SECS=180
PLC_RUNTIME_OPENPLC_USER=openplc
PLC_RUNTIME_OPENPLC_PASSWORD=openplc
# Werkbank runner API (/api/v1/werkbank/jobs/*, /api/v1/werkbank/artifacts/*).
# Mounted when this static token is set OR a tenant registry is configured
# (runners then present portal-issued `bp_…` API keys with scope
# werkbank:runner, verified via the registry). Unset + no registry = not mounted.
WERKBANK_RUNNER_TOKEN=
# Breakpilot Platform (PRODUCT_INTEGRATION_SPEC 2.0)
# Catalog key this deployment serves; used for entitlement checks, usage
# events and the platform handshake.
PRODUCT_KEY=pruefwerk
# Tenant registry: entitlement authority (POST /v1/internal/entitlements/check,
# cached ≤60 s, fail-closed), tenant list for the scheduler, API-key verify.
# Unset = claims-only mode (dev).
TENANT_REGISTRY_URL=
# client_credentials for the registry (Keycloak client `pruefwerk-svc-<env>`).
TENANT_REGISTRY_CLIENT_ID=
TENANT_REGISTRY_CLIENT_SECRET=
# JWT audience that user/service tokens must carry (scope `pruefwerk-audience`).
# Default `pruefwerk`; set to an empty string to disable audience validation (dev).
KEYCLOAK_AUDIENCE=pruefwerk
# Browser origins allowed by CORS (csv). Unset = permissive (dev only).
CORS_ALLOWED_ORIGINS=https://app-stage.breakpilot.com,https://pruefwerk-stage.breakpilot.com
# Keycloak client ids (azp) allowed on /api/v1/platform/* with a service token.
# Default: tenant-registry-svc-stage,tenant-registry-svc-prod,portal-svc-stage,portal-svc-prod
PLATFORM_ALLOWED_CLIENTS=
# Dashboard
DASHBOARD_PORT=8080
AGENT_API_URL=http://localhost:3001
# MCP Server
MCP_ENDPOINT_URL=http://localhost:8090
# Keycloak (required for authentication)
KEYCLOAK_URL=http://localhost:8080
KEYCLOAK_REALM=compliance
KEYCLOAK_CLIENT_ID=compliance-dashboard
REDIRECT_URI=http://localhost:8080/auth/callback
APP_URL=http://localhost:8080
# OpenTelemetry (optional - omit to disable)
# OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
# OTEL_SERVICE_NAME=compliance-agent