Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1327,6 +1327,17 @@ regexes = [
'''(?s)^\s*"eng/provenance/records/go\-gowebauthnx\-legal\-r1\.json":\s*"f1680c3b153114ea4cc145264a716e4669e14212976d6584c1b3f41eda1202c4",?\s*$''',
]

[[allowlists]]
description = "AFV2-DIST-01: two verified public Go legal-record SHA-256 lines in immutable dependency receipt afv2-dist-01-r1."
condition = "AND"
targetRules = ["generic-api-key"]
paths = ['''^eng/policy/dependency\-reviews/afv2\-dist\-01\-r1\.json$''']
regexTarget = "line"
regexes = [
'''(?s)^\s*"eng/provenance/records/go\-gowebauthn\-legal\-r1\.json":\s*"fecb236888c74fd6195890d16720689d5341b51bbe8ac3a3d942171a936e4d07",?\s*$''',
'''(?s)^\s*"eng/provenance/records/go\-gowebauthnx\-legal\-r1\.json":\s*"f1680c3b153114ea4cc145264a716e4669e14212976d6584c1b3f41eda1202c4",?\s*$''',
]

[[allowlists]]
description = "AFV2-CENTER-02 RFC 6455: public WebSocket handshake example at line 196 of the reviewed historical Identity test."
condition = "AND"
Expand Down
112 changes: 112 additions & 0 deletions docs/self-host/cohort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<!-- SPDX-License-Identifier: AGPL-3.0-only -->

# Self-host distribution

The Linux x64 cohort stages the Go Center from its verified producer image,
the published Blazor Dashboard profile, the PostgreSQL 18 configuration, and
the Caddy and systemd service definitions. Its provenance includes the Cloud
candidate receipt, build identity, legal records and reviewed Go dependency
inventory, together with the Web profile's producer receipt, licences and App
dependency locks. The service runs the Go executable, PostgreSQL and Caddy.
The staging tools use the repository's pinned Node.js version.

## Assemble a private candidate

Use clean Cloud and Web producer checkouts, with the exact Git commits and
trees identified by the verified producer inputs. For Cloud, obtain the
original sealed candidate directory and the Go executable extracted from that
candidate's image. The assembler uses the stock verifier from a private copy
of the exact producer commit and checks the executable against the verified
image receipt. Use the pinned Node.js distribution and an existing npm cache
containing the producer's locked dependencies. The assembler restores those
dependencies offline with lifecycle scripts disabled. Service definitions and
notices come from the producer's Git tree. Keep the input candidate and its
sealed manifest available for provenance review.

For Web, verify the GitHub Actions artifact against its approved workflow run,
producer commit and raw ZIP SHA-256. Extract the single published
`web-profiles-<sha256>.tar` member and record its own SHA-256. Use a reviewed
receipt from this verification as a separate input to assembly:

```json
{
"source": {
"repo": "ArcForges/Web",
"commit": "<40 lowercase hexadecimal digits>",
"tree": "<40 lowercase hexadecimal digits>"
},
"runId": "<GitHub Actions run ID>",
"artifactId": "<GitHub Actions profile artifact ID>",
"artifactZipSha256": "<verified workflow ZIP digest>",
"profileSha256": "<verified inner TAR digest>"
}
```

```sh
node tooling/self-host-cohort.ts assemble \
--cloud-repo "$CLOUD_PRODUCER" --web-repo "$WEB_PRODUCER" \
--candidate "$CLOUD_CANDIDATE" --center "$CENTER_EXECUTABLE" \
--profile "$WEB_PROFILE" --web-receipt "$WEB_RECEIPT" \
--output "$FRESH_OUTPUT_DIR" --qualification candidate
```

The output contains `arcforges-self-host-linux-x64.tar` and its
`.manifest.json` sidecar. The authorized signer signs the exact manifest bytes
with Ed25519 and supplies a 64-byte raw `.manifest.sig` sidecar. Distribute
the pinned PEM SPKI public key through the independent operator trust channel.

