Skip to content

Verity: Deployment and Operations

Verity consists of two container images and an external PostgreSQL database. It runs locally with a start script, on a single server with Docker Compose, or on Kubernetes with the Helm chart.

Component Image Ports Notes
Backend m8ty-verity-backend (Spring Boot, JDK 25) 8080 API, 8081 management Liquibase migrations on startup, scheduled jobs, Docker CLI for active scanning
Web m8ty-verity-frontend (Next.js) 3000 BFF; needs BACKEND_URL and PUBLIC_URL
Database PostgreSQL 17 5432 Not bundled; one empty database with an owner role

Both images run as UID/GID 10001 and work with a read-only root filesystem.

Prerequisites: Docker (Docker Desktop, Colima, or OrbStack), JDK 25 or newer, Node.js 22 with pnpm.

Terminal window
./start.sh

The script checks Docker (and starts Colima if needed), creates or starts the container verity-postgres with the volume verity_pgdata, frees the application ports, and runs backend and frontend in the foreground. Ctrl+C stops both; PostgreSQL keeps running unless POSTGRES_STOP_ON_EXIT=true is set.

Service Address
Frontend http://localhost:3000
Backend API http://localhost:8180
Backend management http://localhost:8181
PostgreSQL Port 5432, or a free port chosen by Docker if 5432 is taken

Each customer has its own subdomain. Browsers resolve *.localhost without configuration:

Address Login (dev profile only) Content
http://demo.localhost:3000 demo / demo Demo customer “Demo AG” with sample application, container, deliveries, and SBOMs
http://admin.localhost:3000 admin / admin System administration, without customer data

Ports can be changed through the environment, for example BACKEND_PORT=8280 FRONTEND_PORT=3100 ./start.sh. SPRING_PROFILES_ACTIVE= ./start.sh starts without demo data.

  1. Create .env from deploy/compose.env.example and set at least VERITY_JWT_SECRET (random, at least 32 characters), VERITY_ADMIN_PASSWORD, POSTGRES_PASSWORD, and PUBLIC_URL.
  2. Start the complete stack:
Terminal window
docker compose --profile app up -d --build

The ports are bound to 127.0.0.1 only; put a reverse proxy with TLS in front. For active scanning, the host’s Docker socket is mounted into the backend (DOCKER_SOCKET, DOCKER_GID). Leave SPRING_PROFILES_ACTIVE empty for production use.

The chart in deploy/helm/verity deploys backend and web with Ingress and TLS, PodDisruptionBudgets, optional HorizontalPodAutoscalers, and optional NetworkPolicies. PostgreSQL is not bundled; use a managed database or a separate chart or operator.

Terminal window
kubectl -n verity create secret generic verity-db --from-literal=password='<db-password>'
kubectl -n verity create secret generic verity-jwt --from-literal=jwt-secret="$(openssl rand -hex 32)"
kubectl -n verity create secret generic verity-admin --from-literal=admin-password='<initial-admin-password>'

Without a JWT secret, the chart generates a random key and keeps it across upgrades through lookup; with tools that do not support lookup, provide backend.jwt.existingSecret. Rotating the JWT key logs out all users.

Terminal window
helm install verity deploy/helm/verity -n verity --create-namespace \
--set global.imageRegistry=registry.example.com/verity \
--set postgresql.external.host=pg.example.internal \
--set postgresql.external.existingSecret=verity-db \
--set backend.jwt.existingSecret=verity-jwt \
--set backend.bootstrapAdmin.existingSecret=verity-admin \
--set ingress.enabled=true --set ingress.host=verity.example.com --set ingress.tls.enabled=true
Value Default Purpose
postgresql.external.host / .port / .database / .username verity-postgresql / 5432 / verity / verity External PostgreSQL
postgresql.external.existingSecret "" Secret with the database password (key password)
postgresql.external.parameters / .jdbcUrl "" JDBC parameters such as sslmode=require, or a full JDBC URL
backend.replicaCount / web.replicaCount 2 / 2 Replicas
backend.jwt.existingSecret / .tokenLifetime "" / 8h Token signing key and lifetime
backend.bootstrapAdmin.* empty First administrator (username, password, existingSecret, existingSecretKey)
backend.auth.localLogin true Password login; disable for SSO-only installations
backend.auth.oidc.* / .entra.* / .ldap.* disabled Generic OIDC, Microsoft Entra ID, LDAP/Active Directory
backend.auth.passkey.* enabled Passkeys (WebAuthn); rpId defaults to the host of web.publicUrl
backend.auth.existingSecret "" Secret with LDAP manager password and OIDC/Entra client secrets
backend.mail.* disabled SMTP for notifications, invitations, and reports (host, port, username, existingSecret, from, ssl, starttls)
backend.analysis.* / backend.vulnintel.* OSV, EPSS, CISA KEV on Vulnerability sources and schedules
backend.scanning.runner docker docker or kubernetes
backend.config {} Free-form Spring configuration merged into the backend ConfigMap
ingress.host verity.m8ty.eu Public host; customer subdomains and web.publicUrl derive from it
ingress.backendApi.* disabled Separate host for direct backend API access with API keys
networkPolicy.enabled false NetworkPolicies for web and backend

