---
title: Production Hardening & Compliance Checklist
summary: Pre-production SecOps and reliability checklist for locking down network perimeters, scaling limits, backup drills, and alerting before serving live traffic.
owners:
  - platform-engineering-team
badges:
  - content: SecOps
    backgroundColor: amber
    textColor: amber
---

## When to Use & Blast Radius

Complete this checklist before promoting a BookWorm environment to `Production` or during periodic security posture audits. Network perimeter changes (disabling public access or restricting ingress allowlists) can sever CI/CD runners or **Finance Orchestrator** connectivity if Private Endpoints and outbound static IPs are not configured first.

<Admonition type="warning" title="Network Perimeter Sequencing">

Configure Virtual Network integration, Private Endpoints, and self-hosted CI/CD runners before disabling public network access on Azure data and AI services.

</Admonition>

## Pre-Flight Check

Authenticate to Azure and inspect current public ingress exposure across all Container Apps:

```bash
az account set --subscription "<SUBSCRIPTION_ID>"
az containerapp list --resource-group "<RESOURCE_GROUP>" \
  --query "[?properties.configuration.ingress.external==\`true\`].{Name:name, Fqdn:properties.configuration.ingress.fqdn}" -o table
```

## Procedure

<Steps>
<Step title="Lock down network isolation and edge ingress">

Attach the Container Apps environment to a dedicated Virtual Network, enable Private Endpoints on all Azure data and AI services, restrict **Durable Task Scheduler** and **Quartz Dashboard** access, tighten Blob Storage CORS to the **API Gateway** domain, and bind a WAF + Key Vault TLS certificate.

</Step>
<Step title="Calibrate compute sizing, probes, and AI quotas">

Configure `maxReplicas` and scaling rules across all 16 application Container Apps, verify production liveness/readiness probes, set Production Cosmos DB autoscale RU/s, and raise Microsoft Foundry RPM/TPM quotas above starter baselines.

</Step>
<Step title="Validate backups, restores, and disaster recovery">

Execute a PostgreSQL point-in-time restore drill, confirm Cosmos DB continuous backup and multi-region failover, test a full **Qdrant Cloud** vector re-index through **Catalog Ingestion**, and verify **Message Broker** retention and Blob Storage soft-delete.

</Step>
<Step title="Establish secret rotation, alerting, and SLOs">

Store external partner credentials and signing/session secrets in Azure Key Vault with rotation schedules, configure Azure Monitor alert rules for `5xx`, saturation, throttling, and dead-letter queues, and publish service-level objectives.

</Step>
</Steps>

## Detailed Hardening Checklists

<Accordion title="1. Network Isolation & Edge Ingress">

- [ ] Attach the Container Apps environment to a dedicated Virtual Network subnet with deterministic outbound static IPs.
- [ ] Enable Private Endpoints and disable public network access on PostgreSQL, Azure Managed Redis, Azure Cosmos DB, Azure Storage, and Microsoft Foundry.
- [ ] Restrict **Durable Task Scheduler** IP allowlist to the Container Apps environment outbound static IPs.
- [ ] Restrict Blob Storage CORS allowed origins to your production **API Gateway** custom domain.
- [ ] Restrict **Quartz Dashboard** external ingress to an internal VNet, VPN, or operator IP allowlist.
- [ ] Bind a custom domain, Key Vault-managed TLS certificate, and Web Application Firewall (WAF) in front of **API Gateway**.

</Accordion>

<Accordion title="2. Compute Sizing, Probes & AI Quotas">

- [ ] Define upper autoscaling limits (`maxReplicas`) alongside HTTP concurrency and KEDA message-lag rules across all 16 application Container Apps.
- [ ] Verify Container Apps liveness/readiness probes target valid production endpoints.
- [ ] Benchmark **Privacy Analyzer**, **Privacy Anonymizer**, **Catalog Ingestion**, and **Finance Orchestrator** under peak load.
- [ ] Configure Production Cosmos DB autoscale Request Units (RU/s) on the Rating database.
- [ ] Raise Microsoft Foundry RPM and TPM quotas for `chat`, `decision`, and `embedding` deployments above starter baselines.

</Accordion>

<Accordion title="3. Backups, Restores & Disaster Recovery">

- [ ] Execute and time a PostgreSQL point-in-time restore drill covering Catalog, Ordering, and Scheduler databases.
- [ ] Confirm Cosmos DB continuous backup mode and multi-region failover policy.
- [ ] Execute a full **Qdrant Cloud** vector re-index drill from PostgreSQL through **Catalog Ingestion**.
- [ ] Verify external **Message Broker** topic retention, replication factor, and dead-letter replay procedures.
- [ ] Confirm soft-delete and versioning settings on Azure Blob Storage.

</Accordion>

<Accordion title="4. Secret Rotation, Alerting & SLOs">

- [ ] Store external partner credentials (Message Broker, Vector Database, SMTP Relay) and application signing/session secrets in Azure Key Vault with scheduled rotation.
- [ ] Configure Azure Monitor alert rules for `5xx` spikes, container terminations, probe failures, database/cache saturation, AI HTTP `429` throttling, and non-empty dead-letter queues.
- [ ] Publish availability, p95 latency, RTO, and RPO targets per service boundary.

</Accordion>

## Verification

Audit Storage, Cosmos DB, and Container App ingress posture with Azure CLI before Production sign-off:

```bash
# 1. Confirm Storage disables public blob access and shared-key access
az storage account show --name "<STORAGE_ACCOUNT>" --resource-group "<RESOURCE_GROUP>" \
  --query "{PublicBlobAccess:allowBlobPublicAccess, SharedKeyAccess:allowSharedKeyAccess, MinTls:minimumTlsVersion, PublicNetwork:publicNetworkAccess}" \
  -o table

# 2. Confirm Cosmos DB disables local auth and public access
az cosmosdb show --name "<COSMOS_ACCOUNT>" --resource-group "<RESOURCE_GROUP>" \
  --query "{DisableLocalAuth:disableLocalAuth, PublicNetwork:publicNetworkAccess}" -o table

# 3. Confirm only API Gateway exposes external ingress
az containerapp list --resource-group "<RESOURCE_GROUP>" \
  --query "[?properties.configuration.ingress.external==\`true\`].{Name:name, Fqdn:properties.configuration.ingress.fqdn, MaxReplicas:properties.template.scale.maxReplicas}" \
  -o table
```

Expected output:

```text
PublicBlobAccess    SharedKeyAccess    MinTls    PublicNetwork
------------------  -----------------  --------  ---------------
False               False              TLS1_2    Disabled

DisableLocalAuth    PublicNetwork
------------------  ---------------
True                Disabled

Name     Fqdn                  MaxReplicas
-------  --------------------  -------------
gateway  <DOMAIN>              10
```

## Rollback / Escape Hatch

If tightening a network perimeter or IP allowlist blocks **Finance Orchestrator** or CI/CD runners, temporarily add the Container Apps outbound static IP (`az containerapp env show --name "<ENV_NAME>" --resource-group "<RESOURCE_GROUP>" --query properties.staticIp -o tsv`) to the blocked resource's allowlist while Private Endpoint DNS is verified.
