Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tzssangglass committed Dec 14, 2022
1 parent 5c369fe commit 8419c92
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apisix/plugin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@ _M.encrypt_conf = encrypt_conf
check_plugin_metadata = function(item)
local ok, err = check_single_plugin_schema(item.id, item,
core.schema.TYPE_METADATA, true)
if ok and enable_gde()then
if ok and enable_gde() then
decrypt_conf(item.name, item, core.schema.TYPE_METADATA)
end

Expand Down
2 changes: 2 additions & 0 deletions docs/en/latest/plugins/key-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ For Consumer:
|------|--------|-------------|----------------------------|
| key | string | required | Unique key for a Consumer. |

NOTE: `encrypt_fields = {"key"}` is also defined in the schema, which means that the field will be stored encrypted in etcd. See [encrypted storage fields](../plugin-develop.md#encrypted-storage-fields).

For Route:

| Name | Type | Requirement | Default | Valid | Description |
Expand Down
2 changes: 2 additions & 0 deletions docs/zh/latest/plugins/key-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ Consumer 端:
| ---- | ------ | ------ | ------------------------------------------------------------------------------------------------------------- |
| key | string || 不同的 Consumer 应有不同的 `key`,它应当是唯一的。如果多个 Consumer 使用了相同的 `key`,将会出现请求匹配异常。 |

注意:schema 中还定义了 `encrypt_fields = {"client_secret"}`,这意味着该字段将会被加密存储在 etcd 中。具体参考 [加密存储字段](../plugin-develop.md#加密存储字段)

Router 端:

| 名称 | 类型 | 必选项 | 默认值 | 描述 |
Expand Down

0 comments on commit 8419c92

Please sign in to comment.