Skip to content
Visual explainer 2h to learn 4 steps

Where API Gateway, Apigee and Firebase fit on Google Cloud

Choose between API Gateway and Apigee for an API, explain where Firebase fits, and separate Google Workspace administration from cloud work.

By Invicly Tech, , in Google Cloud Engineering and Services. About 8 minutes to read.

Topic 18 of 32

In short

API Gateway puts a managed front door on serverless backends. Apigee is a full API management product for larger programmes. Firebase is Google's toolkit for app developers, and its projects are Google Cloud projects. Google Workspace is separate: it is email and office software, not cloud infrastructure.

Think of it like this: API Gateway is a reception desk, Apigee is a whole customer service department, Firebase is a starter kit for building the shop front, and Workspace is the office suite your staff use.

Explained simply

An API gateway is a front door for your backend. Callers talk to the gateway, which checks who they are, applies rules and passes the request on. That keeps security and limits out of each service.

Google Cloud has two main options. API Gateway is a managed gateway for serverless backends such as Cloud Run. It is described with an OpenAPI file. Apigee is a full API management product with analytics, quotas per customer and a portal where outside developers sign up.

Securing an API usually means one of two things. An API key identifies the calling project, which helps with quotas but is not strong proof. A JWT, a signed token from a trusted issuer, proves who the caller is.

Firebase and Google Workspace are often mixed up with all this. Firebase is a toolkit for building apps, with sign-in, a database and hosting. Workspace is Gmail, Drive and Meet. They are different products from Google Cloud infrastructure, managed in different places.

Press Play on a diagram to walk through it one step at a time.

CompareAPI Gateway or Apigee
API Gateway
  • For Cloud Run, Functions, App Engine backends
  • Described by an OpenAPI spec
  • API keys, JWT, service accounts
  • Lightweight and simple
Apigee
  • API products, quotas and analytics
  • Developer portal for outside teams
  • Many policies and traffic rules
  • Paid, built for larger needs
LayersFour areas that are easy to confuse
  1. 1
    Google Workspace

    Gmail, Drive, Meet; managed in the Admin console

  2. 2
    Firebase

    App Auth, Firestore, Hosting, messaging

  3. 3
    API management

    API Gateway or Apigee in front of backends

  4. 4
    Google Cloud

    Projects, IAM, networking, compute, data

MapWho administers what
Google accounts in an organisation
  • Workspace Admin console
    • Users and groups
    • Gmail and Drive settings
  • Google Cloud console and IAM
    • Projects
    • Roles on resources
    • Billing
  • Firebase console
    • App sign-in
    • Hosting
    • Messaging

In depth

Comparing API Gateway and Apigee

API Gateway fits when you have a few APIs on serverless backends and need keys or tokens, a stable public URL and simple configuration. You write an OpenAPI spec, create a config and deploy a gateway.

Apigee fits when the API is a product: many consumers, different plans, rate limits per app, analytics, a developer portal and detailed policies such as transformation or threat protection. It is a paid platform with an evaluation option, so check current terms.

Sometimes neither is needed. Cloud Run can require authentication itself, which is enough for a private service called by your own services.

  • API Gateway: light, OpenAPI, serverless backends
  • Apigee: full lifecycle and analytics
  • Cloud Run auth may be enough internally
  • Check current limits and pricing before choosing

Securing an API: keys, JWTs and service accounts

An API key is a string. It is useful to identify and limit a calling project, and it is easy to leak, so never treat it as a password.

A JWT carries claims and a signature. The gateway checks the issuer, audience and expiry against a trusted source, for example Firebase Authentication or another identity provider. For calls between services, a Google-signed identity token from a service account works well.

Pick the weakest method that meets the need and keep tokens short-lived.

SequenceA JWT-protected API call
Client app
Identity provider
API gateway
Cloud Run backend
  1. 1Sign in
    Client app to Identity provider: Sign in
  2. 2Signed JWT
    Identity provider to Client app: Signed JWT
  3. 3Request with bearer token
    Client app to API gateway: Request with bearer token
  4. 4Check issuer, audience, expiry
    API gateway to API gateway: Check issuer, audience, expiry
  5. 5Forward the request
    API gateway to Cloud Run backend: Forward the request

Firebase and Workspace in the picture

