Validate provided external certificates during tenant creation (#1245)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com> Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
@@ -19,6 +19,7 @@ package operatorapi
|
||||
import (
|
||||
"context"
|
||||
"crypto"
|
||||
"crypto/tls"
|
||||
"encoding/base64"
|
||||
"encoding/hex"
|
||||
"fmt"
|
||||
@@ -307,6 +308,10 @@ func createOrReplaceExternalCertSecrets(ctx context.Context, clientSet K8sClient
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// check if the key pair is valid
|
||||
if _, err = tls.X509KeyPair(tlsCrt, tlsKey); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
externalTLSCertificateSecret := &corev1.Secret{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: keyPairSecretName,
|
||||
|
||||
@@ -312,7 +312,8 @@ const STResults = ({ classes, results, start, autotune }: ISTResults) => {
|
||||
{clnMetrics.length <= 1 && (
|
||||
<Grid container>
|
||||
<Grid item xs={12} className={classes.initialResults}>
|
||||
Please wait while we get {autotune? "the initial" : "the system"} results...
|
||||
Please wait while we get {autotune ? "the initial" : "the system"}{" "}
|
||||
results...
|
||||
</Grid>
|
||||
</Grid>
|
||||
)}
|
||||
@@ -391,9 +392,7 @@ const STResults = ({ classes, results, start, autotune }: ISTResults) => {
|
||||
<Grid container>
|
||||
<Grid item xs={12} md={6} className={classes.descriptorLabel}>
|
||||
{start ? (
|
||||
<Fragment>
|
||||
Preliminar Results:
|
||||
</Fragment>
|
||||
<Fragment>Preliminar Results:</Fragment>
|
||||
) : (
|
||||
<Fragment>
|
||||
{jsonView ? "JSON Results:" : "Detailed Results:"}
|
||||
|
||||
Reference in New Issue
Block a user