Compare commits

...

6 Commits

Author SHA1 Message Date
Alex
2263eada70 Release v0.20.3 (#2328)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
2022-09-20 23:54:10 -07:00
Lenin Alevski
368c9ee3d7 InputBoxWrapper automatically add hide/show behavior for password fields (#2327)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-09-20 23:13:34 -05:00
jinapurapu
3513a01711 Add Bucket tooltip improvements (#2326) 2022-09-20 19:12:18 -07:00
Lenin Alevski
0af36a5757 Add: Allow to configure env variables during tenant creation (#2322)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
2022-09-20 18:58:31 -05:00
Daniel Valdivia
fdd5a94074 Fix NPE on Operator Login with SSO (#2324)
Signed-off-by: Daniel Valdivia
2022-09-20 18:57:48 -05:00
Javier Adriel
17ad2cfd14 Add dummy endpoints for kms integration (#2301)
Add dummy endpoints for kms integration

Implementation will come in another PR
2022-09-20 16:09:30 -07:00
149 changed files with 10285 additions and 85 deletions

View File

@@ -15,7 +15,7 @@ spec:
serviceAccountName: console-sa
containers:
- name: console
image: 'minio/console:v0.20.2'
image: 'minio/console:v0.20.3'
imagePullPolicy: "IfNotPresent"
env:
- name: CONSOLE_OPERATOR_MODE

View File

@@ -32,7 +32,7 @@ spec:
spec:
containers:
- name: console
image: 'minio/console:v0.20.2'
image: 'minio/console:v0.20.3'
imagePullPolicy: "IfNotPresent"
env:
- name: CONSOLE_MINIO_SERVER

View File

@@ -58,6 +58,9 @@ type CreateTenantRequest struct {
// encryption
Encryption *EncryptionConfiguration `json:"encryption,omitempty"`
// environment variables
EnvironmentVariables []*EnvironmentVariable `json:"environmentVariables"`
// erasure coding parity
ErasureCodingParity int64 `json:"erasureCodingParity,omitempty"`
@@ -123,6 +126,10 @@ func (m *CreateTenantRequest) Validate(formats strfmt.Registry) error {
res = append(res, err)
}
if err := m.validateEnvironmentVariables(formats); err != nil {
res = append(res, err)
}
if err := m.validateIdp(formats); err != nil {
res = append(res, err)
}
@@ -199,6 +206,32 @@ func (m *CreateTenantRequest) validateEncryption(formats strfmt.Registry) error
return nil
}
func (m *CreateTenantRequest) validateEnvironmentVariables(formats strfmt.Registry) error {
if swag.IsZero(m.EnvironmentVariables) { // not required
return nil
}
for i := 0; i < len(m.EnvironmentVariables); i++ {
if swag.IsZero(m.EnvironmentVariables[i]) { // not required
continue
}
if m.EnvironmentVariables[i] != nil {
if err := m.EnvironmentVariables[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("environmentVariables" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("environmentVariables" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *CreateTenantRequest) validateIdp(formats strfmt.Registry) error {
if swag.IsZero(m.Idp) { // not required
return nil
@@ -355,6 +388,10 @@ func (m *CreateTenantRequest) ContextValidate(ctx context.Context, formats strfm
res = append(res, err)
}
if err := m.contextValidateEnvironmentVariables(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateIdp(ctx, formats); err != nil {
res = append(res, err)
}
@@ -417,6 +454,26 @@ func (m *CreateTenantRequest) contextValidateEncryption(ctx context.Context, for
return nil
}
func (m *CreateTenantRequest) contextValidateEnvironmentVariables(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.EnvironmentVariables); i++ {
if m.EnvironmentVariables[i] != nil {
if err := m.EnvironmentVariables[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("environmentVariables" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("environmentVariables" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *CreateTenantRequest) contextValidateIdp(ctx context.Context, formats strfmt.Registry) error {
if m.Idp != nil {

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmDeleteKeyRequest km delete key request
//
// swagger:model kmDeleteKeyRequest
type KmDeleteKeyRequest interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmListKeysRequest km list keys request
//
// swagger:model kmListKeysRequest
type KmListKeysRequest interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsAssignPolicyRequest kms assign policy request
//
// swagger:model kmsAssignPolicyRequest
type KmsAssignPolicyRequest interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsAssignPolicyResponse kms assign policy response
//
// swagger:model kmsAssignPolicyResponse
type KmsAssignPolicyResponse interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsCreateKeyRequest kms create key request
//
// swagger:model kmsCreateKeyRequest
type KmsCreateKeyRequest interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsCreateKeyResponse kms create key response
//
// swagger:model kmsCreateKeyResponse
type KmsCreateKeyResponse interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsDeleteIdentityRequest kms delete identity request
//
// swagger:model kmsDeleteIdentityRequest
type KmsDeleteIdentityRequest interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsDeleteIdentityResponse kms delete identity response
//
// swagger:model kmsDeleteIdentityResponse
type KmsDeleteIdentityResponse interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsDeleteKeyResponse kms delete key response
//
// swagger:model kmsDeleteKeyResponse
type KmsDeleteKeyResponse interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsDeletePolicyRequest kms delete policy request
//
// swagger:model kmsDeletePolicyRequest
type KmsDeletePolicyRequest interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsDeletePolicyResponse kms delete policy response
//
// swagger:model kmsDeletePolicyResponse
type KmsDeletePolicyResponse interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsDescribeIdentityRequest kms describe identity request
//
// swagger:model kmsDescribeIdentityRequest
type KmsDescribeIdentityRequest interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsDescribeIdentityResponse kms describe identity response
//
// swagger:model kmsDescribeIdentityResponse
type KmsDescribeIdentityResponse interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsDescribePolicyRequest kms describe policy request
//
// swagger:model kmsDescribePolicyRequest
type KmsDescribePolicyRequest interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsDescribePolicyResponse kms describe policy response
//
// swagger:model kmsDescribePolicyResponse
type KmsDescribePolicyResponse interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsDescribeSelfIdentityRequest kms describe self identity request
//
// swagger:model kmsDescribeSelfIdentityRequest
type KmsDescribeSelfIdentityRequest interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsDescribeSelfIdentityResponse kms describe self identity response
//
// swagger:model kmsDescribeSelfIdentityResponse
type KmsDescribeSelfIdentityResponse interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsGetPolicyRequest kms get policy request
//
// swagger:model kmsGetPolicyRequest
type KmsGetPolicyRequest interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsGetPolicyResponse kms get policy response
//
// swagger:model kmsGetPolicyResponse
type KmsGetPolicyResponse interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsImportKeyRequest kms import key request
//
// swagger:model kmsImportKeyRequest
type KmsImportKeyRequest interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsImportKeyResponse kms import key response
//
// swagger:model kmsImportKeyResponse
type KmsImportKeyResponse interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsKeyStatusRequest kms key status request
//
// swagger:model kmsKeyStatusRequest
type KmsKeyStatusRequest interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsKeyStatusResponse kms key status response
//
// swagger:model kmsKeyStatusResponse
type KmsKeyStatusResponse interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsListIdentitiesRequest kms list identities request
//
// swagger:model kmsListIdentitiesRequest
type KmsListIdentitiesRequest interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsListIdentitiesResponse kms list identities response
//
// swagger:model kmsListIdentitiesResponse
type KmsListIdentitiesResponse interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsListKeysResponse kms list keys response
//
// swagger:model kmsListKeysResponse
type KmsListKeysResponse interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsListPoliciesRequest kms list policies request
//
// swagger:model kmsListPoliciesRequest
type KmsListPoliciesRequest interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsListPoliciesResponse kms list policies response
//
// swagger:model kmsListPoliciesResponse
type KmsListPoliciesResponse interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsSetPolicyRequest kms set policy request
//
// swagger:model kmsSetPolicyRequest
type KmsSetPolicyRequest interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsSetPolicyResponse kms set policy response
//
// swagger:model kmsSetPolicyResponse
type KmsSetPolicyResponse interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsStatusRequest kms status request
//
// swagger:model kmsStatusRequest
type KmsStatusRequest interface{}

View File

@@ -0,0 +1,28 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
// KmsStatusResponse kms status response
//
// swagger:model kmsStatusResponse
type KmsStatusResponse interface{}

View File

@@ -2620,6 +2620,12 @@ func init() {
"type": "object",
"$ref": "#/definitions/encryptionConfiguration"
},
"environmentVariables": {
"type": "array",
"items": {
"$ref": "#/definitions/environmentVariable"
}
},
"erasureCodingParity": {
"type": "integer"
},
@@ -8575,6 +8581,12 @@ func init() {
"type": "object",
"$ref": "#/definitions/encryptionConfiguration"
},
"environmentVariables": {
"type": "array",
"items": {
"$ref": "#/definitions/environmentVariable"
}
},
"erasureCodingParity": {
"type": "integer"
},

View File

@@ -537,6 +537,11 @@ func getTenantCreatedResponse(session *models.Principal, params operator_api.Cre
Console: tenantReq.ExposeConsole,
}
// set custom environment variables in configuration file
for _, envVar := range tenantReq.EnvironmentVariables {
tenantConfigurationENV[envVar.Key] = envVar.Value
}
// write tenant configuration to secret that contains config.env
tenantConfigurationName := fmt.Sprintf("%s-env-configuration", tenantName)
_, err = createOrReplaceSecrets(ctx, &k8sClient, ns, []tenantSecret{

View File

@@ -1,7 +1,7 @@
{
"files": {
"main.css": "./static/css/main.b20a708b.css",
"main.js": "./static/js/main.87ca0bd7.js",
"main.js": "./static/js/main.f25583c7.js",
"static/js/1260.5248e62a.chunk.js": "./static/js/1260.5248e62a.chunk.js",
"static/js/6914.57144791.chunk.js": "./static/js/6914.57144791.chunk.js",
"static/js/4209.dd491df8.chunk.js": "./static/js/4209.dd491df8.chunk.js",
@@ -10,7 +10,7 @@
"static/js/5088.2338ab8d.chunk.js": "./static/js/5088.2338ab8d.chunk.js",
"static/js/5140.29fde8ff.chunk.js": "./static/js/5140.29fde8ff.chunk.js",
"static/js/852.8313f23d.chunk.js": "./static/js/852.8313f23d.chunk.js",
"static/js/839.94b8b36e.chunk.js": "./static/js/839.94b8b36e.chunk.js",
"static/js/839.c37e55ae.chunk.js": "./static/js/839.c37e55ae.chunk.js",
"static/js/3176.59846ccd.chunk.js": "./static/js/3176.59846ccd.chunk.js",
"static/js/6137.4944b3c1.chunk.js": "./static/js/6137.4944b3c1.chunk.js",
"static/js/7045.7464040f.chunk.js": "./static/js/7045.7464040f.chunk.js",
@@ -35,7 +35,7 @@
"static/css/343.90c9cdc7.chunk.css": "./static/css/343.90c9cdc7.chunk.css",
"static/js/343.11e3916f.chunk.js": "./static/js/343.11e3916f.chunk.js",
"static/css/1199.90c9cdc7.chunk.css": "./static/css/1199.90c9cdc7.chunk.css",
"static/js/1199.39d0d82a.chunk.js": "./static/js/1199.39d0d82a.chunk.js",
"static/js/1199.503e1d6b.chunk.js": "./static/js/1199.503e1d6b.chunk.js",
"static/css/5517.90c9cdc7.chunk.css": "./static/css/5517.90c9cdc7.chunk.css",
"static/js/5517.62cf2fc9.chunk.js": "./static/js/5517.62cf2fc9.chunk.js",
"static/js/2555.58623b9e.chunk.js": "./static/js/2555.58623b9e.chunk.js",
@@ -63,7 +63,7 @@
"static/js/9467.421ee878.chunk.js": "./static/js/9467.421ee878.chunk.js",
"static/js/6895.3a30a2de.chunk.js": "./static/js/6895.3a30a2de.chunk.js",
"static/js/1379.7bddd455.chunk.js": "./static/js/1379.7bddd455.chunk.js",
"static/js/8277.5ccf5bdb.chunk.js": "./static/js/8277.5ccf5bdb.chunk.js",
"static/js/8277.f96cd195.chunk.js": "./static/js/8277.f96cd195.chunk.js",
"static/js/4133.65219d1a.chunk.js": "./static/js/4133.65219d1a.chunk.js",
"static/css/1367.90c9cdc7.chunk.css": "./static/css/1367.90c9cdc7.chunk.css",
"static/js/1367.63cecfcc.chunk.js": "./static/js/1367.63cecfcc.chunk.js",
@@ -84,9 +84,9 @@
"static/js/8495.b1689c2d.chunk.js": "./static/js/8495.b1689c2d.chunk.js",
"static/js/4934.72071d47.chunk.js": "./static/js/4934.72071d47.chunk.js",
"static/js/9942.78febb7d.chunk.js": "./static/js/9942.78febb7d.chunk.js",
"static/js/7021.6a554d0d.chunk.js": "./static/js/7021.6a554d0d.chunk.js",
"static/js/7021.9ea87695.chunk.js": "./static/js/7021.9ea87695.chunk.js",
"static/js/2684.cb179f6c.chunk.js": "./static/js/2684.cb179f6c.chunk.js",
"static/js/6683.aa56755a.chunk.js": "./static/js/6683.aa56755a.chunk.js",
"static/js/6683.ae70aa3c.chunk.js": "./static/js/6683.ae70aa3c.chunk.js",
"static/js/8350.d0f71354.chunk.js": "./static/js/8350.d0f71354.chunk.js",
"static/js/4873.9349e8b2.chunk.js": "./static/js/4873.9349e8b2.chunk.js",
"static/js/5367.81c2d437.chunk.js": "./static/js/5367.81c2d437.chunk.js",
@@ -137,7 +137,6 @@
"static/js/4827.a3ee5d0a.chunk.js": "./static/js/4827.a3ee5d0a.chunk.js",
"static/js/696.c93c6454.chunk.js": "./static/js/696.c93c6454.chunk.js",
"static/js/3388.6f330810.chunk.js": "./static/js/3388.6f330810.chunk.js",
"static/js/2567.43362044.chunk.js": "./static/js/2567.43362044.chunk.js",
"static/js/71.323f55a6.chunk.js": "./static/js/71.323f55a6.chunk.js",
"static/js/4709.8bd47e6f.chunk.js": "./static/js/4709.8bd47e6f.chunk.js",
"static/js/3870.a1265f93.chunk.js": "./static/js/3870.a1265f93.chunk.js",
@@ -148,11 +147,11 @@
"static/js/7472.85d323e5.chunk.js": "./static/js/7472.85d323e5.chunk.js",
"static/js/9515.a4e964be.chunk.js": "./static/js/9515.a4e964be.chunk.js",
"static/js/2983.15e04479.chunk.js": "./static/js/2983.15e04479.chunk.js",
"static/js/5289.bed1d51e.chunk.js": "./static/js/5289.bed1d51e.chunk.js",
"static/js/2763.02eb6b42.chunk.js": "./static/js/2763.02eb6b42.chunk.js",
"static/js/48.115b7eb1.chunk.js": "./static/js/48.115b7eb1.chunk.js",
"static/js/2763.2e00e8e0.chunk.js": "./static/js/2763.2e00e8e0.chunk.js",
"index.html": "./index.html",
"main.b20a708b.css.map": "./static/css/main.b20a708b.css.map",
"main.87ca0bd7.js.map": "./static/js/main.87ca0bd7.js.map",
"main.f25583c7.js.map": "./static/js/main.f25583c7.js.map",
"1260.5248e62a.chunk.js.map": "./static/js/1260.5248e62a.chunk.js.map",
"6914.57144791.chunk.js.map": "./static/js/6914.57144791.chunk.js.map",
"4209.dd491df8.chunk.js.map": "./static/js/4209.dd491df8.chunk.js.map",
@@ -161,7 +160,7 @@
"5088.2338ab8d.chunk.js.map": "./static/js/5088.2338ab8d.chunk.js.map",
"5140.29fde8ff.chunk.js.map": "./static/js/5140.29fde8ff.chunk.js.map",
"852.8313f23d.chunk.js.map": "./static/js/852.8313f23d.chunk.js.map",
"839.94b8b36e.chunk.js.map": "./static/js/839.94b8b36e.chunk.js.map",
"839.c37e55ae.chunk.js.map": "./static/js/839.c37e55ae.chunk.js.map",
"3176.59846ccd.chunk.js.map": "./static/js/3176.59846ccd.chunk.js.map",
"6137.4944b3c1.chunk.js.map": "./static/js/6137.4944b3c1.chunk.js.map",
"7045.7464040f.chunk.js.map": "./static/js/7045.7464040f.chunk.js.map",
@@ -186,7 +185,7 @@
"343.90c9cdc7.chunk.css.map": "./static/css/343.90c9cdc7.chunk.css.map",
"343.11e3916f.chunk.js.map": "./static/js/343.11e3916f.chunk.js.map",
"1199.90c9cdc7.chunk.css.map": "./static/css/1199.90c9cdc7.chunk.css.map",
"1199.39d0d82a.chunk.js.map": "./static/js/1199.39d0d82a.chunk.js.map",
"1199.503e1d6b.chunk.js.map": "./static/js/1199.503e1d6b.chunk.js.map",
"5517.90c9cdc7.chunk.css.map": "./static/css/5517.90c9cdc7.chunk.css.map",
"5517.62cf2fc9.chunk.js.map": "./static/js/5517.62cf2fc9.chunk.js.map",
"2555.58623b9e.chunk.js.map": "./static/js/2555.58623b9e.chunk.js.map",
@@ -214,7 +213,7 @@
"9467.421ee878.chunk.js.map": "./static/js/9467.421ee878.chunk.js.map",
"6895.3a30a2de.chunk.js.map": "./static/js/6895.3a30a2de.chunk.js.map",
"1379.7bddd455.chunk.js.map": "./static/js/1379.7bddd455.chunk.js.map",
"8277.5ccf5bdb.chunk.js.map": "./static/js/8277.5ccf5bdb.chunk.js.map",
"8277.f96cd195.chunk.js.map": "./static/js/8277.f96cd195.chunk.js.map",
"4133.65219d1a.chunk.js.map": "./static/js/4133.65219d1a.chunk.js.map",
"1367.90c9cdc7.chunk.css.map": "./static/css/1367.90c9cdc7.chunk.css.map",
"1367.63cecfcc.chunk.js.map": "./static/js/1367.63cecfcc.chunk.js.map",
@@ -235,9 +234,9 @@
"8495.b1689c2d.chunk.js.map": "./static/js/8495.b1689c2d.chunk.js.map",
"4934.72071d47.chunk.js.map": "./static/js/4934.72071d47.chunk.js.map",
"9942.78febb7d.chunk.js.map": "./static/js/9942.78febb7d.chunk.js.map",
"7021.6a554d0d.chunk.js.map": "./static/js/7021.6a554d0d.chunk.js.map",
"7021.9ea87695.chunk.js.map": "./static/js/7021.9ea87695.chunk.js.map",
"2684.cb179f6c.chunk.js.map": "./static/js/2684.cb179f6c.chunk.js.map",
"6683.aa56755a.chunk.js.map": "./static/js/6683.aa56755a.chunk.js.map",
"6683.ae70aa3c.chunk.js.map": "./static/js/6683.ae70aa3c.chunk.js.map",
"8350.d0f71354.chunk.js.map": "./static/js/8350.d0f71354.chunk.js.map",
"4873.9349e8b2.chunk.js.map": "./static/js/4873.9349e8b2.chunk.js.map",
"5367.81c2d437.chunk.js.map": "./static/js/5367.81c2d437.chunk.js.map",
@@ -288,7 +287,6 @@
"4827.a3ee5d0a.chunk.js.map": "./static/js/4827.a3ee5d0a.chunk.js.map",
"696.c93c6454.chunk.js.map": "./static/js/696.c93c6454.chunk.js.map",
"3388.6f330810.chunk.js.map": "./static/js/3388.6f330810.chunk.js.map",
"2567.43362044.chunk.js.map": "./static/js/2567.43362044.chunk.js.map",
"71.323f55a6.chunk.js.map": "./static/js/71.323f55a6.chunk.js.map",
"4709.8bd47e6f.chunk.js.map": "./static/js/4709.8bd47e6f.chunk.js.map",
"3870.a1265f93.chunk.js.map": "./static/js/3870.a1265f93.chunk.js.map",
@@ -299,11 +297,11 @@
"7472.85d323e5.chunk.js.map": "./static/js/7472.85d323e5.chunk.js.map",
"9515.a4e964be.chunk.js.map": "./static/js/9515.a4e964be.chunk.js.map",
"2983.15e04479.chunk.js.map": "./static/js/2983.15e04479.chunk.js.map",
"5289.bed1d51e.chunk.js.map": "./static/js/5289.bed1d51e.chunk.js.map",
"2763.02eb6b42.chunk.js.map": "./static/js/2763.02eb6b42.chunk.js.map"
"48.115b7eb1.chunk.js.map": "./static/js/48.115b7eb1.chunk.js.map",
"2763.2e00e8e0.chunk.js.map": "./static/js/2763.2e00e8e0.chunk.js.map"
},
"entrypoints": [
"static/css/main.b20a708b.css",
"static/js/main.87ca0bd7.js"
"static/js/main.f25583c7.js"
]
}

View File

@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><base href="/"/><meta content="width=device-width,initial-scale=1" name="viewport"/><meta content="#081C42" media="(prefers-color-scheme: light)" name="theme-color"/><meta content="#081C42" media="(prefers-color-scheme: dark)" name="theme-color"/><meta content="MinIO Console" name="description"/><link href="./styles/root-styles.css" rel="stylesheet"/><link href="./apple-icon-180x180.png" rel="apple-touch-icon" sizes="180x180"/><link href="./favicon-32x32.png" rel="icon" sizes="32x32" type="image/png"/><link href="./favicon-96x96.png" rel="icon" sizes="96x96" type="image/png"/><link href="./favicon-16x16.png" rel="icon" sizes="16x16" type="image/png"/><link href="./manifest.json" rel="manifest"/><link color="#3a4e54" href="./safari-pinned-tab.svg" rel="mask-icon"/><title>MinIO Console</title><script defer="defer" src="./static/js/main.87ca0bd7.js"></script><link href="./static/css/main.b20a708b.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"><div id="preload"><img src="./images/background.svg"/> <img src="./images/background-wave-orig2.svg"/></div><div id="loader-block"><img src="./Loader.svg"/></div></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><base href="/"/><meta content="width=device-width,initial-scale=1" name="viewport"/><meta content="#081C42" media="(prefers-color-scheme: light)" name="theme-color"/><meta content="#081C42" media="(prefers-color-scheme: dark)" name="theme-color"/><meta content="MinIO Console" name="description"/><link href="./styles/root-styles.css" rel="stylesheet"/><link href="./apple-icon-180x180.png" rel="apple-touch-icon" sizes="180x180"/><link href="./favicon-32x32.png" rel="icon" sizes="32x32" type="image/png"/><link href="./favicon-96x96.png" rel="icon" sizes="96x96" type="image/png"/><link href="./favicon-16x16.png" rel="icon" sizes="16x16" type="image/png"/><link href="./manifest.json" rel="manifest"/><link color="#3a4e54" href="./safari-pinned-tab.svg" rel="mask-icon"/><title>MinIO Console</title><script defer="defer" src="./static/js/main.f25583c7.js"></script><link href="./static/css/main.b20a708b.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"><div id="preload"><img src="./images/background.svg"/> <img src="./images/background-wave-orig2.svg"/></div><div id="loader-block"><img src="./Loader.svg"/></div></div></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -427,3 +427,13 @@ export const IAM_PAGES_PERMISSIONS = {
export const S3_ALL_RESOURCES = "arn:aws:s3:::*";
export const CONSOLE_UI_RESOURCE = "console-ui";
export const permissionTooltipHelper = (scopes: string[], name: string) => {
return (
"You require additional permissions in order to enable " +
name +
". Please ask your MinIO administrator to grant you " +
scopes +
" permission in order to enable Versioning."
);
};

View File

@@ -732,3 +732,166 @@ export const getClientOS = (): string => {
return getPlatform;
};
export const MinIOEnvironmentVariables = [
"MINIO_ACCESS_KEY",
"MINIO_ACCESS_KEY_OLD",
"MINIO_AUDIT_WEBHOOK_AUTH_TOKEN",
"MINIO_AUDIT_WEBHOOK_CLIENT_CERT",
"MINIO_AUDIT_WEBHOOK_CLIENT_KEY",
"MINIO_AUDIT_WEBHOOK_ENABLE",
"MINIO_AUDIT_WEBHOOK_ENDPOINT",
"MINIO_BROWSER",
"MINIO_BROWSER_REDIRECT_URL",
"MINIO_IDENTITY_LDAP_COMMENT",
"MINIO_IDENTITY_LDAP_GROUP_SEARCH_BASE_DN",
"MINIO_IDENTITY_LDAP_GROUP_SEARCH_FILTER",
"MINIO_IDENTITY_LDAP_LOOKUP_BIND_DN",
"MINIO_IDENTITY_LDAP_LOOKUP_BIND_PASSWORD",
"MINIO_IDENTITY_LDAP_SERVER_ADDR",
"MINIO_IDENTITY_LDAP_SERVER_INSECURE",
"MINIO_IDENTITY_LDAP_SERVER_STARTTLS",
"MINIO_IDENTITY_LDAP_STS_EXPIRY",
"MINIO_IDENTITY_LDAP_TLS_SKIP_VERIFY",
"MINIO_IDENTITY_LDAP_USER_DN_SEARCH_BASE_DN",
"MINIO_IDENTITY_LDAP_USER_DN_SEARCH_FILTER",
"MINIO_IDENTITY_LDAP_USERNAME_FORMAT",
"MINIO_IDENTITY_OPENID_CLAIM_NAME",
"MINIO_IDENTITY_OPENID_CLAIM_PREFIX",
"MINIO_IDENTITY_OPENID_CLIENT_ID",
"MINIO_IDENTITY_OPENID_CLIENT_SECRET",
"MINIO_IDENTITY_OPENID_COMMENT",
"MINIO_IDENTITY_OPENID_CONFIG_URL",
"MINIO_IDENTITY_OPENID_REDIRECT_URI",
"MINIO_IDENTITY_OPENID_SCOPES",
"MINIO_KMS_AUTO_ENCRYPTION",
"MINIO_KMS_KES_CERT_FILE",
"MINIO_KMS_KES_ENDPOINT",
"MINIO_KMS_KES_KEY_FILE",
"MINIO_KMS_KES_KEY_NAME",
"MINIO_KMS_SECRET_KEY",
"MINIO_LOGGER_WEBHOOK_AUTH_TOKEN",
"MINIO_LOGGER_WEBHOOK_ENABLE",
"MINIO_LOGGER_WEBHOOK_ENDPOINT",
"MINIO_LOG_QUERY_URL",
"MINIO_NOTIFY_AMQP_AUTO_DELETED",
"MINIO_NOTIFY_AMQP_COMMENT",
"MINIO_NOTIFY_AMQP_DELIVERY_MODE",
"MINIO_NOTIFY_AMQP_DURABLE",
"MINIO_NOTIFY_AMQP_ENABLE",
"MINIO_NOTIFY_AMQP_EXCHANGE",
"MINIO_NOTIFY_AMQP_EXCHANGE_TYPE",
"MINIO_NOTIFY_AMQP_INTERNAL",
"MINIO_NOTIFY_AMQP_MANDATORY",
"MINIO_NOTIFY_AMQP_NO_WAIT",
"MINIO_NOTIFY_AMQP_QUEUE_DIR",
"MINIO_NOTIFY_AMQP_QUEUE_LIMIT",
"MINIO_NOTIFY_AMQP_ROUTING_KEY",
"MINIO_NOTIFY_AMQP_URL",
"MINIO_NOTIFY_ELASTICSEARCH_COMMENT",
"MINIO_NOTIFY_ELASTICSEARCH_ENABLE",
"MINIO_NOTIFY_ELASTICSEARCH_FORMAT",
"MINIO_NOTIFY_ELASTICSEARCH_INDEX",
"MINIO_NOTIFY_ELASTICSEARCH_PASSWORD",
"MINIO_NOTIFY_ELASTICSEARCH_QUEUE_DIR",
"MINIO_NOTIFY_ELASTICSEARCH_QUEUE_LIMIT",
"MINIO_NOTIFY_ELASTICSEARCH_URL",
"MINIO_NOTIFY_ELASTICSEARCH_USERNAME",
"MINIO_NOTIFY_KAFKA_BROKERS",
"MINIO_NOTIFY_KAFKA_CLIENT_TLS_CERT",
"MINIO_NOTIFY_KAFKA_CLIENT_TLS_KEY",
"MINIO_NOTIFY_KAFKA_COMMENT",
"MINIO_NOTIFY_KAFKA_ENABLE",
"MINIO_NOTIFY_KAFKA_QUEUE_DIR",
"MINIO_NOTIFY_KAFKA_QUEUE_LIMIT",
"MINIO_NOTIFY_KAFKA_SASL",
"MINIO_NOTIFY_KAFKA_SASL_MECHANISM",
"MINIO_NOTIFY_KAFKA_SASL_PASSWORD",
"MINIO_NOTIFY_KAFKA_SASL_USERNAME",
"MINIO_NOTIFY_KAFKA_TLS",
"MINIO_NOTIFY_KAFKA_TLS_CLIENT_AUTH",
"MINIO_NOTIFY_KAFKA_TLS_SKIP_VERIFY",
"MINIO_NOTIFY_KAFKA_TOPIC",
"MINIO_NOTIFY_KAFKA_VERSION",
"MINIO_NOTIFY_MQTT_BROKER",
"MINIO_NOTIFY_MQTT_COMMENT",
"MINIO_NOTIFY_MQTT_ENABLE",
"MINIO_NOTIFY_MQTT_KEEP_ALIVE_INTERVAL",
"MINIO_NOTIFY_MQTT_PASSWORD",
"MINIO_NOTIFY_MQTT_QOS",
"MINIO_NOTIFY_MQTT_QUEUE_DIR",
"MINIO_NOTIFY_MQTT_QUEUE_LIMIT",
"MINIO_NOTIFY_MQTT_RECONNECT_INTERVAL",
"MINIO_NOTIFY_MQTT_TOPIC",
"MINIO_NOTIFY_MQTT_USERNAME",
"MINIO_NOTIFY_MYSQL_COMMENT",
"MINIO_NOTIFY_MYSQL_DSN_STRING",
"MINIO_NOTIFY_MYSQL_ENABLE",
"MINIO_NOTIFY_MYSQL_FORMAT",
"MINIO_NOTIFY_MYSQL_MAX_OPEN_CONNECTIONS",
"MINIO_NOTIFY_MYSQL_QUEUE_DIR",
"MINIO_NOTIFY_MYSQL_QUEUE_LIMIT",
"MINIO_NOTIFY_MYSQL_TABLE",
"MINIO_NOTIFY_NATS_ADDRESS",
"MINIO_NOTIFY_NATS_CERT_AUTHORITY",
"MINIO_NOTIFY_NATS_CLIENT_CERT",
"MINIO_NOTIFY_NATS_CLIENT_KEY",
"MINIO_NOTIFY_NATS_COMMENT",
"MINIO_NOTIFY_NATS_ENABLE",
"MINIO_NOTIFY_NATS_PASSWORD",
"MINIO_NOTIFY_NATS_PING_INTERVAL",
"MINIO_NOTIFY_NATS_QUEUE_DIR",
"MINIO_NOTIFY_NATS_QUEUE_LIMIT",
"MINIO_NOTIFY_NATS_STREAMING",
"MINIO_NOTIFY_NATS_STREAMING_ASYNC",
"MINIO_NOTIFY_NATS_STREAMING_CLUSTER_ID",
"MINIO_NOTIFY_NATS_STREAMING_MAX_PUB_ACKS_IN_FLIGHT",
"MINIO_NOTIFY_NATS_SUBJECT",
"MINIO_NOTIFY_NATS_TLS",
"MINIO_NOTIFY_NATS_TLS_SKIP_VERIFY",
"MINIO_NOTIFY_NATS_TOKEN",
"MINIO_NOTIFY_NATS_USERNAME",
"MINIO_NOTIFY_NSQ_COMMENT",
"MINIO_NOTIFY_NSQ_ENABLE",
"MINIO_NOTIFY_NSQ_NSQD_ADDRESS",
"MINIO_NOTIFY_NSQ_QUEUE_DIR",
"MINIO_NOTIFY_NSQ_QUEUE_LIMIT",
"MINIO_NOTIFY_NSQ_TLS",
"MINIO_NOTIFY_NSQ_TLS_SKIP_VERIFY",
"MINIO_NOTIFY_NSQ_TOPIC",
"MINIO_NOTIFY_POSTGRESQL_COMMENT",
"MINIO_NOTIFY_POSTGRESQL_CONNECTION_STRING",
"MINIO_NOTIFY_POSTGRESQL_ENABLE",
"MINIO_NOTIFY_POSTGRESQL_FORMAT",
"MINIO_NOTIFY_POSTGRESQL_MAX_OPEN_CONNECTIONS",
"MINIO_NOTIFY_POSTGRESQL_QUEUE_DIR",
"MINIO_NOTIFY_POSTGRESQL_QUEUE_LIMIT",
"MINIO_NOTIFY_POSTGRESQL_TABLE",
"MINIO_NOTIFY_REDIS_ADDRESS",
"MINIO_NOTIFY_REDIS_COMMENT",
"MINIO_NOTIFY_REDIS_ENABLE",
"MINIO_NOTIFY_REDIS_FORMAT",
"MINIO_NOTIFY_REDIS_KEY",
"MINIO_NOTIFY_REDIS_PASSWORD",
"MINIO_NOTIFY_REDIS_QUEUE_DIR",
"MINIO_NOTIFY_REDIS_QUEUE_LIMIT",
"MINIO_NOTIFY_WEBHOOK_AUTH_TOKEN",
"MINIO_NOTIFY_WEBHOOK_CLIENT_CERT",
"MINIO_NOTIFY_WEBHOOK_CLIENT_KEY",
"MINIO_NOTIFY_WEBHOOK_COMMENT",
"MINIO_NOTIFY_WEBHOOK_ENABLE",
"MINIO_NOTIFY_WEBHOOK_ENDPOINT",
"MINIO_NOTIFY_WEBHOOK_QUEUE_DIR",
"MINIO_NOTIFY_WEBHOOK_QUEUE_LIMIT",
"MINIO_PROMETHEUS_AUTH_TYPE",
"MINIO_PROMETHEUS_JOB_ID",
"MINIO_PROMETHEUS_URL",
"MINIO_ROOT_PASSWORD",
"MINIO_ROOT_USER",
"MINIO_SECRET_KEY",
"MINIO_SECRET_KEY_OLD",
"MINIO_SERVER_URL",
"MINIO_STORAGE_CLASS_COMMENT",
"MINIO_STORAGE_CLASS_RRS",
"MINIO_STORAGE_CLASS_STANDARD",
];

View File

@@ -59,7 +59,10 @@ import {
} from "./addBucketsSlice";
import { addBucketAsync } from "./addBucketThunks";
import AddBucketName from "./AddBucketName";
import { IAM_SCOPES } from "../../../../../common/SecureComponent/permissions";
import {
IAM_SCOPES,
permissionTooltipHelper,
} from "../../../../../common/SecureComponent/permissions";
import { hasPermission } from "../../../../../common/SecureComponent";
import BucketNamingRules from "./BucketNamingRules";
@@ -323,10 +326,13 @@ const AddBucket = ({ classes }: IsetProps) => {
<TooltipWrapper
tooltip={
versioningAllowed
? ""
: "You require additional permissions in order to enable Versioning. Please ask your MinIO administrator to grant you " +
IAM_SCOPES.S3_PUT_BUCKET_VERSIONING +
" permission in order to enable Versioning."
? lockingEnabled && versioningEnabled
? "You must disable Locking before Versioning can be disabled"
: ""
: permissionTooltipHelper(
[IAM_SCOPES.S3_PUT_BUCKET_VERSIONING],
"Versioning"
)
}
>
<FormSwitchWrapper
@@ -352,12 +358,13 @@ const AddBucket = ({ classes }: IsetProps) => {
tooltip={
lockingAllowed
? ""
: "You require additional permissions in order to enable Locking. Please ask your MinIO administrator to grant you " +
(versioningAllowed
? ""
: IAM_SCOPES.S3_PUT_BUCKET_VERSIONING + " and ") +
IAM_SCOPES.S3_PUT_BUCKET_OBJECT_LOCK_CONFIGURATION +
" permissions in order to enable Locking."
: permissionTooltipHelper(
[
IAM_SCOPES.S3_PUT_BUCKET_VERSIONING,
IAM_SCOPES.S3_PUT_BUCKET_OBJECT_LOCK_CONFIGURATION,
],
"Locking"
)
}
>
<FormSwitchWrapper
@@ -501,19 +508,27 @@ const AddBucket = ({ classes }: IsetProps) => {
onClick={resForm}
label={"Clear"}
/>
<Button
id={"create-bucket"}
type="submit"
variant="callAction"
color="primary"
disabled={
addLoading ||
invalidFields.length > 0 ||
!isDirty ||
hasErrors
<TooltipWrapper
tooltip={
invalidFields.length > 0 || !isDirty || hasErrors
? "You must apply a valid name to the bucket"
: ""
}
label={"Create Bucket"}
/>
>
<Button
id={"create-bucket"}
type="submit"
variant="callAction"
color="primary"
disabled={
addLoading ||
invalidFields.length > 0 ||
!isDirty ||
hasErrors
}
label={"Create Bucket"}
/>
</TooltipWrapper>
</Grid>
{addLoading && (
<Grid item xs={12}>

View File

@@ -13,7 +13,7 @@
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
import React from "react";
import React, { useState } from "react";
import {
Grid,
IconButton,
@@ -24,6 +24,8 @@ import {
} from "@mui/material";
import { OutlinedInputProps } from "@mui/material/OutlinedInput";
import { InputProps as StandardInputProps } from "@mui/material/Input";
import VisibilityOffIcon from "@mui/icons-material/VisibilityOff";
import RemoveRedEyeIcon from "@mui/icons-material/RemoveRedEye";
import { Theme } from "@mui/material/styles";
import createStyles from "@mui/styles/createStyles";
import makeStyles from "@mui/styles/makeStyles";
@@ -137,6 +139,7 @@ const InputBoxWrapper = ({
onFocus,
}: InputBoxProps) => {
let inputProps: any = { "data-index": index, ...extraInputProps };
const [toggleTextInput, setToggleTextInput] = useState<boolean>(false);
if (type === "number" && min) {
inputProps["min"] = min;
@@ -150,6 +153,18 @@ const InputBoxWrapper = ({
inputProps["pattern"] = pattern;
}
let inputBoxWrapperIcon = overlayIcon;
let inputBoxWrapperType = type;
if (type === "password" && overlayIcon === null) {
inputBoxWrapperIcon = toggleTextInput ? (
<VisibilityOffIcon />
) : (
<RemoveRedEyeIcon />
);
inputBoxWrapperType = toggleTextInput ? "text" : "password";
}
return (
<React.Fragment>
<Grid
@@ -191,7 +206,7 @@ const InputBoxWrapper = ({
autoFocus={autoFocus}
disabled={disabled}
onChange={onChange}
type={type}
type={inputBoxWrapperType}
multiline={multiline}
autoComplete={autoComplete}
inputProps={inputProps}
@@ -202,7 +217,7 @@ const InputBoxWrapper = ({
onKeyPress={onKeyPress}
onFocus={onFocus}
/>
{overlayIcon && (
{inputBoxWrapperIcon && (
<div
className={`${classes.overlayAction} ${
label !== "" ? "withLabel" : ""
@@ -214,7 +229,7 @@ const InputBoxWrapper = ({
? () => {
overlayAction();
}
: () => null
: () => setToggleTextInput(!toggleTextInput)
}
id={overlayId}
size={"small"}
@@ -222,7 +237,7 @@ const InputBoxWrapper = ({
disableRipple={false}
disableTouchRipple={false}
>
{overlayIcon}
{inputBoxWrapperIcon}
</IconButton>
</div>
)}

View File

@@ -19,11 +19,18 @@ import { useSelector } from "react-redux";
import { Theme } from "@mui/material/styles";
import createStyles from "@mui/styles/createStyles";
import withStyles from "@mui/styles/withStyles";
import { Grid, IconButton, Paper, SelectChangeEvent } from "@mui/material";
import {
Divider,
Grid,
IconButton,
Paper,
SelectChangeEvent,
} from "@mui/material";
import {
createTenantCommon,
modalBasic,
wizardCommon,
formFieldStyles,
} from "../../../Common/FormComponents/common/styleLibrary";
import { AppState, useAppDispatch } from "../../../../../store";
@@ -40,6 +47,7 @@ import {
addNewMinIODomain,
isPageValid,
removeMinIODomain,
setEnvVars,
updateAddField,
} from "../createTenantSlice";
import SelectWrapper from "../../../Common/FormComponents/SelectWrapper/SelectWrapper";
@@ -86,13 +94,44 @@ const styles = (theme: Theme) =>
display: "flex",
marginBottom: 15,
},
overlayAction: {
marginLeft: 10,
envVarRow: {
display: "flex",
alignItems: "center",
justifyContent: "flex-start",
"&:last-child": {
borderBottom: 0,
},
"@media (max-width: 900px)": {
flex: 1,
"& div label": {
minWidth: 50,
},
},
},
fileItem: {
marginRight: 10,
display: "flex",
"& div label": {
minWidth: 50,
},
"@media (max-width: 900px)": {
flexFlow: "column",
},
},
rowActions: {
display: "flex",
justifyContent: "flex-end",
"@media (max-width: 900px)": {
flex: 1,
},
},
overlayAction: {
marginLeft: 10,
"& svg": {
width: 15,
height: 15,
maxWidth: 15,
maxHeight: 15,
},
"& button": {
background: "#EAEAEA",
@@ -100,6 +139,7 @@ const styles = (theme: Theme) =>
},
...modalBasic,
...wizardCommon,
...formFieldStyles,
});
const Configure = ({ classes }: IConfigureProps) => {
@@ -123,6 +163,9 @@ const Configure = ({ classes }: IConfigureProps) => {
const tenantCustom = useSelector(
(state: AppState) => state.createTenant.fields.configure.tenantCustom
);
const tenantEnvVars = useSelector(
(state: AppState) => state.createTenant.fields.configure.envVars
);
const tenantSecurityContext = useSelector(
(state: AppState) =>
state.createTenant.fields.configure.tenantSecurityContext
@@ -242,7 +285,7 @@ const Configure = ({ classes }: IConfigureProps) => {
</span>
</div>
<div className={classes.headerElement}>
<h3 className={classes.h3Section}>Services</h3>
<h4 className={classes.h3Section}>Services</h4>
<span className={classes.descriptionText}>
Whether the tenant's services should request an external IP via
LoadBalancer service type.
@@ -518,6 +561,99 @@ const Configure = ({ classes }: IConfigureProps) => {
</fieldset>
</Grid>
)}
<Divider />
<div className={classes.headerElement}>
<h3 className={classes.h3Section}>Additional Environment Variables</h3>
<span className={classes.descriptionText}>
Define additional environment variables to be used by your MinIO pods
</span>
</div>
<Grid container>
{tenantEnvVars.map((envVar, index) => (
<Grid
item
xs={12}
className={`${classes.formFieldRow} ${classes.envVarRow}`}
key={`tenant-envVar-${index.toString()}`}
>
<Grid item xs={5} className={classes.fileItem}>
<InputBoxWrapper
id="env_var_key"
name="env_var_key"
label="Key"
value={envVar.key}
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
const existingEnvVars = [...tenantEnvVars];
dispatch(
setEnvVars(
existingEnvVars.map((keyPair, i) =>
i === index
? { key: e.target.value, value: keyPair.value }
: keyPair
)
)
);
}}
index={index}
key={`env_var_key_${index.toString()}`}
/>
</Grid>
<Grid item xs={5} className={classes.fileItem}>
<InputBoxWrapper
id="env_var_value"
name="env_var_value"
label="Value"
value={envVar.value}
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
const existingEnvVars = [...tenantEnvVars];
dispatch(
setEnvVars(
existingEnvVars.map((keyPair, i) =>
i === index
? { key: keyPair.key, value: e.target.value }
: keyPair
)
)
);
}}
index={index}
key={`env_var_value_${index.toString()}`}
/>
</Grid>
<Grid item xs={2} className={classes.rowActions}>
<div className={classes.overlayAction}>
<IconButton
size={"small"}
onClick={() => {
const existingEnvVars = [...tenantEnvVars];
existingEnvVars.push({ key: "", value: "" });
dispatch(setEnvVars(existingEnvVars));
}}
disabled={index !== tenantEnvVars.length - 1}
>
<AddIcon />
</IconButton>
</div>
<div className={classes.overlayAction}>
<IconButton
size={"small"}
onClick={() => {
const existingEnvVars = tenantEnvVars.filter(
(item, fIndex) => fIndex !== index
);
dispatch(setEnvVars(existingEnvVars));
}}
disabled={tenantEnvVars.length <= 1}
>
<RemoveIcon />
</IconButton>
</div>
</Grid>
</Grid>
))}
</Grid>
</Paper>
);
};

View File

@@ -103,6 +103,7 @@ const initialState: ICreateTenant = {
exposeMinIO: true,
exposeConsole: true,
tenantCustom: false,
envVars: [{ key: "", value: "" }],
logSearchEnabled: true,
prometheusEnabled: true,
logSearchVolumeSize: "5",
@@ -746,6 +747,9 @@ export const createTenantSlice = createSlice({
setKeyValuePairs: (state, action: PayloadAction<LabelKeyPair[]>) => {
state.nodeSelectorPairs = action.payload;
},
setEnvVars: (state, action: PayloadAction<LabelKeyPair[]>) => {
state.fields.configure.envVars = action.payload;
},
setTolerationInfo: (
state,
action: PayloadAction<{
@@ -1049,6 +1053,7 @@ export const {
addFileGemaltoCa,
resetAddTenantForm,
setKeyValuePairs,
setEnvVars,
setTolerationInfo,
addNewToleration,
removeToleration,

View File

@@ -137,6 +137,7 @@ export const createTenantAsync = createAsyncThunk(
const setDomains = fields.configure.setDomains;
const minioDomains = fields.configure.minioDomains;
const consoleDomain = fields.configure.consoleDomain;
const environmentVariables = fields.configure.envVars;
let tolerations = state.createTenant.tolerations;
let namespace = state.createTenant.fields.nameTenant.namespace;
@@ -547,6 +548,7 @@ export const createTenantAsync = createAsyncThunk(
let domains: any = {};
let sendDomain: any = {};
let sendEnvironmentVariables: any = {};
if (setDomains) {
if (consoleDomain !== "") {
@@ -564,9 +566,17 @@ export const createTenantAsync = createAsyncThunk(
}
}
sendEnvironmentVariables.environmentVariables = environmentVariables
.map((envVar) => ({
key: envVar.key.trim(),
value: envVar.value.trim(),
}))
.filter((envVar) => envVar.key !== "");
dataSend = {
...dataSend,
...sendDomain,
...sendEnvironmentVariables,
idp: { ...dataIDP },
};

View File

@@ -155,6 +155,7 @@ export interface IConfigureFields {
exposeConsole: boolean;
prometheusEnabled: boolean;
tenantCustom: boolean;
envVars: LabelKeyPair[];
logSearchEnabled: boolean;
logSearchVolumeSize: string;
logSearchSizeFactor: string;

View File

@@ -382,7 +382,12 @@ const Login = () => {
key={`login-button`}
variant="callAction"
id="sso-login"
label={loginStrategy.displayNames[0]}
label={
loginStrategy.displayNames &&
loginStrategy.displayNames.length > 0
? loginStrategy.displayNames[0]
: "Login with SSO"
}
onClick={() => (window.location.href = loginStrategy.redirect[0])}
fullWidth
/>

260
restapi/admin_kms.go Normal file
View File

@@ -0,0 +1,260 @@
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package restapi
import (
"context"
"github.com/go-openapi/runtime/middleware"
"github.com/minio/console/models"
"github.com/minio/console/restapi/operations"
kmsAPI "github.com/minio/console/restapi/operations/k_m_s"
)
func registerKMSHandlers(api *operations.ConsoleAPI) {
api.KmsKMSStatusHandler = kmsAPI.KMSStatusHandlerFunc(func(params kmsAPI.KMSStatusParams, session *models.Principal) middleware.Responder {
resp, err := GetKMSStatusResponse(session, params)
if err != nil {
return kmsAPI.NewKMSStatusDefault(int(err.Code)).WithPayload(err)
}
return kmsAPI.NewKMSStatusOK().WithPayload(resp)
})
registerKMSKeyHandlers(api)
registerKMSPolicyHandlers(api)
registerKMSIdentityHandlers(api)
}
func registerKMSKeyHandlers(api *operations.ConsoleAPI) {
api.KmsKMSCreateKeyHandler = kmsAPI.KMSCreateKeyHandlerFunc(func(params kmsAPI.KMSCreateKeyParams, session *models.Principal) middleware.Responder {
err := GetKMSCreateKeyResponse(session, params)
if err != nil {
return kmsAPI.NewKMSCreateKeyDefault(int(err.Code)).WithPayload(err)
}
return kmsAPI.NewKMSCreateKeyCreated()
})
api.KmsKMSImportKeyHandler = kmsAPI.KMSImportKeyHandlerFunc(func(params kmsAPI.KMSImportKeyParams, session *models.Principal) middleware.Responder {
err := GetKMSImportKeyResponse(session, params)
if err != nil {
return kmsAPI.NewKMSImportKeyDefault(int(err.Code)).WithPayload(err)
}
return kmsAPI.NewKMSImportKeyCreated()
})
api.KmsKMSListKeysHandler = kmsAPI.KMSListKeysHandlerFunc(func(params kmsAPI.KMSListKeysParams, session *models.Principal) middleware.Responder {
resp, err := GetKMSListKeysResponse(session, params)
if err != nil {
return kmsAPI.NewKMSListKeysDefault(int(err.Code)).WithPayload(err)
}
return kmsAPI.NewKMSListKeysOK().WithPayload(resp)
})
api.KmsKMSKeyStatusHandler = kmsAPI.KMSKeyStatusHandlerFunc(func(params kmsAPI.KMSKeyStatusParams, session *models.Principal) middleware.Responder {
resp, err := GetKMSKeyStatusResponse(session, params)
if err != nil {
return kmsAPI.NewKMSKeyStatusDefault(int(err.Code)).WithPayload(err)
}
return kmsAPI.NewKMSKeyStatusOK().WithPayload(resp)
})
api.KmsKMSDeleteKeyHandler = kmsAPI.KMSDeleteKeyHandlerFunc(func(params kmsAPI.KMSDeleteKeyParams, session *models.Principal) middleware.Responder {
err := GetKMSDeleteKeyResponse(session, params)
if err != nil {
return kmsAPI.NewKMSDeleteKeyDefault(int(err.Code)).WithPayload(err)
}
return kmsAPI.NewKMSDeleteKeyOK()
})
}
func GetKMSStatusResponse(session *models.Principal, params kmsAPI.KMSStatusParams) (*models.KmsStatusResponse, *models.Error) {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
return nil, ErrorWithContext(ctx, ErrDefault)
}
func GetKMSCreateKeyResponse(session *models.Principal, params kmsAPI.KMSCreateKeyParams) *models.Error {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
return ErrorWithContext(ctx, ErrDefault)
}
func GetKMSImportKeyResponse(session *models.Principal, params kmsAPI.KMSImportKeyParams) *models.Error {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
return ErrorWithContext(ctx, ErrDefault)
}
func GetKMSListKeysResponse(session *models.Principal, params kmsAPI.KMSListKeysParams) (*models.KmsListKeysResponse, *models.Error) {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
return nil, ErrorWithContext(ctx, ErrDefault)
}
func GetKMSKeyStatusResponse(session *models.Principal, params kmsAPI.KMSKeyStatusParams) (*models.KmsKeyStatusResponse, *models.Error) {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
return nil, ErrorWithContext(ctx, ErrDefault)
}
func GetKMSDeleteKeyResponse(session *models.Principal, params kmsAPI.KMSDeleteKeyParams) *models.Error {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
return ErrorWithContext(ctx, ErrDefault)
}
func registerKMSPolicyHandlers(api *operations.ConsoleAPI) {
api.KmsKMSSetPolicyHandler = kmsAPI.KMSSetPolicyHandlerFunc(func(params kmsAPI.KMSSetPolicyParams, session *models.Principal) middleware.Responder {
err := GetKMSSetPolicyResponse(session, params)
if err != nil {
return kmsAPI.NewKMSSetPolicyDefault(int(err.Code)).WithPayload(err)
}
return kmsAPI.NewKMSSetPolicyOK()
})
api.KmsKMSAssignPolicyHandler = kmsAPI.KMSAssignPolicyHandlerFunc(func(params kmsAPI.KMSAssignPolicyParams, session *models.Principal) middleware.Responder {
err := GetKMSAssignPolicyResponse(session, params)
if err != nil {
return kmsAPI.NewKMSAssignPolicyDefault(int(err.Code)).WithPayload(err)
}
return kmsAPI.NewKMSAssignPolicyOK()
})
api.KmsKMSDescribePolicyHandler = kmsAPI.KMSDescribePolicyHandlerFunc(func(params kmsAPI.KMSDescribePolicyParams, session *models.Principal) middleware.Responder {
resp, err := GetKMSDescribePolicyResponse(session, params)
if err != nil {
return kmsAPI.NewKMSDescribePolicyDefault(int(err.Code)).WithPayload(err)
}
return kmsAPI.NewKMSDescribePolicyOK().WithPayload(resp)
})
api.KmsKMSGetPolicyHandler = kmsAPI.KMSGetPolicyHandlerFunc(func(params kmsAPI.KMSGetPolicyParams, session *models.Principal) middleware.Responder {
resp, err := GetKMSGetPolicyResponse(session, params)
if err != nil {
return kmsAPI.NewKMSGetPolicyDefault(int(err.Code)).WithPayload(err)
}
return kmsAPI.NewKMSGetPolicyOK().WithPayload(resp)
})
api.KmsKMSListPoliciesHandler = kmsAPI.KMSListPoliciesHandlerFunc(func(params kmsAPI.KMSListPoliciesParams, session *models.Principal) middleware.Responder {
resp, err := GetKMSListPoliciesResponse(session, params)
if err != nil {
return kmsAPI.NewKMSListPoliciesDefault(int(err.Code)).WithPayload(err)
}
return kmsAPI.NewKMSListPoliciesOK().WithPayload(resp)
})
api.KmsKMSDeletePolicyHandler = kmsAPI.KMSDeletePolicyHandlerFunc(func(params kmsAPI.KMSDeletePolicyParams, session *models.Principal) middleware.Responder {
err := GetKMSDeletePolicyResponse(session, params)
if err != nil {
return kmsAPI.NewKMSDeletePolicyDefault(int(err.Code)).WithPayload(err)
}
return kmsAPI.NewKMSDeletePolicyOK()
})
}
func GetKMSSetPolicyResponse(session *models.Principal, params kmsAPI.KMSSetPolicyParams) *models.Error {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
return ErrorWithContext(ctx, ErrDefault)
}
func GetKMSAssignPolicyResponse(session *models.Principal, params kmsAPI.KMSAssignPolicyParams) *models.Error {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
return ErrorWithContext(ctx, ErrDefault)
}
func GetKMSDescribePolicyResponse(session *models.Principal, params kmsAPI.KMSDescribePolicyParams) (*models.KmsDescribePolicyResponse, *models.Error) {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
return nil, ErrorWithContext(ctx, ErrDefault)
}
func GetKMSGetPolicyResponse(session *models.Principal, params kmsAPI.KMSGetPolicyParams) (*models.KmsGetPolicyResponse, *models.Error) {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
return nil, ErrorWithContext(ctx, ErrDefault)
}
func GetKMSListPoliciesResponse(session *models.Principal, params kmsAPI.KMSListPoliciesParams) (*models.KmsListPoliciesResponse, *models.Error) {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
return nil, ErrorWithContext(ctx, ErrDefault)
}
func GetKMSDeletePolicyResponse(session *models.Principal, params kmsAPI.KMSDeletePolicyParams) *models.Error {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
return ErrorWithContext(ctx, ErrDefault)
}
func registerKMSIdentityHandlers(api *operations.ConsoleAPI) {
api.KmsKMSDescribeIdentityHandler = kmsAPI.KMSDescribeIdentityHandlerFunc(func(params kmsAPI.KMSDescribeIdentityParams, session *models.Principal) middleware.Responder {
resp, err := GetKMSDescribeIdentityResponse(session, params)
if err != nil {
return kmsAPI.NewKMSDescribeIdentityDefault(int(err.Code)).WithPayload(err)
}
return kmsAPI.NewKMSDescribeIdentityOK().WithPayload(resp)
})
api.KmsKMSDescribeSelfIdentityHandler = kmsAPI.KMSDescribeSelfIdentityHandlerFunc(func(params kmsAPI.KMSDescribeSelfIdentityParams, session *models.Principal) middleware.Responder {
resp, err := GetKMSDescribeSelfIdentityResponse(session, params)
if err != nil {
return kmsAPI.NewKMSDescribeSelfIdentityDefault(int(err.Code)).WithPayload(err)
}
return kmsAPI.NewKMSDescribeSelfIdentityOK().WithPayload(resp)
})
api.KmsKMSListIdentitiesHandler = kmsAPI.KMSListIdentitiesHandlerFunc(func(params kmsAPI.KMSListIdentitiesParams, session *models.Principal) middleware.Responder {
resp, err := GetKMSListIdentitiesResponse(session, params)
if err != nil {
return kmsAPI.NewKMSListIdentitiesDefault(int(err.Code)).WithPayload(err)
}
return kmsAPI.NewKMSListIdentitiesOK().WithPayload(resp)
})
api.KmsKMSDeleteIdentityHandler = kmsAPI.KMSDeleteIdentityHandlerFunc(func(params kmsAPI.KMSDeleteIdentityParams, session *models.Principal) middleware.Responder {
err := GetKMSDeleteIdentityResponse(session, params)
if err != nil {
return kmsAPI.NewKMSDeleteIdentityDefault(int(err.Code)).WithPayload(err)
}
return kmsAPI.NewKMSDeleteIdentityOK()
})
}
func GetKMSDescribeIdentityResponse(session *models.Principal, params kmsAPI.KMSDescribeIdentityParams) (*models.KmsDescribeIdentityResponse, *models.Error) {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
return nil, ErrorWithContext(ctx, ErrDefault)
}
func GetKMSDescribeSelfIdentityResponse(session *models.Principal, params kmsAPI.KMSDescribeSelfIdentityParams) (*models.KmsDescribeSelfIdentityResponse, *models.Error) {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
return nil, ErrorWithContext(ctx, ErrDefault)
}
func GetKMSListIdentitiesResponse(session *models.Principal, params kmsAPI.KMSListIdentitiesParams) (*models.KmsListIdentitiesResponse, *models.Error) {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
return nil, ErrorWithContext(ctx, ErrDefault)
}
func GetKMSDeleteIdentityResponse(session *models.Principal, params kmsAPI.KMSDeleteIdentityParams) *models.Error {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
return ErrorWithContext(ctx, ErrDefault)
}

297
restapi/admin_kms_test.go Normal file
View File

@@ -0,0 +1,297 @@
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package restapi
import (
"net/http"
"testing"
"github.com/minio/console/models"
"github.com/minio/console/restapi/operations"
kmsAPI "github.com/minio/console/restapi/operations/k_m_s"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
)
type KMSTestSuite struct {
suite.Suite
assert *assert.Assertions
}
func (suite *KMSTestSuite) SetupSuite() {
suite.assert = assert.New(suite.T())
}
func (suite *KMSTestSuite) TearDownSuite() {
}
func (suite *KMSTestSuite) TestRegisterKMSHandlers() {
api := &operations.ConsoleAPI{}
suite.assertHandlersAreNil(api)
registerKMSHandlers(api)
suite.assertHandlersAreNotNil(api)
}
func (suite *KMSTestSuite) assertHandlersAreNil(api *operations.ConsoleAPI) {
suite.assert.Nil(api.KmsKMSStatusHandler)
suite.assert.Nil(api.KmsKMSCreateKeyHandler)
suite.assert.Nil(api.KmsKMSImportKeyHandler)
suite.assert.Nil(api.KmsKMSListKeysHandler)
suite.assert.Nil(api.KmsKMSKeyStatusHandler)
suite.assert.Nil(api.KmsKMSDeleteKeyHandler)
suite.assert.Nil(api.KmsKMSSetPolicyHandler)
suite.assert.Nil(api.KmsKMSAssignPolicyHandler)
suite.assert.Nil(api.KmsKMSDescribePolicyHandler)
suite.assert.Nil(api.KmsKMSGetPolicyHandler)
suite.assert.Nil(api.KmsKMSListPoliciesHandler)
suite.assert.Nil(api.KmsKMSDeletePolicyHandler)
suite.assert.Nil(api.KmsKMSDescribeIdentityHandler)
suite.assert.Nil(api.KmsKMSDescribeSelfIdentityHandler)
suite.assert.Nil(api.KmsKMSListIdentitiesHandler)
suite.assert.Nil(api.KmsKMSDeleteIdentityHandler)
}
func (suite *KMSTestSuite) assertHandlersAreNotNil(api *operations.ConsoleAPI) {
suite.assert.NotNil(api.KmsKMSStatusHandler)
suite.assert.NotNil(api.KmsKMSCreateKeyHandler)
suite.assert.NotNil(api.KmsKMSImportKeyHandler)
suite.assert.NotNil(api.KmsKMSListKeysHandler)
suite.assert.NotNil(api.KmsKMSKeyStatusHandler)
suite.assert.NotNil(api.KmsKMSDeleteKeyHandler)
suite.assert.NotNil(api.KmsKMSSetPolicyHandler)
suite.assert.NotNil(api.KmsKMSAssignPolicyHandler)
suite.assert.NotNil(api.KmsKMSDescribePolicyHandler)
suite.assert.NotNil(api.KmsKMSGetPolicyHandler)
suite.assert.NotNil(api.KmsKMSListPoliciesHandler)
suite.assert.NotNil(api.KmsKMSDeletePolicyHandler)
suite.assert.NotNil(api.KmsKMSDescribeIdentityHandler)
suite.assert.NotNil(api.KmsKMSDescribeSelfIdentityHandler)
suite.assert.NotNil(api.KmsKMSListIdentitiesHandler)
suite.assert.NotNil(api.KmsKMSDeleteIdentityHandler)
}
func (suite *KMSTestSuite) TestKMSStatusHandlerWithError() {
params, api := suite.initKMSStatusRequest()
response := api.KmsKMSStatusHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSStatusDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSStatusRequest() (params kmsAPI.KMSStatusParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSCreateKeyHandlerWithError() {
params, api := suite.initKMSCreateKeyRequest()
response := api.KmsKMSCreateKeyHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSCreateKeyDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSCreateKeyRequest() (params kmsAPI.KMSCreateKeyParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSImportKeyHandlerWithError() {
params, api := suite.initKMSImportKeyRequest()
response := api.KmsKMSImportKeyHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSImportKeyDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSImportKeyRequest() (params kmsAPI.KMSImportKeyParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSListKeysHandlerWithError() {
params, api := suite.initKMSListKeysRequest()
response := api.KmsKMSListKeysHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSListKeysDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSListKeysRequest() (params kmsAPI.KMSListKeysParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSKeyStatusHandlerWithError() {
params, api := suite.initKMSKeyStatusRequest()
response := api.KmsKMSKeyStatusHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSKeyStatusDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSKeyStatusRequest() (params kmsAPI.KMSKeyStatusParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSDeleteKeyHandlerWithError() {
params, api := suite.initKMSDeleteKeyRequest()
response := api.KmsKMSDeleteKeyHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSDeleteKeyDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSDeleteKeyRequest() (params kmsAPI.KMSDeleteKeyParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSSetPolicyHandlerWithError() {
params, api := suite.initKMSSetPolicyRequest()
response := api.KmsKMSSetPolicyHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSSetPolicyDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSSetPolicyRequest() (params kmsAPI.KMSSetPolicyParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSAssignPolicyHandlerWithError() {
params, api := suite.initKMSAssignPolicyRequest()
response := api.KmsKMSAssignPolicyHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSAssignPolicyDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSAssignPolicyRequest() (params kmsAPI.KMSAssignPolicyParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSDescribePolicyHandlerWithError() {
params, api := suite.initKMSDescribePolicyRequest()
response := api.KmsKMSDescribePolicyHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSDescribePolicyDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSDescribePolicyRequest() (params kmsAPI.KMSDescribePolicyParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSGetPolicyHandlerWithError() {
params, api := suite.initKMSGetPolicyRequest()
response := api.KmsKMSGetPolicyHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSGetPolicyDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSGetPolicyRequest() (params kmsAPI.KMSGetPolicyParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSListPoliciesHandlerWithError() {
params, api := suite.initKMSListPoliciesRequest()
response := api.KmsKMSListPoliciesHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSListPoliciesDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSListPoliciesRequest() (params kmsAPI.KMSListPoliciesParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSDeletePolicyHandlerWithError() {
params, api := suite.initKMSDeletePolicyRequest()
response := api.KmsKMSDeletePolicyHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSDeletePolicyDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSDeletePolicyRequest() (params kmsAPI.KMSDeletePolicyParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSDescribeIdentityHandlerWithError() {
params, api := suite.initKMSDescribeIdentityRequest()
response := api.KmsKMSDescribeIdentityHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSDescribeIdentityDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSDescribeIdentityRequest() (params kmsAPI.KMSDescribeIdentityParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSDescribeSelfIdentityHandlerWithError() {
params, api := suite.initKMSDescribeSelfIdentityRequest()
response := api.KmsKMSDescribeSelfIdentityHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSDescribeSelfIdentityDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSDescribeSelfIdentityRequest() (params kmsAPI.KMSDescribeSelfIdentityParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSListIdentitiesHandlerWithError() {
params, api := suite.initKMSListIdentitiesRequest()
response := api.KmsKMSListIdentitiesHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSListIdentitiesDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSListIdentitiesRequest() (params kmsAPI.KMSListIdentitiesParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func (suite *KMSTestSuite) TestKMSDeleteIdentityHandlerWithError() {
params, api := suite.initKMSDeleteIdentityRequest()
response := api.KmsKMSDeleteIdentityHandler.Handle(params, &models.Principal{})
_, ok := response.(*kmsAPI.KMSDeleteIdentityDefault)
suite.assert.True(ok)
}
func (suite *KMSTestSuite) initKMSDeleteIdentityRequest() (params kmsAPI.KMSDeleteIdentityParams, api operations.ConsoleAPI) {
registerKMSHandlers(&api)
params.HTTPRequest = &http.Request{}
return params, api
}
func TestKMS(t *testing.T) {
suite.Run(t, new(KMSTestSuite))
}

View File

@@ -137,6 +137,8 @@ func configureAPI(api *operations.ConsoleAPI) http.Handler {
registerLogSearchHandlers(api)
// Register admin subnet handlers
registerSubnetHandlers(api)
// Register admin KMS handlers
registerKMSHandlers(api)
// Register Account handlers
registerAdminTiersHandlers(api)
// Register Inspect Handler

File diff suppressed because it is too large Load Diff

View File

@@ -44,6 +44,7 @@ import (
"github.com/minio/console/restapi/operations/configuration"
"github.com/minio/console/restapi/operations/group"
"github.com/minio/console/restapi/operations/inspect"
"github.com/minio/console/restapi/operations/k_m_s"
"github.com/minio/console/restapi/operations/logging"
"github.com/minio/console/restapi/operations/object"
"github.com/minio/console/restapi/operations/policy"
@@ -264,6 +265,54 @@ func NewConsoleAPI(spec *loads.Document) *ConsoleAPI {
InspectInspectHandler: inspect.InspectHandlerFunc(func(params inspect.InspectParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation inspect.Inspect has not yet been implemented")
}),
KmsKMSAssignPolicyHandler: k_m_s.KMSAssignPolicyHandlerFunc(func(params k_m_s.KMSAssignPolicyParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSAssignPolicy has not yet been implemented")
}),
KmsKMSCreateKeyHandler: k_m_s.KMSCreateKeyHandlerFunc(func(params k_m_s.KMSCreateKeyParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSCreateKey has not yet been implemented")
}),
KmsKMSDeleteIdentityHandler: k_m_s.KMSDeleteIdentityHandlerFunc(func(params k_m_s.KMSDeleteIdentityParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSDeleteIdentity has not yet been implemented")
}),
KmsKMSDeleteKeyHandler: k_m_s.KMSDeleteKeyHandlerFunc(func(params k_m_s.KMSDeleteKeyParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSDeleteKey has not yet been implemented")
}),
KmsKMSDeletePolicyHandler: k_m_s.KMSDeletePolicyHandlerFunc(func(params k_m_s.KMSDeletePolicyParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSDeletePolicy has not yet been implemented")
}),
KmsKMSDescribeIdentityHandler: k_m_s.KMSDescribeIdentityHandlerFunc(func(params k_m_s.KMSDescribeIdentityParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSDescribeIdentity has not yet been implemented")
}),
KmsKMSDescribePolicyHandler: k_m_s.KMSDescribePolicyHandlerFunc(func(params k_m_s.KMSDescribePolicyParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSDescribePolicy has not yet been implemented")
}),
KmsKMSDescribeSelfIdentityHandler: k_m_s.KMSDescribeSelfIdentityHandlerFunc(func(params k_m_s.KMSDescribeSelfIdentityParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSDescribeSelfIdentity has not yet been implemented")
}),
KmsKMSGetPolicyHandler: k_m_s.KMSGetPolicyHandlerFunc(func(params k_m_s.KMSGetPolicyParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSGetPolicy has not yet been implemented")
}),
KmsKMSImportKeyHandler: k_m_s.KMSImportKeyHandlerFunc(func(params k_m_s.KMSImportKeyParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSImportKey has not yet been implemented")
}),
KmsKMSKeyStatusHandler: k_m_s.KMSKeyStatusHandlerFunc(func(params k_m_s.KMSKeyStatusParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSKeyStatus has not yet been implemented")
}),
KmsKMSListIdentitiesHandler: k_m_s.KMSListIdentitiesHandlerFunc(func(params k_m_s.KMSListIdentitiesParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSListIdentities has not yet been implemented")
}),
KmsKMSListKeysHandler: k_m_s.KMSListKeysHandlerFunc(func(params k_m_s.KMSListKeysParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSListKeys has not yet been implemented")
}),
KmsKMSListPoliciesHandler: k_m_s.KMSListPoliciesHandlerFunc(func(params k_m_s.KMSListPoliciesParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSListPolicies has not yet been implemented")
}),
KmsKMSSetPolicyHandler: k_m_s.KMSSetPolicyHandlerFunc(func(params k_m_s.KMSSetPolicyParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSSetPolicy has not yet been implemented")
}),
KmsKMSStatusHandler: k_m_s.KMSStatusHandlerFunc(func(params k_m_s.KMSStatusParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation k_m_s.KMSStatus has not yet been implemented")
}),
UserListAUserServiceAccountsHandler: user.ListAUserServiceAccountsHandlerFunc(func(params user.ListAUserServiceAccountsParams, principal *models.Principal) middleware.Responder {
return middleware.NotImplemented("operation user.ListAUserServiceAccounts has not yet been implemented")
}),
@@ -637,6 +686,38 @@ type ConsoleAPI struct {
GroupGroupInfoHandler group.GroupInfoHandler
// InspectInspectHandler sets the operation handler for the inspect operation
InspectInspectHandler inspect.InspectHandler
// KmsKMSAssignPolicyHandler sets the operation handler for the k m s assign policy operation
KmsKMSAssignPolicyHandler k_m_s.KMSAssignPolicyHandler
// KmsKMSCreateKeyHandler sets the operation handler for the k m s create key operation
KmsKMSCreateKeyHandler k_m_s.KMSCreateKeyHandler
// KmsKMSDeleteIdentityHandler sets the operation handler for the k m s delete identity operation
KmsKMSDeleteIdentityHandler k_m_s.KMSDeleteIdentityHandler
// KmsKMSDeleteKeyHandler sets the operation handler for the k m s delete key operation
KmsKMSDeleteKeyHandler k_m_s.KMSDeleteKeyHandler
// KmsKMSDeletePolicyHandler sets the operation handler for the k m s delete policy operation
KmsKMSDeletePolicyHandler k_m_s.KMSDeletePolicyHandler
// KmsKMSDescribeIdentityHandler sets the operation handler for the k m s describe identity operation
KmsKMSDescribeIdentityHandler k_m_s.KMSDescribeIdentityHandler
// KmsKMSDescribePolicyHandler sets the operation handler for the k m s describe policy operation
KmsKMSDescribePolicyHandler k_m_s.KMSDescribePolicyHandler
// KmsKMSDescribeSelfIdentityHandler sets the operation handler for the k m s describe self identity operation
KmsKMSDescribeSelfIdentityHandler k_m_s.KMSDescribeSelfIdentityHandler
// KmsKMSGetPolicyHandler sets the operation handler for the k m s get policy operation
KmsKMSGetPolicyHandler k_m_s.KMSGetPolicyHandler
// KmsKMSImportKeyHandler sets the operation handler for the k m s import key operation
KmsKMSImportKeyHandler k_m_s.KMSImportKeyHandler
// KmsKMSKeyStatusHandler sets the operation handler for the k m s key status operation
KmsKMSKeyStatusHandler k_m_s.KMSKeyStatusHandler
// KmsKMSListIdentitiesHandler sets the operation handler for the k m s list identities operation
KmsKMSListIdentitiesHandler k_m_s.KMSListIdentitiesHandler
// KmsKMSListKeysHandler sets the operation handler for the k m s list keys operation
KmsKMSListKeysHandler k_m_s.KMSListKeysHandler
// KmsKMSListPoliciesHandler sets the operation handler for the k m s list policies operation
KmsKMSListPoliciesHandler k_m_s.KMSListPoliciesHandler
// KmsKMSSetPolicyHandler sets the operation handler for the k m s set policy operation
KmsKMSSetPolicyHandler k_m_s.KMSSetPolicyHandler
// KmsKMSStatusHandler sets the operation handler for the k m s status operation
KmsKMSStatusHandler k_m_s.KMSStatusHandler
// UserListAUserServiceAccountsHandler sets the operation handler for the list a user service accounts operation
UserListAUserServiceAccountsHandler user.ListAUserServiceAccountsHandler
// BucketListAccessRulesWithBucketHandler sets the operation handler for the list access rules with bucket operation
@@ -1037,6 +1118,54 @@ func (o *ConsoleAPI) Validate() error {
if o.InspectInspectHandler == nil {
unregistered = append(unregistered, "inspect.InspectHandler")
}
if o.KmsKMSAssignPolicyHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSAssignPolicyHandler")
}
if o.KmsKMSCreateKeyHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSCreateKeyHandler")
}
if o.KmsKMSDeleteIdentityHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSDeleteIdentityHandler")
}
if o.KmsKMSDeleteKeyHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSDeleteKeyHandler")
}
if o.KmsKMSDeletePolicyHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSDeletePolicyHandler")
}
if o.KmsKMSDescribeIdentityHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSDescribeIdentityHandler")
}
if o.KmsKMSDescribePolicyHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSDescribePolicyHandler")
}
if o.KmsKMSDescribeSelfIdentityHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSDescribeSelfIdentityHandler")
}
if o.KmsKMSGetPolicyHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSGetPolicyHandler")
}
if o.KmsKMSImportKeyHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSImportKeyHandler")
}
if o.KmsKMSKeyStatusHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSKeyStatusHandler")
}
if o.KmsKMSListIdentitiesHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSListIdentitiesHandler")
}
if o.KmsKMSListKeysHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSListKeysHandler")
}
if o.KmsKMSListPoliciesHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSListPoliciesHandler")
}
if o.KmsKMSSetPolicyHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSSetPolicyHandler")
}
if o.KmsKMSStatusHandler == nil {
unregistered = append(unregistered, "k_m_s.KMSStatusHandler")
}
if o.UserListAUserServiceAccountsHandler == nil {
unregistered = append(unregistered, "user.ListAUserServiceAccountsHandler")
}
@@ -1576,6 +1705,70 @@ func (o *ConsoleAPI) initHandlerCache() {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/admin/inspect"] = inspect.NewInspect(o.context, o.InspectInspectHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/kms/policy/{name}/assign"] = k_m_s.NewKMSAssignPolicy(o.context, o.KmsKMSAssignPolicyHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/kms/key"] = k_m_s.NewKMSCreateKey(o.context, o.KmsKMSCreateKeyHandler)
if o.handlers["DELETE"] == nil {
o.handlers["DELETE"] = make(map[string]http.Handler)
}
o.handlers["DELETE"]["/kms/identity/{name}"] = k_m_s.NewKMSDeleteIdentity(o.context, o.KmsKMSDeleteIdentityHandler)
if o.handlers["DELETE"] == nil {
o.handlers["DELETE"] = make(map[string]http.Handler)
}
o.handlers["DELETE"]["/kms/key/{name}"] = k_m_s.NewKMSDeleteKey(o.context, o.KmsKMSDeleteKeyHandler)
if o.handlers["DELETE"] == nil {
o.handlers["DELETE"] = make(map[string]http.Handler)
}
o.handlers["DELETE"]["/kms/policy/{name}"] = k_m_s.NewKMSDeletePolicy(o.context, o.KmsKMSDeletePolicyHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/kms/identity/{name}/describe"] = k_m_s.NewKMSDescribeIdentity(o.context, o.KmsKMSDescribeIdentityHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/kms/policy/{name}/describe"] = k_m_s.NewKMSDescribePolicy(o.context, o.KmsKMSDescribePolicyHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/kms/describe-self/identity"] = k_m_s.NewKMSDescribeSelfIdentity(o.context, o.KmsKMSDescribeSelfIdentityHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/kms/policy/{name}"] = k_m_s.NewKMSGetPolicy(o.context, o.KmsKMSGetPolicyHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/kms/key/{name}/import"] = k_m_s.NewKMSImportKey(o.context, o.KmsKMSImportKeyHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/kms/key/{name}"] = k_m_s.NewKMSKeyStatus(o.context, o.KmsKMSKeyStatusHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/kms/identity"] = k_m_s.NewKMSListIdentities(o.context, o.KmsKMSListIdentitiesHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/kms/key"] = k_m_s.NewKMSListKeys(o.context, o.KmsKMSListKeysHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/kms/policy"] = k_m_s.NewKMSListPolicies(o.context, o.KmsKMSListPoliciesHandler)
if o.handlers["POST"] == nil {
o.handlers["POST"] = make(map[string]http.Handler)
}
o.handlers["POST"]["/kms/policy"] = k_m_s.NewKMSSetPolicy(o.context, o.KmsKMSSetPolicyHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}
o.handlers["GET"]["/kms/status"] = k_m_s.NewKMSStatus(o.context, o.KmsKMSStatusHandler)
if o.handlers["GET"] == nil {
o.handlers["GET"] = make(map[string]http.Handler)
}

View File

@@ -0,0 +1,88 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"net/http"
"github.com/go-openapi/runtime/middleware"
"github.com/minio/console/models"
)
// KMSAssignPolicyHandlerFunc turns a function with the right signature into a k m s assign policy handler
type KMSAssignPolicyHandlerFunc func(KMSAssignPolicyParams, *models.Principal) middleware.Responder
// Handle executing the request and returning a response
func (fn KMSAssignPolicyHandlerFunc) Handle(params KMSAssignPolicyParams, principal *models.Principal) middleware.Responder {
return fn(params, principal)
}
// KMSAssignPolicyHandler interface for that can handle valid k m s assign policy params
type KMSAssignPolicyHandler interface {
Handle(KMSAssignPolicyParams, *models.Principal) middleware.Responder
}
// NewKMSAssignPolicy creates a new http.Handler for the k m s assign policy operation
func NewKMSAssignPolicy(ctx *middleware.Context, handler KMSAssignPolicyHandler) *KMSAssignPolicy {
return &KMSAssignPolicy{Context: ctx, Handler: handler}
}
/*
KMSAssignPolicy swagger:route POST /kms/policy/{name}/assign KMS kMSAssignPolicy
KMS assign policy
*/
type KMSAssignPolicy struct {
Context *middleware.Context
Handler KMSAssignPolicyHandler
}
func (o *KMSAssignPolicy) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
route, rCtx, _ := o.Context.RouteInfo(r)
if rCtx != nil {
*r = *rCtx
}
var Params = NewKMSAssignPolicyParams()
uprinc, aCtx, err := o.Context.Authorize(r, route)
if err != nil {
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
if aCtx != nil {
*r = *aCtx
}
var principal *models.Principal
if uprinc != nil {
principal = uprinc.(*models.Principal) // this is really a models.Principal, I promise
}
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
res := o.Handler.Handle(Params, principal) // actually handle the request
o.Context.Respond(rw, r, route.Produces, route, res)
}

View File

@@ -0,0 +1,114 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"io"
"net/http"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
"github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/strfmt"
"github.com/minio/console/models"
)
// NewKMSAssignPolicyParams creates a new KMSAssignPolicyParams object
//
// There are no default values defined in the spec.
func NewKMSAssignPolicyParams() KMSAssignPolicyParams {
return KMSAssignPolicyParams{}
}
// KMSAssignPolicyParams contains all the bound params for the k m s assign policy operation
// typically these are obtained from a http.Request
//
// swagger:parameters KMSAssignPolicy
type KMSAssignPolicyParams struct {
// HTTP Request Object
HTTPRequest *http.Request `json:"-"`
/*
Required: true
In: body
*/
Body models.KmsAssignPolicyRequest
/*KMS policy name
Required: true
In: path
*/
Name string
}
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
// for simple values it will use straight method calls.
//
// To ensure default values, the struct must have been initialized with NewKMSAssignPolicyParams() beforehand.
func (o *KMSAssignPolicyParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
var res []error
o.HTTPRequest = r
if runtime.HasBody(r) {
defer r.Body.Close()
var body models.KmsAssignPolicyRequest
if err := route.Consumer.Consume(r.Body, &body); err != nil {
if err == io.EOF {
res = append(res, errors.Required("body", "body", ""))
} else {
res = append(res, errors.NewParseError("body", "body", "", err))
}
} else {
// no validation on generic interface
o.Body = body
}
} else {
res = append(res, errors.Required("body", "body", ""))
}
rName, rhkName, _ := route.Params.GetOK("name")
if err := o.bindName(rName, rhkName, route.Formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindName binds and validates parameter Name from path.
func (o *KMSAssignPolicyParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error {
var raw string
if len(rawData) > 0 {
raw = rawData[len(rawData)-1]
}
// Required: true
// Parameter is provided by construction from the route
o.Name = raw
return nil
}

View File

@@ -0,0 +1,115 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/runtime"
"github.com/minio/console/models"
)
// KMSAssignPolicyOKCode is the HTTP code returned for type KMSAssignPolicyOK
const KMSAssignPolicyOKCode int = 200
/*
KMSAssignPolicyOK A successful response.
swagger:response kMSAssignPolicyOK
*/
type KMSAssignPolicyOK struct {
}
// NewKMSAssignPolicyOK creates KMSAssignPolicyOK with default headers values
func NewKMSAssignPolicyOK() *KMSAssignPolicyOK {
return &KMSAssignPolicyOK{}
}
// WriteResponse to the client
func (o *KMSAssignPolicyOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(200)
}
/*
KMSAssignPolicyDefault Generic error response.
swagger:response kMSAssignPolicyDefault
*/
type KMSAssignPolicyDefault struct {
_statusCode int
/*
In: Body
*/
Payload *models.Error `json:"body,omitempty"`
}
// NewKMSAssignPolicyDefault creates KMSAssignPolicyDefault with default headers values
func NewKMSAssignPolicyDefault(code int) *KMSAssignPolicyDefault {
if code <= 0 {
code = 500
}
return &KMSAssignPolicyDefault{
_statusCode: code,
}
}
// WithStatusCode adds the status to the k m s assign policy default response
func (o *KMSAssignPolicyDefault) WithStatusCode(code int) *KMSAssignPolicyDefault {
o._statusCode = code
return o
}
// SetStatusCode sets the status to the k m s assign policy default response
func (o *KMSAssignPolicyDefault) SetStatusCode(code int) {
o._statusCode = code
}
// WithPayload adds the payload to the k m s assign policy default response
func (o *KMSAssignPolicyDefault) WithPayload(payload *models.Error) *KMSAssignPolicyDefault {
o.Payload = payload
return o
}
// SetPayload sets the payload to the k m s assign policy default response
func (o *KMSAssignPolicyDefault) SetPayload(payload *models.Error) {
o.Payload = payload
}
// WriteResponse to the client
func (o *KMSAssignPolicyDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(o._statusCode)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}

View File

@@ -0,0 +1,116 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"errors"
"net/url"
golangswaggerpaths "path"
"strings"
)
// KMSAssignPolicyURL generates an URL for the k m s assign policy operation
type KMSAssignPolicyURL struct {
Name string
_basePath string
// avoid unkeyed usage
_ struct{}
}
// WithBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSAssignPolicyURL) WithBasePath(bp string) *KMSAssignPolicyURL {
o.SetBasePath(bp)
return o
}
// SetBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSAssignPolicyURL) SetBasePath(bp string) {
o._basePath = bp
}
// Build a url path and query string
func (o *KMSAssignPolicyURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/kms/policy/{name}/assign"
name := o.Name
if name != "" {
_path = strings.Replace(_path, "{name}", name, -1)
} else {
return nil, errors.New("name is required on KMSAssignPolicyURL")
}
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil
}
// Must is a helper function to panic when the url builder returns an error
func (o *KMSAssignPolicyURL) Must(u *url.URL, err error) *url.URL {
if err != nil {
panic(err)
}
if u == nil {
panic("url can't be nil")
}
return u
}
// String returns the string representation of the path with query string
func (o *KMSAssignPolicyURL) String() string {
return o.Must(o.Build()).String()
}
// BuildFull builds a full url with scheme, host, path and query string
func (o *KMSAssignPolicyURL) BuildFull(scheme, host string) (*url.URL, error) {
if scheme == "" {
return nil, errors.New("scheme is required for a full url on KMSAssignPolicyURL")
}
if host == "" {
return nil, errors.New("host is required for a full url on KMSAssignPolicyURL")
}
base, err := o.Build()
if err != nil {
return nil, err
}
base.Scheme = scheme
base.Host = host
return base, nil
}
// StringFull returns the string representation of a complete url
func (o *KMSAssignPolicyURL) StringFull(scheme, host string) string {
return o.Must(o.BuildFull(scheme, host)).String()
}

View File

@@ -0,0 +1,88 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"net/http"
"github.com/go-openapi/runtime/middleware"
"github.com/minio/console/models"
)
// KMSCreateKeyHandlerFunc turns a function with the right signature into a k m s create key handler
type KMSCreateKeyHandlerFunc func(KMSCreateKeyParams, *models.Principal) middleware.Responder
// Handle executing the request and returning a response
func (fn KMSCreateKeyHandlerFunc) Handle(params KMSCreateKeyParams, principal *models.Principal) middleware.Responder {
return fn(params, principal)
}
// KMSCreateKeyHandler interface for that can handle valid k m s create key params
type KMSCreateKeyHandler interface {
Handle(KMSCreateKeyParams, *models.Principal) middleware.Responder
}
// NewKMSCreateKey creates a new http.Handler for the k m s create key operation
func NewKMSCreateKey(ctx *middleware.Context, handler KMSCreateKeyHandler) *KMSCreateKey {
return &KMSCreateKey{Context: ctx, Handler: handler}
}
/*
KMSCreateKey swagger:route POST /kms/key KMS kMSCreateKey
KMS create key
*/
type KMSCreateKey struct {
Context *middleware.Context
Handler KMSCreateKeyHandler
}
func (o *KMSCreateKey) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
route, rCtx, _ := o.Context.RouteInfo(r)
if rCtx != nil {
*r = *rCtx
}
var Params = NewKMSCreateKeyParams()
uprinc, aCtx, err := o.Context.Authorize(r, route)
if err != nil {
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
if aCtx != nil {
*r = *aCtx
}
var principal *models.Principal
if uprinc != nil {
principal = uprinc.(*models.Principal) // this is really a models.Principal, I promise
}
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
res := o.Handler.Handle(Params, principal) // actually handle the request
o.Context.Respond(rw, r, route.Produces, route, res)
}

View File

@@ -0,0 +1,89 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"io"
"net/http"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
"github.com/go-openapi/runtime/middleware"
"github.com/minio/console/models"
)
// NewKMSCreateKeyParams creates a new KMSCreateKeyParams object
//
// There are no default values defined in the spec.
func NewKMSCreateKeyParams() KMSCreateKeyParams {
return KMSCreateKeyParams{}
}
// KMSCreateKeyParams contains all the bound params for the k m s create key operation
// typically these are obtained from a http.Request
//
// swagger:parameters KMSCreateKey
type KMSCreateKeyParams struct {
// HTTP Request Object
HTTPRequest *http.Request `json:"-"`
/*
Required: true
In: body
*/
Body models.KmsCreateKeyRequest
}
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
// for simple values it will use straight method calls.
//
// To ensure default values, the struct must have been initialized with NewKMSCreateKeyParams() beforehand.
func (o *KMSCreateKeyParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
var res []error
o.HTTPRequest = r
if runtime.HasBody(r) {
defer r.Body.Close()
var body models.KmsCreateKeyRequest
if err := route.Consumer.Consume(r.Body, &body); err != nil {
if err == io.EOF {
res = append(res, errors.Required("body", "body", ""))
} else {
res = append(res, errors.NewParseError("body", "body", "", err))
}
} else {
// no validation on generic interface
o.Body = body
}
} else {
res = append(res, errors.Required("body", "body", ""))
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}

View File

@@ -0,0 +1,115 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/runtime"
"github.com/minio/console/models"
)
// KMSCreateKeyCreatedCode is the HTTP code returned for type KMSCreateKeyCreated
const KMSCreateKeyCreatedCode int = 201
/*
KMSCreateKeyCreated A successful response.
swagger:response kMSCreateKeyCreated
*/
type KMSCreateKeyCreated struct {
}
// NewKMSCreateKeyCreated creates KMSCreateKeyCreated with default headers values
func NewKMSCreateKeyCreated() *KMSCreateKeyCreated {
return &KMSCreateKeyCreated{}
}
// WriteResponse to the client
func (o *KMSCreateKeyCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(201)
}
/*
KMSCreateKeyDefault Generic error response.
swagger:response kMSCreateKeyDefault
*/
type KMSCreateKeyDefault struct {
_statusCode int
/*
In: Body
*/
Payload *models.Error `json:"body,omitempty"`
}
// NewKMSCreateKeyDefault creates KMSCreateKeyDefault with default headers values
func NewKMSCreateKeyDefault(code int) *KMSCreateKeyDefault {
if code <= 0 {
code = 500
}
return &KMSCreateKeyDefault{
_statusCode: code,
}
}
// WithStatusCode adds the status to the k m s create key default response
func (o *KMSCreateKeyDefault) WithStatusCode(code int) *KMSCreateKeyDefault {
o._statusCode = code
return o
}
// SetStatusCode sets the status to the k m s create key default response
func (o *KMSCreateKeyDefault) SetStatusCode(code int) {
o._statusCode = code
}
// WithPayload adds the payload to the k m s create key default response
func (o *KMSCreateKeyDefault) WithPayload(payload *models.Error) *KMSCreateKeyDefault {
o.Payload = payload
return o
}
// SetPayload sets the payload to the k m s create key default response
func (o *KMSCreateKeyDefault) SetPayload(payload *models.Error) {
o.Payload = payload
}
// WriteResponse to the client
func (o *KMSCreateKeyDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(o._statusCode)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}

View File

@@ -0,0 +1,104 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"errors"
"net/url"
golangswaggerpaths "path"
)
// KMSCreateKeyURL generates an URL for the k m s create key operation
type KMSCreateKeyURL struct {
_basePath string
}
// WithBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSCreateKeyURL) WithBasePath(bp string) *KMSCreateKeyURL {
o.SetBasePath(bp)
return o
}
// SetBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSCreateKeyURL) SetBasePath(bp string) {
o._basePath = bp
}
// Build a url path and query string
func (o *KMSCreateKeyURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/kms/key"
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil
}
// Must is a helper function to panic when the url builder returns an error
func (o *KMSCreateKeyURL) Must(u *url.URL, err error) *url.URL {
if err != nil {
panic(err)
}
if u == nil {
panic("url can't be nil")
}
return u
}
// String returns the string representation of the path with query string
func (o *KMSCreateKeyURL) String() string {
return o.Must(o.Build()).String()
}
// BuildFull builds a full url with scheme, host, path and query string
func (o *KMSCreateKeyURL) BuildFull(scheme, host string) (*url.URL, error) {
if scheme == "" {
return nil, errors.New("scheme is required for a full url on KMSCreateKeyURL")
}
if host == "" {
return nil, errors.New("host is required for a full url on KMSCreateKeyURL")
}
base, err := o.Build()
if err != nil {
return nil, err
}
base.Scheme = scheme
base.Host = host
return base, nil
}
// StringFull returns the string representation of a complete url
func (o *KMSCreateKeyURL) StringFull(scheme, host string) string {
return o.Must(o.BuildFull(scheme, host)).String()
}

View File

@@ -0,0 +1,88 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"net/http"
"github.com/go-openapi/runtime/middleware"
"github.com/minio/console/models"
)
// KMSDeleteIdentityHandlerFunc turns a function with the right signature into a k m s delete identity handler
type KMSDeleteIdentityHandlerFunc func(KMSDeleteIdentityParams, *models.Principal) middleware.Responder
// Handle executing the request and returning a response
func (fn KMSDeleteIdentityHandlerFunc) Handle(params KMSDeleteIdentityParams, principal *models.Principal) middleware.Responder {
return fn(params, principal)
}
// KMSDeleteIdentityHandler interface for that can handle valid k m s delete identity params
type KMSDeleteIdentityHandler interface {
Handle(KMSDeleteIdentityParams, *models.Principal) middleware.Responder
}
// NewKMSDeleteIdentity creates a new http.Handler for the k m s delete identity operation
func NewKMSDeleteIdentity(ctx *middleware.Context, handler KMSDeleteIdentityHandler) *KMSDeleteIdentity {
return &KMSDeleteIdentity{Context: ctx, Handler: handler}
}
/*
KMSDeleteIdentity swagger:route DELETE /kms/identity/{name} KMS kMSDeleteIdentity
KMS delete identity
*/
type KMSDeleteIdentity struct {
Context *middleware.Context
Handler KMSDeleteIdentityHandler
}
func (o *KMSDeleteIdentity) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
route, rCtx, _ := o.Context.RouteInfo(r)
if rCtx != nil {
*r = *rCtx
}
var Params = NewKMSDeleteIdentityParams()
uprinc, aCtx, err := o.Context.Authorize(r, route)
if err != nil {
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
if aCtx != nil {
*r = *aCtx
}
var principal *models.Principal
if uprinc != nil {
principal = uprinc.(*models.Principal) // this is really a models.Principal, I promise
}
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
res := o.Handler.Handle(Params, principal) // actually handle the request
o.Context.Respond(rw, r, route.Produces, route, res)
}

View File

@@ -0,0 +1,88 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/strfmt"
)
// NewKMSDeleteIdentityParams creates a new KMSDeleteIdentityParams object
//
// There are no default values defined in the spec.
func NewKMSDeleteIdentityParams() KMSDeleteIdentityParams {
return KMSDeleteIdentityParams{}
}
// KMSDeleteIdentityParams contains all the bound params for the k m s delete identity operation
// typically these are obtained from a http.Request
//
// swagger:parameters KMSDeleteIdentity
type KMSDeleteIdentityParams struct {
// HTTP Request Object
HTTPRequest *http.Request `json:"-"`
/*KMS identity name
Required: true
In: path
*/
Name string
}
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
// for simple values it will use straight method calls.
//
// To ensure default values, the struct must have been initialized with NewKMSDeleteIdentityParams() beforehand.
func (o *KMSDeleteIdentityParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
var res []error
o.HTTPRequest = r
rName, rhkName, _ := route.Params.GetOK("name")
if err := o.bindName(rName, rhkName, route.Formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindName binds and validates parameter Name from path.
func (o *KMSDeleteIdentityParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error {
var raw string
if len(rawData) > 0 {
raw = rawData[len(rawData)-1]
}
// Required: true
// Parameter is provided by construction from the route
o.Name = raw
return nil
}

View File

@@ -0,0 +1,115 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/runtime"
"github.com/minio/console/models"
)
// KMSDeleteIdentityOKCode is the HTTP code returned for type KMSDeleteIdentityOK
const KMSDeleteIdentityOKCode int = 200
/*
KMSDeleteIdentityOK A successful response.
swagger:response kMSDeleteIdentityOK
*/
type KMSDeleteIdentityOK struct {
}
// NewKMSDeleteIdentityOK creates KMSDeleteIdentityOK with default headers values
func NewKMSDeleteIdentityOK() *KMSDeleteIdentityOK {
return &KMSDeleteIdentityOK{}
}
// WriteResponse to the client
func (o *KMSDeleteIdentityOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(200)
}
/*
KMSDeleteIdentityDefault Generic error response.
swagger:response kMSDeleteIdentityDefault
*/
type KMSDeleteIdentityDefault struct {
_statusCode int
/*
In: Body
*/
Payload *models.Error `json:"body,omitempty"`
}
// NewKMSDeleteIdentityDefault creates KMSDeleteIdentityDefault with default headers values
func NewKMSDeleteIdentityDefault(code int) *KMSDeleteIdentityDefault {
if code <= 0 {
code = 500
}
return &KMSDeleteIdentityDefault{
_statusCode: code,
}
}
// WithStatusCode adds the status to the k m s delete identity default response
func (o *KMSDeleteIdentityDefault) WithStatusCode(code int) *KMSDeleteIdentityDefault {
o._statusCode = code
return o
}
// SetStatusCode sets the status to the k m s delete identity default response
func (o *KMSDeleteIdentityDefault) SetStatusCode(code int) {
o._statusCode = code
}
// WithPayload adds the payload to the k m s delete identity default response
func (o *KMSDeleteIdentityDefault) WithPayload(payload *models.Error) *KMSDeleteIdentityDefault {
o.Payload = payload
return o
}
// SetPayload sets the payload to the k m s delete identity default response
func (o *KMSDeleteIdentityDefault) SetPayload(payload *models.Error) {
o.Payload = payload
}
// WriteResponse to the client
func (o *KMSDeleteIdentityDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(o._statusCode)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}

View File

@@ -0,0 +1,116 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"errors"
"net/url"
golangswaggerpaths "path"
"strings"
)
// KMSDeleteIdentityURL generates an URL for the k m s delete identity operation
type KMSDeleteIdentityURL struct {
Name string
_basePath string
// avoid unkeyed usage
_ struct{}
}
// WithBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSDeleteIdentityURL) WithBasePath(bp string) *KMSDeleteIdentityURL {
o.SetBasePath(bp)
return o
}
// SetBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSDeleteIdentityURL) SetBasePath(bp string) {
o._basePath = bp
}
// Build a url path and query string
func (o *KMSDeleteIdentityURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/kms/identity/{name}"
name := o.Name
if name != "" {
_path = strings.Replace(_path, "{name}", name, -1)
} else {
return nil, errors.New("name is required on KMSDeleteIdentityURL")
}
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil
}
// Must is a helper function to panic when the url builder returns an error
func (o *KMSDeleteIdentityURL) Must(u *url.URL, err error) *url.URL {
if err != nil {
panic(err)
}
if u == nil {
panic("url can't be nil")
}
return u
}
// String returns the string representation of the path with query string
func (o *KMSDeleteIdentityURL) String() string {
return o.Must(o.Build()).String()
}
// BuildFull builds a full url with scheme, host, path and query string
func (o *KMSDeleteIdentityURL) BuildFull(scheme, host string) (*url.URL, error) {
if scheme == "" {
return nil, errors.New("scheme is required for a full url on KMSDeleteIdentityURL")
}
if host == "" {
return nil, errors.New("host is required for a full url on KMSDeleteIdentityURL")
}
base, err := o.Build()
if err != nil {
return nil, err
}
base.Scheme = scheme
base.Host = host
return base, nil
}
// StringFull returns the string representation of a complete url
func (o *KMSDeleteIdentityURL) StringFull(scheme, host string) string {
return o.Must(o.BuildFull(scheme, host)).String()
}

View File

@@ -0,0 +1,88 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"net/http"
"github.com/go-openapi/runtime/middleware"
"github.com/minio/console/models"
)
// KMSDeleteKeyHandlerFunc turns a function with the right signature into a k m s delete key handler
type KMSDeleteKeyHandlerFunc func(KMSDeleteKeyParams, *models.Principal) middleware.Responder
// Handle executing the request and returning a response
func (fn KMSDeleteKeyHandlerFunc) Handle(params KMSDeleteKeyParams, principal *models.Principal) middleware.Responder {
return fn(params, principal)
}
// KMSDeleteKeyHandler interface for that can handle valid k m s delete key params
type KMSDeleteKeyHandler interface {
Handle(KMSDeleteKeyParams, *models.Principal) middleware.Responder
}
// NewKMSDeleteKey creates a new http.Handler for the k m s delete key operation
func NewKMSDeleteKey(ctx *middleware.Context, handler KMSDeleteKeyHandler) *KMSDeleteKey {
return &KMSDeleteKey{Context: ctx, Handler: handler}
}
/*
KMSDeleteKey swagger:route DELETE /kms/key/{name} KMS kMSDeleteKey
KMS delete key
*/
type KMSDeleteKey struct {
Context *middleware.Context
Handler KMSDeleteKeyHandler
}
func (o *KMSDeleteKey) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
route, rCtx, _ := o.Context.RouteInfo(r)
if rCtx != nil {
*r = *rCtx
}
var Params = NewKMSDeleteKeyParams()
uprinc, aCtx, err := o.Context.Authorize(r, route)
if err != nil {
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
if aCtx != nil {
*r = *aCtx
}
var principal *models.Principal
if uprinc != nil {
principal = uprinc.(*models.Principal) // this is really a models.Principal, I promise
}
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
res := o.Handler.Handle(Params, principal) // actually handle the request
o.Context.Respond(rw, r, route.Produces, route, res)
}

View File

@@ -0,0 +1,88 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime/middleware"
"github.com/go-openapi/strfmt"
)
// NewKMSDeleteKeyParams creates a new KMSDeleteKeyParams object
//
// There are no default values defined in the spec.
func NewKMSDeleteKeyParams() KMSDeleteKeyParams {
return KMSDeleteKeyParams{}
}
// KMSDeleteKeyParams contains all the bound params for the k m s delete key operation
// typically these are obtained from a http.Request
//
// swagger:parameters KMSDeleteKey
type KMSDeleteKeyParams struct {
// HTTP Request Object
HTTPRequest *http.Request `json:"-"`
/*KMS key name
Required: true
In: path
*/
Name string
}
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
// for simple values it will use straight method calls.
//
// To ensure default values, the struct must have been initialized with NewKMSDeleteKeyParams() beforehand.
func (o *KMSDeleteKeyParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
var res []error
o.HTTPRequest = r
rName, rhkName, _ := route.Params.GetOK("name")
if err := o.bindName(rName, rhkName, route.Formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
// bindName binds and validates parameter Name from path.
func (o *KMSDeleteKeyParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error {
var raw string
if len(rawData) > 0 {
raw = rawData[len(rawData)-1]
}
// Required: true
// Parameter is provided by construction from the route
o.Name = raw
return nil
}

View File

@@ -0,0 +1,115 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/runtime"
"github.com/minio/console/models"
)
// KMSDeleteKeyOKCode is the HTTP code returned for type KMSDeleteKeyOK
const KMSDeleteKeyOKCode int = 200
/*
KMSDeleteKeyOK A successful response.
swagger:response kMSDeleteKeyOK
*/
type KMSDeleteKeyOK struct {
}
// NewKMSDeleteKeyOK creates KMSDeleteKeyOK with default headers values
func NewKMSDeleteKeyOK() *KMSDeleteKeyOK {
return &KMSDeleteKeyOK{}
}
// WriteResponse to the client
func (o *KMSDeleteKeyOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(200)
}
/*
KMSDeleteKeyDefault Generic error response.
swagger:response kMSDeleteKeyDefault
*/
type KMSDeleteKeyDefault struct {
_statusCode int
/*
In: Body
*/
Payload *models.Error `json:"body,omitempty"`
}
// NewKMSDeleteKeyDefault creates KMSDeleteKeyDefault with default headers values
func NewKMSDeleteKeyDefault(code int) *KMSDeleteKeyDefault {
if code <= 0 {
code = 500
}
return &KMSDeleteKeyDefault{
_statusCode: code,
}
}
// WithStatusCode adds the status to the k m s delete key default response
func (o *KMSDeleteKeyDefault) WithStatusCode(code int) *KMSDeleteKeyDefault {
o._statusCode = code
return o
}
// SetStatusCode sets the status to the k m s delete key default response
func (o *KMSDeleteKeyDefault) SetStatusCode(code int) {
o._statusCode = code
}
// WithPayload adds the payload to the k m s delete key default response
func (o *KMSDeleteKeyDefault) WithPayload(payload *models.Error) *KMSDeleteKeyDefault {
o.Payload = payload
return o
}
// SetPayload sets the payload to the k m s delete key default response
func (o *KMSDeleteKeyDefault) SetPayload(payload *models.Error) {
o.Payload = payload
}
// WriteResponse to the client
func (o *KMSDeleteKeyDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.WriteHeader(o._statusCode)
if o.Payload != nil {
payload := o.Payload
if err := producer.Produce(rw, payload); err != nil {
panic(err) // let the recovery middleware deal with this
}
}
}

View File

@@ -0,0 +1,116 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"errors"
"net/url"
golangswaggerpaths "path"
"strings"
)
// KMSDeleteKeyURL generates an URL for the k m s delete key operation
type KMSDeleteKeyURL struct {
Name string
_basePath string
// avoid unkeyed usage
_ struct{}
}
// WithBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSDeleteKeyURL) WithBasePath(bp string) *KMSDeleteKeyURL {
o.SetBasePath(bp)
return o
}
// SetBasePath sets the base path for this url builder, only required when it's different from the
// base path specified in the swagger spec.
// When the value of the base path is an empty string
func (o *KMSDeleteKeyURL) SetBasePath(bp string) {
o._basePath = bp
}
// Build a url path and query string
func (o *KMSDeleteKeyURL) Build() (*url.URL, error) {
var _result url.URL
var _path = "/kms/key/{name}"
name := o.Name
if name != "" {
_path = strings.Replace(_path, "{name}", name, -1)
} else {
return nil, errors.New("name is required on KMSDeleteKeyURL")
}
_basePath := o._basePath
if _basePath == "" {
_basePath = "/api/v1"
}
_result.Path = golangswaggerpaths.Join(_basePath, _path)
return &_result, nil
}
// Must is a helper function to panic when the url builder returns an error
func (o *KMSDeleteKeyURL) Must(u *url.URL, err error) *url.URL {
if err != nil {
panic(err)
}
if u == nil {
panic("url can't be nil")
}
return u
}
// String returns the string representation of the path with query string
func (o *KMSDeleteKeyURL) String() string {
return o.Must(o.Build()).String()
}
// BuildFull builds a full url with scheme, host, path and query string
func (o *KMSDeleteKeyURL) BuildFull(scheme, host string) (*url.URL, error) {
if scheme == "" {
return nil, errors.New("scheme is required for a full url on KMSDeleteKeyURL")
}
if host == "" {
return nil, errors.New("host is required for a full url on KMSDeleteKeyURL")
}
base, err := o.Build()
if err != nil {
return nil, err
}
base.Scheme = scheme
base.Host = host
return base, nil
}
// StringFull returns the string representation of a complete url
func (o *KMSDeleteKeyURL) StringFull(scheme, host string) string {
return o.Must(o.BuildFull(scheme, host)).String()
}

View File

@@ -0,0 +1,88 @@
// Code generated by go-swagger; DO NOT EDIT.
// This file is part of MinIO Console Server
// Copyright (c) 2022 MinIO, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
package k_m_s
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the generate command
import (
"net/http"
"github.com/go-openapi/runtime/middleware"
"github.com/minio/console/models"
)
// KMSDeletePolicyHandlerFunc turns a function with the right signature into a k m s delete policy handler
type KMSDeletePolicyHandlerFunc func(KMSDeletePolicyParams, *models.Principal) middleware.Responder
// Handle executing the request and returning a response
func (fn KMSDeletePolicyHandlerFunc) Handle(params KMSDeletePolicyParams, principal *models.Principal) middleware.Responder {
return fn(params, principal)
}
// KMSDeletePolicyHandler interface for that can handle valid k m s delete policy params
type KMSDeletePolicyHandler interface {
Handle(KMSDeletePolicyParams, *models.Principal) middleware.Responder
}
// NewKMSDeletePolicy creates a new http.Handler for the k m s delete policy operation
func NewKMSDeletePolicy(ctx *middleware.Context, handler KMSDeletePolicyHandler) *KMSDeletePolicy {
return &KMSDeletePolicy{Context: ctx, Handler: handler}
}
/*
KMSDeletePolicy swagger:route DELETE /kms/policy/{name} KMS kMSDeletePolicy
KMS delete policy
*/
type KMSDeletePolicy struct {
Context *middleware.Context
Handler KMSDeletePolicyHandler
}
func (o *KMSDeletePolicy) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
route, rCtx, _ := o.Context.RouteInfo(r)
if rCtx != nil {
*r = *rCtx
}
var Params = NewKMSDeletePolicyParams()
uprinc, aCtx, err := o.Context.Authorize(r, route)
if err != nil {
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
if aCtx != nil {
*r = *aCtx
}
var principal *models.Principal
if uprinc != nil {
principal = uprinc.(*models.Principal) // this is really a models.Principal, I promise
}
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
o.Context.Respond(rw, r, route.Produces, route, err)
return
}
res := o.Handler.Handle(Params, principal) // actually handle the request
o.Context.Respond(rw, r, route.Produces, route, res)
}

Some files were not shown because too many files have changed in this diff Show More