fix: bind workspace connector configuration safely
This commit is contained in:
@@ -55,7 +55,8 @@ and branch are non-secret; every `*_FILE` is a local path whose content never en
|
||||
| Location | Contains | Never contains |
|
||||
| --- | --- | --- |
|
||||
| Git workspace repository | schema v2 YAML, generated binding names, LLM policy, model/index identity | installation hostnames, keys, passwords, certificates, SSH keys |
|
||||
| local `.env` | remote, branch, installation ID, selected transport and endpoints | secret contents |
|
||||
| local `.env` | remote, branch, installation ID, `THT_WORKSPACE_BINDINGS_ENV_FILE`, and secret source paths | secret contents or `THT_WS_*` values |
|
||||
| workspace bindings env file | only `THT_WS_*` transport, endpoint, user, and `/run/secrets/...` path bindings | secret contents or unrelated application settings |
|
||||
| local secret directory | Git credentials/key, known hosts, CA, connector secret files | a copied registry checkout |
|
||||
| Docker volumes | registry checkout/snapshots/state/locks and local data | host-only secret source files |
|
||||
|
||||
@@ -69,14 +70,20 @@ locks/ # short-lived publish locks
|
||||
```
|
||||
|
||||
Installation variables are deterministic: `psd-clinical` becomes `PSD_CLINICAL`, and every name
|
||||
is `THT_WS_<NAMESPACE>_<ROLE>_<SUFFIX>`. Credentials and certificates use `*_FILE` path variables.
|
||||
is `THT_WS_<NAMESPACE>_<ROLE>_<SUFFIX>`. Copy
|
||||
[the bindings env example](examples/workspace-bindings.env.example) to an untracked operator file
|
||||
and set its absolute path as `THT_WORKSPACE_BINDINGS_ENV_FILE`. It is loaded only into `core`.
|
||||
Credentials and certificates use `*_FILE` path variables that must point inside `/run/secrets`.
|
||||
If declared, `THT_WS_PSD_CLINICAL_VECTOR_WRITER_API_KEY_FILE` is distinct from the vector reader
|
||||
file; a reader credential is never repurposed for writing.
|
||||
|
||||
## Direct PostgreSQL, REST, and SSH tunnel bindings
|
||||
|
||||
Set only fields for the selected transport. Canonical YAML keeps database/schema/collection,
|
||||
distance, embedding model, and dimensions shared in Git.
|
||||
Set only fields for the selected transport in the dedicated bindings env file. Canonical YAML keeps
|
||||
database/schema/collection, distance, embedding model, and dimensions shared in Git. Copy and
|
||||
review [the connector-secret override](examples/connector-secrets.workspace-registry.yaml) for the
|
||||
selected transport: every `*_FILE=/run/secrets/<target>` binding needs one matching Docker secret
|
||||
target and one host-only `*_SOURCE` path in operator `.env`.
|
||||
|
||||
```dotenv
|
||||
# Direct PostgreSQL and pgvector
|
||||
@@ -125,19 +132,21 @@ rather than weakening TLS; use runtime-trusted HTTPS or verified direct/SSH nati
|
||||
|
||||
Copy [the local Compose example](examples/local-compose.workspace-registry.yaml) and exactly one
|
||||
selected [SSH Git override](examples/git-ssh.workspace-registry.yaml) or [HTTPS Git override](examples/git-https.workspace-registry.yaml)
|
||||
into an untracked operator directory. Set `THT_SOURCE_ROOT` in its `.env` to the absolute source
|
||||
checkout path; this keeps the copied Compose file buildable. Create only the secret files used by
|
||||
the selected override, then render it before start.
|
||||
plus [the bindings env example](examples/workspace-bindings.env.example) and a reviewed
|
||||
[connector-secret override](examples/connector-secrets.workspace-registry.yaml) into an untracked
|
||||
operator directory. Set `THT_SOURCE_ROOT` and the absolute `THT_WORKSPACE_BINDINGS_ENV_FILE` in
|
||||
its `.env`; this keeps the copied Compose file buildable and confines `THT_WS_*` values to `core`.
|
||||
Create only the host secret files named by the selected Git/connector override, then render it.
|
||||
|
||||
<!-- verify:command -->
|
||||
```sh
|
||||
THT_SOURCE_ROOT="$(pwd -P)" docker compose -f docs/install/examples/local-compose.workspace-registry.yaml config --quiet
|
||||
THT_SOURCE_ROOT="$(pwd -P)" THT_WORKSPACE_BINDINGS_ENV_FILE="$(pwd -P)/docs/install/examples/workspace-bindings.env.example" docker compose -f docs/install/examples/local-compose.workspace-registry.yaml config --quiet
|
||||
```
|
||||
|
||||
From the operator directory:
|
||||
|
||||
```sh
|
||||
docker compose -f compose.workspace-registry.yaml -f git-ssh.workspace-registry.yaml up --build -d
|
||||
docker compose -f compose.workspace-registry.yaml -f git-ssh.workspace-registry.yaml -f connector-secrets.workspace-registry.yaml up --build -d
|
||||
curl --fail --silent http://127.0.0.1:8787/health
|
||||
curl --fail --silent http://127.0.0.1:8787/workspace-registry/status
|
||||
curl --fail --silent http://127.0.0.1:8787/workspaces
|
||||
|
||||
Reference in New Issue
Block a user