Skip to main content

Overview

API keys are the simplest way to authenticate service-to-service access. Each key is a pre-shared secret that a service includes in every request. Keys are configured in config.yaml — there is no runtime key management API. API keys are for proxy access only. They cannot call the admin API (/auth/login, /api/v1/status, etc.).

Configuration

Fields

Generating keys

Generate a random key:
Use a prefix like ph_ to make API keys recognisable in logs and config files.

Sending requests

Include the key in the X-Proxy-Hopper-Auth header on every request:

Target restrictions

When targets is a named list (not ["*"]), the key is rejected with 403 if the request matches a target not in the list:

Error responses

Security notes

  • Store keys in secrets management (Vault, AWS Secrets Manager, Kubernetes Secrets) — not in plain environment variables or source control
  • Rotate keys by adding the new key alongside the old one, deploying, updating clients, then removing the old key
  • Use the name field to make log attribution easy — key names appear in 403 messages and logs
  • There is no key expiry — rotate compromised keys immediately by removing them from config.yaml and reloading