KMS certificates for Encryption configuration page (#2380)

- removed unused console certificate code in frontend
- fixed confirmation dialog not closing after submit form on encryption
page
- simplified kms mtls/ca certificates for tenant encryption
configuration

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
This commit is contained in:
Lenin Alevski
2022-10-19 12:32:08 -07:00
committed by GitHub
parent 5f07d45846
commit 6b6cfd10f1
19 changed files with 918 additions and 1439 deletions

View File

@@ -42,9 +42,6 @@ type EncryptionConfiguration struct {
// azure
Azure *AzureConfiguration `json:"azure,omitempty"`
// client
Client *KeyPairConfiguration `json:"client,omitempty"`
// gcp
Gcp *GcpConfiguration `json:"gcp,omitempty"`
@@ -54,6 +51,12 @@ type EncryptionConfiguration struct {
// image
Image string `json:"image,omitempty"`
// kms mtls
KmsMtls *EncryptionConfigurationAO1KmsMtls `json:"kms_mtls,omitempty"`
// minio mtls
MinioMtls *KeyPairConfiguration `json:"minio_mtls,omitempty"`
// raw
Raw string `json:"raw,omitempty"`
@@ -66,8 +69,8 @@ type EncryptionConfiguration struct {
// security context
SecurityContext *SecurityContext `json:"securityContext,omitempty"`
// server
Server *KeyPairConfiguration `json:"server,omitempty"`
// server tls
ServerTLS *KeyPairConfiguration `json:"server_tls,omitempty"`
// vault
Vault *VaultConfiguration `json:"vault,omitempty"`
@@ -88,14 +91,16 @@ func (m *EncryptionConfiguration) UnmarshalJSON(raw []byte) error {
Azure *AzureConfiguration `json:"azure,omitempty"`
Client *KeyPairConfiguration `json:"client,omitempty"`
Gcp *GcpConfiguration `json:"gcp,omitempty"`
Gemalto *GemaltoConfiguration `json:"gemalto,omitempty"`
Image string `json:"image,omitempty"`
KmsMtls *EncryptionConfigurationAO1KmsMtls `json:"kms_mtls,omitempty"`
MinioMtls *KeyPairConfiguration `json:"minio_mtls,omitempty"`
Raw string `json:"raw,omitempty"`
Replicas string `json:"replicas,omitempty"`
@@ -104,7 +109,7 @@ func (m *EncryptionConfiguration) UnmarshalJSON(raw []byte) error {
SecurityContext *SecurityContext `json:"securityContext,omitempty"`
Server *KeyPairConfiguration `json:"server,omitempty"`
ServerTLS *KeyPairConfiguration `json:"server_tls,omitempty"`
Vault *VaultConfiguration `json:"vault,omitempty"`
}
@@ -116,14 +121,16 @@ func (m *EncryptionConfiguration) UnmarshalJSON(raw []byte) error {
m.Azure = dataAO1.Azure
m.Client = dataAO1.Client
m.Gcp = dataAO1.Gcp
m.Gemalto = dataAO1.Gemalto
m.Image = dataAO1.Image
m.KmsMtls = dataAO1.KmsMtls
m.MinioMtls = dataAO1.MinioMtls
m.Raw = dataAO1.Raw
m.Replicas = dataAO1.Replicas
@@ -132,7 +139,7 @@ func (m *EncryptionConfiguration) UnmarshalJSON(raw []byte) error {
m.SecurityContext = dataAO1.SecurityContext
m.Server = dataAO1.Server
m.ServerTLS = dataAO1.ServerTLS
m.Vault = dataAO1.Vault
@@ -153,14 +160,16 @@ func (m EncryptionConfiguration) MarshalJSON() ([]byte, error) {
Azure *AzureConfiguration `json:"azure,omitempty"`
Client *KeyPairConfiguration `json:"client,omitempty"`
Gcp *GcpConfiguration `json:"gcp,omitempty"`
Gemalto *GemaltoConfiguration `json:"gemalto,omitempty"`
Image string `json:"image,omitempty"`
KmsMtls *EncryptionConfigurationAO1KmsMtls `json:"kms_mtls,omitempty"`
MinioMtls *KeyPairConfiguration `json:"minio_mtls,omitempty"`
Raw string `json:"raw,omitempty"`
Replicas string `json:"replicas,omitempty"`
@@ -169,7 +178,7 @@ func (m EncryptionConfiguration) MarshalJSON() ([]byte, error) {
SecurityContext *SecurityContext `json:"securityContext,omitempty"`
Server *KeyPairConfiguration `json:"server,omitempty"`
ServerTLS *KeyPairConfiguration `json:"server_tls,omitempty"`
Vault *VaultConfiguration `json:"vault,omitempty"`
}
@@ -178,14 +187,16 @@ func (m EncryptionConfiguration) MarshalJSON() ([]byte, error) {
dataAO1.Azure = m.Azure
dataAO1.Client = m.Client
dataAO1.Gcp = m.Gcp
dataAO1.Gemalto = m.Gemalto
dataAO1.Image = m.Image
dataAO1.KmsMtls = m.KmsMtls
dataAO1.MinioMtls = m.MinioMtls
dataAO1.Raw = m.Raw
dataAO1.Replicas = m.Replicas
@@ -194,7 +205,7 @@ func (m EncryptionConfiguration) MarshalJSON() ([]byte, error) {
dataAO1.SecurityContext = m.SecurityContext
dataAO1.Server = m.Server
dataAO1.ServerTLS = m.ServerTLS
dataAO1.Vault = m.Vault
@@ -223,10 +234,6 @@ func (m *EncryptionConfiguration) Validate(formats strfmt.Registry) error {
res = append(res, err)
}
if err := m.validateClient(formats); err != nil {
res = append(res, err)
}
if err := m.validateGcp(formats); err != nil {
res = append(res, err)
}
@@ -235,11 +242,19 @@ func (m *EncryptionConfiguration) Validate(formats strfmt.Registry) error {
res = append(res, err)
}
if err := m.validateKmsMtls(formats); err != nil {
res = append(res, err)
}
if err := m.validateMinioMtls(formats); err != nil {
res = append(res, err)
}
if err := m.validateSecurityContext(formats); err != nil {
res = append(res, err)
}
if err := m.validateServer(formats); err != nil {
if err := m.validateServerTLS(formats); err != nil {
res = append(res, err)
}
@@ -293,26 +308,6 @@ func (m *EncryptionConfiguration) validateAzure(formats strfmt.Registry) error {
return nil
}
func (m *EncryptionConfiguration) validateClient(formats strfmt.Registry) error {
if swag.IsZero(m.Client) { // not required
return nil
}
if m.Client != nil {
if err := m.Client.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("client")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("client")
}
return err
}
}
return nil
}
func (m *EncryptionConfiguration) validateGcp(formats strfmt.Registry) error {
if swag.IsZero(m.Gcp) { // not required
@@ -353,6 +348,46 @@ func (m *EncryptionConfiguration) validateGemalto(formats strfmt.Registry) error
return nil
}
func (m *EncryptionConfiguration) validateKmsMtls(formats strfmt.Registry) error {
if swag.IsZero(m.KmsMtls) { // not required
return nil
}
if m.KmsMtls != nil {
if err := m.KmsMtls.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("kms_mtls")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("kms_mtls")
}
return err
}
}
return nil
}
func (m *EncryptionConfiguration) validateMinioMtls(formats strfmt.Registry) error {
if swag.IsZero(m.MinioMtls) { // not required
return nil
}
if m.MinioMtls != nil {
if err := m.MinioMtls.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("minio_mtls")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("minio_mtls")
}
return err
}
}
return nil
}
func (m *EncryptionConfiguration) validateSecurityContext(formats strfmt.Registry) error {
if swag.IsZero(m.SecurityContext) { // not required
@@ -373,18 +408,18 @@ func (m *EncryptionConfiguration) validateSecurityContext(formats strfmt.Registr
return nil
}
func (m *EncryptionConfiguration) validateServer(formats strfmt.Registry) error {
func (m *EncryptionConfiguration) validateServerTLS(formats strfmt.Registry) error {
if swag.IsZero(m.Server) { // not required
if swag.IsZero(m.ServerTLS) { // not required
return nil
}
if m.Server != nil {
if err := m.Server.Validate(formats); err != nil {
if m.ServerTLS != nil {
if err := m.ServerTLS.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("server")
return ve.ValidateName("server_tls")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("server")
return ce.ValidateName("server_tls")
}
return err
}
@@ -430,10 +465,6 @@ func (m *EncryptionConfiguration) ContextValidate(ctx context.Context, formats s
res = append(res, err)
}
if err := m.contextValidateClient(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateGcp(ctx, formats); err != nil {
res = append(res, err)
}
@@ -442,11 +473,19 @@ func (m *EncryptionConfiguration) ContextValidate(ctx context.Context, formats s
res = append(res, err)
}
if err := m.contextValidateKmsMtls(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateMinioMtls(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateSecurityContext(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateServer(ctx, formats); err != nil {
if err := m.contextValidateServerTLS(ctx, formats); err != nil {
res = append(res, err)
}
@@ -492,22 +531,6 @@ func (m *EncryptionConfiguration) contextValidateAzure(ctx context.Context, form
return nil
}
func (m *EncryptionConfiguration) contextValidateClient(ctx context.Context, formats strfmt.Registry) error {
if m.Client != nil {
if err := m.Client.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("client")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("client")
}
return err
}
}
return nil
}
func (m *EncryptionConfiguration) contextValidateGcp(ctx context.Context, formats strfmt.Registry) error {
if m.Gcp != nil {
@@ -540,6 +563,38 @@ func (m *EncryptionConfiguration) contextValidateGemalto(ctx context.Context, fo
return nil
}
func (m *EncryptionConfiguration) contextValidateKmsMtls(ctx context.Context, formats strfmt.Registry) error {
if m.KmsMtls != nil {
if err := m.KmsMtls.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("kms_mtls")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("kms_mtls")
}
return err
}
}
return nil
}
func (m *EncryptionConfiguration) contextValidateMinioMtls(ctx context.Context, formats strfmt.Registry) error {
if m.MinioMtls != nil {
if err := m.MinioMtls.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("minio_mtls")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("minio_mtls")
}
return err
}
}
return nil
}
func (m *EncryptionConfiguration) contextValidateSecurityContext(ctx context.Context, formats strfmt.Registry) error {
if m.SecurityContext != nil {
@@ -556,14 +611,14 @@ func (m *EncryptionConfiguration) contextValidateSecurityContext(ctx context.Con
return nil
}
func (m *EncryptionConfiguration) contextValidateServer(ctx context.Context, formats strfmt.Registry) error {
func (m *EncryptionConfiguration) contextValidateServerTLS(ctx context.Context, formats strfmt.Registry) error {
if m.Server != nil {
if err := m.Server.ContextValidate(ctx, formats); err != nil {
if m.ServerTLS != nil {
if err := m.ServerTLS.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("server")
return ve.ValidateName("server_tls")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("server")
return ce.ValidateName("server_tls")
}
return err
}
@@ -605,3 +660,46 @@ func (m *EncryptionConfiguration) UnmarshalBinary(b []byte) error {
*m = res
return nil
}
// EncryptionConfigurationAO1KmsMtls encryption configuration a o1 kms mtls
//
// swagger:model EncryptionConfigurationAO1KmsMtls
type EncryptionConfigurationAO1KmsMtls struct {
// ca
Ca string `json:"ca,omitempty"`
// crt
Crt string `json:"crt,omitempty"`
// key
Key string `json:"key,omitempty"`
}
// Validate validates this encryption configuration a o1 kms mtls
func (m *EncryptionConfigurationAO1KmsMtls) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this encryption configuration a o1 kms mtls based on context it is used
func (m *EncryptionConfigurationAO1KmsMtls) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *EncryptionConfigurationAO1KmsMtls) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *EncryptionConfigurationAO1KmsMtls) UnmarshalBinary(b []byte) error {
var res EncryptionConfigurationAO1KmsMtls
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -51,8 +51,11 @@ type EncryptionConfigurationResponse struct {
// image
Image string `json:"image,omitempty"`
// mtls client
MtlsClient *CertificateInfo `json:"mtls_client,omitempty"`
// kms mtls
KmsMtls *EncryptionConfigurationResponseAO1KmsMtls `json:"kms_mtls,omitempty"`
// minio mtls
MinioMtls *CertificateInfo `json:"minio_mtls,omitempty"`
// raw
Raw string `json:"raw,omitempty"`
@@ -63,8 +66,8 @@ type EncryptionConfigurationResponse struct {
// security context
SecurityContext *SecurityContext `json:"securityContext,omitempty"`
// server
Server *CertificateInfo `json:"server,omitempty"`
// server tls
ServerTLS *CertificateInfo `json:"server_tls,omitempty"`
// vault
Vault *VaultConfigurationResponse `json:"vault,omitempty"`
@@ -91,7 +94,9 @@ func (m *EncryptionConfigurationResponse) UnmarshalJSON(raw []byte) error {
Image string `json:"image,omitempty"`
MtlsClient *CertificateInfo `json:"mtls_client,omitempty"`
KmsMtls *EncryptionConfigurationResponseAO1KmsMtls `json:"kms_mtls,omitempty"`
MinioMtls *CertificateInfo `json:"minio_mtls,omitempty"`
Raw string `json:"raw,omitempty"`
@@ -99,7 +104,7 @@ func (m *EncryptionConfigurationResponse) UnmarshalJSON(raw []byte) error {
SecurityContext *SecurityContext `json:"securityContext,omitempty"`
Server *CertificateInfo `json:"server,omitempty"`
ServerTLS *CertificateInfo `json:"server_tls,omitempty"`
Vault *VaultConfigurationResponse `json:"vault,omitempty"`
}
@@ -117,7 +122,9 @@ func (m *EncryptionConfigurationResponse) UnmarshalJSON(raw []byte) error {
m.Image = dataAO1.Image
m.MtlsClient = dataAO1.MtlsClient
m.KmsMtls = dataAO1.KmsMtls
m.MinioMtls = dataAO1.MinioMtls
m.Raw = dataAO1.Raw
@@ -125,7 +132,7 @@ func (m *EncryptionConfigurationResponse) UnmarshalJSON(raw []byte) error {
m.SecurityContext = dataAO1.SecurityContext
m.Server = dataAO1.Server
m.ServerTLS = dataAO1.ServerTLS
m.Vault = dataAO1.Vault
@@ -152,7 +159,9 @@ func (m EncryptionConfigurationResponse) MarshalJSON() ([]byte, error) {
Image string `json:"image,omitempty"`
MtlsClient *CertificateInfo `json:"mtls_client,omitempty"`
KmsMtls *EncryptionConfigurationResponseAO1KmsMtls `json:"kms_mtls,omitempty"`
MinioMtls *CertificateInfo `json:"minio_mtls,omitempty"`
Raw string `json:"raw,omitempty"`
@@ -160,7 +169,7 @@ func (m EncryptionConfigurationResponse) MarshalJSON() ([]byte, error) {
SecurityContext *SecurityContext `json:"securityContext,omitempty"`
Server *CertificateInfo `json:"server,omitempty"`
ServerTLS *CertificateInfo `json:"server_tls,omitempty"`
Vault *VaultConfigurationResponse `json:"vault,omitempty"`
}
@@ -175,7 +184,9 @@ func (m EncryptionConfigurationResponse) MarshalJSON() ([]byte, error) {
dataAO1.Image = m.Image
dataAO1.MtlsClient = m.MtlsClient
dataAO1.KmsMtls = m.KmsMtls
dataAO1.MinioMtls = m.MinioMtls
dataAO1.Raw = m.Raw
@@ -183,7 +194,7 @@ func (m EncryptionConfigurationResponse) MarshalJSON() ([]byte, error) {
dataAO1.SecurityContext = m.SecurityContext
dataAO1.Server = m.Server
dataAO1.ServerTLS = m.ServerTLS
dataAO1.Vault = m.Vault
@@ -220,7 +231,11 @@ func (m *EncryptionConfigurationResponse) Validate(formats strfmt.Registry) erro
res = append(res, err)
}
if err := m.validateMtlsClient(formats); err != nil {
if err := m.validateKmsMtls(formats); err != nil {
res = append(res, err)
}
if err := m.validateMinioMtls(formats); err != nil {
res = append(res, err)
}
@@ -228,7 +243,7 @@ func (m *EncryptionConfigurationResponse) Validate(formats strfmt.Registry) erro
res = append(res, err)
}
if err := m.validateServer(formats); err != nil {
if err := m.validateServerTLS(formats); err != nil {
res = append(res, err)
}
@@ -322,18 +337,38 @@ func (m *EncryptionConfigurationResponse) validateGemalto(formats strfmt.Registr
return nil
}
func (m *EncryptionConfigurationResponse) validateMtlsClient(formats strfmt.Registry) error {
func (m *EncryptionConfigurationResponse) validateKmsMtls(formats strfmt.Registry) error {
if swag.IsZero(m.MtlsClient) { // not required
if swag.IsZero(m.KmsMtls) { // not required
return nil
}
if m.MtlsClient != nil {
if err := m.MtlsClient.Validate(formats); err != nil {
if m.KmsMtls != nil {
if err := m.KmsMtls.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("mtls_client")
return ve.ValidateName("kms_mtls")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("mtls_client")
return ce.ValidateName("kms_mtls")
}
return err
}
}
return nil
}
func (m *EncryptionConfigurationResponse) validateMinioMtls(formats strfmt.Registry) error {
if swag.IsZero(m.MinioMtls) { // not required
return nil
}
if m.MinioMtls != nil {
if err := m.MinioMtls.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("minio_mtls")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("minio_mtls")
}
return err
}
@@ -362,18 +397,18 @@ func (m *EncryptionConfigurationResponse) validateSecurityContext(formats strfmt
return nil
}
func (m *EncryptionConfigurationResponse) validateServer(formats strfmt.Registry) error {
func (m *EncryptionConfigurationResponse) validateServerTLS(formats strfmt.Registry) error {
if swag.IsZero(m.Server) { // not required
if swag.IsZero(m.ServerTLS) { // not required
return nil
}
if m.Server != nil {
if err := m.Server.Validate(formats); err != nil {
if m.ServerTLS != nil {
if err := m.ServerTLS.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("server")
return ve.ValidateName("server_tls")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("server")
return ce.ValidateName("server_tls")
}
return err
}
@@ -427,7 +462,11 @@ func (m *EncryptionConfigurationResponse) ContextValidate(ctx context.Context, f
res = append(res, err)
}
if err := m.contextValidateMtlsClient(ctx, formats); err != nil {
if err := m.contextValidateKmsMtls(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateMinioMtls(ctx, formats); err != nil {
res = append(res, err)
}
@@ -435,7 +474,7 @@ func (m *EncryptionConfigurationResponse) ContextValidate(ctx context.Context, f
res = append(res, err)
}
if err := m.contextValidateServer(ctx, formats); err != nil {
if err := m.contextValidateServerTLS(ctx, formats); err != nil {
res = append(res, err)
}
@@ -513,14 +552,30 @@ func (m *EncryptionConfigurationResponse) contextValidateGemalto(ctx context.Con
return nil
}
func (m *EncryptionConfigurationResponse) contextValidateMtlsClient(ctx context.Context, formats strfmt.Registry) error {
func (m *EncryptionConfigurationResponse) contextValidateKmsMtls(ctx context.Context, formats strfmt.Registry) error {
if m.MtlsClient != nil {
if err := m.MtlsClient.ContextValidate(ctx, formats); err != nil {
if m.KmsMtls != nil {
if err := m.KmsMtls.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("mtls_client")
return ve.ValidateName("kms_mtls")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("mtls_client")
return ce.ValidateName("kms_mtls")
}
return err
}
}
return nil
}
func (m *EncryptionConfigurationResponse) contextValidateMinioMtls(ctx context.Context, formats strfmt.Registry) error {
if m.MinioMtls != nil {
if err := m.MinioMtls.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("minio_mtls")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("minio_mtls")
}
return err
}
@@ -545,14 +600,14 @@ func (m *EncryptionConfigurationResponse) contextValidateSecurityContext(ctx con
return nil
}
func (m *EncryptionConfigurationResponse) contextValidateServer(ctx context.Context, formats strfmt.Registry) error {
func (m *EncryptionConfigurationResponse) contextValidateServerTLS(ctx context.Context, formats strfmt.Registry) error {
if m.Server != nil {
if err := m.Server.ContextValidate(ctx, formats); err != nil {
if m.ServerTLS != nil {
if err := m.ServerTLS.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("server")
return ve.ValidateName("server_tls")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("server")
return ce.ValidateName("server_tls")
}
return err
}
@@ -594,3 +649,139 @@ func (m *EncryptionConfigurationResponse) UnmarshalBinary(b []byte) error {
*m = res
return nil
}
// EncryptionConfigurationResponseAO1KmsMtls encryption configuration response a o1 kms mtls
//
// swagger:model EncryptionConfigurationResponseAO1KmsMtls
type EncryptionConfigurationResponseAO1KmsMtls struct {
// ca
Ca *CertificateInfo `json:"ca,omitempty"`
// crt
Crt *CertificateInfo `json:"crt,omitempty"`
}
// Validate validates this encryption configuration response a o1 kms mtls
func (m *EncryptionConfigurationResponseAO1KmsMtls) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateCa(formats); err != nil {
res = append(res, err)
}
if err := m.validateCrt(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *EncryptionConfigurationResponseAO1KmsMtls) validateCa(formats strfmt.Registry) error {
if swag.IsZero(m.Ca) { // not required
return nil
}
if m.Ca != nil {
if err := m.Ca.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("kms_mtls" + "." + "ca")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("kms_mtls" + "." + "ca")
}
return err
}
}
return nil
}
func (m *EncryptionConfigurationResponseAO1KmsMtls) validateCrt(formats strfmt.Registry) error {
if swag.IsZero(m.Crt) { // not required
return nil
}
if m.Crt != nil {
if err := m.Crt.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("kms_mtls" + "." + "crt")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("kms_mtls" + "." + "crt")
}
return err
}
}
return nil
}
// ContextValidate validate this encryption configuration response a o1 kms mtls based on the context it is used
func (m *EncryptionConfigurationResponseAO1KmsMtls) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateCa(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateCrt(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *EncryptionConfigurationResponseAO1KmsMtls) contextValidateCa(ctx context.Context, formats strfmt.Registry) error {
if m.Ca != nil {
if err := m.Ca.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("kms_mtls" + "." + "ca")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("kms_mtls" + "." + "ca")
}
return err
}
}
return nil
}
func (m *EncryptionConfigurationResponseAO1KmsMtls) contextValidateCrt(ctx context.Context, formats strfmt.Registry) error {
if m.Crt != nil {
if err := m.Crt.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("kms_mtls" + "." + "crt")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("kms_mtls" + "." + "crt")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *EncryptionConfigurationResponseAO1KmsMtls) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *EncryptionConfigurationResponseAO1KmsMtls) UnmarshalBinary(b []byte) error {
var res EncryptionConfigurationResponseAO1KmsMtls
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -135,9 +135,6 @@ type GemaltoConfigurationKeysecure struct {
// endpoint
// Required: true
Endpoint *string `json:"endpoint"`
// tls
TLS *GemaltoConfigurationKeysecureTLS `json:"tls,omitempty"`
}
// Validate validates this gemalto configuration keysecure
@@ -152,10 +149,6 @@ func (m *GemaltoConfigurationKeysecure) Validate(formats strfmt.Registry) error
res = append(res, err)
}
if err := m.validateTLS(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
@@ -191,25 +184,6 @@ func (m *GemaltoConfigurationKeysecure) validateEndpoint(formats strfmt.Registry
return nil
}
func (m *GemaltoConfigurationKeysecure) validateTLS(formats strfmt.Registry) error {
if swag.IsZero(m.TLS) { // not required
return nil
}
if m.TLS != nil {
if err := m.TLS.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("keysecure" + "." + "tls")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("keysecure" + "." + "tls")
}
return err
}
}
return nil
}
// ContextValidate validate this gemalto configuration keysecure based on the context it is used
func (m *GemaltoConfigurationKeysecure) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
@@ -218,10 +192,6 @@ func (m *GemaltoConfigurationKeysecure) ContextValidate(ctx context.Context, for
res = append(res, err)
}
if err := m.contextValidateTLS(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
@@ -244,22 +214,6 @@ func (m *GemaltoConfigurationKeysecure) contextValidateCredentials(ctx context.C
return nil
}
func (m *GemaltoConfigurationKeysecure) contextValidateTLS(ctx context.Context, formats strfmt.Registry) error {
if m.TLS != nil {
if err := m.TLS.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("keysecure" + "." + "tls")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("keysecure" + "." + "tls")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *GemaltoConfigurationKeysecure) MarshalBinary() ([]byte, error) {
if m == nil {
@@ -353,59 +307,3 @@ func (m *GemaltoConfigurationKeysecureCredentials) UnmarshalBinary(b []byte) err
*m = res
return nil
}
// GemaltoConfigurationKeysecureTLS gemalto configuration keysecure TLS
//
// swagger:model GemaltoConfigurationKeysecureTLS
type GemaltoConfigurationKeysecureTLS struct {
// ca
// Required: true
Ca *string `json:"ca"`
}
// Validate validates this gemalto configuration keysecure TLS
func (m *GemaltoConfigurationKeysecureTLS) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateCa(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *GemaltoConfigurationKeysecureTLS) validateCa(formats strfmt.Registry) error {
if err := validate.Required("keysecure"+"."+"tls"+"."+"ca", "body", m.Ca); err != nil {
return err
}
return nil
}
// ContextValidate validates this gemalto configuration keysecure TLS based on context it is used
func (m *GemaltoConfigurationKeysecureTLS) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *GemaltoConfigurationKeysecureTLS) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *GemaltoConfigurationKeysecureTLS) UnmarshalBinary(b []byte) error {
var res GemaltoConfigurationKeysecureTLS
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -135,9 +135,6 @@ type GemaltoConfigurationResponseKeysecure struct {
// endpoint
// Required: true
Endpoint *string `json:"endpoint"`
// tls
TLS *GemaltoConfigurationResponseKeysecureTLS `json:"tls,omitempty"`
}
// Validate validates this gemalto configuration response keysecure
@@ -152,10 +149,6 @@ func (m *GemaltoConfigurationResponseKeysecure) Validate(formats strfmt.Registry
res = append(res, err)
}
if err := m.validateTLS(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
@@ -191,25 +184,6 @@ func (m *GemaltoConfigurationResponseKeysecure) validateEndpoint(formats strfmt.
return nil
}
func (m *GemaltoConfigurationResponseKeysecure) validateTLS(formats strfmt.Registry) error {
if swag.IsZero(m.TLS) { // not required
return nil
}
if m.TLS != nil {
if err := m.TLS.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("keysecure" + "." + "tls")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("keysecure" + "." + "tls")
}
return err
}
}
return nil
}
// ContextValidate validate this gemalto configuration response keysecure based on the context it is used
func (m *GemaltoConfigurationResponseKeysecure) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
@@ -218,10 +192,6 @@ func (m *GemaltoConfigurationResponseKeysecure) ContextValidate(ctx context.Cont
res = append(res, err)
}
if err := m.contextValidateTLS(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
@@ -244,22 +214,6 @@ func (m *GemaltoConfigurationResponseKeysecure) contextValidateCredentials(ctx c
return nil
}
func (m *GemaltoConfigurationResponseKeysecure) contextValidateTLS(ctx context.Context, formats strfmt.Registry) error {
if m.TLS != nil {
if err := m.TLS.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("keysecure" + "." + "tls")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("keysecure" + "." + "tls")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *GemaltoConfigurationResponseKeysecure) MarshalBinary() ([]byte, error) {
if m == nil {
@@ -353,95 +307,3 @@ func (m *GemaltoConfigurationResponseKeysecureCredentials) UnmarshalBinary(b []b
*m = res
return nil
}
// GemaltoConfigurationResponseKeysecureTLS gemalto configuration response keysecure TLS
//
// swagger:model GemaltoConfigurationResponseKeysecureTLS
type GemaltoConfigurationResponseKeysecureTLS struct {
// ca
// Required: true
Ca *CertificateInfo `json:"ca"`
}
// Validate validates this gemalto configuration response keysecure TLS
func (m *GemaltoConfigurationResponseKeysecureTLS) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateCa(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *GemaltoConfigurationResponseKeysecureTLS) validateCa(formats strfmt.Registry) error {
if err := validate.Required("keysecure"+"."+"tls"+"."+"ca", "body", m.Ca); err != nil {
return err
}
if m.Ca != nil {
if err := m.Ca.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("keysecure" + "." + "tls" + "." + "ca")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("keysecure" + "." + "tls" + "." + "ca")
}
return err
}
}
return nil
}
// ContextValidate validate this gemalto configuration response keysecure TLS based on the context it is used
func (m *GemaltoConfigurationResponseKeysecureTLS) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateCa(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *GemaltoConfigurationResponseKeysecureTLS) contextValidateCa(ctx context.Context, formats strfmt.Registry) error {
if m.Ca != nil {
if err := m.Ca.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("keysecure" + "." + "tls" + "." + "ca")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("keysecure" + "." + "tls" + "." + "ca")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *GemaltoConfigurationResponseKeysecureTLS) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *GemaltoConfigurationResponseKeysecureTLS) UnmarshalBinary(b []byte) error {
var res GemaltoConfigurationResponseKeysecureTLS
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -55,9 +55,6 @@ type VaultConfiguration struct {
// status
Status *VaultConfigurationStatus `json:"status,omitempty"`
// tls
TLS *VaultConfigurationTLS `json:"tls,omitempty"`
}
// Validate validates this vault configuration
@@ -76,10 +73,6 @@ func (m *VaultConfiguration) Validate(formats strfmt.Registry) error {
res = append(res, err)
}
if err := m.validateTLS(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
@@ -134,25 +127,6 @@ func (m *VaultConfiguration) validateStatus(formats strfmt.Registry) error {
return nil
}
func (m *VaultConfiguration) validateTLS(formats strfmt.Registry) error {
if swag.IsZero(m.TLS) { // not required
return nil
}
if m.TLS != nil {
if err := m.TLS.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("tls")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("tls")
}
return err
}
}
return nil
}
// ContextValidate validate this vault configuration based on the context it is used
func (m *VaultConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
@@ -165,10 +139,6 @@ func (m *VaultConfiguration) ContextValidate(ctx context.Context, formats strfmt
res = append(res, err)
}
if err := m.contextValidateTLS(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
@@ -207,22 +177,6 @@ func (m *VaultConfiguration) contextValidateStatus(ctx context.Context, formats
return nil
}
func (m *VaultConfiguration) contextValidateTLS(ctx context.Context, formats strfmt.Registry) error {
if m.TLS != nil {
if err := m.TLS.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("tls")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("tls")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *VaultConfiguration) MarshalBinary() ([]byte, error) {
if m == nil {
@@ -356,46 +310,3 @@ func (m *VaultConfigurationStatus) UnmarshalBinary(b []byte) error {
*m = res
return nil
}
// VaultConfigurationTLS vault configuration TLS
//
// swagger:model VaultConfigurationTLS
type VaultConfigurationTLS struct {
// ca
Ca string `json:"ca,omitempty"`
// crt
Crt string `json:"crt,omitempty"`
// key
Key string `json:"key,omitempty"`
}
// Validate validates this vault configuration TLS
func (m *VaultConfigurationTLS) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this vault configuration TLS based on context it is used
func (m *VaultConfigurationTLS) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *VaultConfigurationTLS) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *VaultConfigurationTLS) UnmarshalBinary(b []byte) error {
var res VaultConfigurationTLS
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -55,9 +55,6 @@ type VaultConfigurationResponse struct {
// status
Status *VaultConfigurationResponseStatus `json:"status,omitempty"`
// tls
TLS *VaultConfigurationResponseTLS `json:"tls,omitempty"`
}
// Validate validates this vault configuration response
@@ -76,10 +73,6 @@ func (m *VaultConfigurationResponse) Validate(formats strfmt.Registry) error {
res = append(res, err)
}
if err := m.validateTLS(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
@@ -134,25 +127,6 @@ func (m *VaultConfigurationResponse) validateStatus(formats strfmt.Registry) err
return nil
}
func (m *VaultConfigurationResponse) validateTLS(formats strfmt.Registry) error {
if swag.IsZero(m.TLS) { // not required
return nil
}
if m.TLS != nil {
if err := m.TLS.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("tls")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("tls")
}
return err
}
}
return nil
}
// ContextValidate validate this vault configuration response based on the context it is used
func (m *VaultConfigurationResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
@@ -165,10 +139,6 @@ func (m *VaultConfigurationResponse) ContextValidate(ctx context.Context, format
res = append(res, err)
}
if err := m.contextValidateTLS(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
@@ -207,22 +177,6 @@ func (m *VaultConfigurationResponse) contextValidateStatus(ctx context.Context,
return nil
}
func (m *VaultConfigurationResponse) contextValidateTLS(ctx context.Context, formats strfmt.Registry) error {
if m.TLS != nil {
if err := m.TLS.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("tls")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("tls")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *VaultConfigurationResponse) MarshalBinary() ([]byte, error) {
if m == nil {
@@ -356,139 +310,3 @@ func (m *VaultConfigurationResponseStatus) UnmarshalBinary(b []byte) error {
*m = res
return nil
}
// VaultConfigurationResponseTLS vault configuration response TLS
//
// swagger:model VaultConfigurationResponseTLS
type VaultConfigurationResponseTLS struct {
// ca
Ca *CertificateInfo `json:"ca,omitempty"`
// crt
Crt *CertificateInfo `json:"crt,omitempty"`
}
// Validate validates this vault configuration response TLS
func (m *VaultConfigurationResponseTLS) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateCa(formats); err != nil {
res = append(res, err)
}
if err := m.validateCrt(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *VaultConfigurationResponseTLS) validateCa(formats strfmt.Registry) error {
if swag.IsZero(m.Ca) { // not required
return nil
}
if m.Ca != nil {
if err := m.Ca.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("tls" + "." + "ca")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("tls" + "." + "ca")
}
return err
}
}
return nil
}
func (m *VaultConfigurationResponseTLS) validateCrt(formats strfmt.Registry) error {
if swag.IsZero(m.Crt) { // not required
return nil
}
if m.Crt != nil {
if err := m.Crt.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("tls" + "." + "crt")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("tls" + "." + "crt")
}
return err
}
}
return nil
}
// ContextValidate validate this vault configuration response TLS based on the context it is used
func (m *VaultConfigurationResponseTLS) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateCa(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateCrt(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *VaultConfigurationResponseTLS) contextValidateCa(ctx context.Context, formats strfmt.Registry) error {
if m.Ca != nil {
if err := m.Ca.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("tls" + "." + "ca")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("tls" + "." + "ca")
}
return err
}
}
return nil
}
func (m *VaultConfigurationResponseTLS) contextValidateCrt(ctx context.Context, formats strfmt.Registry) error {
if m.Crt != nil {
if err := m.Crt.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("tls" + "." + "crt")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("tls" + "." + "crt")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *VaultConfigurationResponseTLS) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *VaultConfigurationResponseTLS) UnmarshalBinary(b []byte) error {
var res VaultConfigurationResponseTLS
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}