Skip to main content

Module vault

Module vault 

Source
Expand description

Vault resolution: the engine never sends a path, remote or name, only an org-salted digest of its git repository’s stable identity. One git repository maps to exactly one vault.

identity_digest = hex(HMAC-SHA256(salt, stable_identity)), where stable_identity is stable_identity of the engine’s repository identity (.lean-ctx-id > normalized git origin without credentials > manifests).

Since 1.1 the request may name a vault (written by lean-ctx cloud link <ns>/<name>) to bind the repository to a vault created on the web. The service binds on first sight when the instance may contribute to that vault, otherwise answers 403 forbidden_right. Without vault, resolve creates a vault on first sight.

Structs§

OrgSaltV1
GET /v1/org/salt.
VaultRefV1
The vault a git repository maps to, as @<ns>/<name>.
VaultResolveRequestV1
POST /v1/vaults/resolve. Creates the vault on first sight.
VaultV1
Response of POST /v1/vaults/resolve.

Constants§

MAX_VAULT_LABEL_CHARS
Longest vault label, in characters.
ORG_SALT_SCHEMA
SEALED_VAULT_UNSUPPORTED
Why a vault that says it is sealed is refused.
VAULT_MATCH_REQUEST_SCHEMA
Request body of POST /v1/vaults/match (C0 fixtures routes/vault_match.*).
VAULT_MATCH_SCHEMA
Answer of POST /v1/vaults/match.
VAULT_RESOLVE_REQUEST_SCHEMA
VAULT_SCHEMA

Functions§

stable_identity
sha256_hex("leanctx.project-identity.v1\n" + repo_identity).