mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #3015 from xiang90/auth_doc
doc: move enable section to the top in auth_api.md
This commit is contained in:
commit
9f984ea6ae
@ -65,6 +65,44 @@ An Error JSON corresponds to:
|
|||||||
"description" : "The longer helpful description of the error."
|
"description" : "The longer helpful description of the error."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#### Enable and Disable Authentication
|
||||||
|
|
||||||
|
**Get auth status**
|
||||||
|
|
||||||
|
GET /v2/auth/enable
|
||||||
|
|
||||||
|
Sent Headers:
|
||||||
|
Possible Status Codes:
|
||||||
|
200 OK
|
||||||
|
200 Body:
|
||||||
|
{
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
**Enable auth**
|
||||||
|
|
||||||
|
PUT /v2/auth/enable
|
||||||
|
|
||||||
|
Sent Headers:
|
||||||
|
Put Body: (empty)
|
||||||
|
Possible Status Codes:
|
||||||
|
200 OK
|
||||||
|
400 Bad Request (if root user has not been created)
|
||||||
|
200 Body: (empty)
|
||||||
|
|
||||||
|
**Disable auth**
|
||||||
|
|
||||||
|
DELETE /v2/auth/enable
|
||||||
|
|
||||||
|
Sent Headers:
|
||||||
|
Authorization: Basic <RootAuthString>
|
||||||
|
Possible Status Codes:
|
||||||
|
200 OK
|
||||||
|
403 Forbidden (if not a root user)
|
||||||
|
200 Body: (empty)
|
||||||
|
|
||||||
|
|
||||||
#### Users
|
#### Users
|
||||||
|
|
||||||
The User JSON object is formed as follows:
|
The User JSON object is formed as follows:
|
||||||
@ -240,44 +278,6 @@ DELETE /v2/auth/roles/rocket
|
|||||||
200 Body: (empty)
|
200 Body: (empty)
|
||||||
|
|
||||||
|
|
||||||
#### Enable and Disable Authentication
|
|
||||||
|
|
||||||
**Get auth status**
|
|
||||||
|
|
||||||
GET /v2/auth/enable
|
|
||||||
|
|
||||||
Sent Headers:
|
|
||||||
Possible Status Codes:
|
|
||||||
200 OK
|
|
||||||
200 Body:
|
|
||||||
{
|
|
||||||
"enabled": true
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
**Enable auth**
|
|
||||||
|
|
||||||
PUT /v2/auth/enable
|
|
||||||
|
|
||||||
Sent Headers:
|
|
||||||
Put Body: (empty)
|
|
||||||
Possible Status Codes:
|
|
||||||
200 OK
|
|
||||||
400 Bad Request (if not a root user)
|
|
||||||
200 Body: (empty)
|
|
||||||
|
|
||||||
**Disable auth**
|
|
||||||
|
|
||||||
DELETE /v2/auth/enable
|
|
||||||
|
|
||||||
Sent Headers:
|
|
||||||
Authorization: Basic <RootAuthString>
|
|
||||||
Possible Status Codes:
|
|
||||||
200 OK
|
|
||||||
403 Forbidden (if not a root user)
|
|
||||||
200 Body: (empty)
|
|
||||||
|
|
||||||
|
|
||||||
## Example Workflow
|
## Example Workflow
|
||||||
|
|
||||||
Let's walk through an example to show two tenants (applications, in our case) using etcd permissions.
|
Let's walk through an example to show two tenants (applications, in our case) using etcd permissions.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user