Non-secret backend settings are rendered into a ConfigMap; secrets come from the chart Secret, from existingSecret options, or from backend.extraEnvFrom.

  • ingress.host routes / to the web pods; the browser talks only to the BFF.
  • Customers work under <slug>.<host>, system administration under admin.<host>, and OIDC returns through auth.<host>. The ingress therefore also needs the wildcard host *.<host> and a matching certificate (with Let’s Encrypt, wildcards require the DNS-01 challenge).
  • ingress.backendApi exposes the backend /api directly on a separate host (for example api.verity.example.com) for CI uploads with X-Api-Key.
  • Upload size: SBOM uploads are accepted up to 50 MB, so raise the ingress body size limit accordingly (for example the NGINX annotation proxy-body-size).
backend:
auth:
localLogin: false
oidc:
enabled: true
issuer: https://sso.example.com/realms/verity
clientId: verity
adminGroup: verity-admins
mail:
enabled: true
host: smtp.example.com
username: verity
existingSecret: verity-smtp # key: smtp-password
from: verity@example.com

For Microsoft Entra ID, register a Web application with the redirect URI https://auth.<host>/api/auth/oidc/callback. LDAP supports bind with a DN pattern or search-then-bind for Active Directory. Admin groups and roles from SSO are synchronized on every login and apply only to logins under admin..

Active scanning: Kubernetes jobs or Docker

Section titled “Active scanning: Kubernetes jobs or Docker”
Runner When How
kubernetes Recommended in a cluster One hardened batch/v1 Job per scan run; no privileged pod; Pod Security restricted is sufficient
docker Default; local and Compose Backend starts scanner containers through the Docker CLI

With runner: kubernetes, the chart creates a namespaced Role for the backend (jobs create/get/list/watch/delete, pods get/list, pods/log get, secrets create/delete) and a NetworkPolicy for scanner pods (egress only DNS, TCP 443, configured registry ports, and the backend). The scanner runs as a non-root initContainer with a read-only root filesystem and writes the SBOM to an emptyDir; a pinned upload container sends it to the backend instance that started the job, authenticated by a one-time token. Registry credentials live only in a per-run Secret that is deleted with the job. Directory scans are not available with this runner. A registry behind the cluster’s own ingress needs an extra egress rule (backend.scanning.kubernetes.extraEgress).

With runner: docker on Kubernetes, either enable the built-in Docker-in-Docker pod (backend.scanning.dind.enabled=true, privileged, reachable only from backend pods) or point backend.scanning.dockerHost to an isolated external Docker host. Mounting the node’s Docker socket is not recommended. backend.scanning.images pulls the Syft, Trivy, and cdxgen images from an internal registry.

To observe running workloads, create a read-only service account with get and list on namespaces, pods, deployments, statefulsets, daemonsets, jobs, and cronjobs, and register the cluster in Verity (API URL, CA certificate, token, schedule, namespace filter). The token is stored encrypted. Removing the cluster role binding revokes access immediately.

Without the dev profile, no account exists after installation. The backend creates a superuser on startup when VERITY_ADMIN_PASSWORD (Helm: backend.bootstrapAdmin.password or .existingSecret) is set with at least 12 characters and no superuser exists yet. Later changes to the value have no effect. With SSO, an admin group or role can be used instead.