Main qualification also requires an independently maintained admission
document and local copies of the actual Cloud and Web `origin/main` history.
Fetch and validate those references through the existing repository trust
process before offline verification. The admission document uses
`{"schema":1,"admitted":[...],"denied":[...],"archiveSha256":"..."}` with
the currently authorized Cloud and Web `{repo,commit,tree}` rows in that
order and the independently approved SHA-256 of the exact cohort archive.
Record withdrawn producer revisions in `denied`. The archive pin prevents a
withdrawn package with the same source identity from being selected. The
verifier also checks each producer's Git tree and ancestry. Use
`--qualification main --admission "$ADMISSION"` with the authorized
admission record.

## Verify and stage

Use an operator-controlled staging directory and the separately supplied
public key. The tool verifies the detached signature, then binds the archive's
filename, length and SHA-256 before reading its members. On Linux x64 it
stages those verified bytes under the archive digest without replacing an
existing release. The command prints the staging path, profile path and
profile SHA-256.

```sh
node tooling/self-host-cohort.ts verify \
--archive "$ARCHIVE" --public-key "$PINNED_PUBLIC_KEY" --allow-candidate
node tooling/self-host-cohort.ts stage \
--archive "$ARCHIVE" --public-key "$PINNED_PUBLIC_KEY" \
--staging "$OPERATOR_STAGING" --allow-candidate
```

The commands above explicitly select an isolated candidate. For main
qualification provide `--cloud-repo`, `--web-repo` and `--admission` with
the verified history and current admission record.

On the target, confirm a Linux x86-64 host, PostgreSQL 18, systemd, Caddy and
the operator's TLS name and certificate. Follow the
[Linux installation procedure](../operations/self-host-install.md) with
`CENTER_BUILD` pointing at the staged `bin/arcforges-center` and
`DEFINITION` at its `setup/` directory. Use the Center's `version` and
`migrate status` outputs to compare the installed build and database with the
cohort. Use the staged profile and its verified SHA-256 from the cohort
receipt. Set `CENTER_ORIGIN` to the same public HTTPS scheme, host and port
as the API, without the `/api` path.

```sh
node tooling/self-host-static-origin.ts stage \
"$STAGED_PROFILE" "$STAGED_PROFILE_SHA256" "$STATIC_RELEASES" \
--dashboard "$CENTER_ORIGIN"
```

