Skip to content

Commit

Permalink
Merge pull request #1765 from QiWang19/bytebase64
Browse files Browse the repository at this point in the history
[OCPNODE-1671] ImagePolicy uses byte format for base64 fields
  • Loading branch information
openshift-merge-bot[bot] authored Feb 14, 2024
2 parents 89248c8 + ec1c5f0 commit e741d64
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ spec:
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:
Expand Down Expand Up @@ -93,6 +94,7 @@ spec:
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:
Expand Down Expand Up @@ -120,12 +122,14 @@ spec:
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ spec:
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:
Expand Down Expand Up @@ -93,6 +94,7 @@ spec:
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:
Expand Down Expand Up @@ -120,12 +122,14 @@ spec:
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ spec:
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:
Expand Down Expand Up @@ -93,6 +94,7 @@ spec:
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:
Expand Down Expand Up @@ -120,12 +122,14 @@ spec:
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ spec:
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:
Expand Down Expand Up @@ -93,6 +94,7 @@ spec:
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:
Expand Down Expand Up @@ -120,12 +122,14 @@ spec:
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:
Expand Down
8 changes: 4 additions & 4 deletions config/v1alpha1/types_image_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ type PublicKey struct {
// KeyData must be at most 8192 characters.
// +kubebuilder:validation:Required
// +kubebuilder:validation:MaxLength=8192
KeyData string `json:"keyData"`
KeyData []byte `json:"keyData"`
// rekorKeyData contains inline base64-encoded data for the PEM format from the Rekor public key.
// rekorKeyData must be at most 8192 characters.
// +optional
// +kubebuilder:validation:MaxLength=8192
RekorKeyData string `json:"rekorKeyData,omitempty"`
RekorKeyData []byte `json:"rekorKeyData,omitempty"`
}

// FulcioCAWithRekor defines the root of trust based on the Fulcio certificate and the Rekor public key.
Expand All @@ -110,12 +110,12 @@ type FulcioCAWithRekor struct {
// fulcioCAData must be at most 8192 characters.
// +kubebuilder:validation:Required
// +kubebuilder:validation:MaxLength=8192
FulcioCAData string `json:"fulcioCAData"`
FulcioCAData []byte `json:"fulcioCAData"`
// rekorKeyData contains inline base64-encoded data for the PEM format from the Rekor public key.
// rekorKeyData must be at most 8192 characters.
// +kubebuilder:validation:Required
// +kubebuilder:validation:MaxLength=8192
RekorKeyData string `json:"rekorKeyData"`
RekorKeyData []byte `json:"rekorKeyData"`
// fulcioSubject specifies OIDC issuer and the email of the Fulcio authentication configuration.
// +kubebuilder:validation:Required
FulcioSubject PolicyFulcioSubject `json:"fulcioSubject,omitempty"`
Expand Down
24 changes: 22 additions & 2 deletions config/v1alpha1/zz_generated.deepcopy.go

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

11 changes: 4 additions & 7 deletions openapi/generated_openapi/zz_generated.openapi.go

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

9 changes: 5 additions & 4 deletions openapi/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -10933,7 +10933,7 @@
"fulcioCAData": {
"description": "fulcioCAData contains inline base64-encoded data for the PEM format fulcio CA. fulcioCAData must be at most 8192 characters.",
"type": "string",
"default": ""
"format": "byte"
},
"fulcioSubject": {
"description": "fulcioSubject specifies OIDC issuer and the email of the Fulcio authentication configuration.",
Expand All @@ -10943,7 +10943,7 @@
"rekorKeyData": {
"description": "rekorKeyData contains inline base64-encoded data for the PEM format from the Rekor public key. rekorKeyData must be at most 8192 characters.",
"type": "string",
"default": ""
"format": "byte"
}
}
},
Expand Down Expand Up @@ -11286,11 +11286,12 @@
"keyData": {
"description": "keyData contains inline base64-encoded data for the PEM format public key. KeyData must be at most 8192 characters.",
"type": "string",
"default": ""
"format": "byte"
},
"rekorKeyData": {
"description": "rekorKeyData contains inline base64-encoded data for the PEM format from the Rekor public key. rekorKeyData must be at most 8192 characters.",
"type": "string"
"type": "string",
"format": "byte"
}
}
},
Expand Down

0 comments on commit e741d64

Please sign in to comment.