- Resource: Policy
- GlobalPolicyEvaluationMode
- AdmissionWhitelistPattern
- AdmissionRule
- EvaluationMode
- EnforcementMode
- Methods
Resource: Policy
A policy
for container image binary authorization.
JSON representation |
---|
{ "name": string, "description": string, "globalPolicyEvaluationMode": enum ( |
Fields | |
---|---|
name |
Output only. The resource name, in the format |
description |
Optional. A descriptive comment. |
globalPolicyEvaluationMode |
Optional. Controls the evaluation of a Google-maintained global admission policy for common system-level images. Images not covered by the global policy will be subject to the project admission policy. This setting has no effect when specified inside a global admission policy. |
admissionWhitelistPatterns[] |
Optional. Admission policy allowlisting. A matching admission request will always be permitted. This feature is typically used to exclude Google or third-party infrastructure images from Binary Authorization policies. |
clusterAdmissionRules |
Optional. Per-cluster admission rules. Cluster spec format: An object containing a list of |
kubernetesNamespaceAdmissionRules |
Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format: An object containing a list of |
kubernetesServiceAccountAdmissionRules |
Optional. Per-kubernetes-service-account admission rules. Service account spec format: An object containing a list of |
istioServiceIdentityAdmissionRules |
Optional. Per-istio-service-identity admission rules. Istio service identity spec format: An object containing a list of |
defaultAdmissionRule |
Required. Default admission rule for a cluster without a per-cluster, per- kubernetes-service-account, or per-istio-service-identity admission rule. |
updateTime |
Output only. Time when the policy was last updated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
etag |
Optional. A checksum, returned by the server, that can be sent on update requests to ensure the policy has an up-to-date value before attempting to update it. See https://google.aip.dev/154. |
GlobalPolicyEvaluationMode
Enums | |
---|---|
GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED |
Not specified: DISABLE is assumed. |
ENABLE |
Enables system policy evaluation. |
DISABLE |
Disables system policy evaluation. |
AdmissionWhitelistPattern
An admission allowlist pattern
exempts images from checks by admission rules
.
JSON representation |
---|
{ "namePattern": string } |
Fields | |
---|---|
namePattern |
An image name pattern to allowlist, in the form |
AdmissionRule
An admission rule
specifies either that all container images used in a pod creation request must be attested to by one or more attestors
, that all pod creations will be allowed, or that all pod creations will be denied.
Images matching an admission allowlist pattern
are exempted from admission rules and will never block a pod creation.
JSON representation |
---|
{ "evaluationMode": enum ( |
Fields | |
---|---|
evaluationMode |
Required. How this admission rule will be evaluated. |
requireAttestationsBy[] |
Optional. The resource names of the attestors that must attest to a container image, in the format Note: this field must be non-empty when the |
enforcementMode |
Required. The action when a pod creation is denied by the admission rule. |
EvaluationMode
Enums | |
---|---|
EVALUATION_MODE_UNSPECIFIED |
Do not use. |
ALWAYS_ALLOW |
This rule allows all pod creations. |
REQUIRE_ATTESTATION |
This rule allows a pod creation if all the attestors listed in requireAttestationsBy have valid attestations for all of the images in the pod spec. |
ALWAYS_DENY |
This rule denies all pod creations. |
EnforcementMode
Defines the possible actions when a pod creation is denied by an admission rule.
Enums | |
---|---|
ENFORCEMENT_MODE_UNSPECIFIED |
Do not use. |
ENFORCED_BLOCK_AND_AUDIT_LOG |
Enforce the admission rule by blocking the pod creation. |
DRYRUN_AUDIT_LOG_ONLY |
Dryrun mode: Audit logging only. This will allow the pod creation as if the admission request had specified break-glass. |
Methods |
|
---|---|
|
Gets the access control policy for a resource. |
|
Sets the access control policy on the specified resource. |
|
Returns permissions that a caller has on the specified resource. |