Commit Graph
4 Commits
Author SHA1 Message Date
jschoubben 263b5d9aba gitea: the Go bundles fall back to the token files in gitea's state directory by default
The binary is placed by hand on novox first, under gitea 0.1.316's composition, which hands the Go bundles
neither MESH_GITEA_TOKEN_FILE nor MESH_GITEA_PACKAGES_TOKEN_FILE, nor any variable naming gitea's state
directory. Without them the fallback reads token and packages-token in /var/lib/mesh/gitea/state (the
manifest's runtime-state directory) and says at start that the path is the default; the manifest's
variables still win when handed.

Builds: design 47 H2 H-A-564 (hq 1b286366)
2026-11-23 13:11:56 +01:00
jschoubben 1ced7fce14 gitea: the Go bundles read the token gitea keeps when the vault refuses their account
Every package publish fails since about 11:45 CET: the package-registry and forge bundles ask the vault for
module/gitea/* from inside the tool runner, whose account the vault refuses (no module's account), and the
manifest since C4 hands them no token file. Until gitea runs as its own account, a bundle the vault refuses
reads the token gitea's TypeScript bundle keeps under its state directory (token, packages-token, each with
its scopes line naming the account), says once at start which source each token came from, and reads the
file again at each call. The manifest hands the two bundles MESH_GITEA_TOKEN_FILE and
MESH_GITEA_PACKAGES_TOKEN_FILE again. The fallback ends with gitea's own account.

Builds: design 47 H2 H-A-564 (hq 1b286366), H-A-543
2026-11-23 13:08:18 +01:00
jschoubben 280adcce68 C4: the vault keeps the forge token with the scopes it was minted with
The file beside the token that kept its scopes went with C4, and with it
the re-mint of a token carrying a scope beyond the tools' (write:admin).
The value written through own-put now holds the token and its scopes; a
token minted with other scopes, or a value naming none, is minted again
unasked and the one it replaces deleted at the forge. The Go bundles read
the token out of that value. The lost test is back as a row of the scope
test in test/token.test.ts.

Builds: design 47 H2 §808; H-A-439
2026-11-22 01:52:24 +01:00
jschoubben 39ed20c5bc C4: the forge module's tokens live in the vault, one process mints at a time
Two processes that minted at once left the forge two tokens by one name, and a token kept in a file in the
runtime state is a plain state. Both accounts' tokens (mesh-tools, mesh-packages) are now the module's own
secrets in the vault, written through the seat mesh-vault's own-put and read through its get, sealed to the
reading process's key. A refused or expired (token-ttl) token is minted again only by the holder of the lease
mint in the state token-lease (mint-lease); each mint is named <account>-<generation>, and the token it
replaces is deleted by id only after own-put landed. The Go bundles read their tokens through get at start
and at secret-changed; the MESH_GITEA_*_TOKEN_FILE words go. forge_token_lease reads the lease and each
token's age, never the token.

Builds: design 47 H2 §808, §822; H-A-407, H-A-422, H-A-426, H-A-430 (1)
2026-11-22 01:41:30 +01:00