From bf1d6b1881ad53fb9f3ef3b8967f435169ab99c1 Mon Sep 17 00:00:00 2001 From: Varidhi61 Date: Fri, 9 Jan 2026 22:09:22 +0530 Subject: [PATCH 1/2] docs: add realm description to zh basic-auth route attributes Add 'realm' parameter to basic-auth plugin documentation. --- docs/zh/latest/plugins/basic-auth.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/zh/latest/plugins/basic-auth.md b/docs/zh/latest/plugins/basic-auth.md index c445e45f3dca..49c5aa7dd90d 100644 --- a/docs/zh/latest/plugins/basic-auth.md +++ b/docs/zh/latest/plugins/basic-auth.md @@ -55,6 +55,7 @@ Route 端: | ---------------- | ------- | ------ | ------ | --------------------------------------------------------------- | | hide_credentials | boolean | 否 | false | 该参数设置为 `true` 时,则不会将 Authorization 请求头传递给 Upstream。| | anonymous_consumer | boolean | 否 | false | 匿名消费者名称。如果已配置,则允许匿名用户绕过身份验证。 | +| realm | string | 否 | basic |在身份验证失败时,应包含在 WWW-Authenticate 标头中的域。| ## 示例 From 1702a661f673535550c9b011364a35dcc0692b9d Mon Sep 17 00:00:00 2001 From: Varidhi61 Date: Mon, 12 Jan 2026 19:46:10 +0530 Subject: [PATCH 2/2] docs: add realm field to zh hmac-auth plugin documentation This change adds documentation for the `realm` field to the Chinese (zh) HMAC auth plugin documentation. The content follows the existing English documentation and keeps the same structure and meaning. No functional or code changes are included. --- docs/zh/latest/plugins/hmac-auth.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/latest/plugins/hmac-auth.md b/docs/zh/latest/plugins/hmac-auth.md index c4460473980f..5120eeb80e3a 100644 --- a/docs/zh/latest/plugins/hmac-auth.md +++ b/docs/zh/latest/plugins/hmac-auth.md @@ -57,7 +57,7 @@ description: hmac-auth 插件支持 HMAC 认证,保证请求的完整性,防 | validate_request_body | boolean | 否 | false | | 如果为 true,则验证请求正文的完整性,以确保在传输过程中没有被篡改。具体来说,插件会创建一个 SHA-256 的 base64 编码 digest,并将其与 `Digest` 头进行比较。如果 `Digest` 头丢失或 digest 不匹配,验证将失败。 | | hide_credentials | boolean | 否 | false | | 如果为 true,则不会将授权请求头传递给上游服务。 | | anonymous_consumer | string | 否 | | | 匿名消费者名称。如果已配置,则允许匿名用户绕过身份验证。 | - +|realm | string | 否 | hmac | |在身份验证失败时应包含在 WWW-Authenticate 标头中的域。| 注意:schema 中还定义了 `encrypt_fields = {"secret_key"}`,这意味着该字段将会被加密存储在 etcd 中。具体参考 [加密存储字段](../plugin-develop.md#加密存储字段)。 ## 示例