Skip to content

docs: add Secret chinese document to Admin API#9522

Merged
SylviaBABY merged 11 commits into
apache:masterfrom
zccabb:master
Jul 2, 2023
Merged

docs: add Secret chinese document to Admin API#9522
SylviaBABY merged 11 commits into
apache:masterfrom
zccabb:master

Conversation

@zccabb

@zccabb zccabb commented May 22, 2023

Copy link
Copy Markdown
Contributor

Description

Provide Chinese documentation for Admin API Secret.

https://apisix.apache.org/docs/apisix/admin-api/#secret

Fixes #9520

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

Comment thread docs/zh/latest/admin-api.md Outdated

## Secret

安全密钥 (Secret) 表示表示 `密钥管理(Secrets Management)`,可以使用任何受支持的密钥管理器,例如 `vault`。

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
安全密钥 (Secret) 表示表示 `密钥管理(Secrets Management)`,可以使用任何受支持的密钥管理器,例如 `vault`
你可以将 secret 资源用于密钥管理,需要配合支持的密钥管理器,例如 `vault`

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@juststillthinking

Copy link
Copy Markdown
Contributor

I think you should read what you have translated and compare it with other translations, it could be a bit more better

@juststillthinking juststillthinking added the wait for update wait for the author's response in this issue/PR label May 23, 2023
@zccabb
zccabb requested a review from juststillthinking May 25, 2023 01:53
@lingsamuel lingsamuel removed the wait for update wait for the author's response in this issue/PR label Jun 26, 2023
@juststillthinking

Copy link
Copy Markdown
Contributor

Secret

Secret 指的是 Secrets Management(密钥管理),可以使用任何支持的密钥管理器,例如 vault

请求地址

Secret 资源请求地址:/apisix/admin/secrets/{secretmanager}/{id}

请求方法

方法 请求URI 请求主体 描述
GET /apisix/admin/secrets NULL 获取所有 secret 的列表。
GET /apisix/admin/secrets/{manager}/{id} NULL 根据 id 获取指定的 secret 。
PUT /apisix/admin/secrets/{manager} {…} 创建新的 secret 配置。
DELETE /apisix/admin/secrets/{manager}/{id} NULL 删除具有指定 id 的 secret。
PATCH /apisix/admin/secrets/{manager}/{id} {…} 更新指定 secret 的选定属性。如果要删除一个属性,可以将该属性的值设置为null。
PATCH /apisix/admin/secrets/{manager}/{id}/{path} {…} 更新路径中指定的属性。其他属性的值保持不变。

body 请求参数

{secretmanager}vault时:

参数 是否必需 类型 描述 示例
uri URI Vault服务器的URI。
prefix string 密钥前缀
token string Vault令牌。

配置示例:

{        
    "uri": "https://localhost/vault",
    "prefix": "/apisix/kv",
    "token": "343effad"
}

使用示例:

curl -i http://127.0.0.1:9180/apisix/admin/secrets/vault/test2 \
-H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
    "uri": "http://xxx/get",
    "prefix" : "apisix",
    "token" : "apisix"
}'
HTTP/1.1 200 OK

{"key":"\/apisix\/secrets\/vault\/test2","value":{"id":"vault\/test2","token":"apisix","prefix":"apisix","update_time":1669625828,"create_time":1669625828,"uri":"http:\/\/xxx\/get"}}

应答参数

当前的响应是从etcd返回的。

@juststillthinking

juststillthinking commented Jun 28, 2023

Copy link
Copy Markdown
Contributor

Hi @zccabb, I translated for you, you could simply modify and apply

@juststillthinking juststillthinking added the wait for update wait for the author's response in this issue/PR label Jun 28, 2023
@zccabb

zccabb commented Jun 29, 2023

Copy link
Copy Markdown
Contributor Author

fixed,Thanks to @monkeyDluffy6017 for all your help

@juststillthinking juststillthinking added approved and removed wait for update wait for the author's response in this issue/PR labels Jun 29, 2023
@SylviaBABY
SylviaBABY merged commit f2337f2 into apache:master Jul 2, 2023
hongbinhsu added a commit to fitphp/apix that referenced this pull request Jul 8, 2023
* upstream/master: (70 commits)
  fix(workflow): enhance schema check (apache#9782)
  docs: add chinese documentation for loki-logger (apache#9687)
  chore(update): stand-alone text (apache#9736)
  docs: add Secret chinese document to Admin API (apache#9522)
  fix(log-rotate): can not keep max files when using custom name (apache#9749)
  docs: fix typo and added useful information (apache#8900)
  docs: explain in more details for the batch-requests plugin (apache#9629)
  docs: update `apisix` section in `config-default.yaml` (apache#9611)
  chore: add missing `report_interval` option for `skywalking` plugin in `config-default.yaml` (apache#9662)
  refactor(jwt-auth): remove unused parameter (apache#9716)
  change(request-id): remove snowflake algorithm (apache#9715)
  fix test case (apache#9706)
  docs: add correct link for openresty arm64 repo (apache#9713)
  fix: get the correct revision (apache#9635)
  fix(body-transformer): xml2lua: replace empty table with empty string (apache#9669)
  feat(prometheus): allow user configure DEFAULT_BUCKETS (apache#9673)
  docs: add example for timeout (apache#9708)
  docs: replace some urls that point to github with relative paths (apache#9684)
  docs: update Debian Installation Guide (apache#9680)
  docs: update how to install apisix on debian (apache#9693)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

docs: secrets documentation of admin-api is needed

4 participants