Adding accesskey and secretkey for service accounts (#985)

* adding accesskey and secretkey for service accounts

* simplifying functions

Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
Co-authored-by: Adam Stafford <adamstafford@Adams-MacBook-Pro.local>
This commit is contained in:
adfost
2021-09-01 09:54:13 -07:00
committed by GitHub
parent d23a7a4fba
commit 849132fa19
17 changed files with 1501 additions and 57 deletions

View File

@@ -2813,6 +2813,39 @@ func init() {
}
}
},
"/service-account-credentials": {
"post": {
"tags": [
"AdminAPI"
],
"summary": "Create Service Account With Credentials",
"operationId": "CreateServiceAccountCreds",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/serviceAccountRequestCreds"
}
}
],
"responses": {
"201": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/serviceAccountCreds"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/service-accounts": {
"get": {
"tags": [
@@ -3180,6 +3213,45 @@ func init() {
}
}
},
"/user/{name}/service-account-credentials": {
"post": {
"tags": [
"AdminAPI"
],
"summary": "Create Service Account for User With Credentials",
"operationId": "CreateServiceAccountCredentials",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/serviceAccountRequestCreds"
}
}
],
"responses": {
"201": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/serviceAccountCreds"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/user/{name}/service-accounts": {
"get": {
"tags": [
@@ -4935,6 +5007,21 @@ func init() {
}
}
},
"serviceAccountRequestCreds": {
"type": "object",
"properties": {
"accessKey": {
"type": "string"
},
"policy": {
"type": "string",
"title": "policy to be applied to the Service Account if any"
},
"secretKey": {
"type": "string"
}
}
},
"serviceAccounts": {
"type": "array",
"items": {
@@ -8237,6 +8324,39 @@ func init() {
}
}
},
"/service-account-credentials": {
"post": {
"tags": [
"AdminAPI"
],
"summary": "Create Service Account With Credentials",
"operationId": "CreateServiceAccountCreds",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/serviceAccountRequestCreds"
}
}
],
"responses": {
"201": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/serviceAccountCreds"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/service-accounts": {
"get": {
"tags": [
@@ -8604,6 +8724,45 @@ func init() {
}
}
},
"/user/{name}/service-account-credentials": {
"post": {
"tags": [
"AdminAPI"
],
"summary": "Create Service Account for User With Credentials",
"operationId": "CreateServiceAccountCredentials",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/serviceAccountRequestCreds"
}
}
],
"responses": {
"201": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/serviceAccountCreds"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/user/{name}/service-accounts": {
"get": {
"tags": [
@@ -10413,6 +10572,21 @@ func init() {
}
}
},
"serviceAccountRequestCreds": {
"type": "object",
"properties": {
"accessKey": {
"type": "string"
},
"policy": {
"type": "string",
"title": "policy to be applied to the Service Account if any"
},
"secretKey": {
"type": "string"
}
}
},
"serviceAccounts": {
"type": "array",
"items": {