Local secrets. One Docker. One merge.
Write a key once in Shared. Each app only stores what is different.
GET /secret/data/{app} returns the merge. Nobody else is affected.
This is the contract. Anyone can reimplement it. Spec: SPEC.md. License: MIT.
docker compose up --build- Unlock with a master password and write it down. It encrypts secret values in
./vault-data. - Sign in with
rooton a laptop, or setVAULT_ROOT_TOKENto a random string. - Apps → Shared once → create an app → override only what must differ.
- Give that app a token scoped to its name.
curl -sS -H "x-vault-token: $TOKEN" http://localhost:8200/secret/data/encuesta-prod{
"path": "encuesta-prod",
"data": {
"value": "{\"DATABASE_URL\":\"postgres://prod\",\"REDIS_URL\":\"redis://shared\"}",
"is_encrypted": false
}
}data.value is a JSON string. Parse the HTTP body, then parse data.value. Leave out x-vault-public-key and is_encrypted stays false.
Send GET /secret/data/{app} with the header x-vault-token. The snippets below use the app name encuesta-prod.
Install the client in that project and load it before the rest of the app:
npm install titan-vault-nodeimport { TitanVault } from "titan-vault-node";
await TitanVault.armParanoiaMode({
vaultUrl: process.env.VAULT_URL || "http://127.0.0.1:8200",
vaultToken: process.env.VAULT_APP_TOKEN,
path: "encuesta-prod",
});
const databaseUrl = TitanVault.config.get("DATABASE_URL");titan-vault-node decrypts the payload when you send a public key. It keeps password fields for the database hooks and throws if the vault does not answer. The package README shows the rest, including armParanoiaMode.
$ch = curl_init("http://localhost:8200/secret/data/encuesta-prod");
curl_setopt_array($ch, [
CURLOPT_HTTPHEADER => ["x-vault-token: $token"],
CURLOPT_RETURNTRANSFER => true,
]);
$body = json_decode(curl_exec($ch), true);
$secrets = json_decode($body["data"]["value"], true);HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create("http://localhost:8200/secret/data/encuesta-prod"))
.header("x-vault-token", token)
.build();
String body = HttpClient.newHttpClient()
.send(req, HttpResponse.BodyHandlers.ofString())
.body();
// Parse `body`, then parse the string in data.value with Jackson or Gson.require "json"
require "net/http"
uri = URI("http://localhost:8200/secret/data/encuesta-prod")
req = Net::HTTP::Get.new(uri)
req["x-vault-token"] = token
body = JSON.parse(Net::HTTP.start(uri.hostname, uri.port) { |h| h.request(req) }.body)
secrets = JSON.parse(body.dig("data", "value"))req, _ := http.NewRequest(http.MethodGet, "http://localhost:8200/secret/data/encuesta-prod", nil)
req.Header.Set("x-vault-token", token)
res, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
defer res.Body.Close()
var body struct {
Data struct {
Value string `json:"value"`
} `json:"data"`
}
if err := json.NewDecoder(res.Body).Decode(&body); err != nil {
return err
}
var secrets map[string]string
if err := json.Unmarshal([]byte(body.Data.Value), &secrets); err != nil {
return err
}The vault speaks HTTP. There is no SDK requirement. Send GET /secret/data/{your-app} and the header x-vault-token. The response is JSON. data.value is a JSON object encoded as a string, so parse it a second time. That map is the merge: shared values plus this app's overrides.
Send x-vault-public-key only when you want the hybrid payload from SPEC.md. Then is_encrypted is true. The Node package decrypts that shape. The trap stays off unless TITAN_INJECT_HONEYTOKEN and TITAN_HONEYTOKEN_VALUE are set.
Not a SaaS. Not a cluster. Not HashiCorp. If you lose the master password, the secret values are gone. Paths and token policies in vault.db stay readable. See SECURITY.md.
| Env | Purpose |
|---|---|
VAULT_ROOT_TOKEN |
Admin token (set this off-laptop) |
VAULT_APP_TOKEN |
Read-only machine token for every app |
VAULT_CORS_ORIGINS |
Comma-separated origins (default http://localhost:5173) |
TELEGRAM_BOT_TOKEN / TELEGRAM_CHAT_ID |
Alerts if you enable the optional trap |
uvicorn titan_vault.api:app --host 0.0.0.0 --port 8200
cd admin-ui && npm install && npm run devOpen http://localhost:5173. Docker serves the UI on port 8200; this dev server does not.