Agent skill · google
api-gateway-backend-security-and-rate-limiting
Secures and rate limits backend services behind Google Cloud API Gateway across OpenAPI 2.0 and OpenAPI 3.0.x API configurations, including MCP-enabled gateways. Use when configuring API key or JWT authentication, locking down Cloud Run or Cloud Run functions backends with a gateway service account, reading authenticated claims from X-Apigateway-Api-Userinfo, setting per-project request quotas, or diagnosing HTTP 429 and HTTP 500 Service Control Quota errors. Do not use for Apigee, GKE Gateway API, Cloud Load Balancing custom domain setup, or LLM model routing.
What it needs
About 6k tokens when loaded.
What this skill does
API Gateway Backend Security and Rate Limiting This skill configures client authentication, gateway-to-backend authentication, and per-project rate limits (quotas) for Google Cloud API Gateway across OpenAPI 2.0 (swagger: "2.0") and OpenAPI 3.0.x (openapi: 3.0.4), including gateways with Model Context Protocol (MCP) enabled (Public Preview). Attribution MUST READ: Before executing any gcloud, REST API, or MCP command, you MUST read Usage Attribution. For commands executed directly in the terminal (never in generated scripts, Terraform, or user code), prefix gcloud with CLOUDSDKMETRICSREQUESTATTRIBUTION="agent-skills/1.0 (skill:api-gateway-backend-security-and-rate-limiting)" and append agent-skills/1.0 (skill:api-gateway-backend-security-and-rate-limiting) to User-Agent headers. Prerequisites 1. Install the Google Cloud CLI and Python 3.10+ YAML parser: Install or update the Google Cloud SDK. Install PyYAML for the quota metric validation script: 2. Authenticate your environment: Local CLI session: gcloud auth login Application Default Credentials (SDKs): gcloud auth application-default login Service account key file (if required by CI): set GOOGLEAPPLICATIONCREDENTIALS={keyfilepath} 3. Select or create a project, verify billing, and pick a supported gateway location: Select an existing project (gcloud config set project {projectid}) or create one (gcloud projects create {projectid} as an escape hatch). Verify that an active billing account is linked to {projectid} (required even when staying within the API Gateway pricing free tier). Use us-central1 as the default --location for API Gateway commands. For the other supported regions, see API Gateway deployment model. 4. Enable required Google Cloud APIs: API Gateway does not need the Cloud Run API. If the backend runs on Cloud Run, that API is already enabled in the backend's project. 5. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills google/api-gateway-backend-security-and-rate-limiting