Populate AddUserServiceAccount policy restrictor with user permissions (#1987)

Created api to generate single JSON including all user permissions to populate AddUserServiceAccount policy restrictor
This commit is contained in:
jinapurapu
2022-05-25 11:34:26 -07:00
committed by GitHub
parent 69e1d653ce
commit fce2a148b8
12 changed files with 787 additions and 2 deletions

View File

@@ -3999,6 +3999,37 @@ func init() {
}
}
},
"/user/{name}/policies": {
"get": {
"tags": [
"Policy"
],
"summary": "returns policies assigned for a specified user",
"operationId": "GetSAUserPolicy",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/aUserPolicyResponse"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/user/{name}/service-account-credentials": {
"post": {
"tags": [
@@ -4250,6 +4281,14 @@ func init() {
}
}
},
"aUserPolicyResponse": {
"type": "object",
"properties": {
"policy": {
"type": "string"
}
}
},
"accessRule": {
"type": "object",
"properties": {
@@ -11033,6 +11072,37 @@ func init() {
}
}
},
"/user/{name}/policies": {
"get": {
"tags": [
"Policy"
],
"summary": "returns policies assigned for a specified user",
"operationId": "GetSAUserPolicy",
"parameters": [
{
"type": "string",
"name": "name",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/aUserPolicyResponse"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/user/{name}/service-account-credentials": {
"post": {
"tags": [
@@ -11410,6 +11480,14 @@ func init() {
}
}
},
"aUserPolicyResponse": {
"type": "object",
"properties": {
"policy": {
"type": "string"
}
}
},
"accessRule": {
"type": "object",
"properties": {