name = Local Secret Providers Example
description = Resolve local secrets from environment variables and files without shell callbacks.
$ API_ORIGIN = https://lorem-api.com/api
$ ENV_VALUE = secret.env("HOME")
$ CLIENT_ID = secret.file("./secrets/demo_client_id.txt")
---
Echo resolved secrets
POST {{ API_ORIGIN }}/echo
~~~ application/json
{
"envValue": "{{ ENV_VALUE }}",
"clientId": "{{ CLIENT_ID }}"
}
~~~
# Echo request succeeds
^ & status == 200
# Resolves the environment-backed value
^ & body.envValue ~= /.+/
# Resolves the file-backed value
^ & body.clientId == "demo-client-id"