Intrigued by the art of cloud architecture? Discover how to design, develop, and manage robust, secure, scalable, and dynamic solutions on Google Cloud as you prepare for the Professional Cloud Architect exam!
Shift-left security is the practice of moving security checks and quality testing to the earliest stages of the software development lifecycle. By catching issues early, development teams can fix vulnerabilities before they reach production, which saves money and increases application reliability. To secure the developer environment, Cloud Workstations provides fully-managed development environments. These workstations protect code by using VPC Service Controls to stop data leaks, forcing image updates to patch software, and using Identity and Access Management (IAM) to control access. Additionally, Cloud Code runs inside the developer's code editor to flag vulnerable dependencies in real time.
Securing the software supply chain requires keeping track of all code and external packages. Artifact Registry acts as a central package manager that stores and manages these build artifacts. Once artifacts are stored, Artifact Analysis automatically scans container images for security flaws. It generates a Software Bill of Materials (SBOM) to list all components inside an image and uses Vulnerability Exploitability eXchange (VEX) to explain how those flaws affect the applications.
To keep the build pipeline secure from attackers, Cloud Build runs its processes in isolated, temporary environments. This service supports the Supply chain Levels for Software Artifacts (SLSA) framework to generate secure build provenance, which is verifiable metadata proving that code has not been tampered with. For a highly secure pipeline, teams aim to achieve SLSA Level 3 compliance. Finally, Binary Authorization acts as a guard at deploy time, working with Cloud Deploy to ensure only verified containers are allowed to run on Google Kubernetes Engine (GKE) or Cloud Run.
Choosing how to release software is key to keeping systems reliable for users during updates. Teams often choose canary deployments to test new code on a tiny fraction of users, or they use blue-green deployments to switch all traffic between two identical environments. Choosing the best strategy depends on how risky the code change is and how much the team needs to avoid user downtime.
To check if a release is healthy, teams monitor signals from both the inside and the outside of the system. Introspective monitoring watches internal metrics like system CPU usage, whereas synthetic monitoring acts like an automated customer to test how the system behaves. Automated pipelines can compare the performance of the new version against a healthy control group to decide if the release should proceed or stop.
Automating this process with tools like Cloud Build and Cloud Deploy helps eliminate human error during releases. These tools work closely with security services to protect the software supply chain before code is sent to production. First, Cloud Build creates the application artifacts, then Artifact Analysis scans them for vulnerabilities, and finally Binary Authorization enforces signature rules so that only signed, trusted code can run. If a failure still happens after deployment, responders trigger a rollback to return to the last known working version, and later write a postmortem to prevent the issue from happening again.
Designing an automated CI/CD pipeline helps development teams release updates quickly and safely while following industry best practices like the DORA framework. Continuous integration automatically builds and tests code with every change, while continuous delivery ensures the software is always ready to deploy. By automating these steps, organizations can avoid manual setup mistakes and speed up their delivery times.
In this pipeline, Cloud Build manages the continuous integration steps. It uses repository triggers to detect code changes, which automatically start tasks like running unit tests and packaging code into container images. These finished images are stored in Artifact Registry, which organizes versions and controls who can access them. While in the registry, Artifact Analysis automatically runs vulnerability scans to stop insecure code from progressing any further.
For the continuous delivery phase, Cloud Deploy automates the progression of applications through environments like staging and production. To maintain strict governance, Binary Authorization uses attestations to verify that each container image has successfully completed all required security scans. If an image lacks these digital signatures, the deployment is blocked. To make this entire process repeatable, teams use Infrastructure as Code (IaC) tools like Terraform to set up resources, while following SLSA standards to keep the source and build stages secure.
Prepare and test your skills
Prepare and test your skills
Canary deployments test new code on a tiny fraction of users, whereas blue-green deployments switch all traffic between two identical environments. The choice between these two strategies depends on how risky the code change is and the degree to which user downtime must be avoided.
Introspective monitoring observes internal metrics like system CPU usage, whereas synthetic monitoring simulates an automated customer to test system behavior. Automated pipelines use these signals to evaluate the performance of a new release against a healthy control group before deciding whether to proceed.
Binary Authorization acts as a deploy-time guard that enforces signature rules and verifies attestations to ensure only verified container images are permitted to run. If an image lacks the required digital signatures confirming it passed vulnerability scans, Binary Authorization blocks Cloud Deploy from releasing it to Google Kubernetes Engine (GKE) or Cloud Run.
Cloud Workstations provides fully-managed development environments that protect code by using VPC Service Controls to stop data leaks and Identity and Access Management (IAM) to control access. It also enforces regular image updates to ensure underlying software is patched against vulnerabilities.
Enable Security Command Center posture monitoring across the environment, and establish Virtual Private Cloud (VPC) Service Controls perimeters to block GKE from pulling unauthorized images.
Enable Artifact Registry automatic scanning for uploaded images, and configure Google Cloud Armor security policies at the ingress load balancer to block requests directed to vulnerable containers.
Incorporate the On-Demand Scanning API within Cloud Build to scan images post-build and block registry upload on policy failure, and configure Binary Authorization on GKE to enforce deployment attestations.
Use GKE Workload Identity to sign container images upon build completion, and implement Kubernetes Network Policies to isolate pods that run unverified images.
An enterprise is modernizing its continuous integration and continuous delivery (CI/CD) pipeline on Google Cloud. The security team requires a shift-left approach to software delivery with the following constraints:
Which solution should you implement to meet these requirements?