diff --git a/portal-ui/src/screens/Console/Tenants/AddTenant/Steps/IdentityProvider/IDPBuiltIn.tsx b/portal-ui/src/screens/Console/Tenants/AddTenant/Steps/IdentityProvider/IDPBuiltIn.tsx index 2ea9eeab7..c062c8fac 100644 --- a/portal-ui/src/screens/Console/Tenants/AddTenant/Steps/IdentityProvider/IDPBuiltIn.tsx +++ b/portal-ui/src/screens/Console/Tenants/AddTenant/Steps/IdentityProvider/IDPBuiltIn.tsx @@ -182,30 +182,28 @@ const IDPBuiltIn = () => { error={validationErrors[`secretkey-${index.toString()}`] || ""} />
- -
- { - dispatch(addIDPNewKeyPair()); - }} - > - - -
-
- -
- { - dispatch(removeIDPKeyPairAtIndex(index)); - }} - > - - -
-
+
+ { + dispatch(addIDPNewKeyPair()); + }} + disabled={index !== accessKeys.length - 1} + > + + +
+
+ { + dispatch(removeIDPKeyPairAtIndex(index)); + }} + disabled={accessKeys.length <= 1} + > + + +
{ {enableCustomCerts && ( + {!enableAutoCert && ( + + + + )} MinIO Certificates - {minioCertificates.map((keyPair: KeyPair) => ( + {minioCertificates.map((keyPair: KeyPair, index) => ( { onClick={() => { dispatch(addKeyPair()); }} + disabled={index !== minioCertificates.length - 1} > @@ -286,6 +293,7 @@ const Security = ({ classes }: ISecurityProps) => { onClick={() => { dispatch(deleteKeyPair(keyPair.id)); }} + disabled={minioCertificates.length <= 1} > @@ -298,7 +306,7 @@ const Security = ({ classes }: ISecurityProps) => { MinIO CA Certificates - {caCertificates.map((keyPair: KeyPair) => ( + {caCertificates.map((keyPair: KeyPair, index) => ( { onClick={() => { dispatch(addCaCertificate()); }} + disabled={index !== caCertificates.length - 1} > @@ -342,6 +351,7 @@ const Security = ({ classes }: ISecurityProps) => { onClick={() => { dispatch(deleteCaCertificate(keyPair.id)); }} + disabled={caCertificates.length <= 1} > diff --git a/portal-ui/src/screens/Console/Tenants/HelpBox/TLSHelpBox.tsx b/portal-ui/src/screens/Console/Tenants/HelpBox/TLSHelpBox.tsx new file mode 100644 index 000000000..389a9ecc0 --- /dev/null +++ b/portal-ui/src/screens/Console/Tenants/HelpBox/TLSHelpBox.tsx @@ -0,0 +1,124 @@ +// 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 . +import React from "react"; +import { useSelector } from "react-redux"; +import { Box } from "@mui/material"; +import CertificateIcon from "../../../../icons/CertificateIcon"; +import { AppState } from "../../../../store"; + +const FeatureItem = ({ + icon, + description, +}: { + icon: any; + description: string; +}) => { + return ( + + {icon}{" "} +
+ {description} +
+
+ ); +}; +const TLSHelpBox = () => { + const namespace = useSelector((state: AppState) => { + return state.createTenant.fields.nameTenant.namespace || ""; + }); + + const tenantName = useSelector((state: AppState) => { + return state.createTenant.fields.nameTenant.tenantName || ""; + }); + + return ( + + + } + description={`TLS Certificates Warning`} + /> + + Automatic certificate generation is not enabled. +
+
+ If you wish to continue only with custom certificates make sure + they are valid for the following internode hostnames, i.e.: +
+
+
+ minio.{namespace} +
+ minio.{namespace}.svc +
+ minio.{namespace}.svc.<cluster domain> +
+ *.{tenantName}-hl.{namespace}.svc.<cluster domain> +
+ *.{namespace}.svc.<cluster domain> +
+
+ Replace <tenant-name>,{" "} + <namespace> and + <cluster domain> with the actual values for your + MinIO tenant. +
+
+ You can learn more at our{" "} + + documentation + + . +
+
+
+ ); +}; + +export default TLSHelpBox;