The first administrator signs in under admin.<host>, creates customers, and invites each customer’s first administrator by e-mail. Without a mail server, the invitation link is shown to the superuser to pass on.

The backend runs with two replicas by default and can be autoscaled; the web tier is stateless. Scheduled jobs (feed synchronization, re-analysis, metric snapshots, reports, SLA checks, risk acceptance expiry, notification dispatch, scan scheduler) take a cluster-wide lease in the table platform.scheduler_locks, so each run happens in exactly one instance. A crashed instance’s lease expires and another instance takes over.

  • Liquibase migrates the schema on backend startup and uses its lock table, so concurrent pods never apply a migration twice.
  • The default rolling update is safe for additive migrations. For breaking migrations, run a single replica with backend.strategy.type=Recreate.
  • Back up the database before upgrading; migrations are forward-only.
  • Existing Flyway-based databases must be recreated before switching to the Liquibase version; their migration history is not taken over.
Terminal window
helm upgrade verity deploy/helm/verity --namespace verity -f my-values.yaml
kubectl -n verity rollout status deploy/verity-backend
  • Every release has a SemVer version and a Git tag v<version>; tags are set only by CI.
  • Every push to main is a release and increments the minor version. A commit trailer Release: major or Release: patch selects the level. Other pipelines build <next>-dev-<short SHA> and push nothing.
  • CI builds and scans both images and pushes them only after a passing scan, as <version> and latest. Deployments always use the version, never latest.
  • Manual builds use the same tagging:
Terminal window
deploy/build-images.sh # build both images locally
deploy/build-images.sh -r registry.example.com/verity -t 1.2.0 --push

Verity receives scanner reports and SBOMs from GitLab pipelines through its API.

Variable Content
VERITY_API_KEY Protected, masked API key of a service account with BOM_UPLOAD and SCAN_RUN
VERITY_URL Backend API base URL, for example https://api.verity.example.com/api/v1 or the internal cluster service
Node ID variables UUIDs of the target container or service nodes, for example one for the backend and one for the frontend image

A typical pipeline:

  1. Upload OWASP Dependency-Check and Trivy reports with POST /import-scan (scan types Dependency Check Scan and Trivy Scan) to the target node, also when the scan gate failed, so the findings are visible.
  2. After a successful release and deployment, upload the CycloneDX SBOM of each image with POST /bom, including image reference, digest, and release version.
  3. Poll GET /bom/token/{token}/status until done is true and fail the job unless succeeded is true.
verity-sbom:
stage: deploy
image: alpine:3.22
needs: [build-image]
script:
- apk add --no-cache curl jq
- IMAGE_DIGEST=$(cat image-digest.txt)
- |
TOKEN=$(curl -fsS -X POST "$VERITY_URL/bom" -H "X-Api-Key: $VERITY_API_KEY" \
-F "bom=@gl-sbom-report.cdx.json" -F "project=$VERITY_NODE_ID" \
-F "imageRef=$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG" -F "imageDigest=$IMAGE_DIGEST" \
-F "pipelineUrl=$CI_PIPELINE_URL" -F "commitSha=$CI_COMMIT_SHA" \
-F "idempotencyKey=$CI_PIPELINE_ID-$CI_JOB_NAME" | jq -r .token)
- |
for i in $(seq 1 60); do
STATUS=$(curl -fsS -H "X-Api-Key: $VERITY_API_KEY" "$VERITY_URL/bom/token/$TOKEN/status")
[ "$(echo "$STATUS" | jq -r .done)" = "true" ] && break; sleep 5
done
echo "$STATUS" | jq .
[ "$(echo "$STATUS" | jq -r .succeeded)" = "true" ]

Deploy jobs can report the observed runtime state with a key that has DEPLOYMENT_REPORT:

Terminal window
curl -fsS -X POST "$VERITY_URL/tenants/$VERITY_TENANT_ID/deployment-reports" \
-H "X-Api-Key: $VERITY_API_KEY" -H "Content-Type: application/json" \
-d '{"cluster":"prod-eu","namespace":"payments","complete":false,
"workloads":[{"workloadKind":"DEPLOYMENT","workloadName":"payments-api","containerName":"api",
"image":"registry.example.com/pay/api:1.4.2","digest":"sha256:..."}]}'

With complete: true, workloads of the namespace that were previously reported through the API but are missing from the report are treated as removed.