Firebase offers services for app teams: Authentication, Firestore, Cloud Messaging, Hosting, Crashlytics and App Check. Each Firebase project is a Google Cloud project, so you can open it in the Cloud console, use IAM and see billing.

Google Workspace is a separate software service for email, files and meetings. Users and groups are managed in the Admin console. Google Cloud can sign people in with Workspace or Cloud Identity accounts, which links identity, but a Workspace admin role does not grant access to cloud resources, and cloud roles do not manage mailboxes.

Learn it in 4 short steps

About 30m each. Track them with a timer in your plan.

  1. 1
    Compare API Gateway and Apigee~30m
  2. 2
    Secure an API with keys or JWTs~30m
  3. 3
    Place Firebase in app development~30m
  4. 4
    Separate Workspace admin from Google Cloud~30m

Key points

  • Choose API Gateway for a handful of APIs with simple auth. Choose Apigee when you need quotas per customer, analytics, a developer portal or complex policies.
  • An API key identifies a caller project but is not strong security. A JWT from a trusted issuer proves who the caller is.
  • Firebase fits mobile and web apps that want sign-in, a document database and hosting without running servers.
  • A Firebase project is also a Google Cloud project, so IAM, billing and quotas still apply.
  • Workspace users, groups and mail are managed in the Admin console. Cloud IAM can use Workspace identities, but the two are administered separately.

Key terms

Tap a card to flip it. 0/6 known

Examples

Describe an API for a gateway

A minimal OpenAPI 2.0 file for a Cloud Run backend. API Gateway uses this style of spec with a Google extension for the backend address. Prerequisites: a deployed Cloud Run service at a placeholder URL. Evidence: a deployed gateway returns the backend response. Cleanup: delete the gateway, config and API, which can bill while they exist.

yaml
swagger: "2.0"
info:
  title: orders-api
  version: 1.0.0
schemes: [https]
produces: [application/json]
paths:
  /orders:
    get:
      operationId: listOrders
      x-google-backend:
        address: https://orders-xyz.a.run.app
      responses:
        "200":
          description: ok

Pick the right tool

A startup builds a mobile app: use Firebase Authentication and Firestore for sign-in and data, and Cloud Run for custom logic. A retailer publishes order APIs to hundreds of partners with usage plans and reports: Apigee. An internal admin API used by two services: Cloud Run authentication, no gateway. A staff member needs a new mailbox: a Workspace admin task, not a cloud task.

Quick reference

  • API Gateway: OpenAPI spec in front of Cloud Run, Functions or App Engine.
  • Apigee: API products, quotas, analytics, developer portal.
  • API key: identifies a project. JWT: proves a caller.
  • Cloud Run can require authentication without any gateway.
  • A Firebase project is a Google Cloud project.
  • Workspace is administered in the Admin console, not Cloud IAM.

Common mistakes

  • Treating an API key as a password. Anyone who has it can use it.
  • Buying Apigee for one internal API that a gateway or Cloud Run authentication would cover.
  • Assuming a Workspace admin can manage Google Cloud resources, or the other way round.

Quick quiz

Pick an answer to see if you're right and why.

Question 1

1You need per-customer quotas, analytics and a developer portal. Choose:

Question 2

2What does an API key reliably give you?

Question 3

3Where do you manage Gmail users?

Question 4

4A Firebase project relates to Google Cloud how?

0/4 answered

Practice exercises

Try each one yourself first. Use the hint if you get stuck, then compare with the solution.

  1. Exercise 1easy

    List three differences between API Gateway and Apigee.

  2. Exercise 2medium

    Decide how to authenticate a mobile app calling your API through a gateway.

  3. Exercise 3hard

    Write a short decision note for exposing a partner API: gateway or Apigee, with reasons and a review date.

Check yourself

Answer in your head, reveal, then be honest with yourself.

Feel confident about this topic?

Frequently asked questions

Do I need a gateway for every API?
No. For a private service called by your own services, Cloud Run authentication is often enough.
Is Firebase a different cloud?
No. It is a set of app services built on Google Cloud, and each project is also a Google Cloud project.
Can a Workspace admin manage my Cloud Run services?
Not by that role alone. Cloud access is granted with IAM roles on projects or resources.

Go deeper

ShareXLinkedInWhatsApp