liveBook · Manning

What you will learn in Secure APIs

Design, build, and implement

by José Haro Peralta
Foreword by Dan Barahona

Chapter by chapter

Chapter 1: What is API security?

1.1 What is API security? · 1.2 What is API security by design? · 1.2.1 Design · 1.2.2 Implementation · 1.2.3 Infrastructure · 1.3 Why is API security important? · 1.4 Unexpected vectors of attack · 1.5 How API security fits into the API development cycle · 1.6 The rapidly changing landscape of API security · 1.7 Who this book is for and what you will learn · 1.8 Summary

What you learn in chapter 1 →

Chapter 2: Aligning API security with your organization

2.1 Evaluating your API security posture · 2.2 Threat modeling is a team sport · 2.2.1 Application decomposition · 2.2.2 Threat identification and ranking · 2.2.3 Response and mitigations · 2.2.4 Review and validation · 2.3 Act now! · 2.3.1 Document your APIs · 2.3.2 Strengthen authentication and authorization · 2.3.3 Use proper API libraries · 2.3.4 Use cloud protection tools · 2.4 Creating an API security program · 2.5 Aligning API security with your organization · 2.6 Navigating API security audits · 2.7 Summary

What you learn in chapter 2 →

Chapter 3: API security principles

3.1 Shift-left API security · 3.2 Zero-trust APIs · 3.3 Validate everything · 3.4 No such thing as an internal API · 3.5 You can’t protect what you don’t know · 3.6 DevSecOps for APIs · 3.7 Summary

What you learn in chapter 3 →

Chapter 4: Top API authentication and authorization vulnerabilities

4.1 Running the code examples · 4.2 Broken object-level authorization · 4.3 A practical example of BOLA · 4.4 Broken authentication · 4.5 A practical example of broken authentication · 4.6 Broken object property level authorization · 4.6.1 Mass assignment · 4.6.2 Excessive data exposure · 4.6.3 Practical example of excessive data exposure · 4.7 Broken function-level authorization · 4.8 A practical example of preventing BFLA · 4.9 Unrestricted access to sensitive business flows · 4.10 A practical example of mitigating abuse of vulnerable business flows · 4.11 Summary

What you learn in chapter 4 →

Chapter 5: Top API configuration and management vulnerabilities

5.1 Unrestricted resource consumption · 5.1.1 Fending off a DoS attack · 5.1.2 Addressing unrestricted resource consumption with code · 5.2 Server-side request forgery · 5.3 A practical example of mitigating SSRF · 5.4 Security misconfiguration · 5.5 A practical example of mitigating security misconfiguration · 5.6 Improper inventory management · 5.7 Unsafe consumption of APIs · 5.8 Addressing unsafe consumption of APIs in practice · 5.9 Summary

What you learn in chapter 5 →

Chapter 6: API security by design

6.1 What is vulnerable API design? · 6.2 Predictable identifiers · 6.3 Unconstrained user input · 6.4 Flexible schemas · 6.4.1 Optional properties · 6.4.2 Additional properties · 6.5 Exposing server-side properties in user input · 6.6 Designing safe user flows · 6.7 Summary

What you learn in chapter 6 →

Chapter 7: API authorization and authentication

7.1 Authentication vs. authorization · 7.2 Understanding JSON Web Tokens · 7.2.1 JWTs defined · 7.2.2 Structure and representation of JWTs · 7.3 Understanding Open Authorization · 7.4 Understanding OAuth flows · 7.4.1 Authorization code flow · 7.4.2 Protecting authorization requests with proof of key exchange · 7.4.3 Client credentials flow · 7.4.4 Device authorization flow · 7.4.5 Refresh token flow · 7.5 Sender-constrained tokens · 7.5.1 Using mTLS for certificate-bound tokens · 7.5.2 Demonstrating proof of possession · 7.6 Understanding OpenID Connect · 7.7 Understanding role-based access controls · 7.8 Summary

What you learn in chapter 7 →

Chapter 8: Implementing API authentication and authorization

8.1 Documenting authenticated endpoints with OpenAPI · 8.2 Issuing JWTs · 8.3 Validating JWTs · 8.4 Integrating with an OpenID Connect provider · 8.4.1 Logging in users and issuing access tokens with an OIDC provider · 8.4.2 Validating access tokens issued by an OIDC provider · 8.5 Adding authorization middleware · 8.6 Implementing role-based access controls · 8.7 Summary

What you learn in chapter 8 →

Chapter 9: Secure API infrastructure

9.1 API gateways · 9.2 Secure network topologies · 9.3 Protecting against layers 3–6 attacks · 9.4 Fending off malicious traffic with WAFs · 9.5 Summary

What you learn in chapter 9 →

Chapter 10: Financial-grade APIs

10.1 What is open banking? · 10.2 What is FAPI? · 10.3 Understanding FAPI’s attacker model · 10.4 Securing APIs with FAPI 2.0’s security profile · 10.5 Securing authorization requests · 10.6 Message signing · 10.7 Summary

What you learn in chapter 10 →

Chapter 11: Observability for API security

11.1 What is API observability? · 11.2 Logs, traces, and metrics · 11.3 Instrumenting APIs · 11.4 Logging custom events · 11.5 Detecting input-based attacks · 11.6 Detecting endpoint abuse attacks · 11.7 Summary

What you learn in chapter 11 →

Chapter 12: Testing API security

12.1 Designing an API security testing strategy · 12.2 Discovering design security flaws in our APIs · 12.3 Using fuzzing and contract testing · 12.4 Automating access control tests · 12.5 Testing business flow vulnerabilities · 12.6 Summary

What you learn in chapter 12 →

Concepts explained in this book

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.