secret_in_path means a key route received an API key secret (otsk_...) where it expects a key id (key_...). Read this page right away if you see it: the secret has been written into a URL and must be treated as leaked.
What happened
Routes:GET /v1/keys/{key_id}DELETE /v1/keys/{key_id}POST /v1/keys/{key_id}/rotate
otsk_, which is the prefix of a key secret. OpenType refused the request without acting on the key. Two values look alike but do different jobs:
How to fix
- Find the key’s id. Call
GET /v1/keysand match the first 13 characters of the leaked secret againstsecret_prefix, or look the key up on the API keys page. - Rotate it with
POST /v1/keys/{key_id}/rotate. The response carries a newsecret, shown once. The old secret stops working at once. - Put the new secret in your secret store and redeploy the services that use it.
- If the key is no longer needed, revoke it with
DELETE /v1/keys/{key_id}instead. - Fix the code that built the URL so it uses the key’s
id, never itssecret.
Example
keys_write.
Related
- Key rotation - rotate in place or overlap two keys.
- API key security - where secrets belong and where they never should.
- malformed_key_id - the path value is neither a secret nor a key id.
- Problem codes - every code, its status, and whether a retry can help.