×

Specification

Property Type Description

apiVersion

string

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

kind

string

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

metadata

ObjectMeta

Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

spec

object

spec contains the configuration for the cluster image policy.

status

object

status contains the observed state of the resource.

.spec

Description

spec contains the configuration for the cluster image policy.

Type

object

Required
  • policy

  • scopes

Property Type Description

policy

object

policy contains configuration to allow scopes to be verified, and defines how images not matching the verification policy will be treated.

scopes

array (string)

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. 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

.spec.policy

Description

policy contains configuration to allow scopes to be verified, and defines how images not matching the verification policy will be treated.

Type

object

Required
  • rootOfTrust

Property Type Description

rootOfTrust

object

rootOfTrust specifies the root of trust for the policy.

signedIdentity

object

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".

.spec.policy.rootOfTrust

Description

rootOfTrust specifies the root of trust for the policy.

Type

object

Required
  • policyType

Property Type Description

fulcioCAWithRekor

object

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

policyType

string

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.

publicKey

object

publicKey defines the root of trust based on a sigstore public key.

.spec.policy.rootOfTrust.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

Type

object

Required
  • fulcioCAData

  • fulcioSubject

  • rekorKeyData

Property Type Description

fulcioCAData

string

fulcioCAData contains inline base64-encoded data for the PEM format fulcio CA. fulcioCAData must be at most 8192 characters.

fulcioSubject

object

fulcioSubject specifies OIDC issuer and the email of the Fulcio authentication configuration.

rekorKeyData

string

rekorKeyData contains inline base64-encoded data for the PEM format from the Rekor public key. rekorKeyData must be at most 8192 characters.

.spec.policy.rootOfTrust.fulcioCAWithRekor.fulcioSubject

Description

fulcioSubject specifies OIDC issuer and the email of the Fulcio authentication configuration.

Type

object

Required
  • oidcIssuer

  • signedEmail

Property Type Description

oidcIssuer

string

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/"

signedEmail

string

signedEmail holds the email address the the Fulcio certificate is issued for. Example: "expected-signing-user@example.com"

.spec.policy.rootOfTrust.publicKey

Description

publicKey defines the root of trust based on a sigstore public key.

Type

object

Required
  • keyData

Property Type Description

keyData

string

keyData contains inline base64-encoded data for the PEM format public key. KeyData must be at most 8192 characters.

rekorKeyData

string

rekorKeyData contains inline base64-encoded data for the PEM format from the Rekor public key. rekorKeyData must be at most 8192 characters.

.spec.policy.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".

Type

object

Required
  • matchPolicy

Property Type Description

exactRepository

object

exactRepository is required if matchPolicy is set to "ExactRepository".

matchPolicy

string

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.

remapIdentity

object

remapIdentity is required if matchPolicy is set to "RemapIdentity".

.spec.policy.signedIdentity.exactRepository

Description

exactRepository is required if matchPolicy is set to "ExactRepository".

Type

object

Required
  • repository

Property Type Description

repository

string

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

.spec.policy.signedIdentity.remapIdentity

Description

remapIdentity is required if matchPolicy is set to "RemapIdentity".

Type

object

Required
  • prefix

  • signedPrefix

Property Type Description

prefix

string

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.

signedPrefix

string

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.

.status

Description

status contains the observed state of the resource.

Type

object

Property Type Description

conditions

array

conditions provide details on the status of this API Resource.

conditions[]

object

Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo’s current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions" // other fields }

.status.conditions

Description

conditions provide details on the status of this API Resource.

Type

array

.status.conditions[]

Description

Condition contains details for one aspect of the current state of this API Resource. --- This struct is intended for direct use as an array at the field path .status.conditions. For example, type FooStatus struct{ // Represents the observations of a foo’s current state. // Known .status.conditions.type are: "Available", "Progressing", and "Degraded" // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions" // other fields }

Type

object

Required
  • lastTransitionTime

  • message

  • reason

  • status

  • type

Property Type Description

lastTransitionTime

string

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.

message

string

message is a human readable message indicating details about the transition. This may be an empty string.

observedGeneration

integer

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.

reason

string

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.

status

string

status of the condition, one of True, False, Unknown.

type

string

type of condition in CamelCase or in foo.example.com/CamelCase. --- Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)

API endpoints

