API Key

API Key

📖 Definition

API Key is a simple API authentication method where clients carry pre-assigned keys in requests to prove identity. It is simple to implement but has lower security, suitable for internal services or low-risk scenarios.

🔗 How Higress Uses This

Higress supports API Key authentication, can manage keys for multiple consumers, and implements rate limiting, statistics, and other functions based on keys.

💡 Examples

  • 1 API Key is usually placed in headers or query parameters
  • 2 Different consumers are assigned different API Keys
  • 3 API Key can set expiration time and permission scope

⚙️ Configuration Example

YAML
# Higress API Key Authentication Configuration
plugins:
  - name: key-auth
    config:
      consumers:
        - name: user-a
          key: "sk-xxxxxxxxxxxx"
        - name: user-b
          key: "sk-yyyyyyyyyyyy"

🔄 Related Terms

FAQ

What is API Key?
API Key is a simple API authentication method where clients carry pre-assigned keys in requests to prove identity. It is simple to implement but has lower security, suitable for internal services or low-risk scenarios.
How does Higress support API Key?
Higress supports API Key authentication, can manage keys for multiple consumers, and implements rate limiting, statistics, and other functions based on keys.

Learn More About Higress

Explore more Higress features and best practices