Validate on Azure
Self-Hosted Only
Validating NetBlueprint Forge on Azure
Copyright (c) 1998-2026 DigitalPrez, LLC. All rights reserved.
The first deployment of NetBlueprint Forge in an Azure subscription, step by step: what README.md could only describe, run for the first time, with what a pass looks like and which of its open items (R numbers) each step closes. These are “your cloud’s steps” of ../VALIDATE.md. Written 2026-11-22.
Status and How to Use It
Every command comes from reading the modules, the chart and Microsoft’s documentation (Sources). A command that turns out wrong is itself a finding: note it and go on. When a check fails, stop and record what you saw; the fix belongs in the files of this repository, not in a change made by hand.
- Read “What you need” and set the variables.
- Take one route: K1 to K22 for the cluster, C1 to C15 for Container Apps. Part 1 of
../VALIDATE.md(the images) is done in K2 or C2. Part 2 (the application) starts at K9 or C8, which say how each “as your cloud’s steps say” is done here. Its optional S1 to S7 have a section of their own, “The sign-in registrations”. - Write each result in Results. A pass closes the open item the step names.
Both routes make resources that are billed while they exist, the cluster route the more (an AKS cluster of two nodes). K22 and C15 take them down.
What You Need
| What | Detail |
|---|---|
| Roles | Contributor and User Access Administrator on the subscription, or Owner (README.md, P1). K4 adds Key Vault Reader on the keys vault for a few minutes |
| Resource providers | The fourteen of P1a. The loop below prints each one’s state; az provider register --namespace Microsoft.<name> for any that is not Registered (App is for the serverless route only) |
| Tools | The Azure CLI (2.83.0 was read), OpenTofu 1.10 or later, jq, curl; for the cluster route kubectl and Helm 3.19 or later; for the serverless route the CLI’s containerapp extension (the debug console). Docker only to build on a machine of your own |
| Where the commands run | Git Bash on the development machine, in the repository’s own folder, not a worktree: .local/, with the engine archive, is only there. Azure Cloud Shell will not do: it has no OpenTofu, none of the state, and no clipboard to pipe to. On 2026-11-22 that machine had az and kubectl on its PATH, OpenTofu and Helm under .local/tools, and no jq |
| Names and certificate | Two DNS names you can add records for (P3). For the cluster route, a certificate and its key as PEM that name both (P6), in a folder outside the repository (deploy/.gitignore leaves out *.key, *.crt, *.pem and *.pfx, but a key has no business beside the code). An ACME DNS-01 challenge gets one before anything runs |
| A region | One that offers Application Gateway for Containers, Azure Managed Redis and PostgreSQL 18, with quota for two Standard_D4ds_v5 nodes on the cluster route |
I=acme; D=acme.example.com; OPS=ops.acme.example.com # as in ../VALIDATE.mdTAG=0.1.0ADMIN=you@example.com # the first administrator's addressCERT=C:/Users/you/forge-cert # the folder of fullchain.pem and privkey.pem, written the Windows wayCLIP=clip.exe # pbcopy on a Mac; wl-copy on Linuxexport MSYS_NO_PATHCONV=1 # Git Bash: leave /keys/..., /dev/null and resource IDs as they are writtenaz loginexport ARM_SUBSCRIPTION_ID=$(az account show --query id -o tsv)for n in ContainerService Network NetworkFunction ServiceNetworking DBforPostgreSQL Cache Storage KeyVault \ ContainerRegistry OperationalInsights Insights ManagedIdentity RecoveryServices App; do echo "Microsoft.$n $(az provider show --namespace "Microsoft.$n" --query registrationState -o tsv)"doneThe commands assume the modules’ name is forge, the default. After a route’s first apply, in that route’s folder, and again in every new terminal:
RG=$(tofu output -raw resource_group); REG=$(tofu output -raw registry_name)REGISTRY=$(tofu output -raw registry); KV=$(tofu output -raw key_vault_name)No command here prints a secret: a password or an invitation link goes through a pipe, to the cluster or to the clipboard. The state file in the route’s folder holds every generated password (P4) and is in .gitignore: keep the folder private and delete the file after the take-down.
The Cluster Route (AKS)
| # | Step | Pass When | Proves |
|---|---|---|---|
| K1 | In deploy/azure/kubernetes: copy example.tfvars to my.tfvars, set location, then tofu init, tofu plan -var-file=my.tfvars -var 'instances={}', and the same with apply |
The plan lists the platform, the cluster and the gateway, and nothing of an instance. The apply ends without error | The first real plan and apply of the modules (R1). If either fails, record the resource’s address, the whole error, tofu version, and whether it was the plan or the apply. Leave what was made, correct the module, apply again |
| K2 | Build and push both images, below, doing Part 1 where it says. Write the two digests into my.tfvars |
Both builds end with Run ID: ... was successful; the worker’s log has I2’s line; the loop prints two @sha256: references |
The images build from a clean copy of the commit and the engine archive alone, and the registry takes them (I1, I2, I6) |
| K3 | Set instances in my.tfvars (acme = { domain = "acme.example.com" }), then plan and apply without -var. A 403 on a secret means a role has not arrived yet: apply again |
The apply ends without error, and tofu output key_vault_keys names the instance’s key |
The database server, the cache, the share and its backup, the secrets, the frontend and the key can be made |
| K4 | Read the key back, below | kty is oct-HSM, keySize 256, keyOps encrypt and decrypt and nothing else, from both sides. The vault is premium with purge protection. The only role on the key is Key Vault Crypto User, held by the identity forge-<instance>-api |
Resource Manager made the AES key the API needs, and nobody else may use it. Closes the first half of R13 |
| K5 | Connect, install the gateway’s controller, and look for the Gateway API’s definitions, below | Two alb-controller pods run. The list has gatewayclasses, gateways and httproutes of gateway.networking.k8s.io, and the route and health check policies of alb.networking.azure.io. The class says Valid GatewayClass |
The controller’s chart brings the Gateway API’s definitions (R4, second part). If they are missing, install the Gateway API’s standard definitions and say so in the guide |
| K6 | Make the namespace and the three secrets, below | describe lists the four settings in forge-settings (and the secret of each sign-in registration you gave the instance), the account’s name and key in forge-files, and tls.crt and tls.key in forge-tls, each with a size and no value |
The secrets reach the cluster from Key Vault through a pipe |
| K7 | Install with the chart, below | The rollout ends within 15 minutes; one API pod and two worker pods are Running; the claim forge-keys is Bound |
The chart installs, the node mounts the share, the API applies the database releases and opens its port |
| K8 | kubectl -n "forge-$I" get gateway forge -o jsonpath='{.status.addresses[0].value}{"\n"}', then a CNAME from $D and another from $OPS to that name |
The name ends in alb.azure.com, and nslookup follows both of yours to it |
One frontend serves both host names |
| K9 | Part 2 of ../VALIDATE.md, A1 to A19, done as the table below says. The guide’s own V1 to V6 are A1, A2, A17, A10, A16 and A12 |
Part 2’s own passes | The application on this route. A6 closes R2 here |
| K10 | After A5: kubectl -n "forge-$I" exec deploy/forge-api -c api -- dotnet NetBlueprint.Registry.Api.dll operator reset operator; echo "exit $?", then read the new password as in A5 and sign in |
exit 0; the file is there again; the console takes the password and asks for one of your own and an authenticator app |
The way back in works where the API’s image has no shell |
| K11 | After A9: the same command with check-engine in place of operator reset operator |
It finds every stored revision sound, and exit 0 |
The engine check runs in the container, against the worker |
| K12 | Workload identity on the API pod, in the block of checks below | AZURE_CLIENT_ID, AZURE_TENANT_ID and AZURE_FEDERATED_TOKEN_FILE are set, the client id is the one the second command prints, and a volume azure-identity-token is mounted |
The webhook gives the pod its token although the service account and the pod set automountServiceAccountToken: false. With A8, closes the second half of R13 |
| K13 | After A8, and ten minutes for the log to arrive: the key used, below | The query lists KeyEncrypt and KeyDecrypt on the instance’s key, and the caller is the identity forge-<instance>-api (its client id is K12’s) and nobody else |
The API reached the key with its own identity, and the vault’s audit log, which the modules send to the workspace, records who used it. If the query finds nothing, the metric in the second command still shows that the key was used |
| K14 | The gateway’s policies and its cookie, below. The timeout is A11 and A16 | Both policies say they were accepted, and the answer sets a cookie named forge-affinity |
values-azure.yaml is right about session affinity (R4, first part). Without routeTimeout the gateway ends every request at 60 seconds (Microsoft, read): a live channel replaced every minute in A11 means the route policy is not applied |
| K15 | The data plane, below, with A1 | azure overlay cilium cilium; the Gateway is PROGRAMMED True; A1 answered through the gateway |
The gateway reaches pods on the Cilium data plane, which Microsoft’s pages do not name (R4, third part) |
| K16 | NetworkPolicy, seen from another namespace, below | reached https://example.com and blocked http://forge-worker... |
A pod with no policy has a way out, so it is the policy that stops the worker in A17; and nothing but the API reaches the worker |
| K17 | The share as the keys reader of A5 sees it, below. Then switch the reader off | 1654; /keys is drwx------ owned by 1654 1654; its files are -rw-------; uid=1654, gid=1654, file_mode=0600, dir_mode=0700; addr= is in the private endpoints’ subnet (x.x.5.*) |
The mount options give the folder to the API’s user alone, and the node reaches the share through the private endpoint |
| K18 | The database’s certificate, below, with A1 | SSL Mode=VerifyFull; the volumes are tmp keys, with no db-ca; A1 said the database is ok |
The image’s own store trusts the flexible server’s authorities, with no bundle mounted. Closes R5 |
| K19 | “The database login’s attributes”, below | forge_admin|f|f|t and forge_app|f|f|f |
The login is no superuser, cannot pass row-level security, and can create a role (need 1) |
| K20 | The share’s backup with the storage account closed, below | Enabled Deny AzureServices. The Backup job ends Completed and a recovery point is listed. Next day the 02:00 UTC job is Completed too: record the tier each point shows |
Azure Backup reaches a share whose account refuses everyone but trusted services. Closes R14 |
| K21 | The worker’s user, and user namespaces on AKS, below | 1000, a Chromium version, then either result: expected Operation not permitted |
I4 on this route, and I5’s question asked of the runtime that matters here (default F) |
| K22 | Take everything down, below | az group exists prints false; the keys vault is listed as deleted, with a purge date |
The modules remove what they made (A19) |
For K2. Build from a clean copy of the commit, not from the repository’s folder. .dockerignore leaves out the other checkouts under .claude/, everything in the cloud folders but their two guides, which the help’s build reads, and .local/, but it lets through every netblueprint-forge-*.zip in .local/, and a copy of the commit is the one thing known to be exactly what was committed. Two ways:
az acr build, with no Docker at all (the way checked for this document, against Microsoft’s reference and the CLI’s source). The CLI packs the folder, honouring.dockerignoreand its!exceptions, uploads it, and the registry builds and pushes.--fileis relative to the folder. Run the block’s first two lines in the repository’s folder, withREGandREGISTRYset.- Docker on a machine of your own. Copy
$SRCthere (there is no remote to clone from), do Part 1 as written, then the guide’s “Build and push the images”.
SRC=$(mktemp -d); git archive HEAD | tar -x -C "$SRC"mkdir "$SRC/.local"; cp ".local/$(jq -r .archive worker/engine.lock.json)" "$SRC/.local/"cd "$SRC"az acr build --registry "$REG" --platform linux/amd64 --file deploy/compose/Dockerfile.api --image "forge/api:$TAG" .az acr build --registry "$REG" --platform linux/amd64 --file deploy/compose/Dockerfile.worker --image "forge/worker:$TAG" .for P in api worker; do echo "${P}_image = \"$REGISTRY/forge/$P@$(az acr repository show --name "$REG" --image "forge/$P:$TAG" --query digest -o tsv)\""doneThe registry builds with the classic builder unless BuildKit is switched on (Microsoft, read), and Dockerfile.api uses COPY --chmod, which needs BuildKit. If the API build stops there, record it; the remedy is a task whose build step has DOCKER_BUILDKIT=1 in its env, run with az acr run.
Part 1 without Docker: the two builds are I1 and I2. For I6, change one character of sha256 in $SRC/worker/engine.lock.json and run the worker build again with --no-push; $SRC is a copy, so nothing is put back. I4 and I5 are asked of AKS’s own runtime in K21. Under Docker itself they need a Docker host, and Azure Cloud Shell is none (its account is unprivileged; that it runs no daemon is not confirmed in documentation). The registry’s agents run Docker, so az acr run --registry "$REG" --cmd "docker run --rm --entrypoint id $REGISTRY/forge/worker:$TAG -u" /dev/null should answer I4 (--cmd takes docker commands; with these flags, not confirmed in documentation). I3 needs docker export, so a Docker host; on Azure, what it proves is shown by A3 (the application, the console and the help are in the image) and K17 (the mount sets the folder’s owner and mode, not the image).
For K4. The apply holds no role on the keys vault’s data, so the first read goes through Resource Manager (the answer’s shape is not confirmed in documentation). The second gives you Key Vault Reader for the check, which can take a few minutes to arrive, and takes it back.
KEYURL=$(tofu output -json key_vault_keys | jq -r --arg i "$I" '.[$i]')KEYS_VAULT=$(echo "$KEYURL" | sed -E 's#^https://([^.]+)\..*#\1#')VAULT_ID=$(az keyvault show --name "$KEYS_VAULT" --query id -o tsv)az rest --method get --url "https://management.azure.com$VAULT_ID/keys/forge-$I-kek?api-version=2026-05-15" \ --query "properties.{kty:kty, keySize:keySize, keyOps:keyOps}"az keyvault show --name "$KEYS_VAULT" --query "properties.{sku:sku.name, purgeProtection:enablePurgeProtection}"az role assignment list --scope "$VAULT_ID/keys/forge-$I-kek" --query "[].{role:roleDefinitionName, principal:principalId}" -o tableaz identity show -g "$RG" -n "forge-$I-api" --query principalId -o tsvME=$(az ad signed-in-user show --query id -o tsv)az role assignment create --role "Key Vault Reader" --assignee-object-id "$ME" --assignee-principal-type User --scope "$VAULT_ID"az keyvault key show --id "$KEYURL" --query "key.{kty:kty, keyOps:keyOps}"az role assignment delete --role "Key Vault Reader" --assignee "$ME" --scope "$VAULT_ID"For K5 to K7. The secrets are piped as a manifest to kubectl create -f -, which works in Git Bash as well as in a Linux shell.
az aks get-credentials --resource-group "$RG" --name "$(tofu output -raw cluster_name)"helm install alb-controller oci://mcr.microsoft.com/application-lb/charts/alb-controller --version 1.13.0 \ --namespace azure-alb-system --create-namespace --set albController.namespace=azure-alb-system \ --set albController.podIdentity.clientID="$(tofu output -raw alb_controller_client_id)"kubectl -n azure-alb-system get podskubectl get crd | grep -E 'gateway.networking.k8s.io|alb.networking.azure.io'kubectl get gatewayclass azure-alb-external -o jsonpath='{.status.conditions[*].message}{"\n"}'
kubectl create namespace "forge-$I"for S in settings files; do az keyvault secret show --vault-name "$KV" --name "forge-$I-$S" --query value -o tsv \ | jq --arg n "forge-$S" '{apiVersion:"v1", kind:"Secret", metadata:{name:$n}, stringData:.}' \ | kubectl -n "forge-$I" create -f -doneopenssl x509 -in "$CERT/fullchain.pem" -noout -ext subjectAltName # must show both host nameskubectl -n "forge-$I" create secret tls forge-tls --cert "$CERT/fullchain.pem" --key "$CERT/privkey.pem"kubectl -n "forge-$I" describe secret forge-settings forge-files forge-tls
tofu output -json helm_values | jq -r --arg i "$I" '.[$i]' > "$I.values.yaml"helm upgrade --install forge ../../helm/netblueprint-forge -n "forge-$I" \ -f ../../helm/netblueprint-forge/values-azure.yaml -f "$I.values.yaml"kubectl -n "forge-$I" rollout status deployment/forge-api --timeout=15mkubectl -n "forge-$I" get pods,pvcFor K9: Part 2 on this route. UP is the function the block below defines.
| Part 2 | How, on the Cluster Route |
|---|---|
| A5 | The keys reader, below: the password goes to the clipboard, and kubectl exec writes nothing to the logs Container insights collects. Leave the reader on for K17; it ends by itself after an hour |
| A6 | set-up through kubectl exec, below. The link goes to the clipboard and to no log |
| A8 | Then K13 |
| A10 | UP --set api.replicas=2, then wait for the rollout as in K7 |
| A12 | kubectl -n "forge-$I" delete pod "$(kubectl -n "forge-$I" get pods -l app.kubernetes.io/component=api -o jsonpath='{.items[0].metadata.name}')". If the page did not blink, it was on the other pod: do it once more |
| A13, A14 | First UP --set api.replicas=1; back to 2 for A15 |
| A17 | kubectl -n "forge-$I" exec deploy/forge-worker -- node -e "fetch('https://example.com').then(()=>process.exit(1),()=>process.exit(0))"; echo "exit $?" prints exit 0. K16 is its control |
| A18 | Restore to a new server and count, below, from the pod of “The database login’s attributes”. Row-level security is forced on organizations, so the count is 0 unless app.scope is set first |
| A19 | K22 |
UP() { helm upgrade forge ../../helm/netblueprint-forge -n "forge-$I" --reuse-values "$@"; }# A5UP --set keysReader.enabled=truekubectl -n "forge-$I" wait --for=condition=Ready pod/forge-keys-reader --timeout=5mkubectl -n "forge-$I" exec forge-keys-reader -- cat /keys/first-operator-password.txt | tr -d '\r\n' | $CLIPkubectl -n "forge-$I" exec forge-keys-reader -- rm /keys/first-operator-password.txt # after signing in# A6kubectl -n "forge-$I" exec deploy/forge-api -c api -- dotnet NetBlueprint.Registry.Api.dll \ set-up --organization Validation --administrator "$ADMIN" --address "https://$D" | $CLIP; echo "exit ${PIPESTATUS[0]}"# A18SRV=$(az postgres flexible-server list -g "$RG" --query "[?starts_with(name,'forge-$I-')].name | [0]" -o tsv)az postgres flexible-server restore -g "$RG" --name "$SRV-restore" --source-server "$SRV"RHOST=$(az postgres flexible-server show -g "$RG" -n "$SRV-restore" --query fullyQualifiedDomainName -o tsv)kubectl -n forge-check exec psql -- psql -At -c "set app.scope = 'platform'" -c "select count(*) from organizations"kubectl -n forge-check exec psql -- psql -At -h "$RHOST" -c "set app.scope = 'platform'" -c "select count(*) from organizations"az postgres flexible-server delete -g "$RG" -n "$SRV-restore" --yesA18 passes when both counts are 1. That a restore with no network named lands in the source’s subnet and zone is not confirmed in documentation; if it does not, name them with --vnet, --subnet and --private-dns-zone.
For K12 to K21, the checks only Azure needs.
# K12kubectl -n "forge-$I" describe pod -l app.kubernetes.io/component=api | grep -E 'AZURE_|azure-identity'az identity show -g "$RG" -n "forge-$I-api" --query clientId -o tsv# K13 (VAULT_ID from K4). The first command needs the CLI's log-analytics extension.WS=$(az monitor log-analytics workspace list -g "$RG" --query "[0].customerId" -o tsv)az monitor log-analytics query -w "$WS" -o table --analytics-query \ "AzureDiagnostics | where ResourceProvider == 'MICROSOFT.KEYVAULT' and OperationName in ('KeyEncrypt','KeyDecrypt') | project TimeGenerated, OperationName, ResultType, id_s, identity_claim_appid_g | order by TimeGenerated desc | take 20"az monitor metrics list --resource "$VAULT_ID" --metrics ServiceApiHit --aggregation Count --interval PT1H --offset 6h \ --filter "ActivityName eq '*'" --query "value[0].timeseries[].metadatavalues[0].value" -o tsv# K14kubectl -n "forge-$I" describe routepolicy forge-route | sed -n '/^Status:/,$p'kubectl -n "forge-$I" describe healthcheckpolicy forge-health | sed -n '/^Status:/,$p'curl -sI "https://$D/" | grep -io '^set-cookie: [^=]*'# K15az aks show -g "$RG" -n "$(tofu output -raw cluster_name)" -o tsv \ --query "networkProfile.[networkPlugin, networkPluginMode, networkDataplane, networkPolicy]"kubectl -n "forge-$I" get gateway,httproute# K16kubectl create namespace forge-checkIMG=$(kubectl -n "forge-$I" get deploy forge-worker -o jsonpath='{.spec.template.spec.containers[0].image}')kubectl -n forge-check run reach --rm -i --restart=Never --image="$IMG" --command -- node -e "const f = u => fetch(u, {signal: AbortSignal.timeout(15000)}).then(() => console.log('reached', u), () => console.log('blocked', u)); f('https://example.com').then(() => f('http://forge-worker.forge-$I:5081/'))"# K17, then the reader offkubectl -n "forge-$I" exec forge-keys-reader -- sh -c 'id -u; ls -ldn /keys; ls -ln /keys; grep " /keys " /proc/mounts | grep -oE "addr=[0-9.]+|uid=[0-9]+|gid=[0-9]+|file_mode=[0-9]+|dir_mode=[0-9]+"'UP --set keysReader.enabled=false# K18kubectl -n "forge-$I" get secret forge-settings -o jsonpath='{.data.ConnectionStrings__Registry}' | base64 -d | grep -o 'SSL Mode=[A-Za-z]*'kubectl -n "forge-$I" get deploy forge-api -o jsonpath='{.spec.template.spec.volumes[*].name}{"\n"}'# K20VAULT="forge-$I-backup"SA=$(az storage account list -g "$RG" --query "[?starts_with(name,'forge${I//-/}')].name | [0]" -o tsv)az storage account show -g "$RG" -n "$SA" -o tsv --query "[publicNetworkAccess, networkRuleSet.defaultAction, networkRuleSet.bypass]"az backup protection backup-now -g "$RG" -v "$VAULT" -c "$SA" -i keys --backup-management-type AzureStorage \ --workload-type AzureFileShare --retain-until "$(date -u -d '+7 days' +%d-%m-%Y)" -o tableaz backup job list -g "$RG" -v "$VAULT" -o tableaz backup recoverypoint list -g "$RG" -v "$VAULT" -c "$SA" -i keys --backup-management-type AzureStorage --workload-type AzureFileShare -o table# K21kubectl -n "forge-$I" exec deploy/forge-worker -- sh -c 'id -u; chromium-browser --version || chromium --version; unshare -U true; echo "unshare exit $?"'In K13 the log’s column names (id_s, identity_claim_appid_g) and the metric’s activity names, and in K14 the shape of the policies’ status, are not confirmed in documentation: record what is printed. In K14 a cookie named AGCAffinity instead would be the gateway’s managed cookie, so the policy’s own name was not taken.
For K22. Three things do not go by themselves:
- Azure Backup puts a delete lock on the storage account it protects, and makes it again at each backup (Microsoft, read): stop the protection first, then delete the lock. Deleted backups are kept for 14 days, and the Recovery Services vault cannot go while it holds them (the guide). The block’s second line switches that off for this vault, which is not confirmed in documentation for a new vault. If it is refused, the vault stays for the 14 days: record it.
- The keys vault has purge protection. The destroy deletes it, and it then waits 90 days as a deleted vault that nobody can purge. Its name stays taken for that time, which a new deployment never meets, because the suffix is made anew. This is the deletion window A19 speaks of.
- What these steps made outside the modules: the restored server of A18, if it is still there;
forge-check; your DNS records; the certificate’s key file;$SRC; the state file.
kubectl delete namespace forge-check; helm uninstall forge -n "forge-$I"az backup vault backup-properties set -g "$RG" -n "$VAULT" --soft-delete-feature-state Disable # VAULT and SA from K20az backup protection disable -g "$RG" -v "$VAULT" -c "$SA" -i keys --backup-management-type AzureStorage \ --workload-type AzureFileShare --delete-backup-data true --yesaz backup container unregister -g "$RG" -v "$VAULT" -c "$SA" --backup-management-type AzureStorage --yesaz lock list -g "$RG" --query "[].{name:name, id:id}" -o tableaz lock delete --ids "<the id of the lock on the storage account>"tofu destroy -var-file=my.tfvarsaz group exists --name "$RG"az keyvault list-deleted --resource-type vault --query "[].{name:name, purge:properties.scheduledPurgeDate}" -o tableIf the destroy still stops, record where: that is what “Removing an instance” in the guide must come to say.
The Serverless Route (Container Apps)
The same order, in deploy/azure/serverless. The platform is this route’s own (forge-apps-<location>, with its own registry and vaults), so the images are pushed again. Read “Read this before choosing the serverless route” in the guide first.
| # | Step | Pass When | Proves |
|---|---|---|---|
| C1 | As K1, in deploy/azure/serverless |
As K1, with no cluster and no gateway | The first plan and apply of this route’s platform (R1) |
| C2 | As K2, against this route’s registry | As K2 | As K2 |
| C3 | In my.tfvars set the instance (domain, api_min_replicas = 1, subnet_number = 0) and leave bind_certificates = false; plan and apply. If it fails on an image pull or a secret, a role has not arrived yet: apply again. Then the health check, below |
The apply ends without error. Within ten minutes one API replica is Running, and the health answers "status":"ok" at the app’s own address |
The apps pull with their identities, read their Key Vault secrets and mount the share; the API reaches the database, the cache, and the worker by its name |
| C4 | K4, in this folder | As K4 | As K4 (R13, first half). On this route the API app’s own identity holds the role |
| C5 | Add the records the output names, below, and compare the TXT value with the app’s own verification id | Four records are printed, a CNAME and a TXT for each host. The comparison prints same |
The TXT record takes the environment’s id (R15, fourth part). different means the output must give the app’s |
| C6 | Set bind_certificates = true and apply; then the host names, below |
Both names are listed as bound (SniEnabled) with a certificate, and https://$D/api/health and https://$OPS/ answer with no certificate warning |
Container Apps binds each managed certificate by itself (R15, third part). If a name stays Disabled, az containerapp hostname bind --hostname <name> -g "$RG" -n "forge-$I-api" --environment "forge-$I" --validation-method CNAME is Microsoft’s own step, and the module needs it |
| C7 | Whether exec passes arguments: az containerapp exec -n "forge-$I-worker" -g "$RG" --command "id -u" |
It prints 1000 and nothing else. uid=1000(node) ... means the arguments were dropped |
--command takes a command with its arguments (R17, first part), and the worker runs as its own user (I4). If they are dropped, set-up, operator reset and check-engine need a Container Apps job on the API’s image, settings, secrets and share with the command overridden, which the modules do not make. A job’s output goes to the workspace’s log: run set-up once more afterwards, since a new link withdraws the old |
| C8 | Part 2 of ../VALIDATE.md, done as the table below says |
Part 2’s own passes | The application on this route. A6 closes R2 here |
| C9 | The first operator’s password through the debug console (A5), below | The clipboard holds the password, the console’s sign-in takes it, and afterwards the file is gone | The debug console reaches the share through /proc/1/root (R17, second part) |
| C10 | The mount, seen in an interactive debug session, below | addr= is in the private endpoints’ subnet (x.x.5.*); uid=1654, gid=1654, file_mode=0600, dir_mode=0700; the folder is drwx------ owned by 1654 1654 |
The storage mount goes through the private endpoint, and Container Apps applies uid and gid on an SMB mount (R15, first and second parts) |
| C11 | Ten minutes after C10, the query below, in the workspace forge-logs (portal, Logs) |
No rows | A debug session’s output is not logged (R17, second part) |
| C12 | A4 | 404 on $D and 401 on $OPS |
The ingress passes the Host header on unchanged (R17, third part). 404 on both means the API never sees the console’s host: record it, since no setting of the modules changes it |
| C13 | A2, then A13 and A14 with one replica | A2 has strict-transport-security; A13 ends in 429; A14 is 401 |
The ingress connects from the environment’s subnet and adds one entry to X-Forwarded-For (R8). If not, az containerapp debug -n "forge-$I-api" -g "$RG" --command "netstat -tn" shows where the connections to port 8080 come from: that range is what Proxy__KnownNetworks__0 must name |
| C14 | A11 and A16 | The live channel stays one WebSocket for ten minutes, and an answer of more than five minutes streams to its end | The 240-second limit is an idle one, which the 15-second keep-alive never reaches (R6). A stream or a WebSocket cut at about four minutes means the limit counts the whole request: the remedy is premium ingress, with an idle limit of up to 30 minutes on a dedicated D4 profile of two nodes or more (az containerapp env premium-ingress add), which the modules do not make |
| C15 | Take everything down: K22 without its first line, in this folder | As K22 | As K22. The custom domains and their certificates go with the destroy |
For C3, C5 and C6.
curl -s "$(tofu output -json app_urls | jq -r --arg i "$I" '.[$i]')/api/health"az containerapp replica list -n "forge-$I-api" -g "$RG" --query "[].{name:name, state:properties.runningState}" -o table# C5tofu output -json custom_domain_records | jq -r --arg i "$I" '.[$i][] | "\(.type) \(.name) \(.value)"'[ "$(az containerapp show -n "forge-$I-api" -g "$RG" --query properties.customDomainVerificationId -o tsv)" = \ "$(tofu output -json custom_domain_records | jq -r --arg i "$I" '[.[$i][] | select(.type == "TXT") | .value] | unique | .[0]')" ] \ && echo same || echo different# C6az containerapp hostname list -n "forge-$I-api" -g "$RG" -o tableFor C8: Part 2 on this route.
| Part 2 | How, on the Serverless Route |
|---|---|
| A5 | C9 |
| A6 | az containerapp exec, below, once C7 has passed. The pipe sends the link to the clipboard instead of the terminal |
| A10 | api_min_replicas = 2 in my.tfvars, apply; az containerapp replica list then shows two |
| A12 | api_min_replicas = 1, apply: Container Apps stops one replica. No command stops a chosen one |
| A13, A14 | With that one replica (C13); back to 2 for A15 |
| A17 | Does not apply: the worker shares the environment’s way out. Record it as R7, open |
| A18 | The restore as on the cluster route; the count with psql as “The database login’s attributes” says for this route |
| A19 | C15 |
| K10, K11, K20 | The same checks here: operator reset operator and check-engine through az containerapp exec, below, and K20’s block as it stands |
az containerapp exec -n "forge-$I-api" -g "$RG" --command "dotnet NetBlueprint.Registry.Api.dll check-engine"az containerapp exec -n "forge-$I-api" -g "$RG" \ --command "dotnet NetBlueprint.Registry.Api.dll set-up --organization Validation --administrator $ADMIN --address https://$D" | $CLIPaz containerapp exec -n "forge-$I-api" -g "$RG" --command "dotnet NetBlueprint.Registry.Api.dll operator reset operator"exec opens a session of its own; that its output can be piped is not confirmed in documentation. If Git Bash’s window will not open the session, run the line in PowerShell, where | clip does the same.
For C9 to C11. The debug console is a preview. It runs as root, which the API’s files refuse: Microsoft says to run switch-user first when the container is not root, and names only /proc/1/cwd. If C9’s one-command form answers Permission denied, only an interactive session can run switch-user, and the guide’s interactive cat then shows the password on the screen. This document does not write that command: record the finding against R17. That --command output can be piped is not confirmed in documentation.
# C9: one command each, so that nothing is shownaz containerapp debug -n "forge-$I-api" -g "$RG" --command "cat /proc/1/root/var/lib/forge/keys/first-operator-password.txt" | tr -d '\r\n' | $CLIPaz containerapp debug -n "forge-$I-api" -g "$RG" --command "rm /proc/1/root/var/lib/forge/keys/first-operator-password.txt" # after signing in# C10: az containerapp debug -n "forge-$I-api" -g "$RG", then inside the session:grep -E 'cifs|smb3' /proc/1/mounts | grep -oE "addr=[0-9.]+|uid=[0-9]+|gid=[0-9]+|file_mode=[0-9]+|dir_mode=[0-9]+"switch-userls -ldn /proc/1/root/var/lib/forge/keysecho forge-debug-markerunion ContainerAppConsoleLogs_CL, ContainerAppSystemLogs_CL| where TimeGenerated > ago(1h)| where * has "forge-debug-marker"The Sign-In Registrations: S1 to S7
Optional: only if you registered the instance with Microsoft, Google or Apple, or set the operators’ single sign-on or breach check (the guide’s K2). ../VALIDATE.md has the steps; do them after A16 and before the restore and the teardown. This is how each “as your cloud’s steps say” is done on Azure.
| Step | Cluster Route | Container Apps |
|---|---|---|
| S1 | Plan with both files, below, and read what it would touch: a new version of the secret forge-$I-settings and nothing else that exists in Azure, with helm_values among the changed outputs. Apply, then the guide’s “After a change, on the cluster route”. The two listings below then name the new settings |
The plan makes one Key Vault secret for each secret you set and the API identity’s right to read it, writes a new version of forge-$I-settings, and changes the API app. Apply; the new revision starts by itself. The listing below then names the new settings |
| S2 to S6 | As written | As written. S2 with Apple registered is the first sight of open item R18: apple is listed only if the key reached the API, and S4 with an Apple ID proves it arrived whole. S6 with mfa_amr = "" proves the empty value is kept: a sign-in whose token has only an amr is then refused |
| S7 | The log line below prints 0 |
The query below, in the environment’s Log Analytics workspace, gives no rows |
A database, cache, key, storage account or network in S1’s plan is a finding. None of these commands prints a secret: the listings are of names.
tofu plan -var-file=my.tfvars -var-file=secrets.tfvars# S1, cluster route: the keys of the cluster's secret, and the settings the pods are given.kubectl -n "forge-$I" get secret forge-settings -o json | jq -r '.data | keys[]'kubectl -n "forge-$I" get deploy forge-api -o json | jq -r '.spec.template.spec.containers[] | select(.name=="api") | .env[].name' | grep -E '^(SignIn|Platform__(BreachCheck|SingleSignOn))'# S1, Container Apps: each setting, and the secret it is read from where it is one.az containerapp show -n "forge-$I-api" -g "$RG" --query "properties.template.containers[0].env[].[name, secretRef]" -o tsv | grep -E '^(SignIn|Platform__(BreachCheck|SingleSignOn))'# S7, cluster route: 0 is the pass.kubectl -n "forge-$I" logs -l app.kubernetes.io/component=api -c api --since=10m --tail=-1 | grep -c 'Pwned Passwords'ContainerAppConsoleLogs_CL| where TimeGenerated > ago(15m)| where * has "Pwned Passwords"The az containerapp show line was not checked against its reference page: the answer is read as Resource Manager gives a container app (properties.template.containers), as C5 already reads properties.customDomainVerificationId. The log takes a few minutes to reach the workspace.
The Database Login’s Attributes
The attributes belong to the flexible server, which both routes make the same way, so one route is enough. The server has private access only: it answers “applications that are deployed on different subnets within the same virtual network” (Microsoft, read), and its private zone resolves there. The most direct way with no change to the network is therefore a short-lived psql pod on the cluster, in a namespace of its own: the chart’s namespace refuses every pod a way out, and forge-check does not. The password goes from Key Vault through a pipe into a Kubernetes secret, and from there into the pod’s environment; it is never shown. The pod and the secret go with the namespace in K22.
kubectl create namespace forge-check # unless K16 made itaz keyvault secret show --vault-name "$KV" --name "forge-$I-settings" --query value -o tsv \ | jq '.ConnectionStrings__Registry | split(";") | map(split("=") | {(.[0]): .[1]}) | add | {apiVersion:"v1", kind:"Secret", metadata:{name:"pg"}, stringData: {PGHOST:.Host, PGDATABASE:.Database, PGUSER:.Username, PGPASSWORD:.Password, PGSSLMODE:"require"}}' \ | kubectl -n forge-check create -f -kubectl -n forge-check apply -f - <<'EOF'apiVersion: v1kind: Podmetadata: { name: psql }spec: restartPolicy: Never containers: - name: psql image: postgres:18-alpine command: ["sleep", "7200"] envFrom: [{ secretRef: { name: pg } }]EOFkubectl -n forge-check wait --for=condition=Ready pod/psql --timeout=5mkubectl -n forge-check exec psql -- psql -At -c "select rolname, rolsuper, rolbypassrls, rolcreaterole from pg_roles where rolname in (current_user, 'forge_app') order by 1"It passes with forge_admin|f|f|t and forge_app|f|f|f: neither is a superuser, neither passes row-level security, and the login can create a role. A t in the second or third column fails it. If Docker Hub refuses the pull, az acr import -n "$REG" --source docker.io/library/postgres:18-alpine --image check/postgres:18-alpine copies the image, and the pod names $REGISTRY/check/postgres:18-alpine.
With the serverless route alone, ask the same from an interactive debug session, which is inside the environment’s subnet. Not confirmed in documentation: the package’s name, and that the API’s variables can be read this way.
tdnf install -y postgresqlswitch-userexport $(tr '\0' '\n' < /proc/1/environ | sed -n 's/^ConnectionStrings__Registry=//p' | tr ';' '\n' \ | sed -n 's/^Host=/PGHOST=/p; s/^Username=/PGUSER=/p; s/^Password=/PGPASSWORD=/p; s/^Database=/PGDATABASE=/p') PGSSLMODE=requirepsql -At -c "select rolname, rolsuper, rolbypassrls, rolcreaterole from pg_roles where rolname in (current_user, 'forge_app') order by 1"Coverage
Every row of the guide’s open items with the status Verify, and every # Verify: line of the modules.
| Item | What It Asks | Proved By |
|---|---|---|
| R2 | set-up run in a container |
A6, done as K9 or as C7 and C8 say |
| R4 | The affinity and timeout settings; the Gateway API’s definitions; pods reached on Cilium | K14 with A11 and A16; K5; K15 with A1. This is also the “Verify every alb.networking.azure.io setting” of values-azure.yaml |
| R5 | The image trusts the flexible server’s authorities | K18 with A1 |
| R6 | Whether the 240-second limit is an idle one | C14 (A11, A16) |
| R8 | What each ingress adds to X-Forwarded-For |
A13 and A14 on each route (K9; C13) |
| R10 | PostgreSQL 18 in Azure Government | No step: it needs an Azure Government subscription. It stays open |
| R13 | The key as made; the token with automountServiceAccountToken: false |
K4 (C4) with A8; K12 with A8 and K13 |
| R14 | Vaulted backup with the account closed | K20 |
| R15 | The mount through the private endpoint; uid and gid; the certificate bound; the TXT record’s id |
C10; C10; C6; C5 |
| R17 | exec with arguments; the debug console’s reach and its log; the Host header |
C7; C9 and C11; C12 |
| R18 | A secret of several lines as an environment variable; an environment variable with an empty value | S2 and S4 on Container Apps with Apple registered; S6 with mfa_amr = "" and an mfa_acr of your provider’s. Without those settings: by no step |
Need 1, rolbypassrls (a Verify in the guide’s text, with no row) |
The login’s attributes | K19 |
kubernetes/cluster.tf |
Pods reached on the Cilium data plane | K15 |
kubernetes/outputs.tf |
The projected token | K12 |
modules/instance/key.tf |
oct-HSM, 256 bits, encrypt and decrypt |
K4 |
modules/instance/file-share.tf |
Vaulted backup with the account closed | K20 |
serverless/apps.tf, five lines |
One X-Forwarded-For entry from the subnet; the Host header; the mount’s path; uid and gid; the certificate binding itself |
C13; C12; C10; C10; C6 |
serverless/outputs.tf |
The environment’s verification id equals the app’s | C5 |
One thing the guide asks for cannot be done as it says: the key service’s live test (dotnet test --filter CloudKeyManagementTests) cannot run from the development machine, because the API’s credential is workload identity and then a managed identity, and takes no az login. A8 with K13 is the live proof instead.
Results
Part 2’s rows are for the route you ran; copy them for a second route.
| Step | Date | Result | What Was Seen |
|---|---|---|---|
| I1 | |||
| I2 | |||
| I3 | |||
| I4 | |||
| I5 | |||
| I6 | |||
| K1 | |||
| K2 | |||
| K3 | |||
| K4 | |||
| K5 | |||
| K6 | |||
| K7 | |||
| K8 | |||
| K9 | |||
| K10 | |||
| K11 | |||
| K12 | |||
| K13 | |||
| K14 | |||
| K15 | |||
| K16 | |||
| K17 | |||
| K18 | |||
| K19 | |||
| K20 | |||
| K21 | |||
| K22 | |||
| C1 | |||
| C2 | |||
| C3 | |||
| C4 | |||
| C5 | |||
| C6 | |||
| C7 | |||
| C8 | |||
| C9 | |||
| C10 | |||
| C11 | |||
| C12 | |||
| C13 | |||
| C14 | |||
| C15 | |||
| A1 | |||
| A2 | |||
| A3 | |||
| A4 | |||
| A5 | |||
| A6 | |||
| A7 | |||
| A8 | |||
| A9 | |||
| A10 | |||
| A11 | |||
| A12 | |||
| A13 | |||
| A14 | |||
| A15 | |||
| A16 | |||
| S1 | |||
| S2 | |||
| S3 | |||
| S4 | |||
| S5 | |||
| S6 | |||
| S7 | |||
| A17 | |||
| A18 | |||
| A19 |
Sources
Read on 2026-11-22. “Read” means the page was fetched and read. “Help” means the installed CLI’s own --help (2.83.0), which confirms a command and its flags and nothing of what it answers. Nothing was run against Azure.
| Source | What It Gives | How It Was Read |
|---|---|---|
| learn.microsoft.com/cli/azure/acr; azure/container-registry/container-registry-quickstart-task-cli and container-registry-tasks-reference-yaml | az acr build (--file, --platform, --no-push, the folder as context), az acr run --cmd, az acr import; BuildKit off unless DOCKER_BUILDKIT=1. None of them mentions .dockerignore |
Read |
github.com/Azure/azure-cli, acr/_archive_utils.py |
The CLI honours .dockerignore, ! and **, and always leaves out .git |
Read through a tool that answered questions about the file |
| learn.microsoft.com/azure/cloud-shell/features and faq-troubleshooting | Cloud Shell’s tools; an unprivileged account. No word on a Docker daemon | Read |
| learn.microsoft.com/azure/application-gateway/for-containers: the controller’s Helm quickstart, components, session-affinity | Chart 1.13.0; a bootstrap pod that manages definitions; 60-second request timeout; one X-Forwarded-For entry; the cookie’s settings; Azure CNI and overlay, Cilium not named |
Read |
| learn.microsoft.com/azure/aks/workload-identity-overview | The label, the annotation, AZURE_FEDERATED_TOKEN_FILE and the projected volume |
Read |
| learn.microsoft.com/azure/key-vault/general/logging and monitor-key-vault-reference | AuditEvent, KeyEncrypt, KeyDecrypt; the metric ServiceApiHit and its ActivityName |
Read |
| learn.microsoft.com/azure/container-apps: ingress-overview, premium-ingress, custom-domains-managed-certificates, sticky-sessions, storage-mounts, container-debug-console; cli/azure/containerapp | 240 seconds; the rightmost X-Forwarded-For entry; the idle limit of 4 to 30 minutes; hostname bind and the app’s verification id; exec --command; debug --command, switch-user, /proc/1/cwd, tdnf |
Read |
| learn.microsoft.com/azure/postgresql/network/concepts-networking-private; cli/azure/postgres/flexible-server | Who reaches a server with private access; restore and its flags |
Read |
| learn.microsoft.com/azure/backup: backup-afs-cli, manage-afs-backup-cli, azure-file-share-support-matrix, backup-azure-files-faq | backup-now, protection disable, container unregister; the delete lock and its return; key access |
Read |
az ... --help for backup (protection, recoverypoint, job, container, vault backup-properties), monitor metrics list, lock, keyvault key show and list-deleted, containerapp (hostname, replica, env), aks show, provider show |
The flags used here | Help |
That Key Vault Reader is enough for az keyvault key show; the log tables’ names in C11; networkDataplane in K15; SniEnabled in C6 |
Not read: from memory, to be confirmed by the step itself |