Authentication overview

Authentication lets you control who can call your Cloud Run workloads. By default, each request must include a Google-signed ID token or access token that identifies the caller. Cloud Run then uses Identity and Access Management (IAM) to check that the caller can invoke the resource before the request reaches your container. This document explains how authentication applies to each Cloud Run resource type and links to guides for common use cases.

Authentication by resource type

How you control access depends on whether the resource serves requests at an endpoint:

  • Each service serves requests at an HTTPS endpoint. To let a principal call a service, grant it the Cloud Run Invoker role (roles/run.invoker) on the service. Principals with broader roles, such as Cloud Run Admin or the basic Owner and Editor roles, can call it, too. If your organization policy allows it, you can disable the Cloud Run Invoker IAM check so that anyone can call the service without credentials.
  • Jobs don't serve requests, so there's no endpoint to authenticate. To let a principal execute a job, grant it the Cloud Run Invoker role on the job. For more information, see Execute jobs.

For a summary of access controls for each resource type, including ingress settings and load balancer options, see Who can invoke or execute your resources.

Common use cases

The following table lists common authentication use cases and the resource types that support them:

Use case Services Jobs
Control who can call or execute the resource Yes Yes
Allow public access Yes No
Authenticate developers Yes No
Authenticate service-to-service requests Yes No
Set custom audiences Yes No
Authenticate end users Yes No
Restrict network ingress Yes No

To execute a job on a schedule, see Execute jobs on a schedule.