A route can’t send a key to another host
Checked with iron-vault 0.2.0-alpha (features: dev-mode), built from main at e10f09e.
See Iron Vault refuse to send a stored key anywhere its credential record doesn’t permit, from a config approval or a
replace.
Prerequisites
- The service running and Ready, with the
httpbin_keycredential andhttpbinroute from getting started. - Your config file,
dev-config.toml.
Steps
1. Point the route at another host
Point the httpbin route somewhere else in dev-config.toml:
upstream = "https://postman-echo.com"
iron-vault config approve dev-config.toml
The service refuses before asking anything:
iron-vault: the service answered error 7 (config-invalid): the proposed config is invalid: route httpbin sends credential httpbin_key to an origin its record does not permit
The command exits with status 1, and iron-vault status still shows the same approval committed version. Put the
upstream back to https://httpbin.org.
2. Try it with replace
Replace the key with a record that permits only another host:
iron-vault replace httpbin_key --origin postman-echo.com
It is refused before it asks for anything:
iron-vault: the service answered error 24 (credential-in-use): routes use credential httpbin_key and would stop working: route httpbin sends credential httpbin_key to httpbin.org:443, which its record does not permit; approve a config without them first
iron-vault list still shows httpbin_key static httpbin.org:443 healthy.
To move a key to another host on purpose, follow changing the origins or the kind.
Reference
- Configuration:
credential, and where it may go. - Errors:
config-invalidandcredential-in-use. - Related: rotate a provider key.