mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-14 13:05:09 +00:00
feat(vaults): support custom headers on API vault
This commit is contained in:
@@ -208,6 +208,9 @@ key_vaults:
|
||||
name: myapi
|
||||
uri: https://vault.example.com/api
|
||||
token: "your-bearer-token"
|
||||
headers:
|
||||
CF-Access-Client-Id: "CLIENT_ID_HERE"
|
||||
CF-Access-Client-Secret: "CLIENT_SECRET_HERE"
|
||||
```
|
||||
|
||||
| Field | Required | Description |
|
||||
@@ -218,6 +221,7 @@ key_vaults:
|
||||
| `token` | yes | Bearer token, sent as `Authorization: Bearer <token>`. |
|
||||
| `no_push` | no | If `true`, keys are read but never written. |
|
||||
| `timeout` | no | Request timeout in seconds; defaults to `vault_timeout`. |
|
||||
| `headers` | no | Extra HTTP `headers` sent with every request, for example the Cloudflare Access service-token headers `CF-Access-Client-Id` and `CF-Access-Client-Secret`. |
|
||||
|
||||
The backend talks to endpoints under `uri` (for example `GET {uri}/{service}/{kid}` to look up a single key) and interprets a numeric `code` field in each JSON response to detect errors such as an invalid token, rate limiting, or an invalid service tag.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user