The following API endpoints are available:

  • /apis/config.openshift.io/v1alpha1/clusterimagepolicies

    • DELETE: delete collection of ClusterImagePolicy

    • GET: list objects of kind ClusterImagePolicy

    • POST: create a ClusterImagePolicy

  • /apis/config.openshift.io/v1alpha1/clusterimagepolicies/{name}

    • DELETE: delete a ClusterImagePolicy

    • GET: read the specified ClusterImagePolicy

    • PATCH: partially update the specified ClusterImagePolicy

    • PUT: replace the specified ClusterImagePolicy

  • /apis/config.openshift.io/v1alpha1/clusterimagepolicies/{name}/status

    • GET: read status of the specified ClusterImagePolicy

    • PATCH: partially update status of the specified ClusterImagePolicy

    • PUT: replace status of the specified ClusterImagePolicy

/apis/config.openshift.io/v1alpha1/clusterimagepolicies

HTTP method

DELETE

Description

delete collection of ClusterImagePolicy

Table 1. HTTP responses
HTTP code Reponse body

200 - OK

Status schema

401 - Unauthorized

Empty

HTTP method

GET

Description

list objects of kind ClusterImagePolicy

Table 2. HTTP responses
HTTP code Reponse body

200 - OK

ClusterImagePolicyList schema

401 - Unauthorized

Empty

HTTP method

POST

Description

create a ClusterImagePolicy

Table 3. Query parameters
Parameter Type Description

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 4. Body parameters
Parameter Type Description

body

ClusterImagePolicy schema

Table 5. HTTP responses
HTTP code Reponse body

200 - OK

ClusterImagePolicy schema

201 - Created

ClusterImagePolicy schema

202 - Accepted

ClusterImagePolicy schema

401 - Unauthorized

Empty

/apis/config.openshift.io/v1alpha1/clusterimagepolicies/{name}

Table 6. Global path parameters
Parameter Type Description

name

string

name of the ClusterImagePolicy

HTTP method

DELETE

Description

delete a ClusterImagePolicy

Table 7. Query parameters
Parameter Type Description

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

Table 8. HTTP responses
HTTP code Reponse body

200 - OK

Status schema

202 - Accepted

Status schema

401 - Unauthorized

Empty

HTTP method

GET

Description

read the specified ClusterImagePolicy

Table 9. HTTP responses
HTTP code Reponse body

200 - OK

ClusterImagePolicy schema

401 - Unauthorized

Empty

HTTP method

PATCH

Description

partially update the specified ClusterImagePolicy

Table 10. Query parameters
Parameter Type Description

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 11. HTTP responses
HTTP code Reponse body

200 - OK

ClusterImagePolicy schema

401 - Unauthorized

Empty

HTTP method

PUT

Description

replace the specified ClusterImagePolicy

Table 12. Query parameters
Parameter Type Description

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 13. Body parameters
Parameter Type Description

body

ClusterImagePolicy schema

Table 14. HTTP responses
HTTP code Reponse body

200 - OK

ClusterImagePolicy schema

201 - Created

ClusterImagePolicy schema

401 - Unauthorized

Empty

/apis/config.openshift.io/v1alpha1/clusterimagepolicies/{name}/status

Table 15. Global path parameters
Parameter Type Description

name

string

name of the ClusterImagePolicy

HTTP method

GET

Description

read status of the specified ClusterImagePolicy

Table 16. HTTP responses
HTTP code Reponse body

200 - OK

ClusterImagePolicy schema

401 - Unauthorized

Empty

HTTP method

PATCH

Description

partially update status of the specified ClusterImagePolicy

Table 17. Query parameters
Parameter Type Description

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 18. HTTP responses
HTTP code Reponse body

200 - OK

ClusterImagePolicy schema

401 - Unauthorized

Empty

HTTP method

PUT

Description

replace status of the specified ClusterImagePolicy

Table 19. Query parameters
Parameter Type Description

dryRun

string

When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

fieldValidation

string

fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. Valid values are: - Ignore: This will ignore any unknown fields that are silently dropped from the object, and will ignore all but the last duplicate field that the decoder encounters. This is the default behavior prior to v1.23. - Warn: This will send a warning via the standard warning response header for each unknown field that is dropped from the object, and for each duplicate field that is encountered. The request will still succeed if there are no other errors, and will only persist the last of any duplicate fields. This is the default in v1.23+ - Strict: This will fail the request with a BadRequest error if any unknown fields would be dropped from the object, or if any duplicate fields are present. The error returned from the server will contain all unknown and duplicate fields encountered.

Table 20. Body parameters
Parameter Type Description

body

ClusterImagePolicy schema

Table 21. HTTP responses
HTTP code Reponse body

200 - OK

ClusterImagePolicy schema

201 - Created

ClusterImagePolicy schema

401 - Unauthorized

Empty