API Key
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.
🔗 在 Higress 中的应用
Higress supports API Key authentication, can manage keys for multiple consumers, and implements rate limiting, statistics, and other functions based on keys.
💡 示例
- 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
⚙️ 配置示例
YAML
# Higress API Key Authentication Configuration
plugins:
- name: key-auth
config:
consumers:
- name: user-a
key: "sk-xxxxxxxxxxxx"
- name: user-b
key: "sk-yyyyyyyyyyyy" 🔄 相关术语
❓ 常见问题
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.
Higress 如何支持 API Key?
Higress supports API Key authentication, can manage keys for multiple consumers, and implements rate limiting, statistics, and other functions based on keys.
深入了解 Higress
探索更多 Higress 的功能和最佳实践