
Welcome to Apigee X API Security Masterclass, the third course in the Apigee X enterprise learning pathway.
This course focuses on securing APIs through practical, enterprise-oriented implementations using Google Cloud Apigee X. You will move beyond general API gateway concepts and work directly with the security controls commonly used to protect production APIs.
Throughout the course, you will secure a single API proxy using progressively stronger security mechanisms, including:
API key verification
OAuth 2.0 client credentials
JSON Web Token validation
Mutual TLS using trusted client certificates
You will also explore common API security risks, understand how authentication and token-based security operate within Apigee X, and examine how AI-powered APIs introduce additional security considerations.
The course combines concise conceptual lectures with hands-on labs. In each practical exercise, you will configure a security control, deploy the updated proxy, test the implementation using curl, and interpret the response. Depending on the scenario, testing will be performed through Windows PowerShell, a local terminal, or Google Cloud Shell.
By the end of the course, you should be able to:
Explain the role of an API gateway in enterprise API security
Protect an API proxy using application credentials
Generate and verify OAuth 2.0 access tokens
Validate signed JWTs in Apigee X
Understand how mutual TLS protects APIs at the network edge
Test and troubleshoot common authentication scenarios
Recognize the role of Apigee X within a layered API security architecture
This course is intended for developers, API engineers, cloud engineers, integration specialists, solution architects and technical professionals who want practical experience securing APIs with Apigee X.
You should already have a basic understanding of REST APIs, HTTP requests, JSON and API gateway concepts. Prior experience with Apigee X is useful, but the introductory section provides sufficient background for learners who are new to the platform.
This is a focused, hands-on course designed to help you build practical security skills that can be applied in enterprise API environments.
How do modern applications handle thousands of requests to dozens or even hundreds of backend services without creating chaos? The answer is a crucial piece of infrastructure: the API Gateway.
In this lecture, we'll demystify this cornerstone of API management. Think of an API Gateway as the intelligent "front door" for all your backend systems. We'll explore its primary role and break down the essential functions it performs to bring order, security, and scalability to your architecture. Understanding the API Gateway is the first major step toward mastering an enterprise platform like Apigee X.
By the end of this lecture, you will be able to:
Define what an API Gateway is and its fundamental purpose in a clear, concise way.
Explain its critical role in modern architectures, especially those using microservices.
Identify the core functions of a gateway, including security enforcement, request routing, and centralized monitoring.
Articulate the key business and technical problems that an API Gateway solves.
Now that we've covered what an API Gateway is, we'll answer the most critical question: Why is it an indispensable component in any modern enterprise architecture?
In this lecture, we move from theory to tangible value. We'll explore the powerful business and technical drivers that make adopting an API Gateway a strategic imperative. We will contrast the challenges of a system without a gateway—such as duplicated effort, inconsistent security, and complex client-side logic—with the streamlined, secure, and scalable world a gateway enables.
You'll discover how a central gateway accelerates developer velocity, hardens your security posture, and unlocks invaluable business insights from your API traffic. This lecture delivers the core justification for investing in a powerful API Management platform.
By the end of this lecture, you will be able to:
Distinguish between the technical function of a gateway and its strategic value proposition.
List the major technical benefits, including client-backend decoupling and centralized policy enforcement.
Explain how an API Gateway directly contributes to business goals like faster time-to-market and improved governance.
Justify the investment in an API Gateway by clearly articulating the problems it solves for developers, architects, and business leaders.
With a solid understanding of what an API Gateway is and why it's essential, it's time to meet the industry-leading platform that puts this theory into practice: Google Cloud's Apigee X.
This lecture is your official introduction to the Apigee X platform, the core technology of this course. We'll go beyond the generic concept of a gateway to show how Apigee provides a comprehensive, full-lifecycle solution for designing, securing, analyzing, and scaling your APIs.
You will learn the fundamental architectural concept of an API Proxy and discover the power of Apigee's policy-based model for managing APIs without writing extensive custom code. We'll finish with a high-level tour of the key features that make Apigee an enterprise-grade choice, setting the stage for the hands-on labs to come.
By the end of this lecture, you will be able to:
Define Apigee X and its role as a full lifecycle API Management platform.
Explain the core concept of an Apigee API Proxy and how it fronts your backend services.
Identify the key feature pillars of the Apigee X platform, including proxy management, analytics, and the developer portal.
Understand the fundamental benefit of using a policy-driven approach to API management.
One of the first and most critical architectural decisions when adopting Apigee is choosing the right deployment model. Should you opt for the simplicity and low operational overhead of the fully-managed Apigee X, or do you require the control and flexibility of Apigee Hybrid? This lecture provides the clarity you need to make an informed choice.
We'll dive into a strategic comparison of Apigee's two primary deployment models. You will learn the fundamental architectural difference: the separation of the management plane from the runtime plane, and who is responsible for managing each. We will break down the pros and cons across key enterprise decision factors like data sovereignty, performance, operational cost, and regulatory compliance.
Finally, we'll look ahead and briefly discuss how your deployment choice can impact advanced strategies, including your approach to integrating with Generative AI.
By the end of this lecture, you will be able to:
Differentiate clearly between the Apigee X (SaaS) and Apigee Hybrid deployment models.
Explain the core architectural concept of the "management plane" vs. the "runtime plane."
Analyze the trade-offs between the two models based on critical enterprise requirements.
Identify the right questions to ask to determine which Apigee model is the best fit for a specific business scenario.
Welcome to a critical foundation of our course! In this lecture, we pull back the curtain on API security. APIs are the gateways to your data and services, making them a prime target for attackers. Understanding how to protect them isn't just a technical skill—it's a business necessity. ?️
This session is designed to give you a clear, comprehensive overview of the modern threat landscape. We'll move beyond theory and look at the real-world vulnerabilities that can expose organizations to significant risk.
What You'll Learn
The "Why": Understand why APIs have become a favorite target for malicious actors and the potential impact of a security breach.
Core Principles: Grasp the fundamental concepts of API security, including authentication, authorization, and data encryption.
Identify Common Threats: Learn to recognize the most critical security risks as defined by the OWASP API Security Top 10, the industry standard for API vulnerabilities.
Proactive Mindset: Begin to think like an attacker to better anticipate and defend against potential threats.
By the end of this lecture, you'll have the foundational knowledge needed to approach API management with a security-first mindset. Let's get started!
Ready to master the gold standard of API security? In this lecture, we move beyond the basics and take a deep dive into the two most important technologies in modern application security: OAuth 2.0 and JSON Web Tokens (JWT).
Understanding how these frameworks operate is no longer optional—it's a core skill for anyone managing or building APIs. We'll demystify the entire process, from the initial user consent to the final, secure API call, so you can implement security policies with confidence. ?
What You'll Learn
Master the Framework: Confidently explain the four key roles in the OAuth 2.0 framework (Resource Owner, Client, Authorization Server, Resource Server).
Differentiate Grant Types: Understand the difference between common OAuth 2.0 grant types and know exactly when to use each one (e.g., Authorization Code vs. Client Credentials).
Decode JWTs: Learn to read and understand the three-part structure of a JSON Web Token: the Header, the Payload (including claims), and the Signature.
Connect the Concepts: Grasp the relationship between the OAuth 2.0 framework, OpenID Connect (OIDC) for identity, and the JWTs that carry the information.
By the end of this deep dive, you won't just know what OAuth 2.0 and JWT are—you'll understand how they work together to secure the modern internet.
Download the Lab05 Part 1 Guide (PDF) to implement API Key validation policies and enforce basic access control.
Lab Objective
Your goal is to take an open, unsecured API proxy and protect it. By the end of this lab, your API will reject all anonymous traffic and will only respond to requests that include a valid API key.
What You'll Do Step-by-Step
Create an API Product: You will bundle your API proxy into a product. This is the core Apigee concept for managing and controlling access to your APIs.
Register a Developer & App: We will simulate the developer onboarding process. You'll create a developer account and register a new "app" that will be used to consume your API product.
Generate and Retrieve an API Key: You will see how Apigee automatically generates a unique consumer key (the API key) for the app you just registered.
Apply the Security Policy: This is the key step. You will navigate to your API proxy's policy editor and add the "Verify API Key" policy to the request flow.
Test Your Secured API: Using a tool like the curl command or Postman, you will test your endpoint. You will first make a call without the key to confirm it's blocked (receiving a 401 Unauthorized error) and then make a successful call with the key to see it work perfectly.
By completing this lab, you'll have successfully implemented a foundational security control and will fundamentally understand how Apigee manages the relationship between API products, developers, apps, and security. Let's get building!
Download and follow the Lab05 Part 2 Guide (PDF) for implementing OAuth 2.0 authorization flows.
our goal is to configure a full OAuth 2.0 flow. You will build a dedicated endpoint to generate access tokens and then secure your primary API proxy so that it only accepts requests that present a valid token.
What You'll Do Step-by-Step
Update the API Product: You will modify your API Product, disabling the simple API key approval and enabling it for the OAuth 2.0 flow.
Build the Token Endpoint: You will add the OAuth-v2 policy to an API proxy and configure its GenerateAccessToken operation. This creates the endpoint (e.g., /oauth/token) that applications will call to exchange their credentials for a bearer token.
Secure the Main API: On your primary "hello-world" proxy, you will replace the API Key policy from Part 1 with a new OAuth-v2 policy. This time, you'll use its VerifyAccessToken operation to validate incoming tokens.
Execute the Two-Step Flow:
Step 1: Using curl or Postman, you will make a POST request to your token endpoint, sending the app's client_id and client_secret to receive a valid access token.
Step 2: You will then use that token in the Authorization: Bearer header to make a successful call to your now-protected API.
Prerequisites
Familiarity with the concepts from Part 1. You will need the API product, developer, and app you created previously.
By the end of this lab, you will have implemented one of the most common and important API security patterns used in the industry today. You'll have practical, hands-on experience with the complete token generation and validation lifecycle in Apigee.
Download and Use the Lab05 Part 3 Guide (PDF) to validate JWT tokens within your API proxy using the VerifyJWT policy.
Your goal is to completely replace the OAuth 2.0 scheme from the previous lab with a modern, secure JWT flow. This involves removing all legacy OAuth 2.0 components for clarity and implementing a robust two-policy approach to handle JWTs according to Apigee's best practices.
What You'll Do Step-by-Step
Clean Up Your Proxy: First, you will remove the OAuth-v2 policies from the previous lab to create a clean slate for our new JWT implementation.
Generate a JWT with Assign Message:
On your token endpoint, you will use the Assign-Message policy.
Inside this policy, you'll leverage Apigee's built-in createJWT() function to dynamically generate a signed JWT.
You will define the token's header, payload (claims), and specify the private key used for signing.
Validate the JWT:
On your main API proxy, you will add the Verify-JWT policy.
You will configure this policy to use the corresponding public key to cryptographically verify the token's signature.
You'll also add checks to validate claims like the expiration time (exp) to prevent replay attacks.
Test the Full Lifecycle:
Step 1: You will call your token endpoint to generate a new, signed JWT.
Step 2: You will take this token and use it in the Authorization: Bearer header to make a successful call to your protected API, proving the validation is working correctly.
By the end of this lab, you'll understand how to build a complete, self-contained token-based security system entirely within Apigee, giving you a powerful and flexible alternative to traditional OAuth.
Download both PDFs below:
• Part 4 Guide — details mTLS setup for secure mutual authentication.
• Complete Lab Guide (Parts 1–4) — consolidates the entire security workflow.
This lab simulates a real-world enterprise workflow by dividing tasks between two distinct roles: the Cloud Network Admin, who configures the infrastructure, and the API Developer, who consumes the secured endpoint. This approach reflects the separation of duties common in large organizations. ☁️
Your goal is to secure an API proxy with mutual TLS (mTLS) by configuring a Google Cloud Load Balancer that sits in front of Apigee X. This ensures that only clients presenting a trusted certificate can establish a connection, with the GCLB handling the TLS termination and validation.
What You'll Do (Simulating Two Roles)
This lab is a collaborative exercise where you'll perform tasks from two different perspectives.
The Cloud Network Admin's Role ??
(Configuring the Infrastructure)
Manage Trust in Certificate Manager: You will upload a Certificate Authority (CA) root certificate to Google Cloud's Certificate Manager. This CA will be the source of truth for which client certificates the load balancer should trust.
Create a Client TLS Policy: You will define a Client TLS Policy for the load balancer. In this policy, you will enable mTLS and instruct it to use the CA from Certificate Manager for validating incoming client certificates.
Enforce the Policy: You will attach this new Client TLS Policy to the load balancer's target HTTPS proxy, effectively activating mTLS for all traffic destined for your Apigee instance.
The API Developer's Role ??
(Testing the Connection)
Obtain Client Credentials: You will be provided with a client certificate and a corresponding private key, just as you would receive from a security team in a real project.
Test for Failure: You will first attempt to connect to the API endpoint using curl without providing the client certificate. You will observe that the connection is rejected at the TLS handshake level by the GCLB—it fails before ever reaching Apigee.
Test for Success: You will then execute the curl command again, this time presenting your client certificate and private key. The GCLB will validate your certificate against its truststore, establish a secure connection, and forward your request to the Apigee proxy, resulting in a successful API call.
APIs are central to modern applications, cloud platforms and enterprise integrations, but exposing an API without effective security controls can create serious business and technical risks.
This practical course shows you how to secure APIs using Google Cloud Apigee X through four widely used security mechanisms:
API key verification
OAuth 2.0 client credentials
JSON Web Token validation
Mutual TLS using client certificates
You will begin by examining common API security risks and the role of an API gateway in protecting backend services. You will then explore OAuth 2.0 and JWT concepts, security considerations for AI-powered APIs, and how generative AI can assist with security anomaly explanation.
The main hands-on lab follows one API proxy through a progressive security journey. You will first protect the proxy with an API key associated with an API Product and Developer App. You will then replace that security model with OAuth 2.0 access-token generation and verification.
Next, you will configure Apigee X to validate signed JWTs before requests reach the backend. Finally, you will examine mutual TLS and configure trusted client-certificate validation at the Google Cloud network edge.
Throughout the practical exercises, you will work with actual Apigee X policies, proxy flows, API Products, Developer Apps, command-line requests and Google Cloud security configuration.
What You Will Learn
By the end of this course, you will be able to:
Explain common API security risks and protection strategies
Understand the difference between API keys, OAuth 2.0, JWT and mTLS
Create API Products and Developer Apps in Apigee X
Enforce API key validation using the Verify API Key policy
Generate and verify OAuth 2.0 access tokens
Protect machine-to-machine API access using client credentials
Extract and validate signed JSON Web Tokens
Configure certificate trust for mutual TLS
Test successful and rejected API requests using curl
Interpret authentication results across Apigee X and Google Cloud
Hands-On and Enterprise Focused
This is not a theory-only security course. The lectures connect security concepts with practical implementation using a real Apigee X proxy.
The course is suitable for:
API developers
Integration engineers
Cloud engineers
Solution architects
Apigee X administrators
API platform and governance teams
Technical professionals working with enterprise APIs
Requirements
You should have:
Basic knowledge of REST APIs, HTTP and JSON
Access to a Google Cloud project and Apigee X environment
Permission to create and deploy API proxies
Basic familiarity with command-line tools such as PowerShell, Cloud Shell or curl
OpenSSL access for the mutual TLS exercise
Prior Apigee X experience is helpful but not mandatory. The opening section introduces the API gateway and Apigee X concepts required to follow the course.
This course is the third stage in the broader Apigee X learning pathway, following Apigee X Foundations and API Design with Apigee X, and preparing you for traffic management, monitoring, CI/CD and enterprise API lifecycle topics.