Files
kumomta/docs/reference/kumo.secrets/load.md
T
Pankaj Rathi eae61a90fe Add support for custom key names in HashiCorp Vault secrets (#399)
* Add support for custom key names in HashiCorp Vault secrets

Co-authored-by: Wez Furlong <wez@wezfurlong.org>
2025-07-25 06:02:21 +01:00

24 lines
539 B
Markdown

# kumo.secrets.load
```lua
kumo.secrets.load(SOURCE)
```
Given a [keysource](../keysource.md), load and return the bytes stored in that source.
## Example of Loading a credential from a vault
```lua
local request = kumo.http.build_client({}):get 'https://example.com/'
local passwd = kumo.secrets.load {
vault_mount = 'secret',
vault_path = 'example.com-passwd',
-- Optional: specify a custom key name (defaults to "key")
-- vault_key = "password"
}
request:basic_auth('username', passwd)
local response = request:send()
```