Yilialinn commented on code in PR #13241:
URL: https://github.com/apache/apisix/pull/13241#discussion_r3116640386


##########
docs/zh/latest/plugins/key-auth.md:
##########
@@ -32,43 +32,43 @@ description: key-auth 插件支持使用身份验证密钥作为客户端在访
     <link rel="canonical" href="https://docs.api7.ai/hub/key-auth"; />
 </head>
 
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
 ## 描述
 
 `key-auth` 插件支持使用身份验证密钥作为客户端在访问上游资源之前进行身份验证的机制。
 
-要使用该插件,您需要在 [Consumers](../terminology/consumer.md) 
上配置身份验证密钥,并在路由或服务上启用该插件。密钥可以包含在请求 URL 查询字符串或请求标头中。然后,APISIX 
将验证密钥以确定是否应允许或拒绝请求访问上游资源。
+要使用该插件,您需要在[消费者](../terminology/consumer.md)上配置身份验证密钥,并在路由或服务上启用该插件。密钥可以包含在请求 
URL 查询字符串或请求标头中。APISIX 将验证密钥以确定是否应允许或拒绝请求访问上游资源。
 
-当消费者成功通过身份验证后,APISIX 会在将请求代理到上游服务之前向请求添加其他标头,例如 
`X-Consumer-Username`、`X-Credential-Indentifier` 
和其他消费者自定义标头(如果已配置)。上游服务将能够区分消费者并根据需要实现其他逻辑。如果这些值中的任何一个不可用,则不会添加相应的标头。
+当消费者成功通过身份验证后,APISIX 会在将请求代理到上游服务之前向请求添加其他标头,例如 
`X-Consumer-Username`、`X-Credential-Identifier` 
和其他消费者自定义标头(如果已配置)。上游服务将能够区分消费者并根据需要实现其他逻辑。如果这些值中的任何一个不可用,则不会添加相应的标头。
 
 ## 属性
 
 Consumer/Credential 端:
 
-| 名称 | 类型   | 必选项  | 描述                                                        
                                                  |
-| ---- | ------ | ------ | 
-------------------------------------------------------------------------------------------------------------
 |
-| key  | string | 是     | 不同的 Consumer 应有不同的 `key`,它应当是唯一的。如果多个 Consumer 
使用了相同的 `key`,将会出现请求匹配异常。该字段支持使用 [APISIX Secret](../terminology/secret.md) 
资源,将值保存在 Secret Manager 中。 |
-
-注意:schema 中还定义了 `encrypt_fields = {"key"}`,这意味着该字段将会被加密存储在 etcd 中。具体参考 
[加密存储字段](../plugin-develop.md#加密存储字段)。
+| 名称 | 类型 | 必选项 | 默认值 | 有效值 | 描述 |
+|------|------|--------|--------|--------|------|
+| key | string | 是 | | | 标识消费者凭证的唯一密钥。密钥在存储到 etcd 之前会使用 AES 
加密。您也可以将其存储在环境变量中并使用 `env://` 前缀引用,或存储在 HashiCorp Vault 等密钥管理器中并使用 `secret://` 
前缀引用。 |

Review Comment:
   Fixed — updated the ZH attributes table with conditional wording: encryption 
only applies when `apisix.data_encryption.enable_encrypt_fields` is enabled and 
etcd is used as the config center.



##########
docs/en/latest/plugins/key-auth.md:
##########
@@ -385,6 +1086,17 @@ You should see an `HTTP/1.1 200 OK` response. This shows 
that the key included i
 
 The following example demonstrates how you can attach a Consumer custom ID to 
authenticated request in the `Consumer-Custom-Id` header, which can be used to 
implement additional logics as needed.

Review Comment:
   Fixed — corrected the prose to use `X-Consumer-Custom-Id` (consistent with 
the examples below and the actual header APISIX adds).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to