Overview
This lesson ties the module together by tracing the full lifecycle of a web request — from the browser, through the backend and database, and back — showing where each earlier concept fits and where security is enforced. It is the end-to-end map of a web interaction.
Learning objectives
- Trace a web request from browser to database and back.
- Identify the security checkpoints along the path.
- Use the lifecycle to reason about where vulnerabilities occur.
Core concept
A typical request flows through predictable stages:
- Browser sends an HTTP(S) request (URL, method, headers, body).
- Transport security (TLS) protects it in transit.
- Server/backend receives it and performs authentication (who are you?) and authorization (are you allowed?).
- Backend validates input, then constructs a safe database query if needed.
- Database returns data; the backend builds a response, applying output encoding and security headers.
- Browser renders the response.
Security must be enforced at the server stages (3–5), not assumed from the client.
How it works
Each stage is a place where a control belongs and where a flaw can occur: weak transport (no HTTPS), missing authentication/authorization, unvalidated input (injection, traversal), unsafe query building (SQL injection), improper output handling (XSS), or missing security headers. Mapping a request to these stages lets you reason systematically about where a given vulnerability lives and which control prevents it — a mental model used throughout assessment and secure development.
Practical example
A user updates their profile: the browser sends a POST /api/profile over HTTPS; the backend authenticates the session, authorizes that the user may edit their own profile, validates the submitted fields, safely writes them via a parameterized query, and returns a response with proper encoding and security headers. Remove any one control — say the authorization check — and a specific vulnerability (here, editing others' profiles) appears at exactly that stage.
Cybersecurity relevance
The request lifecycle is the backbone for both finding and preventing vulnerabilities: nearly every web flaw in this path maps to a missing or broken control at a specific stage. Testers walk the lifecycle to probe each checkpoint (authenticated? authorized? input validated? output encoded?); developers use it to ensure each control is present. Holding this end-to-end picture makes the individual vulnerability lessons that follow cohere into a single model.
Common mistakes
- Assuming a control at one stage covers another — authentication is not authorization; input validation is not output encoding.
- Skipping server-side checks because the frontend appears to constrain the request.
- Not mapping a vulnerability to its stage, leading to fixes in the wrong place.
Key takeaways
- A web request flows: browser → TLS → backend (authentication → authorization → input validation → safe DB query) → database → response (encoding, headers) → browser.
- Security is enforced at the server stages; each stage has a matching control and a matching class of vulnerability.
- The lifecycle is the model for locating where a vulnerability lives and which control prevents it — the framework for the rest of the path.
Check your understanding
- List, in order, the server-side security checkpoints a request passes through after transport.
- How does mapping a vulnerability to a lifecycle stage help you decide where to apply the fix?

