Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

api-gateway-backend-security-and-rate-limiting

Skill by google

Secures and rate limits backend services behind Google Cloud API Gateway. It sets up API key or JWT authentication, locks down Cloud Run backends with a gateway service account, and configures per-project quotas. It is for teams configuring API Gateway security across OpenAPI 2.0 and 3.x specs.

  • Score 89
  • 25k stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install api-gateway-backend-security-and-rate-limiting

Built from the published package, never by AI.

git clone --depth 1 https://github.com/google/skills /tmp/skills && mkdir -p ~/.claude/skills && cp -r /tmp/skills/skills/cloud/api-gateway-backend-security-and-rate-limiting ~/.claude/skills/api-gateway-backend-security-and-rate-li

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install api-gateway-backend-security-and-rate-limiting in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill secures and rate limits backend services behind Google Cloud API Gateway. It covers client authentication with API keys or JWTs, gateway-to-backend authentication, and per-project request quotas. It works with OpenAPI 2.0 and OpenAPI 3.x configurations, including gateways with Model Context Protocol (MCP) enabled.

The skill walks through a workflow: create a gateway service account, grant it invoker access on a Cloud Run or Cloud Run functions backend, and remove public invoker bindings. It also explains reading verified user claims from the X-Apigateway-Api-Userinfo header and includes a script that checks quota metrics before an API config is created. It is aimed at people configuring API Gateway authentication and quotas.

Written from the project's SKILL.md and checked against it.

What it can do

  • API key authenticationIdentifies the calling consumer project for quotas and billing using the x-api-key header.
  • JWT authenticationAuthenticates end users or calling services using JWT schemes in OpenAPI 2.0 or 3.x.
  • Backend lockdownUses a dedicated gateway service account and roles/run.invoker to block direct calls to the backend.
  • Per-project rate limitsSets request quotas per consumer project with x-google-quota and quota metric definitions.
  • Verified user claimsShows how backend code reads decoded claims from the X-Apigateway-Api-Userinfo header.
  • MCP traffic securitySecures tools/list and tools/call on the /mcp path for MCP-enabled gateways (Public Preview).
  • Quota metric validationRuns scripts/check_quota_metrics.py to check quota changes before api-configs create.

What you need

  • Google Cloud CLI (gcloud)
  • Python 3.10 or later with PyYAML
  • A Google Cloud project with an active billing account
  • IAM roles such as roles/apigateway.admin and roles/iam.serviceAccountAdmin

Try asking

  • Lock down my Cloud Run backend so only the API Gateway service account can call it
  • Add API key and per-project quota limits to my gateway OpenAPI spec
  • Set up JWT auth on my API Gateway and read user claims in my backend

Good to know

  • Not for Apigee, GKE Gateway API, Cloud Load Balancing custom domain setup, or LLM model routing.
  • MCP traffic security is listed as Public Preview.
  • Removing allUsers from a live backend before every gateway uses the service account causes 403 errors.
  • Creating an API config with changed quota metrics can cause HTTP 500 errors on older gateways.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/cloud/api-gateway-backend-security-and-rate-limiting/SKILL.md, skills/cloud/api-gateway-backend-security-and-rate-limiting/scripts/check_quota_metrics.py. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md15 KB
  • references/attribution.md2 KB
  • references/backend-security.md10 KB
  • references/client-authentication.md11 KB
  • references/mcp-traffic-security.md9 KB
Show all 7 files
  • references/quotas-and-rate-limiting.md9 KB
  • scripts/check_quota_metrics.py16 KB

Alternatives to api-gateway-backend-security-and-rate-limiting

All alternatives →

Compare with function_health, windows-privilege-escalation or github-actions-advanced

api-gateway-backend-security-and-rate-limiting: common questions

Does it support OpenAPI 3.x specs?

Yes. The source says it covers OpenAPI 2.0 and OpenAPI 3.x, including 3.0.x and 3.1.x, with MCP-enabled gateways included.

Can an API key authenticate end users?

No. The source says never to rely on an API key alone for end-user identity, because API keys identify a Google Cloud project and clients can extract them.

What if my gateway returns an unexplained 429 or 5xx error?

The source says to use the api-gateway-troubleshooting skill to find the cause from gateway logs, since this skill does not cover that.

How do I install api-gateway-backend-security-and-rate-limiting?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is api-gateway-backend-security-and-rate-limiting free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is api-gateway-backend-security-and-rate-limiting safe to use?

It scores 89 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to api-gateway-backend-security-and-rate-limiting?

Similar skills: function_health, windows-privilege-escalation, github-actions-advanced, propose-security-hardening.

api-gateway-backend-security-and-rate-limiting Install

Add to stack

Loading.