aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • Engineering

Securing Cloud Run Deployments With Binary Authorization

  • aster.cloud
  • November 23, 2022
  • 4 minute read
Running applications and workloads in containers is becoming a standard practice for most organizations, especially organizations running in the cloud. This is due to the many benefits of designing applications as microservices. These benefits include increased scalability, better resiliency, faster deployments etc. As a result of this new ability to develop and push features faster, application and security teams are facing new challenges enforcing governance and control without hindering development speed.One common use case by customers is the ability to maintain different levels of governance for application artifacts depending on the environment. Developers have more autonomy in pre-production environments for deploying image artifacts but production releases may need to be deployed from a centralized and authorized artifact repository. With Binary Authorization and Artifact Registry, organizations can easily define the right level of control for different environments, and meet the strictness of their maturity in a SLSA journey or industry.Cloud Run and Google Kubernetes Engine are two popular runtimes for containerized workloads on Google Cloud. Both are integrated with Binary Authorization and Artifact Registry to support improved end-to-end security. To focus on the simplicity of the solution, this blog will focus on Cloud Run. Before outlining the process, we need to understand what Artifact Registry and Binary Authorization are and how they fit into the Google Cloud ecosystem.

What is Artifact Registry?

Artifact Registry is the recommended service for storing and distributing images and application artifacts in Google Cloud. It provides a single location for storing and managing your packages and Docker container images. Artifact Registry integrates with Cloud Build and other continuous delivery and continuous integration systems to store packages from your builds. You can also store trusted dependencies that you use for builds and deployments.


Partner with aster.cloud
for your next big idea.
Let us know here.



From our partners:

CITI.IO :: Business. Institutions. Society. Global Political Economy.
CYBERPOGO.COM :: For the Arts, Sciences, and Technology.
DADAHACKS.COM :: Parenting For The Rest Of Us.
ZEDISTA.COM :: Entertainment. Sports. Culture. Escape.
TAKUMAKU.COM :: For The Hearth And Home.
ASTER.CLOUD :: From The Cloud And Beyond.
LIWAIWAI.COM :: Intelligence, Inside and Outside.
GLOBALCLOUDPLATFORMS.COM :: For The World's Computing Needs.
FIREGULAMAN.COM :: For The Fire In The Belly Of The Coder.
ASTERCASTER.COM :: Supra Astra. Beyond The Stars.
BARTDAY.COM :: Prosperity For Everyone.

Read More  Introducing Datastream For BigQuery

What is Binary Authorization?

Binary Authorization is a service on Google Cloud that provides software supply-chain security for container-based applications. It enables you to configure a policy that the service enforces when an attempt is made to deploy a container image on one of the supported container-based platforms. It provides an extra layer of security control to ensure only approved container images are deployed on the container platform services like Cloud Run and GKE.

Setting Up Deployment Controls

Now that we are familiar with these services, we can outline how they can be used in conjunction with Cloud Run for enforcing governance control for application deployments.

A best practice is to determine the scope of governance control for the organizational policy and the binary authorization policy. The organizational policy lets you define if Binary authorization is required on a specific project e.g. the production project, or on all projects in a specific folder or organization. The Binary Authorization policy grants users the flexibility to enforce deployment from a specific authorized repository in Artifact Registry or from all repositories in an authorized project e.g. the production project . A common use case will be to enforce the organizational policy on a specific project and the binary authorization policy to a single repository.

 

Step 1: Create a centralized repository in Artifact registry

Based on the needs of your organization, you can create one or more authorized repositories that will host all images that have been approved for deployment. We recommend enabling vulnerability scanning on these repositories to ensure images are monitored automatically for any known vulnerabilities. Push your container images to the authorized repositories and take note of the repository url pattern.

