*: add a new API and command for checking auth status (#11536)

This changes have started at etcdctl under auth.go, and make changes to stub out everything down into the internal raft.  Made changes to the .proto files and regenerated them so that the local version would build successfully.
This commit is contained in:
Vern Burton
2020-02-05 21:27:42 -06:00
committed by GitHub
parent 74d5ba5777
commit 071e70cdc4
21 changed files with 1013 additions and 465 deletions

View File

@@ -5,10 +5,6 @@
"produces": [
"application/json"
],
"schemes": [
"http",
"https"
],
"swagger": "2.0",
"info": {
"title": "etcdserver/etcdserverpb/rpc.proto",
@@ -258,6 +254,33 @@
}
}
},
"/v3/auth/status": {
"post": {
"tags": [
"Auth"
],
"summary": "AuthStatus displays authentication status.",
"operationId": "AuthStatus",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/etcdserverpbAuthStatusRequest"
}
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/etcdserverpbAuthStatusResponse"
}
}
}
}
},
"/v3/auth/user/add": {
"post": {
"tags": [
@@ -847,7 +870,16 @@
"200": {
"description": "A successful response.(streaming responses)",
"schema": {
"$ref": "#/x-stream-definitions/etcdserverpbLeaseKeepAliveResponse"
"type": "object",
"title": "Stream result of etcdserverpbLeaseKeepAliveResponse",
"properties": {
"error": {
"$ref": "#/definitions/runtimeStreamError"
},
"result": {
"$ref": "#/definitions/etcdserverpbLeaseKeepAliveResponse"
}
}
}
}
}
@@ -1036,7 +1068,16 @@
"200": {
"description": "A successful response.(streaming responses)",
"schema": {
"$ref": "#/x-stream-definitions/etcdserverpbSnapshotResponse"
"type": "object",
"title": "Stream result of etcdserverpbSnapshotResponse",
"properties": {
"error": {
"$ref": "#/definitions/runtimeStreamError"
},
"result": {
"$ref": "#/definitions/etcdserverpbSnapshotResponse"
}
}
}
}
}
@@ -1118,7 +1159,16 @@
"200": {
"description": "A successful response.(streaming responses)",
"schema": {
"$ref": "#/x-stream-definitions/etcdserverpbWatchResponse"
"type": "object",
"title": "Stream result of etcdserverpbWatchResponse",
"properties": {
"error": {
"$ref": "#/definitions/runtimeStreamError"
},
"result": {
"$ref": "#/definitions/etcdserverpbWatchResponse"
}
}
}
}
}
@@ -1423,6 +1473,21 @@
}
}
},
"etcdserverpbAuthStatusRequest": {
"type": "object"
},
"etcdserverpbAuthStatusResponse": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"format": "boolean"
},
"header": {
"$ref": "#/definitions/etcdserverpbResponseHeader"
}
}
},
"etcdserverpbAuthUserAddRequest": {
"type": "object",
"properties": {
@@ -2637,43 +2702,5 @@
{
"ApiKey": []
}
],
"x-stream-definitions": {
"etcdserverpbLeaseKeepAliveResponse": {
"properties": {
"error": {
"$ref": "#/definitions/runtimeStreamError"
},
"result": {
"$ref": "#/definitions/etcdserverpbLeaseKeepAliveResponse"
}
},
"title": "Stream result of etcdserverpbLeaseKeepAliveResponse",
"type": "object"
},
"etcdserverpbSnapshotResponse": {
"properties": {
"error": {
"$ref": "#/definitions/runtimeStreamError"
},
"result": {
"$ref": "#/definitions/etcdserverpbSnapshotResponse"
}
},
"title": "Stream result of etcdserverpbSnapshotResponse",
"type": "object"
},
"etcdserverpbWatchResponse": {
"properties": {
"error": {
"$ref": "#/definitions/runtimeStreamError"
},
"result": {
"$ref": "#/definitions/etcdserverpbWatchResponse"
}
},
"title": "Stream result of etcdserverpbWatchResponse",
"type": "object"
}
}
]
}