Skip to main content
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.
Rotate the key named by that secret now. URLs end up in proxy logs, browser history, monitoring tools and error trackers, so the secret may already be stored outside your control.

What happened

Routes:
  • GET /v1/keys/{key_id}
  • DELETE /v1/keys/{key_id}
  • POST /v1/keys/{key_id}/rotate
The path value starts with 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

  1. Find the key’s id. Call GET /v1/keys and match the first 13 characters of the leaked secret against secret_prefix, or look the key up on the API keys page.
  2. Rotate it with POST /v1/keys/{key_id}/rotate. The response carries a new secret, shown once. The old secret stops working at once.
  3. Put the new secret in your secret store and redeploy the services that use it.
  4. If the key is no longer needed, revoke it with DELETE /v1/keys/{key_id} instead.
  5. Fix the code that built the URL so it uses the key’s id, never its secret.

Example

Rotating the key by its id. The call needs keys_write.