From d672d3c5dcfd71912fd2f539266e0ae9e957073f Mon Sep 17 00:00:00 2001 From: vishalnayak Date: Wed, 28 Sep 2016 22:11:48 -0400 Subject: [PATCH] Added website docs for lookup and destroy APIs --- builtin/credential/approle/path_role.go | 4 +- website/source/docs/auth/approle.html.md | 113 ++++++++++++++--------- 2 files changed, 70 insertions(+), 47 deletions(-) diff --git a/builtin/credential/approle/path_role.go b/builtin/credential/approle/path_role.go index 5cad584c83..b2b20ee559 100644 --- a/builtin/credential/approle/path_role.go +++ b/builtin/credential/approle/path_role.go @@ -79,8 +79,8 @@ type roleIDStorageEntry struct { // role//custom-secret-id - For assigning a custom SecretID against an role // role//secret-id/lookup - For reading the properties of a secret_id // role//secret-id/destroy - For deleting a secret_id -// role//secret-id-accessor/ - For reading the -// properties of, or deleting a secret_id, using the accessor of secret_id. +// role//secret-id-accessor/lookup - For reading secret_id using accessor +// role//secret-id-accessor/destroy - For deleting secret_id using accessor func rolePaths(b *backend) []*framework.Path { return []*framework.Path{ &framework.Path{ diff --git a/website/source/docs/auth/approle.html.md b/website/source/docs/auth/approle.html.md index 31b966e44d..be37287871 100644 --- a/website/source/docs/auth/approle.html.md +++ b/website/source/docs/auth/approle.html.md @@ -557,8 +557,8 @@ the role. -### /auth/approle/role/[role_name]/secret-id/ -#### GET +### /auth/approle/role/[role_name]/secret-id/lookup +#### POST
Description
@@ -566,14 +566,20 @@ the role.
Method
-
`GET`
+
`POST`
URL
-
`/auth/approle/role/[role_name]/secret-id/`
+
`/auth/approle/role/[role_name]/secret-id/lookup`
Parameters
- None. +
    +
  • + secret_id + required +Secret ID attached to the role +
  • +
Returns
@@ -581,27 +587,26 @@ the role. ```javascript { - "auth": null, - "warnings": null, - "wrap_info": null, - "data": { - "secret_id_ttl": 600, - "secret_id_num_uses": 40, - "secret_id_accessor": "5e222f10-278d-a829-4e74-10d71977bb53", - "metadata": {}, - "last_updated_time": "2016-06-29T05:31:09.407042587Z", - "expiration_time": "2016-06-29T05:41:09.407042587Z", - "creation_time": "2016-06-29T05:31:09.407042587Z" - }, - "lease_duration": 0, - "renewable": false, - "lease_id": "" + "request_id": "0d25d8ec-0d16-2842-1dda-c28c25aefd4b", + "lease_id": "", + "lease_duration": 0, + "renewable": false, + "data": { + "cidr_list": null, + "creation_time": "2016-09-28T21:00:46.760570318-04:00", + "expiration_time": "0001-01-01T00:00:00Z", + "last_updated_time": "2016-09-28T21:00:46.760570318-04:00", + "metadata": {}, + "secret_id_accessor": "b4bea6b2-0214-9f7f-33cf-e732155feadb", + "secret_id_num_uses": 10, + "secret_id_ttl": 0 + }, } ``` -
+### /auth/approle/role/[role_name]/secret-id/destroy #### DELETE
Description
@@ -613,11 +618,17 @@ the role.
`DELETE`
URL
-
`/auth/approle/role/[role_name]/secret-id/`
+
`/auth/approle/role/[role_name]/secret-id/destroy`
Parameters
- None. +
    +
  • + secret_id + required +Secret ID attached to the role +
  • +
Returns
@@ -626,8 +637,8 @@ the role.
-### /auth/approle/role/[role_name]/secret-id-accessor/ -#### GET +### /auth/approle/role/[role_name]/secret-id-accessor/lookup +#### POST
Description
@@ -636,14 +647,20 @@ the role.
Method
-
`GET`
+
`POST`
URL
-
`/auth/approle/role/[role_name]/secret-id-accessor/`
+
`/auth/approle/role/[role_name]/secret-id-accessor/lookup`
Parameters
- None. +
    +
  • + secret_id_accessor + required +Accessor of the secret ID +
  • +
Returns
@@ -651,27 +668,27 @@ the role. ```javascript { - "auth": null, - "warnings": null, - "wrap_info": null, - "data": { - "secret_id_ttl": 600, - "secret_id_num_uses": 40, - "secret_id_accessor": "5e222f10-278d-a829-4e74-10d71977bb53", - "metadata": {}, - "last_updated_time": "2016-06-29T05:31:09.407042587Z", - "expiration_time": "2016-06-29T05:41:09.407042587Z", - "creation_time": "2016-06-29T05:31:09.407042587Z" - }, - "lease_duration": 0, - "renewable": false, - "lease_id": "" + "request_id": "2132237e-d1b6-d298-6117-b54a2d938d00", + "lease_id": "", + "lease_duration": 0, + "renewable": false, + "data": { + "cidr_list": null, + "creation_time": "2016-09-28T22:09:02.834238344-04:00", + "expiration_time": "0001-01-01T00:00:00Z", + "last_updated_time": "2016-09-28T22:09:02.834238344-04:00", + "metadata": {}, + "secret_id_accessor": "54ba219d-b539-ac4f-e3cf-763c02f351fb", + "secret_id_num_uses": 10, + "secret_id_ttl": 0 + }, } ```
+### /auth/approle/role/[role_name]/secret-id-accessor/destroy #### DELETE
Description
@@ -683,11 +700,17 @@ the role.
`DELETE`
URL
-
`/auth/approle/role/[role_name]/secret-id-accessor/`
+
`/auth/approle/role/[role_name]/secret-id-accessor/destroy`
Parameters
- None. +
    +
  • + secret_id_accessor + required +Accessor of the secret ID +
  • +
Returns