Validate a Deployment
Self-Hosted Only
Validating a Deployment
Copyright (c) 1998-2026 DigitalPrez, LLC. All rights reserved.
The first real runs of everything in deploy/, step by step. The guides describe a deployment that nobody has made; each step here proves one thing they could only describe, and says what a pass looks like. Written 2026-11-22.
Status
A step whose command is 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 to the instance.
How to Use It
- Part 1 below, once: the images, wherever Docker runs.
- Your cloud’s own steps: aws/VALIDATE.md, azure/VALIDATE.md or gcp/VALIDATE.md. Each walks one route from an empty account to a running instance, checks what is particular to that cloud, and sends you back here for Part 2 once the instance answers.
- Part 2 below, once per instance: the application itself, the same on every cloud.
- Record each result in the table at the end of your cloud’s steps: the date, pass or fail, and what you saw. A pass closes the open item the step names in that cloud’s guide.
Throughout: I is the instance’s key in instances (the examples use acme), D its domain and OPS its console host. The commands are written for bash, as in each cloud’s own shell. None of them prints a secret; where a password is needed it is piped or copied, never shown.
I=acmeD=acme.example.comOPS=ops.acme.example.comA validation deployment makes resources that are billed while they exist: a database, a cache, a load balancer, a NAT gateway and, on the cluster route, a cluster. Each cloud’s steps end with taking them down.
Part 1: The Images, Before Any Cloud
These steps were done once, on 2026-11-23, on the development machine with Docker Desktop 4.99.0, and all six passed. I5 gave the expected Operation not permitted: under Docker’s default seccomp profile the layout check cannot run, as default F says. Compose gives the worker a profile of its own, and with it the check worked on 2026-11-24 (compose/README.md, “The layout check”). Do them again for your own build, wherever Docker runs: a machine of your own with Docker, or the cloud’s own shell, as your cloud’s steps say. The source must be there, with the engine archive named in worker/engine.lock.json in .local/.
| # | Step | Pass When | Proves |
|---|---|---|---|
| I1 | docker buildx build --platform linux/amd64 -f deploy/compose/Dockerfile.api -t forge-api:validate --load . |
It builds | The API image, with the application, the console and the help built inside it. The help’s build reads the eight guides of deploy/, which .dockerignore lets in by name |
| I2 | docker buildx build --platform linux/amd64 -f deploy/compose/Dockerfile.worker -t forge-worker:validate --load . |
It builds, and the output has the line engine: release <version> verified and unpacked with the version of worker/engine.lock.json |
The worker image, and that the build checks the engine’s fingerprint |
| I3 | The API image’s contents, below | All three index.html files are listed, and var/lib/forge/keys/ is a folder with mode drwx------ owned by 1654/1654 |
The application at /app/wwwroot, the help at /app/wwwroot/help, the console at /app/console, and the folder of keys owned by the API’s user alone (COPY --chown --chmod) |
| I4 | docker run --rm --entrypoint sh forge-worker:validate -c 'id -u; chromium-browser --version || chromium --version' |
It prints 1000 and a Chromium version |
The worker runs as its own user and has its browser |
| I5 | docker run --rm --cap-drop ALL --security-opt no-new-privileges --entrypoint unshare forge-worker:validate -U true; echo "exit $?" |
Either result is a finding. Expected: Operation not permitted and a non-zero exit |
Whether a container under Docker’s default seccomp profile may make a user namespace, which Chromium’s sandbox needs (README.md, default F). If it exits 0, the layout check may work under Docker after all |
| I6 | To prove the build refuses a wrong engine: change one character of sha256 in worker/engine.lock.json, run I2 again, then put the character back |
The build fails with the engine archive does not match the pin |
The pin is enforced in the image build |
For I3:
docker create --name forge-api-check forge-api:validatedocker export forge-api-check | tar --numeric-owner -tvf - app/wwwroot/index.html app/wwwroot/help/index.html app/console/index.html var/lib/forge/keysdocker rm forge-api-checkPart 2: The Application, Once an Instance Answers
Your cloud’s steps bring you here when the instance’s two names resolve and its API is ready. Where a step says “your cloud’s steps”, the how is there.
Under Compose on one machine (2026-11-23), A1 to A9, A13, A14 and A17 passed in their Compose form, and A11 only so far as the server’s first ping (compose/README.md, “Checks that prove these files”). That proves the application in its images; it proves nothing about a cloud’s load balancer, network or managed services, which is what these steps are for. A10 and A12 need two API instances, A15 and A16 an AI key, and A18 a cloud’s backups.
The Instance From Outside
| # | Step | Pass When | Proves |
|---|---|---|---|
| A1 | curl -s "https://$D/api/health" |
It answers "status":"ok", the database ok, and the engine version of worker/engine.lock.json |
The API reaches its database and its worker, and the load balancer reaches the API |
| A2 | curl -sI "https://$D/" |
It has content-security-policy, x-frame-options: DENY and strict-transport-security, and sets the load balancer’s affinity cookie |
The API serves the application with its own headers (default A). strict-transport-security is sent only when the API knows the request came over HTTPS, so its presence proves the API trusts the load balancer’s forwarded headers |
| A3 | Open https://$OPS/, https://$D/ and https://$D/help/ in a browser |
The first shows the operator’s sign-in, the second the workspace’s, the third the help, with “Validate a deployment” under Deploy and operate | The API tells the console’s host from the workspace’s (README.md, “The platform console”), and serves the help built into its image (DECISIONS.md O-44) |
| A4 | for h in "$D" "$OPS"; do curl -s -o /dev/null -w "$h %{http_code}\n" "https://$h/api/platform/organizations"; done |
404 on the workspace’s host and 401 on the console’s |
The console’s routes answer on its own host only, and there they ask for an operator (DECISIONS.md O-29). 404 on both means the API does not see the console’s host name: the load balancer is not passing the Host header on |
The First Operator, the Organization and Its Administrator
| # | Step | Pass When | Proves |
|---|---|---|---|
| A5 | Read the first operator’s first password, as your cloud’s steps say. Sign in at https://$OPS/ as operator. Then delete the file, as your cloud’s steps say |
The console asks for a password of your own and an authenticator app, then opens. Afterwards the file is gone | The API made the first operator and wrote the file to the folder of keys; the folder is shared storage that outlives the container |
| A6 | Run the API’s set-up command, as your cloud’s steps say: set-up --organization "Validation" --administrator <your address> --address https://$D |
It prints an invitation link and ends with 0 | The API’s commands run on this route, and the first organization exists. The link is a secret for seven days: where the command’s output goes to a log, your cloud’s steps say so |
| A7 | Open the link, choose a password, and sign in | You are in the workspace as the organization’s administrator | Invitations, passwords and sessions |
Keys, the Engine and the Live Channel
| # | Step | Pass When | Proves |
|---|---|---|---|
| A8 | In the workspace, open Sign-in security and add an authenticator app. Sign out, then sign in with a code | The code is asked for and accepted | The first use of the key service: the secret is sealed under the organization’s data key, which the instance’s key wraps. Your cloud’s steps then find that use in the key service’s own log |
| A9 | Add a model: one of the engine’s examples, from assets/examples in the engine archive |
Its findings appear and its page opens | The worker, the pinned engine, and storing a revision |
| A10 | Raise the API to two instances, as your cloud’s steps say. Open the same model in two browsers, signed in as the administrator in both. In one, add a revision | The other shows the change without a reload | The cache carries the live channel between API instances, and the load balancer’s affinity keeps each browser on one |
| A11 | Leave one of those pages open and untouched for ten minutes, with the browser’s network panel open | The connection indicator in the top bar stays connected, and the network panel shows one WebSocket, not a series of them | The load balancer’s idle timeout is above the live channel’s keep-alive |
| A12 | Stop one API instance, as your cloud’s steps say | The open page reconnects by itself and you are still signed in | One API instance can go without anyone noticing |
The Forwarded Address
The API limits sign-in attempts to ten a minute for each caller’s address. If it took the load balancer’s address for everyone’s, the limit would be shared by everyone. Do this with one API instance, since each instance counts for itself.
| # | Step | Pass When | Proves |
|---|---|---|---|
| A13 | From one network, the loop below: twelve wrong sign-ins for an address nobody has | It prints ten 401 and then 429 |
The limit works, and the API sees one address for this caller |
| A14 | Within the same minute, from another network (a phone’s hotspot, or the cloud’s shell), the same request once | 401, not 429 |
The API tells callers apart: Proxy__KnownNetworks, Proxy__KnownProxies and Proxy__ForwardLimit are right for this load balancer. A 429 here means the API sees every caller as the load balancer |
for n in $(seq 1 12); do curl -s -o /dev/null -w '%{http_code} ' -X POST "https://$D/api/auth/sign-in" \ -H 'Content-Type: application/json' -d '{"email":"nobody@example.invalid","password":"wrong-on-purpose"}'done; echoThe Assistant, If You Have an AI Key
These two need a key of your own from the AI vendor and spend its tokens. Skip them without one.
| # | Step | Pass When | Proves |
|---|---|---|---|
| A15 | With two API instances, enter the key in the workspace’s AI settings and run its test | The test passes | The API reaches the AI vendor through the route’s way out, and the key is sealed with the Data Protection keys in the folder of keys |
| A16 | Start a draft with the assistant and ask for a large model, so that the answer takes more than five minutes | The answer streams to its end | The load balancer does not cut a long stream. If A15 passed on one API instance and this runs on the other, the folder of keys is shared between them |
Sign-In Registrations and the Operators’ Single Sign-On, If You Set Them
Optional too, and lettered apart so that A1 to A19 keep their numbers. Each needs a registration of your own with the provider it names (README.md, “Sign-in registrations and the operators’ single sign-on”; what to register is in docs/architecture/sign-in-registrations.md). Skip any you have not made. S2, S3 and S5 send nothing secret and need no account at the provider.
| # | Step | Pass When | Proves |
|---|---|---|---|
| S1 | tofu output registration_addresses, and register the two addresses of $I with your providers. Add sign_in, operator_sign_on or breach_check to the instance, put the secrets in secrets.tfvars, plan with both files, apply, and start the API again, as your cloud’s steps say |
The plan changes the API’s settings and the instance’s entry in the secret store, and nothing else: no database, cache, key or network | The modules carry the registrations, and leave everything else alone |
| S2 | curl -s "https://$D/api/auth/accounts" |
providers lists exactly the ones you registered, and selfSignUp is true on the shared managed instance only |
The API has everything of each registration: the ids from its settings, the secret from the secret store. A provider that is missing has half a registration, or the API has not started again |
| S3 | For each provider listed, the request below | address begins with the provider’s own sign-in address and carries redirect_uri=https%3A%2F%2F, your domain, then %2Fapi%2Fauth%2Faccounts%2Fcallback |
The API reaches the provider through the route’s way out (it reads the provider’s discovery document first), and names its return address by the instance’s public name over HTTPS: the forwarded headers again |
| S4 | In the workspace, open People and invite an address of your own. Open the link in a private window and accept it with one provider. For each other provider: as that person, connect the account in Sign-in security, sign out, and sign in with it | Each time you are in the workspace as the invited person | The client secret, or Apple’s key, is the right one, end to end: only the exchange of the code uses it |
| S5 | curl -s "https://$OPS/api/platform/auth/methods", then curl -s -o /dev/null -w '%{redirect_url}\n' "https://$OPS/api/platform/auth/sso/start" |
"singleSignOn":true, then your provider’s authorization address, carrying redirect_uri=https%3A%2F%2F, the console’s host, then %2Fapi%2Fplatform%2Fauth%2Fsso%2Fcallback. An address ending /?sso=failed means the API could not read the provider’s discovery document |
The operators’ single sign-on is on, the API reaches the issuer, and the return address is the console’s own |
| S6 | In the console, add an operator whose username is their username at the provider (the preferred_username claim, unless you named another). Sign in as them with the provider’s button. Then try an account of the provider that has no operator account |
The first is in only after the provider asked for a second factor; the second is refused. operator still signs in with its password and app |
Operators are matched to accounts that exist, nobody is made on the way in, a sign-in without a second factor is not taken, and administrators keep their own way in (DECISIONS.md O-58) |
| S7 | With the breach check on: as operator, change your password to a new one. Then read the API’s log of that minute, as your cloud’s steps say |
The password is taken, and the log has no line beginning Pwned Passwords. Pwned Passwords did not answer means the API cannot reach api.pwnedpasswords.com, and the bundled list alone checked the password |
The breach check’s way out (O-57) |
# S3: microsoft, google or apple. The sign-in limit of A13 counts these too.P=microsoftcurl -s -X POST "https://$D/api/auth/accounts/$P/start" -H 'Content-Type: application/json' -d '{}'; echoAfterwards
| # | Step | Pass When | Proves |
|---|---|---|---|
| A17 | The worker’s isolation, as your cloud’s steps say | The worker reaches nothing outside | The worker has no way out |
| A18 | Restore the database’s backup to a new server, as your cloud’s steps say, and compare a row count | The restored server has the organization | A backup that has been restored once, before real data goes in |
| A19 | Take everything down, as your cloud’s steps say | Nothing billed is left, and the key waits out its deletion window where the cloud has one | The modules can remove what they made |