feat(app): Secrets management page + backend-aware API

- new Secrets page (/secrets, nav entry): lists vault secrets, reveal/copy,
  add/edit/delete, shows active backend + addr + role; read-only on followers
- GET /secrets/info (backend/addr/role/writable); fix /secrets CRUD to use the
  castle.yaml-selected backend (was defaulting to the now-empty file backend)
- OpenBaoBackend.list_names drops folder entries (node-prefix groups)
- tests: conftest forces file backend so host castle.yaml can't leak into tests

app builds clean (tsc 0); endpoints verified live against the vault.
This commit is contained in:
2026-07-07 06:53:16 -07:00
parent c525e154da
commit 5949543ace
8 changed files with 310 additions and 4 deletions

View File

@@ -2,9 +2,14 @@
from __future__ import annotations
import os as _os
from collections.abc import Generator
from pathlib import Path
# Tests must not read the host's real secret backend (castle.yaml may point
# at OpenBao); force the file backend unless CI explicitly overrides.
_os.environ.setdefault("CASTLE_SECRET_BACKEND", "file")
import pytest
import yaml