Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Developer practice bank has an additional 608 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your team is building a secure CI/CD pipeline using Cloud Build and Binary Authorization to protect GKE deployments. You must ensure that only images verified during the build pipeline can be deployed.
Your configuration must meet these requirements:
Which setup should you configure?
roles/cloudkms.cryptoKeyDecrypter to decrypt the key during builds, add the public key to an attestor without an Artifact Analysis note, and sign the image's SHA-256 digest.Using a symmetric Cloud KMS key alongside roles/cloudkms.cryptoKeyDecrypter is a legacy pattern for decrypting sensitive credentials—such as third-party registry passwords—inside a Cloud Build step. It is not intended for managing Binary Authorization signing keys.
roles/cloudkms.cryptoKeyDecrypter only enables symmetric decryption; it does not grant permission to attach occurrences to Artifact Analysis or read attestors.You were migrating an older Cloud Build pipeline that needed to decrypt a legacy third-party password file at build time rather than signing container images for Binary Authorization.
asymmetric-signing key in Cloud KMS, add its public key to an attestor linked to an Artifact Analysis note, grant the Cloud Build service account roles/cloudkms.publicKeyViewer and roles/binaryauthorization.attestorsVerifier, and sign the container image's :latest tag.In Cloud KMS and Binary Authorization, roles/cloudkms.publicKeyViewer allows an identity to read public key material (typically when registering a key on an attestor), while roles/binaryauthorization.attestorsVerifier allows a deployer service account to verify attestations during policy evaluation.
roles/cloudkms.publicKeyViewer nor roles/binaryauthorization.attestorsVerifier allows Cloud Build to sign payloads with the private key or write attestation occurrences. Signing requires roles/cloudkms.signerVerifier (or roles/cloudkms.signer) and roles/containeranalysis.notes.attacher.:latest. Signing a tag rather than a digest prevents deploy-time enforcement from matching the attestation.roles/cloudkms.publicKeyViewer cannot invoke the asymmetricSign API on Cloud KMS.roles/binaryauthorization.attestorsVerifier is assigned to the GKE or deployer project's Binary Authorization service agent, not the Cloud Build signer.:latest can be overwritten with different image contents, breaking cryptographic integrity guarantees.You were configuring an administrator to import a Cloud KMS public key onto an attestor (publicKeyViewer) and granting a GKE deployer project's Binary Authorization service agent permission to verify that attestor at deploy time (attestorsVerifier).
asymmetric-signing key in Cloud KMS, add its public key to a Binary Authorization attestor linked to an Artifact Analysis note, grant the Cloud Build service account roles/cloudkms.signerVerifier, roles/binaryauthorization.attestorsViewer, and roles/containeranalysis.notes.attacher, and sign the image's SHA-256 digest.In a secure container supply chain on Google Cloud, Binary Authorization uses asymmetric PKIX cryptography to verify that container images passed required build-time gates before deployment. Cloud Key Management Service (Cloud KMS) manages the asymmetric key pair (asymmetric-signing, such as ec-sign-p256-sha256), keeping the private key securely inside Cloud KMS while the public key is attached to a Binary Authorization attestor.
asymmetric-signing key in Cloud KMS allows Cloud Build to invoke the Cloud KMS signing API remotely. The private key never leaves Google-managed cryptographic hardware or software boundaries.roles/cloudkms.signerVerifier lets Cloud Build sign payloads using the KMS key, roles/binaryauthorization.attestorsViewer allows it to inspect the attestor and retrieve the public key ID, and roles/containeranalysis.notes.attacher permits attaching the attestation occurrence to the note.:latest.Unlike local key generation or symmetric encryption workarounds, this pattern eliminates private key distribution risks, satisfies Artifact Analysis storage requirements, and enforces strict least-privilege IAM permissions across build and deployment workflows.
asymmetric-signing key in Cloud KMS, attach the public key directly to the Binary Authorization policy without creating an attestor, configure Artifact Analysis to use a regional endpoint for storing occurrences, and grant Cloud Build roles/cloudkms.signerVerifier to sign the image tag.A Binary Authorization policy defines admission rules (such as REQUIRE_ATTESTATION) for a project or cluster, while Artifact Analysis provides both global and regional API endpoints for storing container metadata.
containeranalysis.googleapis.com), or the enforcer will fail to find them.You were configuring a Continuous Validation (CV) platform policy with a simpleSigningAttestationCheck (which embeds pkixPublicKeySet directly in the platform policy YAML), although even then you would still need to use the global Artifact Analysis endpoint and sign the immutable image digest.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated