Skip to content

Commit

Permalink
Add support for TLS specs
Browse files Browse the repository at this point in the history
Signed-off-by: Veronika Fisarova <[email protected]>
  • Loading branch information
Deydra71 committed Sep 29, 2023
1 parent 4f97c2d commit 092b79c
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions modules/common/tls/tls.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
Copyright 2022 Red Hat
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package tls

// Service contains server-specific TLS secret
type Service struct {
// Server-specific settings
SecretName string `json:"secretName,omitempty"`
DisableNonTLSListeners bool `json:"disableNonTLSListeners,omitempty"`
}

// Ca contains CA-specific settings, which could be used both by services (to define their own CA certificates)
// and by clients (to verify the server's certificate)
type Ca struct {
// CA-specific settings
CaSecretName string `json:"caSecretName,omitempty"`
}

// TLS - a generic type, which encapsulates both the service and CA configurations
type TLS struct {
Service *Service `json:"service"`
Ca *Ca `json:"ca"`
}

0 comments on commit 092b79c

Please sign in to comment.