- Resource: PlatformPolicy
- GkePolicy
- ImageAllowlist
- CheckSet
- Scope
- Check
- SimpleSigningAttestationCheck
- AttestationAuthenticator
- PkixPublicKeySet
- TrustedDirectoryCheck
- ImageFreshnessCheck
- VulnerabilityCheck
- MaximumAllowedSeverity
- SlsaCheck
- VerificationRule
- TrustedBuilder
- AttestationSource
- SigstoreSignatureCheck
- SigstoreAuthority
- SigstorePublicKeySet
- SigstorePublicKey
- Methods
Resource: PlatformPolicy
A Binary Authorization platform policy
for deployments on various platforms
.
JSON representation |
---|
{ "name": string, "description": string, "updateTime": string, "etag": string, // Union field |
Fields | |
---|---|
name |
Output only. The relative resource name of the Binary Authorization platform policy, in the form of |
description |
Optional. A description comment about the policy. |
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. Used to prevent updating the policy when another request has updated it since it was retrieved. |
Union field policy_details . Platform-specific policy details. The detail should be consistent with the platform value in the URL. policy_details can be only one of the following: |
|
gkePolicy |
Optional. GKE platform-specific policy. |
GkePolicy
A Binary Authorization policy for a GKE cluster. This is one type of policy that can occur as a PlatformPolicy
.
JSON representation |
---|
{ "imageAllowlist": { object ( |
Fields | |
---|---|
imageAllowlist |
Optional. Images exempted from this policy. If any of the patterns match the image being evaluated, the rest of the policy will not be evaluated. |
checkSets[] |
Optional. The
If If |
ImageAllowlist
Images that are exempted from normal checks based on name pattern only.
JSON representation |
---|
{ "allowPattern": [ string ] } |
Fields | |
---|---|
allowPattern[] |
Required. A disjunction of image patterns to allow. If any of these patterns match, then the image is considered exempted by this allowlist. |
CheckSet
A conjunction of policy checks, scoped to a particular namespace or Kubernetes service account.
In order for evaluation of a CheckSet
to return "allowed" for a given image in a given Pod, one of the following conditions must be satisfied:
- The image is explicitly exempted by an entry in
imageAllowlist
, OR - ALL of the
checks
evaluate to "allowed".
JSON representation |
---|
{ "displayName": string, "scope": { object ( |
Fields | |
---|---|
displayName |
Optional. A user-provided name for this |
scope |
Optional. The scope to which this |
imageAllowlist |
Optional. Images exempted from this |
checks[] |
Optional. The checks to apply. The ultimate result of evaluating the check set will be "allow" if and only if every check in If |
Scope
A scope specifier for CheckSet
objects.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field scope . A specific type of scope specifier. scope can be only one of the following: |
|
kubernetesServiceAccount |
Optional. Matches a single Kubernetes service account, e.g. |
kubernetesNamespace |
Optional. Matches all Kubernetes service accounts in the provided namespace, unless a more specific |
Check
A single check to perform against a Pod. Checks are grouped into CheckSet
objects, which are defined by the top-level policy.
JSON representation |
---|
{ "displayName": string, "imageAllowlist": { object ( |
Fields | |
---|---|
displayName |
Optional. A user-provided name for this check. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results. |
imageAllowlist |
Optional. Images exempted from this check. If any of the patterns match the image url, the check will not be evaluated. |
Union field check . The specific type and configuration of check to perform. check can be only one of the following: |
|
alwaysDeny |
Optional. A special-case check that always denies. Note that this still only applies when the scope of the This check is primarily useful for testing, or to set the default behavior for all unmatched scopes to "deny". |
simpleSigningAttestationCheck |
Optional. Require a SimpleSigning-type attestation for every image in the deployment. |
trustedDirectoryCheck |
Optional. Require that an image lives in a trusted directory. |
imageFreshnessCheck |
Optional. Require that an image is no older than a configured expiration time. Image age is determined by its upload time. |
vulnerabilityCheck |
Optional. Require that an image does not contain vulnerabilities that violate the configured rules, such as based on severity levels. |
slsaCheck |
Optional. Require that an image was built by a trusted builder (such as Google Cloud Build), meets requirements for Supply chain Levels for Software Artifacts (SLSA), and was built from a trusted source code repostitory. |
sigstoreSignatureCheck |
Optional. Require that an image was signed by Cosign with a trusted key. This check requires that both the image and signature are stored in Artifact Registry. |
SimpleSigningAttestationCheck
Require a signed DSSE attestation with type SimpleSigning.
JSON representation |
---|
{
"attestationAuthenticators": [
{
object ( |
Fields | |
---|---|
attestationAuthenticators[] |
Required. The authenticators required by this check to verify an attestation. Typically this is one or more PKIX public keys for signature verification. Only one authenticator needs to consider an attestation verified in order for an attestation to be considered fully authenticated. In otherwords, this list of authenticators is an "OR" of the authenticator results. At least one authenticator is required. |
containerAnalysisAttestationProjects[] |
Optional. The projects where attestations are stored as Container Analysis Occurrences, in the format When fetching Occurrences from Container Analysis, only Maximum number of |
AttestationAuthenticator
An attestation authenticator
that will be used to verify attestations. Typically this is just a set of public keys.
Conceptually, an authenticator can be treated as always returning either "authenticated" or "not authenticated" when presented with a signed attestation (almost always assumed to be a DSSE attestation). The details of how an authenticator makes this decision are specific to the type of 'authenticator' that this message wraps.
JSON representation |
---|
{ "displayName": string, // Union field |
Fields | |
---|---|
displayName |
Optional. A user-provided name for this |
Union field authenticator . The specific type of authentication configured by this authenticator. authenticator can be only one of the following: |
|
pkixPublicKeySet |
Optional. A set of raw PKIX SubjectPublicKeyInfo format public keys. If any public key in the set validates the attestation signature, then the signature is considered authenticated (i.e. any one key is sufficient to authenticate). |
PkixPublicKeySet
A bundle of PKIX public keys, used to authenticate attestation signatures.
Generally, a signature is considered to be authenticated by a PkixPublicKeySet
if any of the public keys verify it (i.e. it is an "OR" of the keys).
JSON representation |
---|
{
"pkixPublicKeys": [
{
object ( |
Fields | |
---|---|
pkixPublicKeys[] |
Required. |
TrustedDirectoryCheck
A trusted directory check, which rejects images that do not come from the set of user-configured trusted directories.
JSON representation |
---|
{ "trustedDirPatterns": [ string ] } |
Fields | |
---|---|
trustedDirPatterns[] |
Required. List of trusted directory patterns. A pattern is in the form "registry/path/to/directory". The registry domain part is defined as two or more dot-separated words, e.g., |
ImageFreshnessCheck
An image freshness check, which rejects images that were uploaded before the set number of days ago to the supported repositories.
JSON representation |
---|
{ "maxUploadAgeDays": integer } |
Fields | |
---|---|
maxUploadAgeDays |
Required. The max number of days that is allowed since the image was uploaded. Must be greater than zero. |
VulnerabilityCheck
An image vulnerability check, which rejects images that violate the configured vulnerability rules.
JSON representation |
---|
{ "allowedCves": [ string ], "blockedCves": [ string ], "maximumUnfixableSeverity": enum ( |
Fields | |
---|---|
allowedCves[] |
Optional. A list of specific CVEs to ignore even if the vulnerability level violates |
blockedCves[] |
Optional. A list of specific CVEs to always raise warnings about even if the vulnerability level meets |
maximumUnfixableSeverity |
Required. The threshold for severity for which a fix isn't currently available. This field is required and must be set. |
maximumFixableSeverity |
Required. The threshold for severity for which a fix is currently available. This field is required and must be set. |
containerAnalysisVulnerabilityProjects[] |
Optional. The projects where vulnerabilities are stored as Container Analysis Occurrences. Each project is expressed in the resource format of Maximum number of |
MaximumAllowedSeverity
Maximum allowed severity level which is compared to an image's effective
severity
defined by Container Analysis: https://cloud.google.com/container-analysis/docs/container-scanning-overview#sources.
Enums | |
---|---|
MAXIMUM_ALLOWED_SEVERITY_UNSPECIFIED |
Not specified. |
BLOCK_ALL |
Block any vulnerability. |
MINIMAL |
Allow only minimal severity. |
LOW |
Allow only low severity and lower. |
MEDIUM |
Allow medium severity and lower. |
HIGH |
Allow high severity and lower. |
CRITICAL |
Allow critical severity and lower. |
ALLOW_ALL |
Allow all severity, even vulnerability with unspecified severity. |
SlsaCheck
A SLSA provenance attestation check, which ensures that images are built by a trusted builder using source code from its trusted repositories only.
JSON representation |
---|
{
"rules": [
{
object ( |
Fields | |
---|---|
rules[] |
Specifies a list of verification rules for the SLSA attestations. An image is considered compliant with the SlsaCheck if any of the rules are satisfied. |
VerificationRule
Specifies verification rules for evaluating the SLSA attestations including: which builders to trust, where to fetch the SLSA attestations generated by those builders, and other builder-specific evaluation rules such as which source repositories are trusted. An image is considered verified by the rule if any of the fetched SLSA attestations is verified.
JSON representation |
---|
{ "trustedBuilder": enum ( |
Fields | |
---|---|
trustedBuilder |
Each verification rule is used for evaluation against provenances generated by a specific builder (group). For some of the builders, such as the Google Cloud Build, users don't need to explicitly specify their roots of trust in the policy since the evaluation service can automatically fetch them based on the builder (group). |
attestationSource |
Specifies where to fetch the provenances attestations generated by the builder (group). |
configBasedBuildRequired |
If true, require the image to be built from a top-level configuration. |
trustedSourceRepoPatterns[] |
List of trusted source code repository URL patterns. These patterns match the full repository URL without its scheme (e.g. |
TrustedBuilder
Supported builders (group).
Enums | |
---|---|
BUILDER_UNSPECIFIED |
Should never happen. |
GOOGLE_CLOUD_BUILD |
The whole Google Cloud Build (GCB) builder group, including all GCB builder types. |
AttestationSource
Specifies the locations for fetching the provenance attestations.
JSON representation |
---|
{ "containerAnalysisAttestationProjects": [ string ] } |
Fields | |
---|---|
containerAnalysisAttestationProjects[] |
The IDs of the Google Cloud projects that store the SLSA attestations as Container Analysis Occurrences, in the format Maximum number of |
SigstoreSignatureCheck
A Sigstore signature check, which verifies the Sigstore signature associated with an image.
JSON representation |
---|
{
"sigstoreAuthorities": [
{
object ( |
Fields | |
---|---|
sigstoreAuthorities[] |
Required. The authorities required by this check to verify the signature. A signature only needs to be verified by one authority to pass the check. |
SigstoreAuthority
A Sigstore authority, used to verify signatures that are created by Sigstore.
An authority is analogous to an attestation authenticator, verifying that a signature is valid or invalid.
JSON representation |
---|
{ "displayName": string, // Union field |
Fields | |
---|---|
displayName |
Optional. A user-provided name for this |
Union field authority . The specific authority type. authority can be only one of the following: |
|
publicKeySet |
Required. A simple set of public keys. A signature is considered valid if any keys in the set validate the signature. |
SigstorePublicKeySet
A bundle of Sigstore public keys, used to verify Sigstore signatures.
A signature is authenticated by a SigstorePublicKeySet
if any of the keys verify it.
JSON representation |
---|
{
"publicKeys": [
{
object ( |
Fields | |
---|---|
publicKeys[] |
Required. |
SigstorePublicKey
A Sigstore public key.
SigstorePublicKey
is the public key material used to authenticate Sigstore signatures.
JSON representation |
---|
{ "publicKeyPem": string } |
Fields | |
---|---|
publicKeyPem |
The public key material in PEM format. |
Methods |
|
---|---|
|
Creates a platform policy , and returns a copy of it. |
|
Deletes a platform policy . |
|
Gets a platform policy . |
|
Lists platform policies owned by a project in the specified platform. |
|
Replaces a platform policy . |