Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SECURESIGN-994] Add TLS to Fulcio and CTlog services #492

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
1 change: 0 additions & 1 deletion api/v1alpha1/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ type CtlogService struct {
// Port of Ctlog Log Server End point
//+kubebuilder:validation:Minimum:=1
//+kubebuilder:validation:Maximum:=65535
//+kubebuilder:default:=80
//+optional
Port *int32 `json:"port,omitempty"`
// Prefix is the name of the log. The prefix cannot be empty and can
Expand Down
4 changes: 4 additions & 0 deletions api/v1alpha1/ctlog_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ type CTlogSpec struct {
// publicKeyRef, rootCertificates and trillian will be overridden.
//+optional
ServerConfigRef *LocalObjectReference `json:"serverConfigRef,omitempty"`
// Configuration for enabling TLS (Transport Layer Security) encryption for CTlog.
//+optional
TLS TLS `json:"tls,omitempty"`
}

// CTlogStatus defines the observed state of CTlog component
Expand All @@ -57,6 +60,7 @@ type CTlogStatus struct {
PrivateKeyPasswordRef *SecretKeySelector `json:"privateKeyPasswordRef,omitempty"`
PublicKeyRef *SecretKeySelector `json:"publicKeyRef,omitempty"`
RootCertificates []SecretKeySelector `json:"rootCertificates,omitempty"`
TLS TLS `json:"tls,omitempty"`
// The ID of a Trillian tree that stores the log data.
TreeID *int64 `json:"treeID,omitempty"`
// +listType=map
Expand Down
2 changes: 1 addition & 1 deletion api/v1alpha1/fulcio_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type FulcioSpec struct {
ExternalAccess ExternalAccess `json:"externalAccess,omitempty"`
// Ctlog service configuration
//+optional
//+kubebuilder:default:={port: 80, prefix: trusted-artifact-signer}
//+kubebuilder:default:={prefix: trusted-artifact-signer}
Ctlog CtlogService `json:"ctlog,omitempty"`
// Fulcio Configuration
//+required
Expand Down
2 changes: 2 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bundle/manifests/rhtas-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ metadata:
]
capabilities: Seamless Upgrades
containerImage: registry.redhat.io/rhtas/rhtas-rhel9-operator@sha256:028b6eec7f821b18cf710237a7613ef76d2bacdeff56462368e4e186f26627cc
createdAt: "2024-09-11T13:45:32Z"
createdAt: "2024-09-16T09:07:25Z"
features.operators.openshift.io/cnf: "false"
features.operators.openshift.io/cni: "false"
features.operators.openshift.io/csi: "false"
Expand Down
92 changes: 92 additions & 0 deletions bundle/manifests/rhtas.redhat.com_ctlogs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,52 @@ spec:
- name
type: object
x-kubernetes-map-type: atomic
tls:
description: Configuration for enabling TLS (Transport Layer Security)
encryption for CTlog.
properties:
certificateRef:
description: Reference to the certificate secret used for TLS
encryption.
properties:
key:
description: The key of the secret to select from. Must be
a valid secret key.
pattern: ^[-._a-zA-Z0-9]+$
type: string
name:
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
type: string
required:
- key
- name
type: object
x-kubernetes-map-type: atomic
privateKeyRef:
description: Reference to the private key secret used for TLS
encryption.
properties:
key:
description: The key of the secret to select from. Must be
a valid secret key.
pattern: ^[-._a-zA-Z0-9]+$
type: string
name:
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
type: string
required:
- key
- name
type: object
x-kubernetes-map-type: atomic
type: object
x-kubernetes-validations:
- message: privateKeyRef cannot be empty
rule: (!has(self.certificateRef) || has(self.privateKeyRef))
treeID:
description: |-
The ID of a Trillian tree that stores the log data.
Expand Down Expand Up @@ -343,6 +389,52 @@ spec:
- name
type: object
x-kubernetes-map-type: atomic
tls:
description: TLS (Transport Layer Security) Configuration for enabling
service encryption.
properties:
certificateRef:
description: Reference to the certificate secret used for TLS
encryption.
properties:
key:
description: The key of the secret to select from. Must be
a valid secret key.
pattern: ^[-._a-zA-Z0-9]+$
type: string
name:
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
type: string
required:
- key
- name
type: object
x-kubernetes-map-type: atomic
privateKeyRef:
description: Reference to the private key secret used for TLS
encryption.
properties:
key:
description: The key of the secret to select from. Must be
a valid secret key.
pattern: ^[-._a-zA-Z0-9]+$
type: string
name:
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
type: string
required:
- key
- name
type: object
x-kubernetes-map-type: atomic
type: object
x-kubernetes-validations:
- message: privateKeyRef cannot be empty
rule: (!has(self.certificateRef) || has(self.privateKeyRef))
treeID:
description: The ID of a Trillian tree that stores the log data.
format: int64
Expand Down
2 changes: 0 additions & 2 deletions bundle/manifests/rhtas.redhat.com_fulcios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,13 @@ spec:
(has(self.MetaIssuers) && (size(self.MetaIssuers) > 0))
ctlog:
default:
port: 80
prefix: trusted-artifact-signer
description: Ctlog service configuration
properties:
address:
description: Address to Ctlog Log Server End point
type: string
port:
default: 80
description: Port of Ctlog Log Server End point
format: int32
maximum: 65535
Expand Down
48 changes: 46 additions & 2 deletions bundle/manifests/rhtas.redhat.com_securesigns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,52 @@ spec:
- name
type: object
x-kubernetes-map-type: atomic
tls:
description: Configuration for enabling TLS (Transport Layer Security)
encryption for CTlog.
properties:
certificateRef:
description: Reference to the certificate secret used for
TLS encryption.
properties:
key:
description: The key of the secret to select from. Must
be a valid secret key.
pattern: ^[-._a-zA-Z0-9]+$
type: string
name:
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
type: string
required:
- key
- name
type: object
x-kubernetes-map-type: atomic
privateKeyRef:
description: Reference to the private key secret used for
TLS encryption.
properties:
key:
description: The key of the secret to select from. Must
be a valid secret key.
pattern: ^[-._a-zA-Z0-9]+$
type: string
name:
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
type: string
required:
- key
- name
type: object
x-kubernetes-map-type: atomic
type: object
x-kubernetes-validations:
- message: privateKeyRef cannot be empty
rule: (!has(self.certificateRef) || has(self.privateKeyRef))
treeID:
description: |-
The ID of a Trillian tree that stores the log data.
Expand Down Expand Up @@ -375,15 +421,13 @@ spec:
|| (has(self.MetaIssuers) && (size(self.MetaIssuers) > 0))
ctlog:
default:
port: 80
prefix: trusted-artifact-signer
description: Ctlog service configuration
properties:
address:
description: Address to Ctlog Log Server End point
type: string
port:
default: 80
description: Port of Ctlog Log Server End point
format: int32
maximum: 65535
Expand Down
92 changes: 92 additions & 0 deletions config/crd/bases/rhtas.redhat.com_ctlogs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,52 @@ spec:
- name
type: object
x-kubernetes-map-type: atomic
tls:
description: Configuration for enabling TLS (Transport Layer Security)
encryption for CTlog.
properties:
certificateRef:
description: Reference to the certificate secret used for TLS
encryption.
properties:
key:
description: The key of the secret to select from. Must be
a valid secret key.
pattern: ^[-._a-zA-Z0-9]+$
type: string
name:
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
type: string
required:
- key
- name
type: object
x-kubernetes-map-type: atomic
privateKeyRef:
description: Reference to the private key secret used for TLS
encryption.
properties:
key:
description: The key of the secret to select from. Must be
a valid secret key.
pattern: ^[-._a-zA-Z0-9]+$
type: string
name:
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
type: string
required:
- key
- name
type: object
x-kubernetes-map-type: atomic
type: object
x-kubernetes-validations:
- message: privateKeyRef cannot be empty
rule: (!has(self.certificateRef) || has(self.privateKeyRef))
treeID:
description: |-
The ID of a Trillian tree that stores the log data.
Expand Down Expand Up @@ -343,6 +389,52 @@ spec:
- name
type: object
x-kubernetes-map-type: atomic
tls:
description: TLS (Transport Layer Security) Configuration for enabling
service encryption.
properties:
certificateRef:
description: Reference to the certificate secret used for TLS
encryption.
properties:
key:
description: The key of the secret to select from. Must be
a valid secret key.
pattern: ^[-._a-zA-Z0-9]+$
type: string
name:
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
type: string
required:
- key
- name
type: object
x-kubernetes-map-type: atomic
privateKeyRef:
description: Reference to the private key secret used for TLS
encryption.
properties:
key:
description: The key of the secret to select from. Must be
a valid secret key.
pattern: ^[-._a-zA-Z0-9]+$
type: string
name:
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
type: string
required:
- key
- name
type: object
x-kubernetes-map-type: atomic
type: object
x-kubernetes-validations:
- message: privateKeyRef cannot be empty
rule: (!has(self.certificateRef) || has(self.privateKeyRef))
treeID:
description: The ID of a Trillian tree that stores the log data.
format: int64
Expand Down
2 changes: 0 additions & 2 deletions config/crd/bases/rhtas.redhat.com_fulcios.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,13 @@ spec:
(has(self.MetaIssuers) && (size(self.MetaIssuers) > 0))
ctlog:
default:
port: 80
prefix: trusted-artifact-signer
description: Ctlog service configuration
properties:
address:
description: Address to Ctlog Log Server End point
type: string
port:
default: 80
description: Port of Ctlog Log Server End point
format: int32
maximum: 65535
Expand Down
Loading
Loading