Use the returned release to select the fragment through the
[static origin procedure](../operations/static-origin.md). Keep the preceding
verified cohort and the applicable
[database recovery material](../operations/self-host-recovery.md) under
operator custody.
20 changes: 10 additions & 10 deletions eng/policy/dependency-policy.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"schemaVersion": 1,
"repository": "Cloud",
"sourceCommit": "50fce91a14eea3c1a3b6cc7fc5443a9810269118",
"sourceCommit": "124cf616f9bff47aaaec2003f8d3aab7b44babf9",
"manifests": ["package.json"],
"inputs": {
".dockerignore": "56a8c2a51a8ac982a72114b76a89d8843a837b1aa0b96c04e17c775344b2058f",
".github/workflows/ci.yml": "6b945cf940c9d825e867d225b0c4be4a115e1a870ca1136cdeec4479745ee43a",
".gitignore": "3f4b2e7b8f7c7f0e7b1bc4888d5ab5855f4d11639669e534d8cd5f5b02ef00e0",
".gitleaks.toml": "2b3c936f10c393b8e948146ef20c7581f014ec4603f8f448af40a9bdf1f367b0",
".gitleaks.toml": "5580ccf20703aaa89511bd3d966de556723d084d69a3291f76845a8b1555ee54",
".node-version": "5c293036fc0a61ad76e15d85f454c3c7cec157e181e035b69f95058a2c239144",
".npmrc": "857e18055c0f5d75719d253033954c10511c4b16ae5bd68bc45bb75d93a411bc",
".python-version": "673e2ba07f95bfcfe0a543258b8e267954e403d1f466481c546f467f86b31d46",
Expand Down Expand Up @@ -239,7 +239,7 @@
"eng/provenance/artifact-profiles/cloud-release-r97.json": "90af89ab0759071a491c8536dad85ae1c2fdcf225c65410c06928f79f93de026",
"eng/provenance/artifact-profiles/cloud-release-r98.json": "ee30639dcc826ff95a3d0765812966169b8121f2eebeb571f2d2490fc5bdf656",
"eng/provenance/artifact-profiles/cloud-release-r99.json": "5751564e623ce4ecc442d9faa29faa3978add74dad0b826aae29a781233e2a22",
"eng/provenance/files.json": "9e8b042f267871a2c16e42c357e5c84b282c8a625c46b40b175bdce5f65c993f",
"eng/provenance/files.json": "9b94510f08ae689844e66008def11e8b50088be8a68ef8567600c200b93d3779",
"eng/provenance/records/afv2-center-01-management-storage-r1.json": "0ec5d5aadbedb3c1dd54741f2e1df4711852a9b8b42acbb5246a42401548215f",
"eng/provenance/records/afv2-center-01-management-storage-r2.json": "5f9910beb89d51add566f63af9822011250bd5b374fd9214ff09acfeb62d4ea6",
"eng/provenance/records/afv2-center-01-management-storage-r3.json": "84a30e4eea501632e65292e9d441449ae8bbd440287b2607ebbdfc1859d010b8",
Expand Down Expand Up @@ -541,7 +541,7 @@
"tests/worker/docker-context.test.ts": "e6949c97cf5c78e36a11c2b3220fc7e95c423ec0182e784fc876f976aff6c938",
"tests/worker/postgres-deploy.test.ts": "51af666b7dd57cbca88c498f0cc8b7c35ff68090273cf6716d186a4bc75a8cf8",
"tests/worker/proof-gate.test.ts": "83b320bf48091b6638164cbe032bddb8a2a9e9069403d63ce68c4851d2dc3b6e",
"tests/worker/provenance.test.ts": "406c8ed5e207b5af37eb85351d5adef6df68ad9137672042e759a29b05478219",
"tests/worker/provenance.test.ts": "1d374b9470f2c3c0a29e81eb7dc8731d02d61c6fbf02e1fc4161cf0c8c27fd74",
"tests/worker/release-provenance.test.ts": "dc6e1e0782e51dda080a89e0fcea36a122fde035ffcf7c065ff33c3e389052ab",
"tests/worker/support/ctr06-bootstrap-mock.ts": "aa369367046fa25269231b36b814ecef4cb68533398b355c74b2919b55a546e1",
"tests/worker/support/ctr06-bootstrap-production-driver.ts": "9f8ca433063dd3f1715862a8691119095ecafb8b05115b6941b1e3cb0ee3cf64",
Expand Down Expand Up @@ -581,12 +581,12 @@
"owner": "Cloud dependency maintainer",
"reviewer": "candidate_audit",
"date": "2026-11-22",
"rationale": "AFV2-MIG-02 binds the independently reviewed PostgreSQL contraction and historical fixture helper to the exact Cloud source. The measured Worker artifact, shared bridge and security bridge artifacts, historic legal records, public digest scan proof, and reviewed package closure are preserved.",
"rationale": "AFV2-DIST-01 binds the exact source inventory for the signed self-host assembly tooling and the accompanying operator runbook.",
"inputs": {
".dockerignore": "56a8c2a51a8ac982a72114b76a89d8843a837b1aa0b96c04e17c775344b2058f",
".github/workflows/ci.yml": "6b945cf940c9d825e867d225b0c4be4a115e1a870ca1136cdeec4479745ee43a",
".gitignore": "3f4b2e7b8f7c7f0e7b1bc4888d5ab5855f4d11639669e534d8cd5f5b02ef00e0",
".gitleaks.toml": "2b3c936f10c393b8e948146ef20c7581f014ec4603f8f448af40a9bdf1f367b0",
".gitleaks.toml": "5580ccf20703aaa89511bd3d966de556723d084d69a3291f76845a8b1555ee54",
".node-version": "5c293036fc0a61ad76e15d85f454c3c7cec157e181e035b69f95058a2c239144",
".npmrc": "857e18055c0f5d75719d253033954c10511c4b16ae5bd68bc45bb75d93a411bc",
".python-version": "673e2ba07f95bfcfe0a543258b8e267954e403d1f466481c546f467f86b31d46",
Expand Down Expand Up @@ -818,7 +818,7 @@
"eng/provenance/artifact-profiles/cloud-release-r97.json": "90af89ab0759071a491c8536dad85ae1c2fdcf225c65410c06928f79f93de026",
"eng/provenance/artifact-profiles/cloud-release-r98.json": "ee30639dcc826ff95a3d0765812966169b8121f2eebeb571f2d2490fc5bdf656",
"eng/provenance/artifact-profiles/cloud-release-r99.json": "5751564e623ce4ecc442d9faa29faa3978add74dad0b826aae29a781233e2a22",
"eng/provenance/files.json": "9e8b042f267871a2c16e42c357e5c84b282c8a625c46b40b175bdce5f65c993f",
"eng/provenance/files.json": "9b94510f08ae689844e66008def11e8b50088be8a68ef8567600c200b93d3779",
"eng/provenance/records/afv2-center-01-management-storage-r1.json": "0ec5d5aadbedb3c1dd54741f2e1df4711852a9b8b42acbb5246a42401548215f",
"eng/provenance/records/afv2-center-01-management-storage-r2.json": "5f9910beb89d51add566f63af9822011250bd5b374fd9214ff09acfeb62d4ea6",
"eng/provenance/records/afv2-center-01-management-storage-r3.json": "84a30e4eea501632e65292e9d441449ae8bbd440287b2607ebbdfc1859d010b8",
Expand Down Expand Up @@ -1120,7 +1120,7 @@
"tests/worker/docker-context.test.ts": "e6949c97cf5c78e36a11c2b3220fc7e95c423ec0182e784fc876f976aff6c938",
"tests/worker/postgres-deploy.test.ts": "51af666b7dd57cbca88c498f0cc8b7c35ff68090273cf6716d186a4bc75a8cf8",
"tests/worker/proof-gate.test.ts": "83b320bf48091b6638164cbe032bddb8a2a9e9069403d63ce68c4851d2dc3b6e",
"tests/worker/provenance.test.ts": "406c8ed5e207b5af37eb85351d5adef6df68ad9137672042e759a29b05478219",
"tests/worker/provenance.test.ts": "1d374b9470f2c3c0a29e81eb7dc8731d02d61c6fbf02e1fc4161cf0c8c27fd74",
"tests/worker/release-provenance.test.ts": "dc6e1e0782e51dda080a89e0fcea36a122fde035ffcf7c065ff33c3e389052ab",
"tests/worker/support/ctr06-bootstrap-mock.ts": "aa369367046fa25269231b36b814ecef4cb68533398b355c74b2919b55a546e1",
"tests/worker/support/ctr06-bootstrap-production-driver.ts": "9f8ca433063dd3f1715862a8691119095ecafb8b05115b6941b1e3cb0ee3cf64",
Expand Down Expand Up @@ -1166,7 +1166,7 @@
"framework-posture"
],
"runtimeAssessment": "Preserve locked Go and npm dependencies with existing managed compatibility fixtures. ArcForges Cloud now prepares a sealed Go-only service image. Existing historical CTR06 producer and D1 artifacts stay anchored to their original checkout and do not enter current deployment.",
"maintenance": "Retain previous release and bridge evidence. Verify admitted bytes on the designated native hosts."
"maintenance": "Validate signed cohort installation under the admitted producer identities and retain the reviewed dependency inputs."
},
"closure": {
"node_modules/@arcforges/ai-internal": {
Expand Down Expand Up @@ -1979,7 +1979,7 @@
"buildToolPrereleases": {
"unenv": "2.0.0-rc.24"
},
"reviewRecord": "eng/policy/dependency-reviews/afv2-mig-02-r1.json",
"reviewRecord": "eng/policy/dependency-reviews/afv2-dist-01-r1.json",
"dependencyClasses": {
"build-inputs": "Complete exact npm lock inventory; licence metadata is preserved, not inferred as a redistribution grant. Existing transitive development prereleases are named build-only migration inputs and cannot enter runtime/stable closures.",
"runtime": "Only the independently enforced existing shipped artifact records admit runtime inputs and legal scopes.",
Expand Down
Loading