diff --git a/config/v1alpha1/types_image_policy.go b/config/v1alpha1/types_image_policy.go
index a177ddb0d66..d4c12fd3bd2 100644
--- a/config/v1alpha1/types_image_policy.go
+++ b/config/v1alpha1/types_image_policy.go
@@ -73,10 +73,12 @@ type Policy struct {
// +union
// +kubebuilder:validation:XValidation:rule="has(self.policyType) && self.policyType == 'PublicKey' ? has(self.publicKey) : !has(self.publicKey)",message="publicKey is required when policyType is PublicKey, and forbidden otherwise"
// +kubebuilder:validation:XValidation:rule="has(self.policyType) && self.policyType == 'FulcioCAWithRekor' ? has(self.fulcioCAWithRekor) : !has(self.fulcioCAWithRekor)",message="fulcioCAWithRekor is required when policyType is FulcioCAWithRekor, and forbidden otherwise"
+// +kubebuilder:validation:XValidation:rule="has(self.policyType) && self.policyType == 'PKI' ? has(self.pki) : !has(self.pki)",message="pki is required when policyType is PKI, and forbidden otherwise"
type PolicyRootOfTrust struct {
// policyType serves as the union's discriminator. Users are required to assign a value to this field, choosing one of the policy types that define the root of trust.
// "PublicKey" indicates that the policy relies on a sigstore publicKey and may optionally use a Rekor verification.
// "FulcioCAWithRekor" indicates that the policy is based on the Fulcio certification and incorporates a Rekor verification.
+ // "PKI" is a DevPreview feature that indicates that the policy is based on the certificates from Bring Your Own Public Key Infrastructure (BYOPKI).
// +unionDiscriminator
// +kubebuilder:validation:Required
PolicyType PolicyType `json:"policyType"`
@@ -88,14 +90,19 @@ type PolicyRootOfTrust struct {
// https://github.com/sigstore/fulcio and https://github.com/sigstore/rekor
// +optional
FulcioCAWithRekor *FulcioCAWithRekor `json:"fulcioCAWithRekor,omitempty"`
+ // pki defines the root of trust based on Bring Your Own Public Key Infrastructure (BYOPKI) Root CA(s) and corresponding intermediate certificates.
+ // +optional
+ // +openshift:enable:FeatureGate=SigstoreImageVerificationPKI
+ PKI *PKI `json:"pki,omitempty"`
}
-// +kubebuilder:validation:Enum=PublicKey;FulcioCAWithRekor
+// +kubebuilder:validation:Enum=PublicKey;FulcioCAWithRekor;PKI
type PolicyType string
const (
PublicKeyRootOfTrust PolicyType = "PublicKey"
FulcioCAWithRekorRootOfTrust PolicyType = "FulcioCAWithRekor"
+ PKIRootOfTrust PolicyType = "PKI"
)
// PublicKey defines the root of trust based on a sigstore public key.
@@ -143,6 +150,36 @@ type PolicyFulcioSubject struct {
SignedEmail string `json:"signedEmail"`
}
+// PKI defines the root of trust based on Root CA(s) and corresponding intermediate certificates.
+type PKI struct {
+ // caRootsData contains base64-encoded data of a certificate bundle PEM file, which contains one or more CA roots in the PEM format.
+ // +kubebuilder:validation:Required
+ // +kubebuilder:validation:MaxLength=8192
+ CertificateAuthorityRootsData []byte `json:"caRootsData"`
+ // caIntermediatesData contains base64-encoded data of a certificate bundle PEM file, which contains one or more intermediate certificates in the PEM format.
+ // caIntermediatesData requires CertificateAuthorityRoots to be set.
+ // +optional
+ // +kubebuilder:validation:MaxLength=8192
+ CertificateAuthorityIntermediatesData []byte `json:"caIntermediatesData,omitempty"`
+
+ // pkiCertificateSubject defines the requirements imposed on the subject to which the certificate was issued.
+ // +kubebuilder:validation:Required
+ PKICertificateSubject *PKICertificateSubject `json:"pkiCertificateSubject"`
+}
+
+// PKICertificateSubject defines the requirements imposed on the subject to which the certificate was issued.
+// +kubebuilder:validation:XValidation:rule="has(self.email) || has(self.hostname)", message="at least one of email or hostname must be set in pkiCertificateSubject"
+type PKICertificateSubject struct {
+ // email specifies the expected email address imposed on the subject to which the certificate was issued.
+ // +optional
+ // +kubebuilder:validation:XValidation:rule=`self.matches('^\\S+@\\S+$')`,message="invalid email address in pkiCertificateSubject"
+ Email string `json:"email,omitempty"`
+ // Hostname specifies the expected hostname imposed on the subject to which the certificate was issued.
+ // +optional
+ // +kubebuilder:validation:XValidation:rule=`self.matches('^(\\*\\.)?([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+\\.[a-zA-Z]{2,}$')`,message="invalid hostname in pkiCertificateSubject"
+ Hostname string `json:"hostname,omitempty"`
+}
+
// PolicyIdentity defines image identity the signature claims about the image. When omitted, the default matchPolicy is "MatchRepoDigestOrExact".
// +kubebuilder:validation:XValidation:rule="(has(self.matchPolicy) && self.matchPolicy == 'ExactRepository') ? has(self.exactRepository) : !has(self.exactRepository)",message="exactRepository is required when matchPolicy is ExactRepository, and forbidden otherwise"
// +kubebuilder:validation:XValidation:rule="(has(self.matchPolicy) && self.matchPolicy == 'RemapIdentity') ? has(self.remapIdentity) : !has(self.remapIdentity)",message="remapIdentity is required when matchPolicy is RemapIdentity, and forbidden otherwise"
diff --git a/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clusterimagepolicies-CustomNoUpgrade.crd.yaml b/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clusterimagepolicies-CustomNoUpgrade.crd.yaml
index 4bf43427549..a06fbc2142d 100644
--- a/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clusterimagepolicies-CustomNoUpgrade.crd.yaml
+++ b/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clusterimagepolicies-CustomNoUpgrade.crd.yaml
@@ -102,14 +102,65 @@ spec:
- fulcioSubject
- rekorKeyData
type: object
+ pki:
+ description: pki defines the root of trust based on Bring
+ Your Own Public Key Infrastructure (BYOPKI) Root CA(s) and
+ corresponding intermediate certificates.
+ properties:
+ caIntermediatesData:
+ description: |-
+ caIntermediatesData contains base64-encoded data of a certificate bundle PEM file, which contains one or more intermediate certificates in the PEM format.
+ caIntermediatesData requires CertificateAuthorityRoots to be set.
+ format: byte
+ maxLength: 8192
+ type: string
+ caRootsData:
+ description: caRootsData contains base64-encoded data
+ of a certificate bundle PEM file, which contains one
+ or more CA roots in the PEM format.
+ format: byte
+ maxLength: 8192
+ type: string
+ pkiCertificateSubject:
+ description: pkiCertificateSubject defines the requirements
+ imposed on the subject to which the certificate was
+ issued.
+ properties:
+ email:
+ description: email specifies the expected email address
+ imposed on the subject to which the certificate
+ was issued.
+ type: string
+ x-kubernetes-validations:
+ - message: invalid email address in pkiCertificateSubject
+ rule: self.matches('^\\S+@\\S+$')
+ hostname:
+ description: Hostname specifies the expected hostname
+ imposed on the subject to which the certificate
+ was issued.
+ type: string
+ x-kubernetes-validations:
+ - message: invalid hostname in pkiCertificateSubject
+ rule: self.matches('^(\\*\\.)?([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+\\.[a-zA-Z]{2,}$')
+ type: object
+ x-kubernetes-validations:
+ - message: at least one of email or hostname must be set
+ in pkiCertificateSubject
+ rule: has(self.email) || has(self.hostname)
+ required:
+ - caRootsData
+ - pkiCertificateSubject
+ type: object
policyType:
description: |-
policyType serves as the union's discriminator. Users are required to assign a value to this field, choosing one of the policy types that define the root of trust.
"PublicKey" indicates that the policy relies on a sigstore publicKey and may optionally use a Rekor verification.
"FulcioCAWithRekor" indicates that the policy is based on the Fulcio certification and incorporates a Rekor verification.
+ "PKI" is a DevPreview feature that indicates that the policy is based on the certificates from Bring Your Own Public Key Infrastructure (BYOPKI).
enum:
- PublicKey
- FulcioCAWithRekor
+ - PKI
type: string
publicKey:
description: publicKey defines the root of trust based on
@@ -144,6 +195,10 @@ spec:
and forbidden otherwise
rule: 'has(self.policyType) && self.policyType == ''FulcioCAWithRekor''
? has(self.fulcioCAWithRekor) : !has(self.fulcioCAWithRekor)'
+ - message: pki is required when policyType is PKI, and forbidden
+ otherwise
+ rule: 'has(self.policyType) && self.policyType == ''PKI'' ?
+ has(self.pki) : !has(self.pki)'
signedIdentity:
description: signedIdentity specifies what image identity the
signature claims about the image. The required matchPolicy field
diff --git a/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clusterimagepolicies-DevPreviewNoUpgrade.crd.yaml b/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clusterimagepolicies-DevPreviewNoUpgrade.crd.yaml
index 5881ce95955..9a58f1f776f 100644
--- a/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clusterimagepolicies-DevPreviewNoUpgrade.crd.yaml
+++ b/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clusterimagepolicies-DevPreviewNoUpgrade.crd.yaml
@@ -102,14 +102,65 @@ spec:
- fulcioSubject
- rekorKeyData
type: object
+ pki:
+ description: pki defines the root of trust based on Bring
+ Your Own Public Key Infrastructure (BYOPKI) Root CA(s) and
+ corresponding intermediate certificates.
+ properties:
+ caIntermediatesData:
+ description: |-
+ caIntermediatesData contains base64-encoded data of a certificate bundle PEM file, which contains one or more intermediate certificates in the PEM format.
+ caIntermediatesData requires CertificateAuthorityRoots to be set.
+ format: byte
+ maxLength: 8192
+ type: string
+ caRootsData:
+ description: caRootsData contains base64-encoded data
+ of a certificate bundle PEM file, which contains one
+ or more CA roots in the PEM format.
+ format: byte
+ maxLength: 8192
+ type: string
+ pkiCertificateSubject:
+ description: pkiCertificateSubject defines the requirements
+ imposed on the subject to which the certificate was
+ issued.
+ properties:
+ email:
+ description: email specifies the expected email address
+ imposed on the subject to which the certificate
+ was issued.
+ type: string
+ x-kubernetes-validations:
+ - message: invalid email address in pkiCertificateSubject
+ rule: self.matches('^\\S+@\\S+$')
+ hostname:
+ description: Hostname specifies the expected hostname
+ imposed on the subject to which the certificate
+ was issued.
+ type: string
+ x-kubernetes-validations:
+ - message: invalid hostname in pkiCertificateSubject
+ rule: self.matches('^(\\*\\.)?([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+\\.[a-zA-Z]{2,}$')
+ type: object
+ x-kubernetes-validations:
+ - message: at least one of email or hostname must be set
+ in pkiCertificateSubject
+ rule: has(self.email) || has(self.hostname)
+ required:
+ - caRootsData
+ - pkiCertificateSubject
+ type: object
policyType:
description: |-
policyType serves as the union's discriminator. Users are required to assign a value to this field, choosing one of the policy types that define the root of trust.
"PublicKey" indicates that the policy relies on a sigstore publicKey and may optionally use a Rekor verification.
"FulcioCAWithRekor" indicates that the policy is based on the Fulcio certification and incorporates a Rekor verification.
+ "PKI" is a DevPreview feature that indicates that the policy is based on the certificates from Bring Your Own Public Key Infrastructure (BYOPKI).
enum:
- PublicKey
- FulcioCAWithRekor
+ - PKI
type: string
publicKey:
description: publicKey defines the root of trust based on
@@ -144,6 +195,10 @@ spec:
and forbidden otherwise
rule: 'has(self.policyType) && self.policyType == ''FulcioCAWithRekor''
? has(self.fulcioCAWithRekor) : !has(self.fulcioCAWithRekor)'
+ - message: pki is required when policyType is PKI, and forbidden
+ otherwise
+ rule: 'has(self.policyType) && self.policyType == ''PKI'' ?
+ has(self.pki) : !has(self.pki)'
signedIdentity:
description: signedIdentity specifies what image identity the
signature claims about the image. The required matchPolicy field
diff --git a/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clusterimagepolicies-TechPreviewNoUpgrade.crd.yaml b/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clusterimagepolicies-TechPreviewNoUpgrade.crd.yaml
index bece5395b83..41395eedc9b 100644
--- a/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clusterimagepolicies-TechPreviewNoUpgrade.crd.yaml
+++ b/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_clusterimagepolicies-TechPreviewNoUpgrade.crd.yaml
@@ -107,9 +107,11 @@ spec:
policyType serves as the union's discriminator. Users are required to assign a value to this field, choosing one of the policy types that define the root of trust.
"PublicKey" indicates that the policy relies on a sigstore publicKey and may optionally use a Rekor verification.
"FulcioCAWithRekor" indicates that the policy is based on the Fulcio certification and incorporates a Rekor verification.
+ "PKI" is a DevPreview feature that indicates that the policy is based on the certificates from Bring Your Own Public Key Infrastructure (BYOPKI).
enum:
- PublicKey
- FulcioCAWithRekor
+ - PKI
type: string
publicKey:
description: publicKey defines the root of trust based on
@@ -144,6 +146,10 @@ spec:
and forbidden otherwise
rule: 'has(self.policyType) && self.policyType == ''FulcioCAWithRekor''
? has(self.fulcioCAWithRekor) : !has(self.fulcioCAWithRekor)'
+ - message: pki is required when policyType is PKI, and forbidden
+ otherwise
+ rule: 'has(self.policyType) && self.policyType == ''PKI'' ?
+ has(self.pki) : !has(self.pki)'
signedIdentity:
description: signedIdentity specifies what image identity the
signature claims about the image. The required matchPolicy field
diff --git a/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_imagepolicies-CustomNoUpgrade.crd.yaml b/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_imagepolicies-CustomNoUpgrade.crd.yaml
index 58102a8d741..2c1c65dcc3a 100644
--- a/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_imagepolicies-CustomNoUpgrade.crd.yaml
+++ b/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_imagepolicies-CustomNoUpgrade.crd.yaml
@@ -102,14 +102,65 @@ spec:
- fulcioSubject
- rekorKeyData
type: object
+ pki:
+ description: pki defines the root of trust based on Bring
+ Your Own Public Key Infrastructure (BYOPKI) Root CA(s) and
+ corresponding intermediate certificates.
+ properties:
+ caIntermediatesData:
+ description: |-
+ caIntermediatesData contains base64-encoded data of a certificate bundle PEM file, which contains one or more intermediate certificates in the PEM format.
+ caIntermediatesData requires CertificateAuthorityRoots to be set.
+ format: byte
+ maxLength: 8192
+ type: string
+ caRootsData:
+ description: caRootsData contains base64-encoded data
+ of a certificate bundle PEM file, which contains one
+ or more CA roots in the PEM format.
+ format: byte
+ maxLength: 8192
+ type: string
+ pkiCertificateSubject:
+ description: pkiCertificateSubject defines the requirements
+ imposed on the subject to which the certificate was
+ issued.
+ properties:
+ email:
+ description: email specifies the expected email address
+ imposed on the subject to which the certificate
+ was issued.
+ type: string
+ x-kubernetes-validations:
+ - message: invalid email address in pkiCertificateSubject
+ rule: self.matches('^\\S+@\\S+$')
+ hostname:
+ description: Hostname specifies the expected hostname
+ imposed on the subject to which the certificate
+ was issued.
+ type: string
+ x-kubernetes-validations:
+ - message: invalid hostname in pkiCertificateSubject
+ rule: self.matches('^(\\*\\.)?([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+\\.[a-zA-Z]{2,}$')
+ type: object
+ x-kubernetes-validations:
+ - message: at least one of email or hostname must be set
+ in pkiCertificateSubject
+ rule: has(self.email) || has(self.hostname)
+ required:
+ - caRootsData
+ - pkiCertificateSubject
+ type: object
policyType:
description: |-
policyType serves as the union's discriminator. Users are required to assign a value to this field, choosing one of the policy types that define the root of trust.
"PublicKey" indicates that the policy relies on a sigstore publicKey and may optionally use a Rekor verification.
"FulcioCAWithRekor" indicates that the policy is based on the Fulcio certification and incorporates a Rekor verification.
+ "PKI" is a DevPreview feature that indicates that the policy is based on the certificates from Bring Your Own Public Key Infrastructure (BYOPKI).
enum:
- PublicKey
- FulcioCAWithRekor
+ - PKI
type: string
publicKey:
description: publicKey defines the root of trust based on
@@ -144,6 +195,10 @@ spec:
and forbidden otherwise
rule: 'has(self.policyType) && self.policyType == ''FulcioCAWithRekor''
? has(self.fulcioCAWithRekor) : !has(self.fulcioCAWithRekor)'
+ - message: pki is required when policyType is PKI, and forbidden
+ otherwise
+ rule: 'has(self.policyType) && self.policyType == ''PKI'' ?
+ has(self.pki) : !has(self.pki)'
signedIdentity:
description: signedIdentity specifies what image identity the
signature claims about the image. The required matchPolicy field
diff --git a/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_imagepolicies-DevPreviewNoUpgrade.crd.yaml b/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_imagepolicies-DevPreviewNoUpgrade.crd.yaml
index 4fb733479f2..9b6b5bab8a6 100644
--- a/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_imagepolicies-DevPreviewNoUpgrade.crd.yaml
+++ b/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_imagepolicies-DevPreviewNoUpgrade.crd.yaml
@@ -102,14 +102,65 @@ spec:
- fulcioSubject
- rekorKeyData
type: object
+ pki:
+ description: pki defines the root of trust based on Bring
+ Your Own Public Key Infrastructure (BYOPKI) Root CA(s) and
+ corresponding intermediate certificates.
+ properties:
+ caIntermediatesData:
+ description: |-
+ caIntermediatesData contains base64-encoded data of a certificate bundle PEM file, which contains one or more intermediate certificates in the PEM format.
+ caIntermediatesData requires CertificateAuthorityRoots to be set.
+ format: byte
+ maxLength: 8192
+ type: string
+ caRootsData:
+ description: caRootsData contains base64-encoded data
+ of a certificate bundle PEM file, which contains one
+ or more CA roots in the PEM format.
+ format: byte
+ maxLength: 8192
+ type: string
+ pkiCertificateSubject:
+ description: pkiCertificateSubject defines the requirements
+ imposed on the subject to which the certificate was
+ issued.
+ properties:
+ email:
+ description: email specifies the expected email address
+ imposed on the subject to which the certificate
+ was issued.
+ type: string
+ x-kubernetes-validations:
+ - message: invalid email address in pkiCertificateSubject
+ rule: self.matches('^\\S+@\\S+$')
+ hostname:
+ description: Hostname specifies the expected hostname
+ imposed on the subject to which the certificate
+ was issued.
+ type: string
+ x-kubernetes-validations:
+ - message: invalid hostname in pkiCertificateSubject
+ rule: self.matches('^(\\*\\.)?([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+\\.[a-zA-Z]{2,}$')
+ type: object
+ x-kubernetes-validations:
+ - message: at least one of email or hostname must be set
+ in pkiCertificateSubject
+ rule: has(self.email) || has(self.hostname)
+ required:
+ - caRootsData
+ - pkiCertificateSubject
+ type: object
policyType:
description: |-
policyType serves as the union's discriminator. Users are required to assign a value to this field, choosing one of the policy types that define the root of trust.
"PublicKey" indicates that the policy relies on a sigstore publicKey and may optionally use a Rekor verification.
"FulcioCAWithRekor" indicates that the policy is based on the Fulcio certification and incorporates a Rekor verification.
+ "PKI" is a DevPreview feature that indicates that the policy is based on the certificates from Bring Your Own Public Key Infrastructure (BYOPKI).
enum:
- PublicKey
- FulcioCAWithRekor
+ - PKI
type: string
publicKey:
description: publicKey defines the root of trust based on
@@ -144,6 +195,10 @@ spec:
and forbidden otherwise
rule: 'has(self.policyType) && self.policyType == ''FulcioCAWithRekor''
? has(self.fulcioCAWithRekor) : !has(self.fulcioCAWithRekor)'
+ - message: pki is required when policyType is PKI, and forbidden
+ otherwise
+ rule: 'has(self.policyType) && self.policyType == ''PKI'' ?
+ has(self.pki) : !has(self.pki)'
signedIdentity:
description: signedIdentity specifies what image identity the
signature claims about the image. The required matchPolicy field
diff --git a/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_imagepolicies-TechPreviewNoUpgrade.crd.yaml b/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_imagepolicies-TechPreviewNoUpgrade.crd.yaml
index 7b531611db2..1d398d1f3c1 100644
--- a/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_imagepolicies-TechPreviewNoUpgrade.crd.yaml
+++ b/config/v1alpha1/zz_generated.crd-manifests/0000_10_config-operator_01_imagepolicies-TechPreviewNoUpgrade.crd.yaml
@@ -107,9 +107,11 @@ spec:
policyType serves as the union's discriminator. Users are required to assign a value to this field, choosing one of the policy types that define the root of trust.
"PublicKey" indicates that the policy relies on a sigstore publicKey and may optionally use a Rekor verification.
"FulcioCAWithRekor" indicates that the policy is based on the Fulcio certification and incorporates a Rekor verification.
+ "PKI" is a DevPreview feature that indicates that the policy is based on the certificates from Bring Your Own Public Key Infrastructure (BYOPKI).
enum:
- PublicKey
- FulcioCAWithRekor
+ - PKI
type: string
publicKey:
description: publicKey defines the root of trust based on
@@ -144,6 +146,10 @@ spec:
and forbidden otherwise
rule: 'has(self.policyType) && self.policyType == ''FulcioCAWithRekor''
? has(self.fulcioCAWithRekor) : !has(self.fulcioCAWithRekor)'
+ - message: pki is required when policyType is PKI, and forbidden
+ otherwise
+ rule: 'has(self.policyType) && self.policyType == ''PKI'' ?
+ has(self.pki) : !has(self.pki)'
signedIdentity:
description: signedIdentity specifies what image identity the
signature claims about the image. The required matchPolicy field
diff --git a/config/v1alpha1/zz_generated.deepcopy.go b/config/v1alpha1/zz_generated.deepcopy.go
index ab39b5b9154..ee466b469f9 100644
--- a/config/v1alpha1/zz_generated.deepcopy.go
+++ b/config/v1alpha1/zz_generated.deepcopy.go
@@ -475,6 +475,53 @@ func (in *InsightsDataGatherStatus) DeepCopy() *InsightsDataGatherStatus {
return out
}
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PKI) DeepCopyInto(out *PKI) {
+ *out = *in
+ if in.CertificateAuthorityRootsData != nil {
+ in, out := &in.CertificateAuthorityRootsData, &out.CertificateAuthorityRootsData
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ if in.CertificateAuthorityIntermediatesData != nil {
+ in, out := &in.CertificateAuthorityIntermediatesData, &out.CertificateAuthorityIntermediatesData
+ *out = make([]byte, len(*in))
+ copy(*out, *in)
+ }
+ if in.PKICertificateSubject != nil {
+ in, out := &in.PKICertificateSubject, &out.PKICertificateSubject
+ *out = new(PKICertificateSubject)
+ **out = **in
+ }
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PKI.
+func (in *PKI) DeepCopy() *PKI {
+ if in == nil {
+ return nil
+ }
+ out := new(PKI)
+ in.DeepCopyInto(out)
+ return out
+}
+
+// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
+func (in *PKICertificateSubject) DeepCopyInto(out *PKICertificateSubject) {
+ *out = *in
+ return
+}
+
+// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PKICertificateSubject.
+func (in *PKICertificateSubject) DeepCopy() *PKICertificateSubject {
+ if in == nil {
+ return nil
+ }
+ out := new(PKICertificateSubject)
+ in.DeepCopyInto(out)
+ return out
+}
+
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Policy) DeepCopyInto(out *Policy) {
*out = *in
@@ -580,6 +627,11 @@ func (in *PolicyRootOfTrust) DeepCopyInto(out *PolicyRootOfTrust) {
*out = new(FulcioCAWithRekor)
(*in).DeepCopyInto(*out)
}
+ if in.PKI != nil {
+ in, out := &in.PKI, &out.PKI
+ *out = new(PKI)
+ (*in).DeepCopyInto(*out)
+ }
return
}
diff --git a/config/v1alpha1/zz_generated.featuregated-crd-manifests.yaml b/config/v1alpha1/zz_generated.featuregated-crd-manifests.yaml
index 393365b41c3..176e0d907c3 100644
--- a/config/v1alpha1/zz_generated.featuregated-crd-manifests.yaml
+++ b/config/v1alpha1/zz_generated.featuregated-crd-manifests.yaml
@@ -29,6 +29,7 @@ clusterimagepolicies.config.openshift.io:
Category: ""
FeatureGates:
- SigstoreImageVerification
+ - SigstoreImageVerificationPKI
FilenameOperatorName: config-operator
FilenameOperatorOrdering: "01"
FilenameRunLevel: "0000_10"
@@ -52,6 +53,7 @@ imagepolicies.config.openshift.io:
Category: ""
FeatureGates:
- SigstoreImageVerification
+ - SigstoreImageVerificationPKI
FilenameOperatorName: config-operator
FilenameOperatorOrdering: "01"
FilenameRunLevel: "0000_10"
diff --git a/config/v1alpha1/zz_generated.featuregated-crd-manifests/clusterimagepolicies.config.openshift.io/SigstoreImageVerification.yaml b/config/v1alpha1/zz_generated.featuregated-crd-manifests/clusterimagepolicies.config.openshift.io/SigstoreImageVerification.yaml
index 075d2cdaf79..39e886af936 100644
--- a/config/v1alpha1/zz_generated.featuregated-crd-manifests/clusterimagepolicies.config.openshift.io/SigstoreImageVerification.yaml
+++ b/config/v1alpha1/zz_generated.featuregated-crd-manifests/clusterimagepolicies.config.openshift.io/SigstoreImageVerification.yaml
@@ -107,9 +107,11 @@ spec:
policyType serves as the union's discriminator. Users are required to assign a value to this field, choosing one of the policy types that define the root of trust.
"PublicKey" indicates that the policy relies on a sigstore publicKey and may optionally use a Rekor verification.
"FulcioCAWithRekor" indicates that the policy is based on the Fulcio certification and incorporates a Rekor verification.
+ "PKI" is a DevPreview feature that indicates that the policy is based on the certificates from Bring Your Own Public Key Infrastructure (BYOPKI).
enum:
- PublicKey
- FulcioCAWithRekor
+ - PKI
type: string
publicKey:
description: publicKey defines the root of trust based on
@@ -144,6 +146,10 @@ spec:
and forbidden otherwise
rule: 'has(self.policyType) && self.policyType == ''FulcioCAWithRekor''
? has(self.fulcioCAWithRekor) : !has(self.fulcioCAWithRekor)'
+ - message: pki is required when policyType is PKI, and forbidden
+ otherwise
+ rule: 'has(self.policyType) && self.policyType == ''PKI'' ?
+ has(self.pki) : !has(self.pki)'
signedIdentity:
description: signedIdentity specifies what image identity the
signature claims about the image. The required matchPolicy field
diff --git a/config/v1alpha1/zz_generated.featuregated-crd-manifests/clusterimagepolicies.config.openshift.io/SigstoreImageVerificationPKI.yaml b/config/v1alpha1/zz_generated.featuregated-crd-manifests/clusterimagepolicies.config.openshift.io/SigstoreImageVerificationPKI.yaml
new file mode 100644
index 00000000000..6fdcd1d7adc
--- /dev/null
+++ b/config/v1alpha1/zz_generated.featuregated-crd-manifests/clusterimagepolicies.config.openshift.io/SigstoreImageVerificationPKI.yaml
@@ -0,0 +1,407 @@
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/1457
+ api.openshift.io/filename-cvo-runlevel: "0000_10"
+ api.openshift.io/filename-operator: config-operator
+ api.openshift.io/filename-ordering: "01"
+ feature-gate.release.openshift.io/SigstoreImageVerificationPKI: "true"
+ name: clusterimagepolicies.config.openshift.io
+spec:
+ group: config.openshift.io
+ names:
+ kind: ClusterImagePolicy
+ listKind: ClusterImagePolicyList
+ plural: clusterimagepolicies
+ singular: clusterimagepolicy
+ scope: Cluster
+ versions:
+ - name: v1alpha1
+ schema:
+ openAPIV3Schema:
+ description: |-
+ ClusterImagePolicy holds cluster-wide configuration for image signature verification
+
+ Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.
+ properties:
+ apiVersion:
+ description: |-
+ APIVersion defines the versioned schema of this representation of an object.
+ Servers should convert recognized schemas to the latest internal value, and
+ may reject unrecognized values.
+ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
+ type: string
+ kind:
+ description: |-
+ Kind is a string value representing the REST resource this object represents.
+ Servers may infer this from the endpoint the client submits requests to.
+ Cannot be updated.
+ In CamelCase.
+ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: spec contains the configuration for the cluster image policy.
+ properties:
+ policy:
+ description: |-
+ policy contains configuration to allow scopes to be verified, and defines how
+ images not matching the verification policy will be treated.
+ properties:
+ rootOfTrust:
+ description: rootOfTrust specifies the root of trust for the policy.
+ properties:
+ fulcioCAWithRekor:
+ description: |-
+ fulcioCAWithRekor defines the root of trust based on the Fulcio certificate and the Rekor public key.
+ For more information about Fulcio and Rekor, please refer to the document at:
+ https://github.com/sigstore/fulcio and https://github.com/sigstore/rekor
+ properties:
+ fulcioCAData:
+ description: |-
+ fulcioCAData contains inline base64-encoded data for the PEM format fulcio CA.
+ fulcioCAData must be at most 8192 characters.
+ format: byte
+ maxLength: 8192
+ type: string
+ fulcioSubject:
+ description: fulcioSubject specifies OIDC issuer and the
+ email of the Fulcio authentication configuration.
+ properties:
+ oidcIssuer:
+ description: |-
+ oidcIssuer contains the expected OIDC issuer. It will be verified that the Fulcio-issued certificate contains a (Fulcio-defined) certificate extension pointing at this OIDC issuer URL. When Fulcio issues certificates, it includes a value based on an URL inside the client-provided ID token.
+ Example: "https://expected.OIDC.issuer/"
+ type: string
+ x-kubernetes-validations:
+ - message: oidcIssuer must be a valid URL
+ rule: isURL(self)
+ signedEmail:
+ description: |-
+ signedEmail holds the email address the the Fulcio certificate is issued for.
+ Example: "expected-signing-user@example.com"
+ type: string
+ x-kubernetes-validations:
+ - message: invalid email address
+ rule: self.matches('^\\S+@\\S+$')
+ required:
+ - oidcIssuer
+ - signedEmail
+ type: object
+ rekorKeyData:
+ description: |-
+ rekorKeyData contains inline base64-encoded data for the PEM format from the Rekor public key.
+ rekorKeyData must be at most 8192 characters.
+ format: byte
+ maxLength: 8192
+ type: string
+ required:
+ - fulcioCAData
+ - fulcioSubject
+ - rekorKeyData
+ type: object
+ pki:
+ description: pki defines the root of trust based on Bring
+ Your Own Public Key Infrastructure (BYOPKI) Root CA(s) and
+ corresponding intermediate certificates.
+ properties:
+ caIntermediatesData:
+ description: |-
+ caIntermediatesData contains base64-encoded data of a certificate bundle PEM file, which contains one or more intermediate certificates in the PEM format.
+ caIntermediatesData requires CertificateAuthorityRoots to be set.
+ format: byte
+ maxLength: 8192
+ type: string
+ caRootsData:
+ description: caRootsData contains base64-encoded data
+ of a certificate bundle PEM file, which contains one
+ or more CA roots in the PEM format.
+ format: byte
+ maxLength: 8192
+ type: string
+ pkiCertificateSubject:
+ description: pkiCertificateSubject defines the requirements
+ imposed on the subject to which the certificate was
+ issued.
+ properties:
+ email:
+ description: email specifies the expected email address
+ imposed on the subject to which the certificate
+ was issued.
+ type: string
+ x-kubernetes-validations:
+ - message: invalid email address in pkiCertificateSubject
+ rule: self.matches('^\\S+@\\S+$')
+ hostname:
+ description: Hostname specifies the expected hostname
+ imposed on the subject to which the certificate
+ was issued.
+ type: string
+ x-kubernetes-validations:
+ - message: invalid hostname in pkiCertificateSubject
+ rule: self.matches('^(\\*\\.)?([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+\\.[a-zA-Z]{2,}$')
+ type: object
+ x-kubernetes-validations:
+ - message: at least one of email or hostname must be set
+ in pkiCertificateSubject
+ rule: has(self.email) || has(self.hostname)
+ required:
+ - caRootsData
+ - pkiCertificateSubject
+ type: object
+ policyType:
+ description: |-
+ policyType serves as the union's discriminator. Users are required to assign a value to this field, choosing one of the policy types that define the root of trust.
+ "PublicKey" indicates that the policy relies on a sigstore publicKey and may optionally use a Rekor verification.
+ "FulcioCAWithRekor" indicates that the policy is based on the Fulcio certification and incorporates a Rekor verification.
+ "PKI" is a DevPreview feature that indicates that the policy is based on the certificates from Bring Your Own Public Key Infrastructure (BYOPKI).
+ enum:
+ - PublicKey
+ - FulcioCAWithRekor
+ - PKI
+ type: string
+ publicKey:
+ description: publicKey defines the root of trust based on
+ a sigstore public key.
+ properties:
+ keyData:
+ description: |-
+ keyData contains inline base64-encoded data for the PEM format public key.
+ KeyData must be at most 8192 characters.
+ format: byte
+ maxLength: 8192
+ type: string
+ rekorKeyData:
+ description: |-
+ rekorKeyData contains inline base64-encoded data for the PEM format from the Rekor public key.
+ rekorKeyData must be at most 8192 characters.
+ format: byte
+ maxLength: 8192
+ type: string
+ required:
+ - keyData
+ type: object
+ required:
+ - policyType
+ type: object
+ x-kubernetes-validations:
+ - message: publicKey is required when policyType is PublicKey,
+ and forbidden otherwise
+ rule: 'has(self.policyType) && self.policyType == ''PublicKey''
+ ? has(self.publicKey) : !has(self.publicKey)'
+ - message: fulcioCAWithRekor is required when policyType is FulcioCAWithRekor,
+ and forbidden otherwise
+ rule: 'has(self.policyType) && self.policyType == ''FulcioCAWithRekor''
+ ? has(self.fulcioCAWithRekor) : !has(self.fulcioCAWithRekor)'
+ - message: pki is required when policyType is PKI, and forbidden
+ otherwise
+ rule: 'has(self.policyType) && self.policyType == ''PKI'' ?
+ has(self.pki) : !has(self.pki)'
+ signedIdentity:
+ description: signedIdentity specifies what image identity the
+ signature claims about the image. The required matchPolicy field
+ specifies the approach used in the verification process to verify
+ the identity in the signature and the actual image identity,
+ the default matchPolicy is "MatchRepoDigestOrExact".
+ properties:
+ exactRepository:
+ description: exactRepository is required if matchPolicy is
+ set to "ExactRepository".
+ properties:
+ repository:
+ description: |-
+ repository is the reference of the image identity to be matched.
+ The value should be a repository name (by omitting the tag or digest) in a registry implementing the "Docker Registry HTTP API V2". For example, docker.io/library/busybox
+ maxLength: 512
+ type: string
+ x-kubernetes-validations:
+ - message: invalid repository or prefix in the signedIdentity,
+ should not include the tag or digest
+ rule: 'self.matches(''.*:([\\w][\\w.-]{0,127})$'')?
+ self.matches(''^(localhost:[0-9]+)$''): true'
+ - message: invalid repository or prefix in the signedIdentity
+ rule: self.matches('^(((?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+(?::[0-9]+)?)|(localhost(?::[0-9]+)?))(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?$')
+ required:
+ - repository
+ type: object
+ matchPolicy:
+ description: |-
+ matchPolicy sets the type of matching to be used.
+ Valid values are "MatchRepoDigestOrExact", "MatchRepository", "ExactRepository", "RemapIdentity". When omitted, the default value is "MatchRepoDigestOrExact".
+ If set matchPolicy to ExactRepository, then the exactRepository must be specified.
+ If set matchPolicy to RemapIdentity, then the remapIdentity must be specified.
+ "MatchRepoDigestOrExact" means that the identity in the signature must be in the same repository as the image identity if the image identity is referenced by a digest. Otherwise, the identity in the signature must be the same as the image identity.
+ "MatchRepository" means that the identity in the signature must be in the same repository as the image identity.
+ "ExactRepository" means that the identity in the signature must be in the same repository as a specific identity specified by "repository".
+ "RemapIdentity" means that the signature must be in the same as the remapped image identity. Remapped image identity is obtained by replacing the "prefix" with the specified “signedPrefix” if the the image identity matches the specified remapPrefix.
+ enum:
+ - MatchRepoDigestOrExact
+ - MatchRepository
+ - ExactRepository
+ - RemapIdentity
+ type: string
+ remapIdentity:
+ description: remapIdentity is required if matchPolicy is set
+ to "RemapIdentity".
+ properties:
+ prefix:
+ description: |-
+ prefix is the prefix of the image identity to be matched.
+ If the image identity matches the specified prefix, that prefix is replaced by the specified “signedPrefix” (otherwise it is used as unchanged and no remapping takes place).
+ This useful when verifying signatures for a mirror of some other repository namespace that preserves the vendor’s repository structure.
+ The prefix and signedPrefix values can be either host[:port] values (matching exactly the same host[:port], string), repository namespaces,
+ or repositories (i.e. they must not contain tags/digests), and match as prefixes of the fully expanded form.
+ For example, docker.io/library/busybox (not busybox) to specify that single repository, or docker.io/library (not an empty string) to specify the parent namespace of docker.io/library/busybox.
+ maxLength: 512
+ type: string
+ x-kubernetes-validations:
+ - message: invalid repository or prefix in the signedIdentity,
+ should not include the tag or digest
+ rule: 'self.matches(''.*:([\\w][\\w.-]{0,127})$'')?
+ self.matches(''^(localhost:[0-9]+)$''): true'
+ - message: invalid repository or prefix in the signedIdentity
+ rule: self.matches('^(((?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+(?::[0-9]+)?)|(localhost(?::[0-9]+)?))(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?$')
+ signedPrefix:
+ description: |-
+ signedPrefix is the prefix of the image identity to be matched in the signature. The format is the same as "prefix". The values can be either host[:port] values (matching exactly the same host[:port], string), repository namespaces,
+ or repositories (i.e. they must not contain tags/digests), and match as prefixes of the fully expanded form.
+ For example, docker.io/library/busybox (not busybox) to specify that single repository, or docker.io/library (not an empty string) to specify the parent namespace of docker.io/library/busybox.
+ maxLength: 512
+ type: string
+ x-kubernetes-validations:
+ - message: invalid repository or prefix in the signedIdentity,
+ should not include the tag or digest
+ rule: 'self.matches(''.*:([\\w][\\w.-]{0,127})$'')?
+ self.matches(''^(localhost:[0-9]+)$''): true'
+ - message: invalid repository or prefix in the signedIdentity
+ rule: self.matches('^(((?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+(?::[0-9]+)?)|(localhost(?::[0-9]+)?))(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?$')
+ required:
+ - prefix
+ - signedPrefix
+ type: object
+ required:
+ - matchPolicy
+ type: object
+ x-kubernetes-validations:
+ - message: exactRepository is required when matchPolicy is ExactRepository,
+ and forbidden otherwise
+ rule: '(has(self.matchPolicy) && self.matchPolicy == ''ExactRepository'')
+ ? has(self.exactRepository) : !has(self.exactRepository)'
+ - message: remapIdentity is required when matchPolicy is RemapIdentity,
+ and forbidden otherwise
+ rule: '(has(self.matchPolicy) && self.matchPolicy == ''RemapIdentity'')
+ ? has(self.remapIdentity) : !has(self.remapIdentity)'
+ required:
+ - rootOfTrust
+ type: object
+ scopes:
+ description: |-
+ scopes defines the list of image identities assigned to a policy. Each item refers to a scope in a registry implementing the "Docker Registry HTTP API V2".
+ Scopes matching individual images are named Docker references in the fully expanded form, either using a tag or digest. For example, docker.io/library/busybox:latest (not busybox:latest).
+ More general scopes are prefixes of individual-image scopes, and specify a repository (by omitting the tag or digest), a repository
+ namespace, or a registry host (by only specifying the host name and possibly a port number) or a wildcard expression starting with `*.`, for matching all subdomains (not including a port number).
+ Wildcards are only supported for subdomain matching, and may not be used in the middle of the host, i.e. *.example.com is a valid case, but example*.*.com is not.
+ If multiple scopes match a given image, only the policy requirements for the most specific scope apply. The policy requirements for more general scopes are ignored.
+ In addition to setting a policy appropriate for your own deployed applications, make sure that a policy on the OpenShift image repositories
+ quay.io/openshift-release-dev/ocp-release, quay.io/openshift-release-dev/ocp-v4.0-art-dev (or on a more general scope) allows deployment of the OpenShift images required for cluster operation.
+ If a scope is configured in both the ClusterImagePolicy and the ImagePolicy, or if the scope in ImagePolicy is nested under one of the scopes from the ClusterImagePolicy, only the policy from the ClusterImagePolicy will be applied.
+ For additional details about the format, please refer to the document explaining the docker transport field,
+ which can be found at: https://github.com/containers/image/blob/main/docs/containers-policy.json.5.md#docker
+ items:
+ maxLength: 512
+ type: string
+ x-kubernetes-validations:
+ - message: invalid image scope format, scope must contain a fully
+ qualified domain name or 'localhost'
+ rule: 'size(self.split(''/'')[0].split(''.'')) == 1 ? self.split(''/'')[0].split(''.'')[0].split('':'')[0]
+ == ''localhost'' : true'
+ - message: invalid image scope with wildcard, a wildcard can only
+ be at the start of the domain and is only supported for subdomain
+ matching, not path matching
+ rule: 'self.contains(''*'') ? self.matches(''^\\*(?:\\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+$'')
+ : true'
+ - message: invalid repository namespace or image specification in
+ the image scope
+ rule: '!self.contains(''*'') ? self.matches(''^((((?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+(?::[0-9]+)?)|(localhost(?::[0-9]+)?))(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?)(?::([\\w][\\w.-]{0,127}))?(?:@([A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][[:xdigit:]]{32,}))?$'')
+ : true'
+ maxItems: 256
+ type: array
+ x-kubernetes-list-type: set
+ required:
+ - policy
+ - scopes
+ type: object
+ status:
+ description: status contains the observed state of the resource.
+ properties:
+ conditions:
+ description: conditions provide details on the status of this API
+ Resource.
+ items:
+ description: Condition contains details for one aspect of the current
+ state of this API Resource.
+ properties:
+ lastTransitionTime:
+ description: |-
+ lastTransitionTime is the last time the condition transitioned from one status to another.
+ This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
+ format: date-time
+ type: string
+ message:
+ description: |-
+ message is a human readable message indicating details about the transition.
+ This may be an empty string.
+ maxLength: 32768
+ type: string
+ observedGeneration:
+ description: |-
+ observedGeneration represents the .metadata.generation that the condition was set based upon.
+ For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
+ with respect to the current state of the instance.
+ format: int64
+ minimum: 0
+ type: integer
+ reason:
+ description: |-
+ reason contains a programmatic identifier indicating the reason for the condition's last transition.
+ Producers of specific condition types may define expected values and meanings for this field,
+ and whether the values are considered a guaranteed API.
+ The value should be a CamelCase string.
+ This field may not be empty.
+ maxLength: 1024
+ minLength: 1
+ pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
+ type: string
+ status:
+ description: status of the condition, one of True, False, Unknown.
+ enum:
+ - "True"
+ - "False"
+ - Unknown
+ type: string
+ type:
+ description: type of condition in CamelCase or in foo.example.com/CamelCase.
+ maxLength: 316
+ pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
+ type: string
+ required:
+ - lastTransitionTime
+ - message
+ - reason
+ - status
+ - type
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - type
+ x-kubernetes-list-type: map
+ type: object
+ required:
+ - spec
+ type: object
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/config/v1alpha1/zz_generated.featuregated-crd-manifests/imagepolicies.config.openshift.io/SigstoreImageVerification.yaml b/config/v1alpha1/zz_generated.featuregated-crd-manifests/imagepolicies.config.openshift.io/SigstoreImageVerification.yaml
index f74bdb973fb..9bbd190add8 100644
--- a/config/v1alpha1/zz_generated.featuregated-crd-manifests/imagepolicies.config.openshift.io/SigstoreImageVerification.yaml
+++ b/config/v1alpha1/zz_generated.featuregated-crd-manifests/imagepolicies.config.openshift.io/SigstoreImageVerification.yaml
@@ -107,9 +107,11 @@ spec:
policyType serves as the union's discriminator. Users are required to assign a value to this field, choosing one of the policy types that define the root of trust.
"PublicKey" indicates that the policy relies on a sigstore publicKey and may optionally use a Rekor verification.
"FulcioCAWithRekor" indicates that the policy is based on the Fulcio certification and incorporates a Rekor verification.
+ "PKI" is a DevPreview feature that indicates that the policy is based on the certificates from Bring Your Own Public Key Infrastructure (BYOPKI).
enum:
- PublicKey
- FulcioCAWithRekor
+ - PKI
type: string
publicKey:
description: publicKey defines the root of trust based on
@@ -144,6 +146,10 @@ spec:
and forbidden otherwise
rule: 'has(self.policyType) && self.policyType == ''FulcioCAWithRekor''
? has(self.fulcioCAWithRekor) : !has(self.fulcioCAWithRekor)'
+ - message: pki is required when policyType is PKI, and forbidden
+ otherwise
+ rule: 'has(self.policyType) && self.policyType == ''PKI'' ?
+ has(self.pki) : !has(self.pki)'
signedIdentity:
description: signedIdentity specifies what image identity the
signature claims about the image. The required matchPolicy field
diff --git a/config/v1alpha1/zz_generated.featuregated-crd-manifests/imagepolicies.config.openshift.io/SigstoreImageVerificationPKI.yaml b/config/v1alpha1/zz_generated.featuregated-crd-manifests/imagepolicies.config.openshift.io/SigstoreImageVerificationPKI.yaml
new file mode 100644
index 00000000000..2ed45351057
--- /dev/null
+++ b/config/v1alpha1/zz_generated.featuregated-crd-manifests/imagepolicies.config.openshift.io/SigstoreImageVerificationPKI.yaml
@@ -0,0 +1,407 @@
+apiVersion: apiextensions.k8s.io/v1
+kind: CustomResourceDefinition
+metadata:
+ annotations:
+ api-approved.openshift.io: https://github.com/openshift/api/pull/1457
+ api.openshift.io/filename-cvo-runlevel: "0000_10"
+ api.openshift.io/filename-operator: config-operator
+ api.openshift.io/filename-ordering: "01"
+ feature-gate.release.openshift.io/SigstoreImageVerificationPKI: "true"
+ name: imagepolicies.config.openshift.io
+spec:
+ group: config.openshift.io
+ names:
+ kind: ImagePolicy
+ listKind: ImagePolicyList
+ plural: imagepolicies
+ singular: imagepolicy
+ scope: Namespaced
+ versions:
+ - name: v1alpha1
+ schema:
+ openAPIV3Schema:
+ description: |-
+ ImagePolicy holds namespace-wide configuration for image signature verification
+
+ Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.
+ properties:
+ apiVersion:
+ description: |-
+ APIVersion defines the versioned schema of this representation of an object.
+ Servers should convert recognized schemas to the latest internal value, and
+ may reject unrecognized values.
+ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
+ type: string
+ kind:
+ description: |-
+ Kind is a string value representing the REST resource this object represents.
+ Servers may infer this from the endpoint the client submits requests to.
+ Cannot be updated.
+ In CamelCase.
+ More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
+ type: string
+ metadata:
+ type: object
+ spec:
+ description: spec holds user settable values for configuration
+ properties:
+ policy:
+ description: |-
+ policy contains configuration to allow scopes to be verified, and defines how
+ images not matching the verification policy will be treated.
+ properties:
+ rootOfTrust:
+ description: rootOfTrust specifies the root of trust for the policy.
+ properties:
+ fulcioCAWithRekor:
+ description: |-
+ fulcioCAWithRekor defines the root of trust based on the Fulcio certificate and the Rekor public key.
+ For more information about Fulcio and Rekor, please refer to the document at:
+ https://github.com/sigstore/fulcio and https://github.com/sigstore/rekor
+ properties:
+ fulcioCAData:
+ description: |-
+ fulcioCAData contains inline base64-encoded data for the PEM format fulcio CA.
+ fulcioCAData must be at most 8192 characters.
+ format: byte
+ maxLength: 8192
+ type: string
+ fulcioSubject:
+ description: fulcioSubject specifies OIDC issuer and the
+ email of the Fulcio authentication configuration.
+ properties:
+ oidcIssuer:
+ description: |-
+ oidcIssuer contains the expected OIDC issuer. It will be verified that the Fulcio-issued certificate contains a (Fulcio-defined) certificate extension pointing at this OIDC issuer URL. When Fulcio issues certificates, it includes a value based on an URL inside the client-provided ID token.
+ Example: "https://expected.OIDC.issuer/"
+ type: string
+ x-kubernetes-validations:
+ - message: oidcIssuer must be a valid URL
+ rule: isURL(self)
+ signedEmail:
+ description: |-
+ signedEmail holds the email address the the Fulcio certificate is issued for.
+ Example: "expected-signing-user@example.com"
+ type: string
+ x-kubernetes-validations:
+ - message: invalid email address
+ rule: self.matches('^\\S+@\\S+$')
+ required:
+ - oidcIssuer
+ - signedEmail
+ type: object
+ rekorKeyData:
+ description: |-
+ rekorKeyData contains inline base64-encoded data for the PEM format from the Rekor public key.
+ rekorKeyData must be at most 8192 characters.
+ format: byte
+ maxLength: 8192
+ type: string
+ required:
+ - fulcioCAData
+ - fulcioSubject
+ - rekorKeyData
+ type: object
+ pki:
+ description: pki defines the root of trust based on Bring
+ Your Own Public Key Infrastructure (BYOPKI) Root CA(s) and
+ corresponding intermediate certificates.
+ properties:
+ caIntermediatesData:
+ description: |-
+ caIntermediatesData contains base64-encoded data of a certificate bundle PEM file, which contains one or more intermediate certificates in the PEM format.
+ caIntermediatesData requires CertificateAuthorityRoots to be set.
+ format: byte
+ maxLength: 8192
+ type: string
+ caRootsData:
+ description: caRootsData contains base64-encoded data
+ of a certificate bundle PEM file, which contains one
+ or more CA roots in the PEM format.
+ format: byte
+ maxLength: 8192
+ type: string
+ pkiCertificateSubject:
+ description: pkiCertificateSubject defines the requirements
+ imposed on the subject to which the certificate was
+ issued.
+ properties:
+ email:
+ description: email specifies the expected email address
+ imposed on the subject to which the certificate
+ was issued.
+ type: string
+ x-kubernetes-validations:
+ - message: invalid email address in pkiCertificateSubject
+ rule: self.matches('^\\S+@\\S+$')
+ hostname:
+ description: Hostname specifies the expected hostname
+ imposed on the subject to which the certificate
+ was issued.
+ type: string
+ x-kubernetes-validations:
+ - message: invalid hostname in pkiCertificateSubject
+ rule: self.matches('^(\\*\\.)?([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+\\.[a-zA-Z]{2,}$')
+ type: object
+ x-kubernetes-validations:
+ - message: at least one of email or hostname must be set
+ in pkiCertificateSubject
+ rule: has(self.email) || has(self.hostname)
+ required:
+ - caRootsData
+ - pkiCertificateSubject
+ type: object
+ policyType:
+ description: |-
+ policyType serves as the union's discriminator. Users are required to assign a value to this field, choosing one of the policy types that define the root of trust.
+ "PublicKey" indicates that the policy relies on a sigstore publicKey and may optionally use a Rekor verification.
+ "FulcioCAWithRekor" indicates that the policy is based on the Fulcio certification and incorporates a Rekor verification.
+ "PKI" is a DevPreview feature that indicates that the policy is based on the certificates from Bring Your Own Public Key Infrastructure (BYOPKI).
+ enum:
+ - PublicKey
+ - FulcioCAWithRekor
+ - PKI
+ type: string
+ publicKey:
+ description: publicKey defines the root of trust based on
+ a sigstore public key.
+ properties:
+ keyData:
+ description: |-
+ keyData contains inline base64-encoded data for the PEM format public key.
+ KeyData must be at most 8192 characters.
+ format: byte
+ maxLength: 8192
+ type: string
+ rekorKeyData:
+ description: |-
+ rekorKeyData contains inline base64-encoded data for the PEM format from the Rekor public key.
+ rekorKeyData must be at most 8192 characters.
+ format: byte
+ maxLength: 8192
+ type: string
+ required:
+ - keyData
+ type: object
+ required:
+ - policyType
+ type: object
+ x-kubernetes-validations:
+ - message: publicKey is required when policyType is PublicKey,
+ and forbidden otherwise
+ rule: 'has(self.policyType) && self.policyType == ''PublicKey''
+ ? has(self.publicKey) : !has(self.publicKey)'
+ - message: fulcioCAWithRekor is required when policyType is FulcioCAWithRekor,
+ and forbidden otherwise
+ rule: 'has(self.policyType) && self.policyType == ''FulcioCAWithRekor''
+ ? has(self.fulcioCAWithRekor) : !has(self.fulcioCAWithRekor)'
+ - message: pki is required when policyType is PKI, and forbidden
+ otherwise
+ rule: 'has(self.policyType) && self.policyType == ''PKI'' ?
+ has(self.pki) : !has(self.pki)'
+ signedIdentity:
+ description: signedIdentity specifies what image identity the
+ signature claims about the image. The required matchPolicy field
+ specifies the approach used in the verification process to verify
+ the identity in the signature and the actual image identity,
+ the default matchPolicy is "MatchRepoDigestOrExact".
+ properties:
+ exactRepository:
+ description: exactRepository is required if matchPolicy is
+ set to "ExactRepository".
+ properties:
+ repository:
+ description: |-
+ repository is the reference of the image identity to be matched.
+ The value should be a repository name (by omitting the tag or digest) in a registry implementing the "Docker Registry HTTP API V2". For example, docker.io/library/busybox
+ maxLength: 512
+ type: string
+ x-kubernetes-validations:
+ - message: invalid repository or prefix in the signedIdentity,
+ should not include the tag or digest
+ rule: 'self.matches(''.*:([\\w][\\w.-]{0,127})$'')?
+ self.matches(''^(localhost:[0-9]+)$''): true'
+ - message: invalid repository or prefix in the signedIdentity
+ rule: self.matches('^(((?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+(?::[0-9]+)?)|(localhost(?::[0-9]+)?))(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?$')
+ required:
+ - repository
+ type: object
+ matchPolicy:
+ description: |-
+ matchPolicy sets the type of matching to be used.
+ Valid values are "MatchRepoDigestOrExact", "MatchRepository", "ExactRepository", "RemapIdentity". When omitted, the default value is "MatchRepoDigestOrExact".
+ If set matchPolicy to ExactRepository, then the exactRepository must be specified.
+ If set matchPolicy to RemapIdentity, then the remapIdentity must be specified.
+ "MatchRepoDigestOrExact" means that the identity in the signature must be in the same repository as the image identity if the image identity is referenced by a digest. Otherwise, the identity in the signature must be the same as the image identity.
+ "MatchRepository" means that the identity in the signature must be in the same repository as the image identity.
+ "ExactRepository" means that the identity in the signature must be in the same repository as a specific identity specified by "repository".
+ "RemapIdentity" means that the signature must be in the same as the remapped image identity. Remapped image identity is obtained by replacing the "prefix" with the specified “signedPrefix” if the the image identity matches the specified remapPrefix.
+ enum:
+ - MatchRepoDigestOrExact
+ - MatchRepository
+ - ExactRepository
+ - RemapIdentity
+ type: string
+ remapIdentity:
+ description: remapIdentity is required if matchPolicy is set
+ to "RemapIdentity".
+ properties:
+ prefix:
+ description: |-
+ prefix is the prefix of the image identity to be matched.
+ If the image identity matches the specified prefix, that prefix is replaced by the specified “signedPrefix” (otherwise it is used as unchanged and no remapping takes place).
+ This useful when verifying signatures for a mirror of some other repository namespace that preserves the vendor’s repository structure.
+ The prefix and signedPrefix values can be either host[:port] values (matching exactly the same host[:port], string), repository namespaces,
+ or repositories (i.e. they must not contain tags/digests), and match as prefixes of the fully expanded form.
+ For example, docker.io/library/busybox (not busybox) to specify that single repository, or docker.io/library (not an empty string) to specify the parent namespace of docker.io/library/busybox.
+ maxLength: 512
+ type: string
+ x-kubernetes-validations:
+ - message: invalid repository or prefix in the signedIdentity,
+ should not include the tag or digest
+ rule: 'self.matches(''.*:([\\w][\\w.-]{0,127})$'')?
+ self.matches(''^(localhost:[0-9]+)$''): true'
+ - message: invalid repository or prefix in the signedIdentity
+ rule: self.matches('^(((?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+(?::[0-9]+)?)|(localhost(?::[0-9]+)?))(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?$')
+ signedPrefix:
+ description: |-
+ signedPrefix is the prefix of the image identity to be matched in the signature. The format is the same as "prefix". The values can be either host[:port] values (matching exactly the same host[:port], string), repository namespaces,
+ or repositories (i.e. they must not contain tags/digests), and match as prefixes of the fully expanded form.
+ For example, docker.io/library/busybox (not busybox) to specify that single repository, or docker.io/library (not an empty string) to specify the parent namespace of docker.io/library/busybox.
+ maxLength: 512
+ type: string
+ x-kubernetes-validations:
+ - message: invalid repository or prefix in the signedIdentity,
+ should not include the tag or digest
+ rule: 'self.matches(''.*:([\\w][\\w.-]{0,127})$'')?
+ self.matches(''^(localhost:[0-9]+)$''): true'
+ - message: invalid repository or prefix in the signedIdentity
+ rule: self.matches('^(((?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+(?::[0-9]+)?)|(localhost(?::[0-9]+)?))(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?$')
+ required:
+ - prefix
+ - signedPrefix
+ type: object
+ required:
+ - matchPolicy
+ type: object
+ x-kubernetes-validations:
+ - message: exactRepository is required when matchPolicy is ExactRepository,
+ and forbidden otherwise
+ rule: '(has(self.matchPolicy) && self.matchPolicy == ''ExactRepository'')
+ ? has(self.exactRepository) : !has(self.exactRepository)'
+ - message: remapIdentity is required when matchPolicy is RemapIdentity,
+ and forbidden otherwise
+ rule: '(has(self.matchPolicy) && self.matchPolicy == ''RemapIdentity'')
+ ? has(self.remapIdentity) : !has(self.remapIdentity)'
+ required:
+ - rootOfTrust
+ type: object
+ scopes:
+ description: |-
+ scopes defines the list of image identities assigned to a policy. Each item refers to a scope in a registry implementing the "Docker Registry HTTP API V2".
+ Scopes matching individual images are named Docker references in the fully expanded form, either using a tag or digest. For example, docker.io/library/busybox:latest (not busybox:latest).
+ More general scopes are prefixes of individual-image scopes, and specify a repository (by omitting the tag or digest), a repository
+ namespace, or a registry host (by only specifying the host name and possibly a port number) or a wildcard expression starting with `*.`, for matching all subdomains (not including a port number).
+ Wildcards are only supported for subdomain matching, and may not be used in the middle of the host, i.e. *.example.com is a valid case, but example*.*.com is not.
+ If multiple scopes match a given image, only the policy requirements for the most specific scope apply. The policy requirements for more general scopes are ignored.
+ In addition to setting a policy appropriate for your own deployed applications, make sure that a policy on the OpenShift image repositories
+ quay.io/openshift-release-dev/ocp-release, quay.io/openshift-release-dev/ocp-v4.0-art-dev (or on a more general scope) allows deployment of the OpenShift images required for cluster operation.
+ If a scope is configured in both the ClusterImagePolicy and the ImagePolicy, or if the scope in ImagePolicy is nested under one of the scopes from the ClusterImagePolicy, only the policy from the ClusterImagePolicy will be applied.
+ For additional details about the format, please refer to the document explaining the docker transport field,
+ which can be found at: https://github.com/containers/image/blob/main/docs/containers-policy.json.5.md#docker
+ items:
+ maxLength: 512
+ type: string
+ x-kubernetes-validations:
+ - message: invalid image scope format, scope must contain a fully
+ qualified domain name or 'localhost'
+ rule: 'size(self.split(''/'')[0].split(''.'')) == 1 ? self.split(''/'')[0].split(''.'')[0].split('':'')[0]
+ == ''localhost'' : true'
+ - message: invalid image scope with wildcard, a wildcard can only
+ be at the start of the domain and is only supported for subdomain
+ matching, not path matching
+ rule: 'self.contains(''*'') ? self.matches(''^\\*(?:\\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+$'')
+ : true'
+ - message: invalid repository namespace or image specification in
+ the image scope
+ rule: '!self.contains(''*'') ? self.matches(''^((((?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))+(?::[0-9]+)?)|(localhost(?::[0-9]+)?))(?:(?:/[a-z0-9]+(?:(?:(?:[._]|__|[-]*)[a-z0-9]+)+)?)+)?)(?::([\\w][\\w.-]{0,127}))?(?:@([A-Za-z][A-Za-z0-9]*(?:[-_+.][A-Za-z][A-Za-z0-9]*)*[:][[:xdigit:]]{32,}))?$'')
+ : true'
+ maxItems: 256
+ type: array
+ x-kubernetes-list-type: set
+ required:
+ - policy
+ - scopes
+ type: object
+ status:
+ description: status contains the observed state of the resource.
+ properties:
+ conditions:
+ description: conditions provide details on the status of this API
+ Resource.
+ items:
+ description: Condition contains details for one aspect of the current
+ state of this API Resource.
+ properties:
+ lastTransitionTime:
+ description: |-
+ lastTransitionTime is the last time the condition transitioned from one status to another.
+ This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
+ format: date-time
+ type: string
+ message:
+ description: |-
+ message is a human readable message indicating details about the transition.
+ This may be an empty string.
+ maxLength: 32768
+ type: string
+ observedGeneration:
+ description: |-
+ observedGeneration represents the .metadata.generation that the condition was set based upon.
+ For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
+ with respect to the current state of the instance.
+ format: int64
+ minimum: 0
+ type: integer
+ reason:
+ description: |-
+ reason contains a programmatic identifier indicating the reason for the condition's last transition.
+ Producers of specific condition types may define expected values and meanings for this field,
+ and whether the values are considered a guaranteed API.
+ The value should be a CamelCase string.
+ This field may not be empty.
+ maxLength: 1024
+ minLength: 1
+ pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
+ type: string
+ status:
+ description: status of the condition, one of True, False, Unknown.
+ enum:
+ - "True"
+ - "False"
+ - Unknown
+ type: string
+ type:
+ description: type of condition in CamelCase or in foo.example.com/CamelCase.
+ maxLength: 316
+ pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
+ type: string
+ required:
+ - lastTransitionTime
+ - message
+ - reason
+ - status
+ - type
+ type: object
+ type: array
+ x-kubernetes-list-map-keys:
+ - type
+ x-kubernetes-list-type: map
+ type: object
+ required:
+ - spec
+ type: object
+ served: true
+ storage: true
+ subresources:
+ status: {}
diff --git a/config/v1alpha1/zz_generated.swagger_doc_generated.go b/config/v1alpha1/zz_generated.swagger_doc_generated.go
index 55468f38dac..7abd41eb89d 100644
--- a/config/v1alpha1/zz_generated.swagger_doc_generated.go
+++ b/config/v1alpha1/zz_generated.swagger_doc_generated.go
@@ -167,6 +167,27 @@ func (ImagePolicyStatus) SwaggerDoc() map[string]string {
return map_ImagePolicyStatus
}
+var map_PKI = map[string]string{
+ "": "PKI defines the root of trust based on Root CA(s) and corresponding intermediate certificates.",
+ "caRootsData": "caRootsData contains base64-encoded data of a certificate bundle PEM file, which contains one or more CA roots in the PEM format.",
+ "caIntermediatesData": "caIntermediatesData contains base64-encoded data of a certificate bundle PEM file, which contains one or more intermediate certificates in the PEM format. caIntermediatesData requires CertificateAuthorityRoots to be set.",
+ "pkiCertificateSubject": "pkiCertificateSubject defines the requirements imposed on the subject to which the certificate was issued.",
+}
+
+func (PKI) SwaggerDoc() map[string]string {
+ return map_PKI
+}
+
+var map_PKICertificateSubject = map[string]string{
+ "": "PKICertificateSubject defines the requirements imposed on the subject to which the certificate was issued.",
+ "email": "email specifies the expected email address imposed on the subject to which the certificate was issued.",
+ "hostname": "Hostname specifies the expected hostname imposed on the subject to which the certificate was issued.",
+}
+
+func (PKICertificateSubject) SwaggerDoc() map[string]string {
+ return map_PKICertificateSubject
+}
+
var map_Policy = map[string]string{
"": "Policy defines the verification policy for the items in the scopes list.",
"rootOfTrust": "rootOfTrust specifies the root of trust for the policy.",
@@ -217,9 +238,10 @@ func (PolicyMatchRemapIdentity) SwaggerDoc() map[string]string {
var map_PolicyRootOfTrust = map[string]string{
"": "PolicyRootOfTrust defines the root of trust based on the selected policyType.",
- "policyType": "policyType serves as the union's discriminator. Users are required to assign a value to this field, choosing one of the policy types that define the root of trust. \"PublicKey\" indicates that the policy relies on a sigstore publicKey and may optionally use a Rekor verification. \"FulcioCAWithRekor\" indicates that the policy is based on the Fulcio certification and incorporates a Rekor verification.",
+ "policyType": "policyType serves as the union's discriminator. Users are required to assign a value to this field, choosing one of the policy types that define the root of trust. \"PublicKey\" indicates that the policy relies on a sigstore publicKey and may optionally use a Rekor verification. \"FulcioCAWithRekor\" indicates that the policy is based on the Fulcio certification and incorporates a Rekor verification. \"PKI\" is a DevPreview feature that indicates that the policy is based on the certificates from Bring Your Own Public Key Infrastructure (BYOPKI).",
"publicKey": "publicKey defines the root of trust based on a sigstore public key.",
"fulcioCAWithRekor": "fulcioCAWithRekor defines the root of trust based on the Fulcio certificate and the Rekor public key. For more information about Fulcio and Rekor, please refer to the document at: https://github.com/sigstore/fulcio and https://github.com/sigstore/rekor",
+ "pki": "pki defines the root of trust based on Bring Your Own Public Key Infrastructure (BYOPKI) Root CA(s) and corresponding intermediate certificates.",
}
func (PolicyRootOfTrust) SwaggerDoc() map[string]string {
diff --git a/features.md b/features.md
index 99112082504..41bcf3e6936 100644
--- a/features.md
+++ b/features.md
@@ -7,6 +7,7 @@
| MachineAPIOperatorDisableMachineHealthCheckController| | | | | | |
| MultiArchInstallAzure| | | | | | |
| GatewayAPI| | | Enabled | Enabled | | |
+| SigstoreImageVerificationPKI| | | Enabled | Enabled | | |
| AWSClusterHostedDNS| | | Enabled | Enabled | Enabled | Enabled |
| AdditionalRoutingCapabilities| | | Enabled | Enabled | Enabled | Enabled |
| AutomatedEtcdBackup| | | Enabled | Enabled | Enabled | Enabled |
diff --git a/features/features.go b/features/features.go
index e55ec593d71..795478c2d9e 100644
--- a/features/features.go
+++ b/features/features.go
@@ -171,6 +171,14 @@ var (
enableIn(configv1.DevPreviewNoUpgrade, configv1.TechPreviewNoUpgrade).
mustRegister()
+ FeatureGateSigstoreImageVerificationPKI = newFeatureGate("SigstoreImageVerificationPKI").
+ reportProblemsToJiraComponent("node").
+ contactPerson("QiWang").
+ productScope(ocpSpecific).
+ enhancementPR("https://github.com/openshift/enhancements/pull/1658").
+ enableIn(configv1.DevPreviewNoUpgrade).
+ mustRegister()
+
FeatureGateGCPLabelsTags = newFeatureGate("GCPLabelsTags").
reportProblemsToJiraComponent("Installer").
contactPerson("bhb").
diff --git a/openapi/generated_openapi/zz_generated.openapi.go b/openapi/generated_openapi/zz_generated.openapi.go
index a2430334b66..6a6a7e0bf15 100644
--- a/openapi/generated_openapi/zz_generated.openapi.go
+++ b/openapi/generated_openapi/zz_generated.openapi.go
@@ -415,6 +415,8 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA
"github.com/openshift/api/config/v1alpha1.InsightsDataGatherList": schema_openshift_api_config_v1alpha1_InsightsDataGatherList(ref),
"github.com/openshift/api/config/v1alpha1.InsightsDataGatherSpec": schema_openshift_api_config_v1alpha1_InsightsDataGatherSpec(ref),
"github.com/openshift/api/config/v1alpha1.InsightsDataGatherStatus": schema_openshift_api_config_v1alpha1_InsightsDataGatherStatus(ref),
+ "github.com/openshift/api/config/v1alpha1.PKI": schema_openshift_api_config_v1alpha1_PKI(ref),
+ "github.com/openshift/api/config/v1alpha1.PKICertificateSubject": schema_openshift_api_config_v1alpha1_PKICertificateSubject(ref),
"github.com/openshift/api/config/v1alpha1.Policy": schema_openshift_api_config_v1alpha1_Policy(ref),
"github.com/openshift/api/config/v1alpha1.PolicyFulcioSubject": schema_openshift_api_config_v1alpha1_PolicyFulcioSubject(ref),
"github.com/openshift/api/config/v1alpha1.PolicyIdentity": schema_openshift_api_config_v1alpha1_PolicyIdentity(ref),
@@ -20732,6 +20734,69 @@ func schema_openshift_api_config_v1alpha1_InsightsDataGatherStatus(ref common.Re
}
}
+func schema_openshift_api_config_v1alpha1_PKI(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "PKI defines the root of trust based on Root CA(s) and corresponding intermediate certificates.",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "caRootsData": {
+ SchemaProps: spec.SchemaProps{
+ Description: "caRootsData contains base64-encoded data of a certificate bundle PEM file, which contains one or more CA roots in the PEM format.",
+ Type: []string{"string"},
+ Format: "byte",
+ },
+ },
+ "caIntermediatesData": {
+ SchemaProps: spec.SchemaProps{
+ Description: "caIntermediatesData contains base64-encoded data of a certificate bundle PEM file, which contains one or more intermediate certificates in the PEM format. caIntermediatesData requires CertificateAuthorityRoots to be set.",
+ Type: []string{"string"},
+ Format: "byte",
+ },
+ },
+ "pkiCertificateSubject": {
+ SchemaProps: spec.SchemaProps{
+ Description: "pkiCertificateSubject defines the requirements imposed on the subject to which the certificate was issued.",
+ Ref: ref("github.com/openshift/api/config/v1alpha1.PKICertificateSubject"),
+ },
+ },
+ },
+ Required: []string{"caRootsData", "pkiCertificateSubject"},
+ },
+ },
+ Dependencies: []string{
+ "github.com/openshift/api/config/v1alpha1.PKICertificateSubject"},
+ }
+}
+
+func schema_openshift_api_config_v1alpha1_PKICertificateSubject(ref common.ReferenceCallback) common.OpenAPIDefinition {
+ return common.OpenAPIDefinition{
+ Schema: spec.Schema{
+ SchemaProps: spec.SchemaProps{
+ Description: "PKICertificateSubject defines the requirements imposed on the subject to which the certificate was issued.",
+ Type: []string{"object"},
+ Properties: map[string]spec.Schema{
+ "email": {
+ SchemaProps: spec.SchemaProps{
+ Description: "email specifies the expected email address imposed on the subject to which the certificate was issued.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ "hostname": {
+ SchemaProps: spec.SchemaProps{
+ Description: "Hostname specifies the expected hostname imposed on the subject to which the certificate was issued.",
+ Type: []string{"string"},
+ Format: "",
+ },
+ },
+ },
+ },
+ },
+ }
+}
+
func schema_openshift_api_config_v1alpha1_Policy(ref common.ReferenceCallback) common.OpenAPIDefinition {
return common.OpenAPIDefinition{
Schema: spec.Schema{
@@ -20900,7 +20965,7 @@ func schema_openshift_api_config_v1alpha1_PolicyRootOfTrust(ref common.Reference
Properties: map[string]spec.Schema{
"policyType": {
SchemaProps: spec.SchemaProps{
- Description: "policyType serves as the union's discriminator. Users are required to assign a value to this field, choosing one of the policy types that define the root of trust. \"PublicKey\" indicates that the policy relies on a sigstore publicKey and may optionally use a Rekor verification. \"FulcioCAWithRekor\" indicates that the policy is based on the Fulcio certification and incorporates a Rekor verification.",
+ Description: "policyType serves as the union's discriminator. Users are required to assign a value to this field, choosing one of the policy types that define the root of trust. \"PublicKey\" indicates that the policy relies on a sigstore publicKey and may optionally use a Rekor verification. \"FulcioCAWithRekor\" indicates that the policy is based on the Fulcio certification and incorporates a Rekor verification. \"PKI\" is a DevPreview feature that indicates that the policy is based on the certificates from Bring Your Own Public Key Infrastructure (BYOPKI).",
Default: "",
Type: []string{"string"},
Format: "",
@@ -20918,6 +20983,12 @@ func schema_openshift_api_config_v1alpha1_PolicyRootOfTrust(ref common.Reference
Ref: ref("github.com/openshift/api/config/v1alpha1.FulcioCAWithRekor"),
},
},
+ "pki": {
+ SchemaProps: spec.SchemaProps{
+ Description: "pki defines the root of trust based on Bring Your Own Public Key Infrastructure (BYOPKI) Root CA(s) and corresponding intermediate certificates.",
+ Ref: ref("github.com/openshift/api/config/v1alpha1.PKI"),
+ },
+ },
},
Required: []string{"policyType"},
},
@@ -20928,6 +20999,7 @@ func schema_openshift_api_config_v1alpha1_PolicyRootOfTrust(ref common.Reference
"discriminator": "policyType",
"fields-to-discriminateBy": map[string]interface{}{
"fulcioCAWithRekor": "FulcioCAWithRekor",
+ "pki": "PKI",
"publicKey": "PublicKey",
},
},
@@ -20936,7 +21008,7 @@ func schema_openshift_api_config_v1alpha1_PolicyRootOfTrust(ref common.Reference
},
},
Dependencies: []string{
- "github.com/openshift/api/config/v1alpha1.FulcioCAWithRekor", "github.com/openshift/api/config/v1alpha1.PublicKey"},
+ "github.com/openshift/api/config/v1alpha1.FulcioCAWithRekor", "github.com/openshift/api/config/v1alpha1.PKI", "github.com/openshift/api/config/v1alpha1.PublicKey"},
}
}
diff --git a/openapi/openapi.json b/openapi/openapi.json
index 33384de2a3c..a8fae8f43e3 100644
--- a/openapi/openapi.json
+++ b/openapi/openapi.json
@@ -11291,6 +11291,44 @@
"com.github.openshift.api.config.v1alpha1.InsightsDataGatherStatus": {
"type": "object"
},
+ "com.github.openshift.api.config.v1alpha1.PKI": {
+ "description": "PKI defines the root of trust based on Root CA(s) and corresponding intermediate certificates.",
+ "type": "object",
+ "required": [
+ "caRootsData",
+ "pkiCertificateSubject"
+ ],
+ "properties": {
+ "caIntermediatesData": {
+ "description": "caIntermediatesData contains base64-encoded data of a certificate bundle PEM file, which contains one or more intermediate certificates in the PEM format. caIntermediatesData requires CertificateAuthorityRoots to be set.",
+ "type": "string",
+ "format": "byte"
+ },
+ "caRootsData": {
+ "description": "caRootsData contains base64-encoded data of a certificate bundle PEM file, which contains one or more CA roots in the PEM format.",
+ "type": "string",
+ "format": "byte"
+ },
+ "pkiCertificateSubject": {
+ "description": "pkiCertificateSubject defines the requirements imposed on the subject to which the certificate was issued.",
+ "$ref": "#/definitions/com.github.openshift.api.config.v1alpha1.PKICertificateSubject"
+ }
+ }
+ },
+ "com.github.openshift.api.config.v1alpha1.PKICertificateSubject": {
+ "description": "PKICertificateSubject defines the requirements imposed on the subject to which the certificate was issued.",
+ "type": "object",
+ "properties": {
+ "email": {
+ "description": "email specifies the expected email address imposed on the subject to which the certificate was issued.",
+ "type": "string"
+ },
+ "hostname": {
+ "description": "Hostname specifies the expected hostname imposed on the subject to which the certificate was issued.",
+ "type": "string"
+ }
+ }
+ },
"com.github.openshift.api.config.v1alpha1.Policy": {
"description": "Policy defines the verification policy for the items in the scopes list.",
"type": "object",
@@ -11404,8 +11442,12 @@
"description": "fulcioCAWithRekor defines the root of trust based on the Fulcio certificate and the Rekor public key. For more information about Fulcio and Rekor, please refer to the document at: https://github.com/sigstore/fulcio and https://github.com/sigstore/rekor",
"$ref": "#/definitions/com.github.openshift.api.config.v1alpha1.FulcioCAWithRekor"
},
+ "pki": {
+ "description": "pki defines the root of trust based on Bring Your Own Public Key Infrastructure (BYOPKI) Root CA(s) and corresponding intermediate certificates.",
+ "$ref": "#/definitions/com.github.openshift.api.config.v1alpha1.PKI"
+ },
"policyType": {
- "description": "policyType serves as the union's discriminator. Users are required to assign a value to this field, choosing one of the policy types that define the root of trust. \"PublicKey\" indicates that the policy relies on a sigstore publicKey and may optionally use a Rekor verification. \"FulcioCAWithRekor\" indicates that the policy is based on the Fulcio certification and incorporates a Rekor verification.",
+ "description": "policyType serves as the union's discriminator. Users are required to assign a value to this field, choosing one of the policy types that define the root of trust. \"PublicKey\" indicates that the policy relies on a sigstore publicKey and may optionally use a Rekor verification. \"FulcioCAWithRekor\" indicates that the policy is based on the Fulcio certification and incorporates a Rekor verification. \"PKI\" is a DevPreview feature that indicates that the policy is based on the certificates from Bring Your Own Public Key Infrastructure (BYOPKI).",
"type": "string",
"default": ""
},
@@ -11419,6 +11461,7 @@
"discriminator": "policyType",
"fields-to-discriminateBy": {
"fulcioCAWithRekor": "FulcioCAWithRekor",
+ "pki": "PKI",
"publicKey": "PublicKey"
}
}
diff --git a/payload-manifests/crds/0000_10_config-operator_01_clusterimagepolicies-CustomNoUpgrade.crd.yaml b/payload-manifests/crds/0000_10_config-operator_01_clusterimagepolicies-CustomNoUpgrade.crd.yaml
index 4bf43427549..a06fbc2142d 100644
--- a/payload-manifests/crds/0000_10_config-operator_01_clusterimagepolicies-CustomNoUpgrade.crd.yaml
+++ b/payload-manifests/crds/0000_10_config-operator_01_clusterimagepolicies-CustomNoUpgrade.crd.yaml
@@ -102,14 +102,65 @@ spec:
- fulcioSubject
- rekorKeyData
type: object
+ pki:
+ description: pki defines the root of trust based on Bring
+ Your Own Public Key Infrastructure (BYOPKI) Root CA(s) and
+ corresponding intermediate certificates.
+ properties:
+ caIntermediatesData:
+ description: |-
+ caIntermediatesData contains base64-encoded data of a certificate bundle PEM file, which contains one or more intermediate certificates in the PEM format.
+ caIntermediatesData requires CertificateAuthorityRoots to be set.
+ format: byte
+ maxLength: 8192
+ type: string
+ caRootsData:
+ description: caRootsData contains base64-encoded data
+ of a certificate bundle PEM file, which contains one
+ or more CA roots in the PEM format.
+ format: byte
+ maxLength: 8192
+ type: string
+ pkiCertificateSubject:
+ description: pkiCertificateSubject defines the requirements
+ imposed on the subject to which the certificate was
+ issued.
+ properties:
+ email:
+ description: email specifies the expected email address
+ imposed on the subject to which the certificate
+ was issued.
+ type: string
+ x-kubernetes-validations:
+ - message: invalid email address in pkiCertificateSubject
+ rule: self.matches('^\\S+@\\S+$')
+ hostname:
+ description: Hostname specifies the expected hostname
+ imposed on the subject to which the certificate
+ was issued.
+ type: string
+ x-kubernetes-validations:
+ - message: invalid hostname in pkiCertificateSubject
+ rule: self.matches('^(\\*\\.)?([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+\\.[a-zA-Z]{2,}$')
+ type: object
+ x-kubernetes-validations:
+ - message: at least one of email or hostname must be set
+ in pkiCertificateSubject
+ rule: has(self.email) || has(self.hostname)
+ required:
+ - caRootsData
+ - pkiCertificateSubject
+ type: object
policyType:
description: |-
policyType serves as the union's discriminator. Users are required to assign a value to this field, choosing one of the policy types that define the root of trust.
"PublicKey" indicates that the policy relies on a sigstore publicKey and may optionally use a Rekor verification.
"FulcioCAWithRekor" indicates that the policy is based on the Fulcio certification and incorporates a Rekor verification.
+ "PKI" is a DevPreview feature that indicates that the policy is based on the certificates from Bring Your Own Public Key Infrastructure (BYOPKI).
enum:
- PublicKey
- FulcioCAWithRekor
+ - PKI
type: string
publicKey:
description: publicKey defines the root of trust based on
@@ -144,6 +195,10 @@ spec:
and forbidden otherwise
rule: 'has(self.policyType) && self.policyType == ''FulcioCAWithRekor''
? has(self.fulcioCAWithRekor) : !has(self.fulcioCAWithRekor)'
+ - message: pki is required when policyType is PKI, and forbidden
+ otherwise
+ rule: 'has(self.policyType) && self.policyType == ''PKI'' ?
+ has(self.pki) : !has(self.pki)'
signedIdentity:
description: signedIdentity specifies what image identity the
signature claims about the image. The required matchPolicy field
diff --git a/payload-manifests/crds/0000_10_config-operator_01_clusterimagepolicies-DevPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_10_config-operator_01_clusterimagepolicies-DevPreviewNoUpgrade.crd.yaml
index 5881ce95955..9a58f1f776f 100644
--- a/payload-manifests/crds/0000_10_config-operator_01_clusterimagepolicies-DevPreviewNoUpgrade.crd.yaml
+++ b/payload-manifests/crds/0000_10_config-operator_01_clusterimagepolicies-DevPreviewNoUpgrade.crd.yaml
@@ -102,14 +102,65 @@ spec:
- fulcioSubject
- rekorKeyData
type: object
+ pki:
+ description: pki defines the root of trust based on Bring
+ Your Own Public Key Infrastructure (BYOPKI) Root CA(s) and
+ corresponding intermediate certificates.
+ properties:
+ caIntermediatesData:
+ description: |-
+ caIntermediatesData contains base64-encoded data of a certificate bundle PEM file, which contains one or more intermediate certificates in the PEM format.
+ caIntermediatesData requires CertificateAuthorityRoots to be set.
+ format: byte
+ maxLength: 8192
+ type: string
+ caRootsData:
+ description: caRootsData contains base64-encoded data
+ of a certificate bundle PEM file, which contains one
+ or more CA roots in the PEM format.
+ format: byte
+ maxLength: 8192
+ type: string
+ pkiCertificateSubject:
+ description: pkiCertificateSubject defines the requirements
+ imposed on the subject to which the certificate was
+ issued.
+ properties:
+ email:
+ description: email specifies the expected email address
+ imposed on the subject to which the certificate
+ was issued.
+ type: string
+ x-kubernetes-validations:
+ - message: invalid email address in pkiCertificateSubject
+ rule: self.matches('^\\S+@\\S+$')
+ hostname:
+ description: Hostname specifies the expected hostname
+ imposed on the subject to which the certificate
+ was issued.
+ type: string
+ x-kubernetes-validations:
+ - message: invalid hostname in pkiCertificateSubject
+ rule: self.matches('^(\\*\\.)?([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+\\.[a-zA-Z]{2,}$')
+ type: object
+ x-kubernetes-validations:
+ - message: at least one of email or hostname must be set
+ in pkiCertificateSubject
+ rule: has(self.email) || has(self.hostname)
+ required:
+ - caRootsData
+ - pkiCertificateSubject
+ type: object
policyType:
description: |-
policyType serves as the union's discriminator. Users are required to assign a value to this field, choosing one of the policy types that define the root of trust.
"PublicKey" indicates that the policy relies on a sigstore publicKey and may optionally use a Rekor verification.
"FulcioCAWithRekor" indicates that the policy is based on the Fulcio certification and incorporates a Rekor verification.
+ "PKI" is a DevPreview feature that indicates that the policy is based on the certificates from Bring Your Own Public Key Infrastructure (BYOPKI).
enum:
- PublicKey
- FulcioCAWithRekor
+ - PKI
type: string
publicKey:
description: publicKey defines the root of trust based on
@@ -144,6 +195,10 @@ spec:
and forbidden otherwise
rule: 'has(self.policyType) && self.policyType == ''FulcioCAWithRekor''
? has(self.fulcioCAWithRekor) : !has(self.fulcioCAWithRekor)'
+ - message: pki is required when policyType is PKI, and forbidden
+ otherwise
+ rule: 'has(self.policyType) && self.policyType == ''PKI'' ?
+ has(self.pki) : !has(self.pki)'
signedIdentity:
description: signedIdentity specifies what image identity the
signature claims about the image. The required matchPolicy field
diff --git a/payload-manifests/crds/0000_10_config-operator_01_clusterimagepolicies-TechPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_10_config-operator_01_clusterimagepolicies-TechPreviewNoUpgrade.crd.yaml
index bece5395b83..41395eedc9b 100644
--- a/payload-manifests/crds/0000_10_config-operator_01_clusterimagepolicies-TechPreviewNoUpgrade.crd.yaml
+++ b/payload-manifests/crds/0000_10_config-operator_01_clusterimagepolicies-TechPreviewNoUpgrade.crd.yaml
@@ -107,9 +107,11 @@ spec:
policyType serves as the union's discriminator. Users are required to assign a value to this field, choosing one of the policy types that define the root of trust.
"PublicKey" indicates that the policy relies on a sigstore publicKey and may optionally use a Rekor verification.
"FulcioCAWithRekor" indicates that the policy is based on the Fulcio certification and incorporates a Rekor verification.
+ "PKI" is a DevPreview feature that indicates that the policy is based on the certificates from Bring Your Own Public Key Infrastructure (BYOPKI).
enum:
- PublicKey
- FulcioCAWithRekor
+ - PKI
type: string
publicKey:
description: publicKey defines the root of trust based on
@@ -144,6 +146,10 @@ spec:
and forbidden otherwise
rule: 'has(self.policyType) && self.policyType == ''FulcioCAWithRekor''
? has(self.fulcioCAWithRekor) : !has(self.fulcioCAWithRekor)'
+ - message: pki is required when policyType is PKI, and forbidden
+ otherwise
+ rule: 'has(self.policyType) && self.policyType == ''PKI'' ?
+ has(self.pki) : !has(self.pki)'
signedIdentity:
description: signedIdentity specifies what image identity the
signature claims about the image. The required matchPolicy field
diff --git a/payload-manifests/crds/0000_10_config-operator_01_imagepolicies-CustomNoUpgrade.crd.yaml b/payload-manifests/crds/0000_10_config-operator_01_imagepolicies-CustomNoUpgrade.crd.yaml
index 58102a8d741..2c1c65dcc3a 100644
--- a/payload-manifests/crds/0000_10_config-operator_01_imagepolicies-CustomNoUpgrade.crd.yaml
+++ b/payload-manifests/crds/0000_10_config-operator_01_imagepolicies-CustomNoUpgrade.crd.yaml
@@ -102,14 +102,65 @@ spec:
- fulcioSubject
- rekorKeyData
type: object
+ pki:
+ description: pki defines the root of trust based on Bring
+ Your Own Public Key Infrastructure (BYOPKI) Root CA(s) and
+ corresponding intermediate certificates.
+ properties:
+ caIntermediatesData:
+ description: |-
+ caIntermediatesData contains base64-encoded data of a certificate bundle PEM file, which contains one or more intermediate certificates in the PEM format.
+ caIntermediatesData requires CertificateAuthorityRoots to be set.
+ format: byte
+ maxLength: 8192
+ type: string
+ caRootsData:
+ description: caRootsData contains base64-encoded data
+ of a certificate bundle PEM file, which contains one
+ or more CA roots in the PEM format.
+ format: byte
+ maxLength: 8192
+ type: string
+ pkiCertificateSubject:
+ description: pkiCertificateSubject defines the requirements
+ imposed on the subject to which the certificate was
+ issued.
+ properties:
+ email:
+ description: email specifies the expected email address
+ imposed on the subject to which the certificate
+ was issued.
+ type: string
+ x-kubernetes-validations:
+ - message: invalid email address in pkiCertificateSubject
+ rule: self.matches('^\\S+@\\S+$')
+ hostname:
+ description: Hostname specifies the expected hostname
+ imposed on the subject to which the certificate
+ was issued.
+ type: string
+ x-kubernetes-validations:
+ - message: invalid hostname in pkiCertificateSubject
+ rule: self.matches('^(\\*\\.)?([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+\\.[a-zA-Z]{2,}$')
+ type: object
+ x-kubernetes-validations:
+ - message: at least one of email or hostname must be set
+ in pkiCertificateSubject
+ rule: has(self.email) || has(self.hostname)
+ required:
+ - caRootsData
+ - pkiCertificateSubject
+ type: object
policyType:
description: |-
policyType serves as the union's discriminator. Users are required to assign a value to this field, choosing one of the policy types that define the root of trust.
"PublicKey" indicates that the policy relies on a sigstore publicKey and may optionally use a Rekor verification.
"FulcioCAWithRekor" indicates that the policy is based on the Fulcio certification and incorporates a Rekor verification.
+ "PKI" is a DevPreview feature that indicates that the policy is based on the certificates from Bring Your Own Public Key Infrastructure (BYOPKI).
enum:
- PublicKey
- FulcioCAWithRekor
+ - PKI
type: string
publicKey:
description: publicKey defines the root of trust based on
@@ -144,6 +195,10 @@ spec:
and forbidden otherwise
rule: 'has(self.policyType) && self.policyType == ''FulcioCAWithRekor''
? has(self.fulcioCAWithRekor) : !has(self.fulcioCAWithRekor)'
+ - message: pki is required when policyType is PKI, and forbidden
+ otherwise
+ rule: 'has(self.policyType) && self.policyType == ''PKI'' ?
+ has(self.pki) : !has(self.pki)'
signedIdentity:
description: signedIdentity specifies what image identity the
signature claims about the image. The required matchPolicy field
diff --git a/payload-manifests/crds/0000_10_config-operator_01_imagepolicies-DevPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_10_config-operator_01_imagepolicies-DevPreviewNoUpgrade.crd.yaml
index 4fb733479f2..9b6b5bab8a6 100644
--- a/payload-manifests/crds/0000_10_config-operator_01_imagepolicies-DevPreviewNoUpgrade.crd.yaml
+++ b/payload-manifests/crds/0000_10_config-operator_01_imagepolicies-DevPreviewNoUpgrade.crd.yaml
@@ -102,14 +102,65 @@ spec:
- fulcioSubject
- rekorKeyData
type: object
+ pki:
+ description: pki defines the root of trust based on Bring
+ Your Own Public Key Infrastructure (BYOPKI) Root CA(s) and
+ corresponding intermediate certificates.
+ properties:
+ caIntermediatesData:
+ description: |-
+ caIntermediatesData contains base64-encoded data of a certificate bundle PEM file, which contains one or more intermediate certificates in the PEM format.
+ caIntermediatesData requires CertificateAuthorityRoots to be set.
+ format: byte
+ maxLength: 8192
+ type: string
+ caRootsData:
+ description: caRootsData contains base64-encoded data
+ of a certificate bundle PEM file, which contains one
+ or more CA roots in the PEM format.
+ format: byte
+ maxLength: 8192
+ type: string
+ pkiCertificateSubject:
+ description: pkiCertificateSubject defines the requirements
+ imposed on the subject to which the certificate was
+ issued.
+ properties:
+ email:
+ description: email specifies the expected email address
+ imposed on the subject to which the certificate
+ was issued.
+ type: string
+ x-kubernetes-validations:
+ - message: invalid email address in pkiCertificateSubject
+ rule: self.matches('^\\S+@\\S+$')
+ hostname:
+ description: Hostname specifies the expected hostname
+ imposed on the subject to which the certificate
+ was issued.
+ type: string
+ x-kubernetes-validations:
+ - message: invalid hostname in pkiCertificateSubject
+ rule: self.matches('^(\\*\\.)?([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+\\.[a-zA-Z]{2,}$')
+ type: object
+ x-kubernetes-validations:
+ - message: at least one of email or hostname must be set
+ in pkiCertificateSubject
+ rule: has(self.email) || has(self.hostname)
+ required:
+ - caRootsData
+ - pkiCertificateSubject
+ type: object
policyType:
description: |-
policyType serves as the union's discriminator. Users are required to assign a value to this field, choosing one of the policy types that define the root of trust.
"PublicKey" indicates that the policy relies on a sigstore publicKey and may optionally use a Rekor verification.
"FulcioCAWithRekor" indicates that the policy is based on the Fulcio certification and incorporates a Rekor verification.
+ "PKI" is a DevPreview feature that indicates that the policy is based on the certificates from Bring Your Own Public Key Infrastructure (BYOPKI).
enum:
- PublicKey
- FulcioCAWithRekor
+ - PKI
type: string
publicKey:
description: publicKey defines the root of trust based on
@@ -144,6 +195,10 @@ spec:
and forbidden otherwise
rule: 'has(self.policyType) && self.policyType == ''FulcioCAWithRekor''
? has(self.fulcioCAWithRekor) : !has(self.fulcioCAWithRekor)'
+ - message: pki is required when policyType is PKI, and forbidden
+ otherwise
+ rule: 'has(self.policyType) && self.policyType == ''PKI'' ?
+ has(self.pki) : !has(self.pki)'
signedIdentity:
description: signedIdentity specifies what image identity the
signature claims about the image. The required matchPolicy field
diff --git a/payload-manifests/crds/0000_10_config-operator_01_imagepolicies-TechPreviewNoUpgrade.crd.yaml b/payload-manifests/crds/0000_10_config-operator_01_imagepolicies-TechPreviewNoUpgrade.crd.yaml
index 7b531611db2..1d398d1f3c1 100644
--- a/payload-manifests/crds/0000_10_config-operator_01_imagepolicies-TechPreviewNoUpgrade.crd.yaml
+++ b/payload-manifests/crds/0000_10_config-operator_01_imagepolicies-TechPreviewNoUpgrade.crd.yaml
@@ -107,9 +107,11 @@ spec:
policyType serves as the union's discriminator. Users are required to assign a value to this field, choosing one of the policy types that define the root of trust.
"PublicKey" indicates that the policy relies on a sigstore publicKey and may optionally use a Rekor verification.
"FulcioCAWithRekor" indicates that the policy is based on the Fulcio certification and incorporates a Rekor verification.
+ "PKI" is a DevPreview feature that indicates that the policy is based on the certificates from Bring Your Own Public Key Infrastructure (BYOPKI).
enum:
- PublicKey
- FulcioCAWithRekor
+ - PKI
type: string
publicKey:
description: publicKey defines the root of trust based on
@@ -144,6 +146,10 @@ spec:
and forbidden otherwise
rule: 'has(self.policyType) && self.policyType == ''FulcioCAWithRekor''
? has(self.fulcioCAWithRekor) : !has(self.fulcioCAWithRekor)'
+ - message: pki is required when policyType is PKI, and forbidden
+ otherwise
+ rule: 'has(self.policyType) && self.policyType == ''PKI'' ?
+ has(self.pki) : !has(self.pki)'
signedIdentity:
description: signedIdentity specifies what image identity the
signature claims about the image. The required matchPolicy field
diff --git a/payload-manifests/featuregates/featureGate-Hypershift-Default.yaml b/payload-manifests/featuregates/featureGate-Hypershift-Default.yaml
index a2130d6f0b7..32ee6a2e2e2 100644
--- a/payload-manifests/featuregates/featureGate-Hypershift-Default.yaml
+++ b/payload-manifests/featuregates/featureGate-Hypershift-Default.yaml
@@ -145,6 +145,9 @@
{
"name": "SigstoreImageVerification"
},
+ {
+ "name": "SigstoreImageVerificationPKI"
+ },
{
"name": "TranslateStreamCloseWebsocketRequests"
},
diff --git a/payload-manifests/featuregates/featureGate-Hypershift-DevPreviewNoUpgrade.yaml b/payload-manifests/featuregates/featureGate-Hypershift-DevPreviewNoUpgrade.yaml
index c9d021261e3..d19d2c5a269 100644
--- a/payload-manifests/featuregates/featureGate-Hypershift-DevPreviewNoUpgrade.yaml
+++ b/payload-manifests/featuregates/featureGate-Hypershift-DevPreviewNoUpgrade.yaml
@@ -221,6 +221,9 @@
{
"name": "SigstoreImageVerification"
},
+ {
+ "name": "SigstoreImageVerificationPKI"
+ },
{
"name": "TranslateStreamCloseWebsocketRequests"
},
diff --git a/payload-manifests/featuregates/featureGate-Hypershift-TechPreviewNoUpgrade.yaml b/payload-manifests/featuregates/featureGate-Hypershift-TechPreviewNoUpgrade.yaml
index 693027446a6..847923550d1 100644
--- a/payload-manifests/featuregates/featureGate-Hypershift-TechPreviewNoUpgrade.yaml
+++ b/payload-manifests/featuregates/featureGate-Hypershift-TechPreviewNoUpgrade.yaml
@@ -35,6 +35,9 @@
},
{
"name": "MultiArchInstallAzure"
+ },
+ {
+ "name": "SigstoreImageVerificationPKI"
}
],
"enabled": [
diff --git a/payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml b/payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml
index ad2106d3976..5963e22ee99 100644
--- a/payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml
+++ b/payload-manifests/featuregates/featureGate-SelfManagedHA-Default.yaml
@@ -148,6 +148,9 @@
{
"name": "SigstoreImageVerification"
},
+ {
+ "name": "SigstoreImageVerificationPKI"
+ },
{
"name": "TranslateStreamCloseWebsocketRequests"
},
diff --git a/payload-manifests/featuregates/featureGate-SelfManagedHA-DevPreviewNoUpgrade.yaml b/payload-manifests/featuregates/featureGate-SelfManagedHA-DevPreviewNoUpgrade.yaml
index 52e01ba3868..c622e2ef59d 100644
--- a/payload-manifests/featuregates/featureGate-SelfManagedHA-DevPreviewNoUpgrade.yaml
+++ b/payload-manifests/featuregates/featureGate-SelfManagedHA-DevPreviewNoUpgrade.yaml
@@ -221,6 +221,9 @@
{
"name": "SigstoreImageVerification"
},
+ {
+ "name": "SigstoreImageVerificationPKI"
+ },
{
"name": "TranslateStreamCloseWebsocketRequests"
},
diff --git a/payload-manifests/featuregates/featureGate-SelfManagedHA-TechPreviewNoUpgrade.yaml b/payload-manifests/featuregates/featureGate-SelfManagedHA-TechPreviewNoUpgrade.yaml
index 152ba3cbcb0..ac8c5376a4f 100644
--- a/payload-manifests/featuregates/featureGate-SelfManagedHA-TechPreviewNoUpgrade.yaml
+++ b/payload-manifests/featuregates/featureGate-SelfManagedHA-TechPreviewNoUpgrade.yaml
@@ -35,6 +35,9 @@
},
{
"name": "MultiArchInstallAzure"
+ },
+ {
+ "name": "SigstoreImageVerificationPKI"
}
],
"enabled": [