Security Tab for operator-ui (#804)

Security Tab allow users to set various configurations related to TLS
certificates for MinIO and Console

- Enable/Disable AutoCert
- Add/Delete MinIO and Console Certificates
- Add/Delete MinIO and Console CA Certificates

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
This commit is contained in:
Lenin Alevski
2021-06-17 17:30:20 -07:00
committed by GitHub
parent 09503ed0c8
commit 85797749ba
38 changed files with 3717 additions and 34 deletions

View File

@@ -3033,6 +3033,83 @@ func init() {
}
}
},
"/namespaces/{namespace}/tenants/{tenant}/security": {
"get": {
"tags": [
"AdminAPI"
],
"summary": "Tenant Security",
"operationId": "TenantSecurity",
"parameters": [
{
"type": "string",
"name": "namespace",
"in": "path",
"required": true
},
{
"type": "string",
"name": "tenant",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/tenantSecurityResponse"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"post": {
"tags": [
"AdminAPI"
],
"summary": "Update Tenant Security",
"operationId": "UpdateTenantSecurity",
"parameters": [
{
"type": "string",
"name": "namespace",
"in": "path",
"required": true
},
{
"type": "string",
"name": "tenant",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/updateTenantSecurityRequest"
}
}
],
"responses": {
"204": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/namespaces/{namespace}/tenants/{tenant}/usage": {
"get": {
"tags": [
@@ -4645,6 +4722,26 @@ func init() {
}
}
},
"certificateInfo": {
"type": "object",
"properties": {
"domains": {
"type": "array",
"items": {
"type": "string"
}
},
"expiry": {
"type": "string"
},
"name": {
"type": "string"
},
"serialNumber": {
"type": "string"
}
}
},
"changeUserPasswordRequest": {
"type": "object",
"required": [
@@ -6901,6 +6998,12 @@ func init() {
"tenant": {
"type": "object",
"properties": {
"consoleEnabled": {
"type": "boolean"
},
"consoleTLS": {
"type": "boolean"
},
"console_image": {
"type": "string"
},
@@ -6942,6 +7045,9 @@ func init() {
"logEnabled": {
"type": "boolean"
},
"minioTLS": {
"type": "boolean"
},
"monitoringEnabled": {
"type": "boolean"
},
@@ -7041,6 +7147,43 @@ func init() {
}
}
},
"tenantSecurityResponse": {
"type": "object",
"properties": {
"autoCert": {
"type": "boolean"
},
"customCertificates": {
"type": "object",
"properties": {
"console": {
"type": "array",
"items": {
"$ref": "#/definitions/certificateInfo"
}
},
"consoleCAs": {
"type": "array",
"items": {
"$ref": "#/definitions/certificateInfo"
}
},
"minio": {
"type": "array",
"items": {
"$ref": "#/definitions/certificateInfo"
}
},
"minioCAs": {
"type": "array",
"items": {
"$ref": "#/definitions/certificateInfo"
}
}
}
}
}
},
"tenantStatus": {
"type": "object",
"properties": {
@@ -7303,6 +7446,49 @@ func init() {
}
}
},
"updateTenantSecurityRequest": {
"type": "object",
"properties": {
"autoCert": {
"type": "boolean"
},
"customCertificates": {
"type": "object",
"properties": {
"console": {
"type": "array",
"items": {
"$ref": "#/definitions/keyPairConfiguration"
}
},
"consoleCAs": {
"type": "array",
"items": {
"type": "string"
}
},
"minio": {
"type": "array",
"items": {
"$ref": "#/definitions/keyPairConfiguration"
}
},
"minioCAs": {
"type": "array",
"items": {
"type": "string"
}
},
"secretsToBeDeleted": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
},
"updateUser": {
"type": "object",
"required": [
@@ -10527,6 +10713,83 @@ func init() {
}
}
},
"/namespaces/{namespace}/tenants/{tenant}/security": {
"get": {
"tags": [
"AdminAPI"
],
"summary": "Tenant Security",
"operationId": "TenantSecurity",
"parameters": [
{
"type": "string",
"name": "namespace",
"in": "path",
"required": true
},
{
"type": "string",
"name": "tenant",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/tenantSecurityResponse"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
},
"post": {
"tags": [
"AdminAPI"
],
"summary": "Update Tenant Security",
"operationId": "UpdateTenantSecurity",
"parameters": [
{
"type": "string",
"name": "namespace",
"in": "path",
"required": true
},
{
"type": "string",
"name": "tenant",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/updateTenantSecurityRequest"
}
}
],
"responses": {
"204": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/namespaces/{namespace}/tenants/{tenant}/usage": {
"get": {
"tags": [
@@ -12200,6 +12463,70 @@ func init() {
}
}
},
"TenantSecurityResponseCustomCertificates": {
"type": "object",
"properties": {
"console": {
"type": "array",
"items": {
"$ref": "#/definitions/certificateInfo"
}
},
"consoleCAs": {
"type": "array",
"items": {
"$ref": "#/definitions/certificateInfo"
}
},
"minio": {
"type": "array",
"items": {
"$ref": "#/definitions/certificateInfo"
}
},
"minioCAs": {
"type": "array",
"items": {
"$ref": "#/definitions/certificateInfo"
}
}
}
},
"UpdateTenantSecurityRequestCustomCertificates": {
"type": "object",
"properties": {
"console": {
"type": "array",
"items": {
"$ref": "#/definitions/keyPairConfiguration"
}
},
"consoleCAs": {
"type": "array",
"items": {
"type": "string"
}
},
"minio": {
"type": "array",
"items": {
"$ref": "#/definitions/keyPairConfiguration"
}
},
"minioCAs": {
"type": "array",
"items": {
"type": "string"
}
},
"secretsToBeDeleted": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"VaultConfigurationApprole": {
"type": "object",
"required": [
@@ -12779,6 +13106,26 @@ func init() {
}
}
},
"certificateInfo": {
"type": "object",
"properties": {
"domains": {
"type": "array",
"items": {
"type": "string"
}
},
"expiry": {
"type": "string"
},
"name": {
"type": "string"
},
"serialNumber": {
"type": "string"
}
}
},
"changeUserPasswordRequest": {
"type": "object",
"required": [
@@ -14888,6 +15235,12 @@ func init() {
"tenant": {
"type": "object",
"properties": {
"consoleEnabled": {
"type": "boolean"
},
"consoleTLS": {
"type": "boolean"
},
"console_image": {
"type": "string"
},
@@ -14929,6 +15282,9 @@ func init() {
"logEnabled": {
"type": "boolean"
},
"minioTLS": {
"type": "boolean"
},
"monitoringEnabled": {
"type": "boolean"
},
@@ -15028,6 +15384,43 @@ func init() {
}
}
},
"tenantSecurityResponse": {
"type": "object",
"properties": {
"autoCert": {
"type": "boolean"
},
"customCertificates": {
"type": "object",
"properties": {
"console": {
"type": "array",
"items": {
"$ref": "#/definitions/certificateInfo"
}
},
"consoleCAs": {
"type": "array",
"items": {
"$ref": "#/definitions/certificateInfo"
}
},
"minio": {
"type": "array",
"items": {
"$ref": "#/definitions/certificateInfo"
}
},
"minioCAs": {
"type": "array",
"items": {
"$ref": "#/definitions/certificateInfo"
}
}
}
}
}
},
"tenantStatus": {
"type": "object",
"properties": {
@@ -15290,6 +15683,49 @@ func init() {
}
}
},
"updateTenantSecurityRequest": {
"type": "object",
"properties": {
"autoCert": {
"type": "boolean"
},
"customCertificates": {
"type": "object",
"properties": {
"console": {
"type": "array",
"items": {
"$ref": "#/definitions/keyPairConfiguration"
}
},
"consoleCAs": {
"type": "array",
"items": {
"type": "string"
}
},
"minio": {
"type": "array",
"items": {
"$ref": "#/definitions/keyPairConfiguration"
}
},
"minioCAs": {
"type": "array",
"items": {
"type": "string"
}
},
"secretsToBeDeleted": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
},
"updateUser": {
"type": "object",
"required": [