Two production applications and every security layer turned on
This is a marketplace stack the Stacktic team runs as its security reference: a catalog API, a shop
front end, an AI assistant, and around them every security component the catalog offers. Every
control below is a component, a sub-component, a link or an attribute on its diagram.
The design of the secured marketplace. Solid lines are links, dashed lines the WAF profile protecting both applications. The bottom band is the security generated around the same components.click to enlarge
catalog-svc (external source code, Django, port 8000) · portal-frontend (external source code, Node.js, port 8080) — both env: production, 2 replicas
Who reaches them
apisix with 8 routes and an AI gateway sub-component · crowdsec with the WAF profile waf · keycloak-operator · cert-manager
Data and events
cnpg with catalog-db and sonarqube · kafka with the topics bids and orders, a bridge and two node pools · opensearch · valkey · seaweedfs with six buckets
Model
vllm with the model marketplace-chat
Data jobs
airflow with the ETL sub-component catalog-export
Scale and load
keda with the triggers api-load and shop-load · k6 with the suite shop-journey-r2
build_gate: enforce, sast_gate: enforce, SonarQube scan through sonarqube-external_source_code
The same
DAST
nuclei-external_source_code
nuclei-external_source_code
Autoscaling
KEDA trigger api-load (prometheus_query-external_source_code)
KEDA trigger shop-load
catalog-svc's own links: external_source_code-db to catalog-db, external_source_code-swbucket
to catalog-images, external_source_code-valkey, external_source_code-opensearch,
external_source_code-topic to bids and to orders, and external_source_code-ai_gateway to
ai-gateway, which links ai_gateway-model to marketplace-chat. Each one puts its variables into
the application's environment, in the Django form for the database, the cache and the bucket — see
How a stack fits together.
rate_limiting and rate_limit_count on seven of the eight route links (not on Grafana)
APISIX limit-count per client address, counted on each gateway replica
Web application firewall
CrowdSec waf sub-component, linked waf-external_source_code to both applications; apisix-crowdsec
CrowdSec's AppSec engine (Coraza with the OWASP Core Rule Set, virtual patches, generic rules) checks every request to both applications. The profile runs in detect: matches raise alerts, nothing is blocked yet. With passthrough, an unreachable WAF lets requests through
IP bans
crowdsec_firewall_bouncer on, crowdsec_simulation off, remediation ban for 4 hours
Scenario overflows produce real decisions; the firewall bouncer drops traffic from a banned address on every node. Operator addresses are on crowdsec_allowlist so they are never banned
One policy per link; the OPA policy network-policy-enforcement refuses workloads in namespaces without one
Admission policy
opa with 8 policy sub-components
label-deny, pod-level-security, network-policy-enforcement and resource-policy at deny; image-policy and rbac-enforcement at warn; securitycontext and probes at dryrun. Every policy is scoped to the stack label stacktic.io/stack. opa_failure_policy: Ignore: if Gatekeeper is down, admission does not fail
Kafka clients
mtls on the Kafka component
Each application linked to a topic gets its own TLS client certificate and ACLs
The index lifecycle policy moves the SIEM indices (Falco, APISIX, OPA, audit, OpenTelemetry, Suricata, CrowdSec) to warm after 7 days and deletes them after 365
Metrics
prometheus-suricata, prometheus-crowdsec, prometheus-opa and nine more
Alert rules per component and the provisioned dashboards
external-secrets links external_secrets-openbao: a seed Job writes the stack's secrets into
OpenBao, and External Secrets syncs them into the namespaces that use them. openbao-swbucket
takes Raft snapshots of OpenBao into a bucket on a schedule. See
Identity and secrets.
Database backups, OpenSearch snapshots and OpenBao snapshots, each in its own bucket
Stack agent
deploy_access, backup_apply_access and cve_decisions_enabled on
Deploys committed branches, runs guarded restore operations, records vulnerability decisions
MCP server
fastmcp linked to mcp-client, opa, stack-agent, valkey, kafka; ai_workflow: spec-kit
Keycloak login, admission-policy tools, the agent's scans, persistent client storage, Kafka tools, and spec-driven development kits in the application folders