si vault (SI Vault native format, Fort/Vault aligned)
si vault encrypts local .env files and manages per repo/env key material via local keyring state.
Design goals:
- dotenv-first workflow
- encrypted values committed to
safe - deterministic key names:
SI_VAULT_PUBLIC_KEY(stored in.envfile)- private key material resolved from local SI vault keyring only (no env key material overrides)
- SI Vault cryptography is local and file/keyring based.
- Fort is the only API wrapper for policy/auth over SI Vault operations.
Fort Boundary (No Overlap Contract)
- SI Vault owns cryptography and
.envciphertext format only. - Fort owns remote API authn/authz and policy enforcement only.
- SI Vault does not implement remote policy/auth decisions.
- Fort does not implement independent secret persistence or crypto key generation.
- Runtime agents should consume secrets through Fort; SI Vault CLI remains the local maintenance/admin tool.
- Inside SI runtime containers, local
si vaultsecret commands are blocked by default and must usesi fort.
si fort Wrapper Contract
si fortwraps the nativefortbinary and keeps runtime auth file-based.- Host bootstrap/admin auth for
si codex spawn ...provisioning uses the bootstrap token file at~/.si/fort/bootstrap/admin.token. - Runtime container sessions use file-backed token paths for the short-lived access token and rotating refresh token.
- Wrapper behavior:
- prefers caller-supplied runtime token paths (
FORT_TOKEN_PATH,FORT_REFRESH_TOKEN_PATH) and refreshes those file-backed sessions in place when possible - otherwise prefers the active profile-scoped Fort session under
~/.si/codex/profiles/<profile>/fort/and refreshes that file-backed session in place when possible - only falls back to bootstrap/admin auth when no runtime session is available or runtime refresh fails
- runtime refresh is owned by the profile-scoped Fort refresher
- passes explicit token-file auth to native
fortwhen default files are available (no bearer token argv injection) - rejects deprecated token-value env vars (
FORT_TOKEN,FORT_REFRESH_TOKEN) - strips legacy token env entries from child process env if present
- prefers caller-supplied runtime token paths (
- Operational guidance:
- keep
~/.si/fort/bootstrap/*for break-glass recovery only - keep routine Fort access in
~/.si/codex/profiles/<profile>/fort/access.tokenandrefresh.token
- keep
- For flags that belong to native
fortglobal options, pass through after--:si fort -- --host https://fort.aureuma.ai doctor
Core Model
- Secrets live in local
.envfiles (encrypted values). SI_VAULT_PUBLIC_KEYis inserted at file top when missing.- Encrypted values use prefix
encrypted:si-vault:. - Legacy
encrypted:payloads are accepted for backward compatibility. - Key material is scoped by
repo/envand stored in local keyring file:- default:
~/.si/vault/si-vault-keyring.json - override:
SI_VAULT_KEYRING_FILE
- default:
- This SI Vault keyring is a local JSON state file, not the OS keychain/secret-service store.
- A single canonical keypair is enforced across all keyring scopes to prevent key sprawl.
- Legacy identity/private-key env variables are ignored with warnings.
Quickstart
Generate or load keypair for current repo/env:.env:
- Use
si fort ...for secret access. - Direct local
si vaultsecret commands are blocked in-container.
Encryption Behavior
si vault encryptdoes not re-encrypt already-encrypted values by default.- Use
--reencryptto rotate ciphertext. --reencryptdecrypts first, then encrypts plaintext again.
Pre-commit Guard
Install hook:si vault check --staged and blocks commits if plaintext values are found in .env* files.
It resolves si in this order: SI_BIN, a repo-local ./si, then si on PATH.
Commands
si vault keypair/si vault keygensi vault statussi vault checksi vault hooks <install|status|uninstall>si vault encryptsi vault decryptsi vault restoresi vault setsi vault unsetsi vault getsi vault list/si vault lssi vault runsi vault docker exec

