Vault API
Routers
Section titled “Routers”router→ prefix/api/resource/Secret(tags: Secret)method_router→ prefix/api/method(tags: Vault Methods)
Hand-maintained notes against modules/vault/router.go. Route inventory (generated): routes.md. Response models (generated): response-models/vault.md.
Router router
Section titled “Router router”| Method | Path | Permission |
|---|---|---|
GET | /api/resource/Secret | tenant:read |
POST | /api/resource/Secret | tenant:manage |
DELETE | /api/resource/Secret/{key:path} | tenant:manage |
GET | /api/resource/Secret/{key:path} | tenant:manage |
PUT | /api/resource/Secret/{key:path} | tenant:manage |
GET /api/resource/Secret
Section titled “GET /api/resource/Secret”- source:
modules/vault/router.go
POST /api/resource/Secret
Section titled “POST /api/resource/Secret”- source:
modules/vault/router.go
DELETE /api/resource/Secret/{key:path}
Section titled “DELETE /api/resource/Secret/{key:path}”- source:
modules/vault/router.go
GET /api/resource/Secret/{key:path}
Section titled “GET /api/resource/Secret/{key:path}”- source:
modules/vault/router.go
PUT /api/resource/Secret/{key:path}
Section titled “PUT /api/resource/Secret/{key:path}”- source:
modules/vault/router.go
Router method_router
Section titled “Router method_router”| Method | Path | Permission |
|---|---|---|
GET | /api/method/shc.vault.exists | tenant:read |
GET | /api/method/shc.vault.status | open |
POST | /api/method/shc.vault.unlock | open |
POST | /api/method/shc.vault.rotate | open |
POST | /api/method/shc.vault.export | tenant:manage |
POST | /api/method/shc.vault.import | tenant:manage |
GET /api/method/shc.vault.exists
Section titled “GET /api/method/shc.vault.exists”- source:
modules/vault/router.go
GET /api/method/shc.vault.status
Section titled “GET /api/method/shc.vault.status”- source:
modules/vault/router.go
POST /api/method/shc.vault.unlock
Section titled “POST /api/method/shc.vault.unlock”- source:
modules/vault/router.go
POST /api/method/shc.vault.rotate
Section titled “POST /api/method/shc.vault.rotate”- summary: rotate the vault key-encryption key (KEK) and re-wrap stored secrets.
- source:
modules/vault/router.go
POST /api/method/shc.vault.export
Section titled “POST /api/method/shc.vault.export”- summary: export secrets (scoped) for backup / transfer.
- source:
modules/vault/router.go
POST /api/method/shc.vault.import
Section titled “POST /api/method/shc.vault.import”- summary: import a previously exported secret bundle.
- source:
modules/vault/router.go
Internal RPC functions
Section titled “Internal RPC functions”Peer functions served through POST /internal/rpc/{function} on the
internal listener (not the public API), source
modules/vault/rpc.go:
| Function | Purpose |
|---|---|
vault.unlock | An unlocked peer pushes the master password to this node |
vault.rekey | Validated live re-key on rotate |
vault.request_unlock | A locked node asks an unlocked peer to push the unlock back |
vault.coldstart_plant | Write this node’s auto-unlock drop-in pair |
vault.coldstart_uproot | Remove it |
shc@docs:~$