request context
The information attached to a single request, such as who made it, when and from where, that code or access policies check while handling it.
In more detail
In a web application it usually carries the signed-in user, the tenant and a request ID, so every layer can use them without passing them around by hand. Cloud access policies evaluate a request context too: in AWS each fact, such as the source IP address or whether MFA was used, is a condition key. If a key is absent from the context, most conditions on it evaluate to false, which can silently disable a deny.
Related terms
- condition key — A value AWS attaches to every request, such as whether multi-factor authentication was used, that a policy Condition can test.
- fail open — What a security control does when it breaks or cannot decide: failing open lets the request through, while failing closed blocks it.
- AsyncLocalStorage — A Node.js feature that keeps a value available to all code running for one request, even across await and callbacks, without passing it as an argument.
- middleware — Code that sits between an incoming request and the handler that answers it, doing a shared job such as logging, authentication or rate limiting.
- multi-tenancy — One running system serving several separate customers, called tenants, while keeping each one's data and settings apart.
- correlation ID — A unique value attached to one request and passed along everywhere it goes, so its logs and traces can be found together.
Taught in
- Cloud IAM Architecture & Permission Boundaries — Cloud Security & DevSecOps Engineering
- Envelope Encryption & Data Protection with KMS — Cloud Security & DevSecOps Engineering
- Type-Safe RPC Architectures: tRPC & Procedures — Production Full-Stack Engineering
- Multi-Tenant Identity: Tenant Isolation & Middleware — Production Full-Stack Engineering
- Structured Logging & Correlation IDs: Context Stitching — Production Full-Stack Engineering