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.
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.
- For Cloud Run, Functions, App Engine backends
- Described by an OpenAPI spec
- API keys, JWT, service accounts
- Lightweight and simple
- API products, quotas and analytics
- Developer portal for outside teams
- Many policies and traffic rules
- Paid, built for larger needs
- 1Google Workspace
Gmail, Drive, Meet; managed in the Admin console
- 2Firebase
App Auth, Firestore, Hosting, messaging
- 3API management
API Gateway or Apigee in front of backends
- 4Google Cloud
Projects, IAM, networking, compute, data
- 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.
- Client app to Identity provider: Sign in1Sign in
- Identity provider to Client app: Signed JWT2Signed JWT
- Client app to API gateway: Request with bearer token3Request with bearer token
- 4Check issuer, audience, expiryAPI gateway to API gateway: Check issuer, audience, expiry
- API gateway to Cloud Run backend: Forward the request5Forward 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.
- 1Compare API Gateway and Apigee~30m
- 2Secure an API with keys or JWTs~30m
- 3Place Firebase in app development~30m
- 4Separate 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.
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: okPick 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.
Practice exercises
Try each one yourself first. Use the hint if you get stuck, then compare with the solution.
- Exercise 1easy
List three differences between API Gateway and Apigee.
- Exercise 2medium
Decide how to authenticate a mobile app calling your API through a gateway.
- 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.