Read More  API Management On Google Cloud
https://storage.googleapis.com/gweb-cloudblog-publish/images/Image1-ArtifactRegistry.max-900x900.png
Step 2: Require Binary Authorization for Cloud RunTo require every Cloud Run service to use Binary Authorization policies, you need to configure the “Allowed Binary Authorization Policies (Cloud Run)” organizational policy. This can be enforced at the Organization, Folder or Project Level depending on your scope. This ensures that no Cloud Run service deployed is capable of bypassing the binary authorization policy from being enforced.
https://storage.googleapis.com/gweb-cloudblog-publish/images/Image2-OrgPolicy.max-1600x1600.png
Step 3: Create a Binary Authorization PolicyBinary Authorization Policies are created per project. Currently, you can only configure one policy per project. Policies should be customized based on the sensitivity of the environment running in a given project. Development projects may have no policies defined at all. Testing or staging projects may disallow all images by default with an exemption policy to allow deployments from one or more approved repository locations. Container images that match the image patterns of the exemption policy are allowed to be deployed to Cloud Run. Production projects may have a similar policy to staging with an additional requirement that all images be signed and attested by an authority within the organization.While the policy syntax can account for wide diversity of scenarios, as a starting point we can consider the policy rule to only allow images from a specific repository using a fully qualified resource name:
us-central1-docker.pkg.dev/test-project/production-apps/**

in the format 

<region>-docker.pkg.dev/<project-id>/<repository-name>

and ** refers to any image with any tag

Check out the reference pages for creating exemption image patterns for Cloud Run and GKE
https://storage.googleapis.com/gweb-cloudblog-publish/images/Image3-BinAuthPolicy.max-1600x1600.png
Step 4: Proactively monitor Cloud Audit Logs for “Break Glass” eventsAn attempt to deploy a Cloud Run service that violates the Binary Authorization organization policy configured earlier will result in an error. This error details the violation and gives the option to “break glass”. This allows users with the right permissions to override the Binary Authorization policy in place. Every Break Glass event is logged to Cloud Audit Logs, regardless of whether the deployment satisfies or violates the policy. Administrators can proactively configure notification of any Break Glass event to the appropriate channels using Log-based alerts in the Cloud Operations suite.
https://storage.googleapis.com/gweb-cloudblog-publish/images/Image4-Breakglass.max-1200x1200.png

Conclusion

With Artifact Registry and Binary Authorization, Google Cloud users now have a flexible additional layer of security for better governance of container images. They also have better administration of control on what can be deployed across their container runtime environments. As shown above, organizations can deploy a range of basic to advanced policies depending on the maturity of their security posture or the requirements for different environments. The implementation outlined above can be applied for Google Kubernetes Engine and Anthos deployments with some additional Binary Authorization settings available like continuous validation, specific rules and Google system image exemption. You can find more information on Binary Authorization in our docs.

Read More  Canonical Announces The General Availability Of Chiselled Ubuntu Containers

 

By: NJ Njoku (Customer Engineer) and Preston Holmes (Product Manager)
Source: Google Cloud Blog


For enquiries, product placements, sponsorships, and collaborations, connect with us at [email protected]. We'd love to hear from you!

Our humans need coffee too! Your support is highly appreciated, thank you!

aster.cloud

Related Topics
  • Artifact Registry
  • Binary Authorization
  • Cloud Run
  • Google Cloud
  • IAM
  • Tutorials
You May Also Like
View Post
  • Engineering
  • Technology

Guide: Our top four AI Hypercomputer use cases, reference architectures and tutorials

  • March 9, 2025
View Post
  • Computing
  • Engineering

Why a decades old architecture decision is impeding the power of AI computing

  • February 19, 2025
View Post
  • Engineering
  • Software Engineering

This Month in Julia World

  • January 17, 2025
View Post
  • Engineering
  • Software Engineering

Google Summer of Code 2025 is here!

  • January 17, 2025
View Post
  • Data
  • Engineering

Hiding in Plain Site: Attackers Sneaking Malware into Images on Websites

  • January 16, 2025
View Post
  • Computing
  • Design
  • Engineering
  • Technology

Here’s why it’s important to build long-term cryptographic resilience

  • December 24, 2024
IBM and Ferrari Premium Partner
View Post
  • Data
  • Engineering

IBM Selected as Official Fan Engagement and Data Analytics Partner for Scuderia Ferrari HP

  • November 7, 2024
View Post
  • Engineering

Transforming the Developer Experience for Every Engineering Role

  • July 14, 2024

Stay Connected!
LATEST
  • college-of-cardinals-2025 1
    The Definitive Who’s Who of the 2025 Papal Conclave
    • May 7, 2025
  • conclave-poster-black-smoke 2
    The World Is Revalidating Itself
    • May 6, 2025
  • 3
    Conclave: How A New Pope Is Chosen
    • April 25, 2025
  • Getting things done makes her feel amazing 4
    Nurturing Minds in the Digital Revolution
    • April 25, 2025
  • 5
    AI is automating our jobs – but values need to change if we are to be liberated by it
    • April 17, 2025
  • 6
    Canonical Releases Ubuntu 25.04 Plucky Puffin
    • April 17, 2025
  • 7
    United States Army Enterprise Cloud Management Agency Expands its Oracle Defense Cloud Services
    • April 15, 2025
  • 8
    Tokyo Electron and IBM Renew Collaboration for Advanced Semiconductor Technology
    • April 2, 2025
  • 9
    IBM Accelerates Momentum in the as a Service Space with Growing Portfolio of Tools Simplifying Infrastructure Management
    • March 27, 2025
  • 10
    Tariffs, Trump, and Other Things That Start With T – They’re Not The Problem, It’s How We Use Them
    • March 25, 2025
about
Hello World!

We are aster.cloud. We’re created by programmers for programmers.

Our site aims to provide guides, programming tips, reviews, and interesting materials for tech people and those who want to learn in general.

We would like to hear from you.

If you have any feedback, enquiries, or sponsorship request, kindly reach out to us at:

[email protected]
Most Popular
  • 1
    IBM contributes key open-source projects to Linux Foundation to advance AI community participation
    • March 22, 2025
  • 2
    Co-op mode: New partners driving the future of gaming with AI
    • March 22, 2025
  • 3
    Mitsubishi Motors Canada Launches AI-Powered “Intelligent Companion” to Transform the 2025 Outlander Buying Experience
    • March 10, 2025
  • PiPiPi 4
    The Unexpected Pi-Fect Deals This March 14
    • March 13, 2025
  • Nintendo Switch Deals on Amazon 5
    10 Physical Nintendo Switch Game Deals on MAR10 Day!
    • March 9, 2025
  • /
  • Technology
  • Tools
  • About
  • Contact Us

Input your search keywords and press Enter.