diff --git a/api/v1beta2/ocirepository_types.go b/api/v1beta2/ocirepository_types.go index 97593442e..6dc05167c 100644 --- a/api/v1beta2/ocirepository_types.go +++ b/api/v1beta2/ocirepository_types.go @@ -191,25 +191,26 @@ type OCIRepositoryVerification struct { // +optional SecretRef *meta.LocalObjectReference `json:"secretRef,omitempty"` - // CosignIdentityMatch specifies the identity matching criteria to use + // MatchOIDCIdentity specifies the identity matching criteria to use // while verifying an OCI artifact which was signed using Cosign keyless // signing. - CosignIdentityMatch *CosignIdentityMatch `json:"cosignIdentityMatch,omitempty"` + // +optional + MatchOIDCIdentity *MatchOIDCIdentity `json:"matchOIDCIdentity,omitempty"` } -// CosignIdentityMatch specifies options for verifying the certificate identity, +// MatchOIDCIdentity specifies options for verifying the certificate identity, // i.e. the issuer and the subject of the certificate. -type CosignIdentityMatch struct { - // IssuerRegExp specifies the regex pattern to match against to verify +type MatchOIDCIdentity struct { + // Issuer specifies the regex pattern to match against to verify // the OIDC issuer in the Fulcio certificate. The pattern must be a // valid Go regular expression. // +optional - IssuerRegExp string `json:"issuerRegExp,omitempty"` - // SubjectRegExp specifies the regex pattern to match against to verify + Issuer string `json:"issuer,omitempty"` + // Subject specifies the regex pattern to match against to verify // the identity in the Fulcio certificate. The pattern must be a // valid Go regular expression. // +optional - SubjectRegExp string `json:"subjectRegExp,omitempty"` + Subject string `json:"subject,omitempty"` } // OCIRepositoryStatus defines the observed state of OCIRepository diff --git a/api/v1beta2/zz_generated.deepcopy.go b/api/v1beta2/zz_generated.deepcopy.go index 8b2e41dff..c69ee345e 100644 --- a/api/v1beta2/zz_generated.deepcopy.go +++ b/api/v1beta2/zz_generated.deepcopy.go @@ -185,21 +185,6 @@ func (in *BucketStatus) DeepCopy() *BucketStatus { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CosignIdentityMatch) DeepCopyInto(out *CosignIdentityMatch) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CosignIdentityMatch. -func (in *CosignIdentityMatch) DeepCopy() *CosignIdentityMatch { - if in == nil { - return nil - } - out := new(CosignIdentityMatch) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GitRepository) DeepCopyInto(out *GitRepository) { *out = *in @@ -663,6 +648,21 @@ func (in *LocalHelmChartSourceReference) DeepCopy() *LocalHelmChartSourceReferen return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *MatchOIDCIdentity) DeepCopyInto(out *MatchOIDCIdentity) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MatchOIDCIdentity. +func (in *MatchOIDCIdentity) DeepCopy() *MatchOIDCIdentity { + if in == nil { + return nil + } + out := new(MatchOIDCIdentity) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *OCILayerSelector) DeepCopyInto(out *OCILayerSelector) { *out = *in @@ -849,9 +849,9 @@ func (in *OCIRepositoryVerification) DeepCopyInto(out *OCIRepositoryVerification *out = new(meta.LocalObjectReference) **out = **in } - if in.CosignIdentityMatch != nil { - in, out := &in.CosignIdentityMatch, &out.CosignIdentityMatch - *out = new(CosignIdentityMatch) + if in.MatchOIDCIdentity != nil { + in, out := &in.MatchOIDCIdentity, &out.MatchOIDCIdentity + *out = new(MatchOIDCIdentity) **out = **in } } diff --git a/config/crd/bases/source.toolkit.fluxcd.io_helmcharts.yaml b/config/crd/bases/source.toolkit.fluxcd.io_helmcharts.yaml index 5e72ca06b..b0c9971dc 100644 --- a/config/crd/bases/source.toolkit.fluxcd.io_helmcharts.yaml +++ b/config/crd/bases/source.toolkit.fluxcd.io_helmcharts.yaml @@ -411,19 +411,19 @@ spec: Chart dependencies, which are not bundled in the umbrella chart artifact, are not verified. properties: - cosignIdentityMatch: - description: CosignIdentityMatch specifies the identity matching + matchOIDCIdentity: + description: MatchOIDCIdentity specifies the identity matching criteria to use while verifying an OCI artifact which was signed using Cosign keyless signing. properties: - issuerRegExp: - description: IssuerRegExp specifies the regex pattern to match - against to verify the OIDC issuer in the Fulcio certificate. - The pattern must be a valid Go regular expression. + issuer: + description: Issuer specifies the regex pattern to match against + to verify the OIDC issuer in the Fulcio certificate. The + pattern must be a valid Go regular expression. type: string - subjectRegExp: - description: SubjectRegExp specifies the regex pattern to - match against to verify the identity in the Fulcio certificate. + subject: + description: Subject specifies the regex pattern to match + against to verify the identity in the Fulcio certificate. The pattern must be a valid Go regular expression. type: string type: object diff --git a/config/crd/bases/source.toolkit.fluxcd.io_ocirepositories.yaml b/config/crd/bases/source.toolkit.fluxcd.io_ocirepositories.yaml index 00f8f946d..d0675b466 100644 --- a/config/crd/bases/source.toolkit.fluxcd.io_ocirepositories.yaml +++ b/config/crd/bases/source.toolkit.fluxcd.io_ocirepositories.yaml @@ -164,19 +164,19 @@ spec: public keys used to verify the signature and specifies which provider to use to check whether OCI image is authentic. properties: - cosignIdentityMatch: - description: CosignIdentityMatch specifies the identity matching + matchOIDCIdentity: + description: MatchOIDCIdentity specifies the identity matching criteria to use while verifying an OCI artifact which was signed using Cosign keyless signing. properties: - issuerRegExp: - description: IssuerRegExp specifies the regex pattern to match - against to verify the OIDC issuer in the Fulcio certificate. - The pattern must be a valid Go regular expression. + issuer: + description: Issuer specifies the regex pattern to match against + to verify the OIDC issuer in the Fulcio certificate. The + pattern must be a valid Go regular expression. type: string - subjectRegExp: - description: SubjectRegExp specifies the regex pattern to - match against to verify the identity in the Fulcio certificate. + subject: + description: Subject specifies the regex pattern to match + against to verify the identity in the Fulcio certificate. The pattern must be a valid Go regular expression. type: string type: object diff --git a/docs/api/v1beta2/source.md b/docs/api/v1beta2/source.md index 7085b245c..5491c2827 100644 --- a/docs/api/v1beta2/source.md +++ b/docs/api/v1beta2/source.md @@ -1614,56 +1614,6 @@ github.com/fluxcd/pkg/apis/meta.ReconcileRequestStatus -
-(Appears on: -OCIRepositoryVerification) -
-CosignIdentityMatch specifies options for verifying the certificate identity, -i.e. the issuer and the subject of the certificate.
-Field | -Description | -
---|---|
-issuerRegExp - -string - - |
-
-(Optional)
- IssuerRegExp specifies the regex pattern to match against to verify -the OIDC issuer in the Fulcio certificate. The pattern must be a -valid Go regular expression. - |
-
-subjectRegExp - -string - - |
-
-(Optional)
- SubjectRegExp specifies the regex pattern to match against to verify -the identity in the Fulcio certificate. The pattern must be a -valid Go regular expression. - |
-
@@ -2838,6 +2788,56 @@ string +
+(Appears on: +OCIRepositoryVerification) +
+MatchOIDCIdentity specifies options for verifying the certificate identity, +i.e. the issuer and the subject of the certificate.
+Field | +Description | +
---|---|
+issuer + +string + + |
+
+(Optional)
+ Issuer specifies the regex pattern to match against to verify +the OIDC issuer in the Fulcio certificate. The pattern must be a +valid Go regular expression. + |
+
+subject + +string + + |
+
+(Optional)
+ Subject specifies the regex pattern to match against to verify +the identity in the Fulcio certificate. The pattern must be a +valid Go regular expression. + |
+
@@ -3347,15 +3347,16 @@ trusted public keys.
cosignIdentityMatch
matchOIDCIdentity
CosignIdentityMatch specifies the identity matching criteria to use +(Optional) +
MatchOIDCIdentity specifies the identity matching criteria to use while verifying an OCI artifact which was signed using Cosign keyless signing.