Storefront has been decoupled into micro-frontends with a dedicated commerce app and shared shell.

Read the architecture guide →

Secrets, Certificates & SecOps Rotation

SecOps runbook for verifying Managed Identities, inspecting TLS certificates, revoking compromised credentials, rotating secrets, and querying audit logs.

SecOps

When to Use & Blast Radius

Use this runbook during scheduled credential rotations, TLS certificate renewals, suspected secret compromise, or security incident investigations. Rotating session secrets or revoking partner keys invalidates active sessions or interrupts downstream calls until affected Container App revisions restart.

Coordinate Session Secret Rotations

Rotating frontend authentication secrets logs out active users across Storefront and Commerce simultaneously. Revoking Message Broker, Vector Database, or SMTP Relay credentials requires updating CI/CD environment secrets and restarting dependent Container Apps.

Credential Rotation and Revocation Flow

Loading graph...

Pre-Flight Check

Verify Azure CLI context, inspect Key Vault certificates, and confirm Managed Identity assignments:

Terminal window
az account set --subscription "<SUBSCRIPTION_ID>"
az keyvault certificate list --vault-name "<KEY_VAULT_NAME>" \
--query "[].{Name:name, Enabled:attributes.enabled, Expires:attributes.expires}" -o table
az identity list --resource-group "<RESOURCE_GROUP>" \
--query "[].{Name:name, PrincipalId:principalId, ClientId:clientId}" -o table

Procedure

  1. Verify Entra ID Federated Identity Credentials and Managed Identities

    Confirm API Gateway, backend services, and AI agent identities have valid Federated Identity Credentials and no unauthorized role assignments:

    Terminal window
    az ad app federated-credential list --id "<ENTRA_APP_OBJECT_ID>" \
    --query "[].{Name:name, Subject:subject, Audiences:audiences}" -o table
    az role assignment list --resource-group "<RESOURCE_GROUP>" --assignee "<PRINCIPAL_ID>" \
    --query "[].{Role:roleDefinitionName, Scope:scope}" -o table

  2. Inspect and renew Container Apps custom TLS certificates

    Check expiration dates on custom domain certificates bound to the Container Apps environment and import renewed certificates from Key Vault:

    Terminal window
    az containerapp env certificate list --name "<ENV_NAME>" --resource-group "<RESOURCE_GROUP>" \
    --query "[].{Name:name, Subject:properties.subjectName, Expiration:properties.expirationDate}" -o table

  3. Rotate external partner credentials in GitHub Environments and redeploy

    Generate a new API key or connection string in the external provider (Message Broker, Qdrant Cloud, or SMTP Relay), update the GitHub Environment secret, and roll out updated Container Apps:

    Terminal window
    gh secret set "<SECRET_NAME>" --env "<ENV>" --body "<NEW_SECRET_VALUE>"
    gh workflow run apphost-cd.yml -f environment="<ENV>" -f clear_cache=false

  4. Update Container App secrets directly during emergency revocation

    When immediate rotation cannot wait for a full CI/CD run, update the Container App secret and restart the active revision:

    Terminal window
    az containerapp secret set --name "<APP_NAME>" --resource-group "<RESOURCE_GROUP>" \
    --secrets "<SECRET_KEY>=<NEW_SECRET_VALUE>"
    az containerapp revision restart --name "<APP_NAME>" --resource-group "<RESOURCE_GROUP>" --revision "<REVISION_NAME>"

  5. Query Azure Activity and Entra ID audit logs

    Inspect recent control-plane mutations, role assignment changes, and Key Vault secret access:

    Terminal window
    az monitor activity-log list --resource-group "<RESOURCE_GROUP>" --offset 24h \
    --query "[?level=='Warning' || level=='Error' || contains(operationName.value,'roleAssignments')].{Time:eventTimestamp, Caller:caller, Operation:operationName.localizedValue, Status:status.value}" \
    -o table

Verification

Confirm all rotated Container Apps are Running with healthy revisions and zero 401/403 authentication errors in Log Analytics:

Terminal window
WORKSPACE_ID=$(az monitor log-analytics workspace list --resource-group "<RESOURCE_GROUP>" --query "[0].customerId" -o tsv)
az monitor log-analytics query --workspace "${WORKSPACE_ID}" \
--analytics-query "ContainerAppConsoleLogs_CL | where TimeGenerated > ago(15m) | where Log_s has_any ('401','403','Unauthorized','NOAUTH') | summarize AuthErrors=count() by ContainerAppName_s" \
-o table

Expected output:

(0 rows returned)

Rollback / Escape Hatch

If a rotated partner credential breaks connectivity, re-apply the previous active credential (if not yet revoked) via az containerapp secret set and restart the affected revision, or re-run the last known-good CI/CD deployment.