Skip to content

Zero trust: no request is trusted for where it comes from

The older model of network security draws a boundary around the company’s systems. Inside it, machines and users are trusted: they sit behind firewalls and gateways, and a request from an internal address is let through. NIST’s zero trust document describes the weakness of that model. Authenticated subjects are given authorized access to a broad collection of resources once they are on the internal network, so that unauthorized lateral movement within the environment has been one of the biggest challenges for federal agencies. Perimeter firewalls help against attackers on the internet and are less useful for attacks that start inside.

Zero trust is NIST’s name for the answer. The document’s abstract says that zero trust assumes no implicit trust is granted to assets or user accounts based solely on their physical or network location, or on who owns the asset. It adds that authentication and authorization are discrete functions performed before a session to a resource is established. Its working definition is a collection of concepts designed to minimize uncertainty in enforcing least-privilege, per-request access decisions in the face of a network viewed as compromised.

Mental model. In a perimeter, being inside is a credential. In zero trust it is not: every request has to show who is asking and what it is allowed, wherever it comes from. The question moves from “where are you” to “who are you, and may you do this one thing”.

Two cautions come from the same document. Zero trust is not a single architecture but a set of guiding principles, and it cannot be bought as a product or finished by replacing technology in one go: NIST describes a journey of incremental adoption. And the document is about an enterprise’s users, devices and resources. This lesson applies its ideas to requests between services, and the mapping is the course’s, not NIST’s.

NIST lists seven tenets as the ideal goal, noting that not every tenet may be fully implemented in its purest form. In short:

  1. All data sources and computing services are considered resources.
  2. All communication is secured regardless of network location. Network location alone does not imply trust: a request from inside the old perimeter meets the same requirements as one from outside. Communication should protect confidentiality and integrity and provide source authentication.
  3. Access to an individual resource is granted per session, after trust in the requester is evaluated, with the least privileges needed to complete the task. Access to one resource does not grant access to another.
  4. Access is determined by dynamic policy, including the state of the client’s identity, the application and the requesting asset, and possibly behavioural and environmental attributes.
  5. The enterprise monitors and measures the integrity and security posture of all its assets. No asset is inherently trusted.
  6. All resource authentication and authorization are dynamic and strictly enforced before access is allowed, in a cycle of reevaluating trust.
  7. The enterprise collects as much information as possible about the state of assets, network and communications, and uses it to improve its security posture.

This course’s earlier lessons already built several of these. Tenet 2 is TLS on every connection, and mutual TLS where the server must know which service is calling (the encryption lesson). Tenet 3 is the least privilege of the last lesson, and “sometime recently” in NIST’s wording is what a token’s lifetime is. Tenet 6 is the authorization check on every request (the first lesson).

NIST’s abstract model has a subject that needs access to a resource. The access goes through a policy decision point (PDP), which decides, and a policy enforcement point (PEP), which enables, monitors and ends the connection between the subject and the resource. The PDP is made of a policy engine, which makes the decision to grant, deny or revoke access, and a policy administrator, which carries it out. If a previous approval is countermanded, the administrator tells the enforcement point to shut the connection down. That is the part a locally checked token does not have: a way to take an approval back.

NIST also names the implicit trust zone: the area where all entities are trusted to at least the level of the last PEP in the path. Its example is an airport: everyone who passes the security checkpoint is then trusted in the terminal. A PEP cannot apply a policy more specific than its place in the traffic allows, so the implicit trust zone must be as small as possible, and zero trust moves enforcement closer to the resource.

The mapping to a request path is an analogy and not part of NIST’s model. In the course’s flow the service enforces the decision, the authorization server holds the decisions about tokens, and the more often the service asks, the closer the decision is to the request.

Pick Opaque token, introspection in the comparison list. For every request the service asks the authorization server whether the token is active and what it allows. That is the strictest version of “verified at each access” in this flow. A JWT checked locally verifies a signature at each access too, but the decision about what it allows was made when it was issued, which is closer to NIST’s “sometime recently”.

TLS, then who you are, then what you may do

80 ms
80 ms
10 ms
10 ms
Compare

The service checks the password, keeps the session in its own memory and gives the client a cookie that names it. Each later request carries the cookie and the service looks the session up. One connection, two requests.

340 ms
  1. TCP handshake40 ms
    SYN
    Client to Service: SYN. Arrives at 40 ms.
  2. 80 ms
    SYN-ACK
    Service to Client: SYN-ACK. Arrives at 80 ms.
  3. TLS 1.3 handshake120 ms
    ACK + ClientHello
    Client to Service: ACK + ClientHello. Arrives at 120 ms.
  4. 160 ms
    ServerHello … Finished
    Service to Client: ServerHello … Finished. Arrives at 160 ms.
  5. Authentication: proving who you are200 ms
    Finished + POST /login (username, password)
    Client to Service: Finished + POST /login (username, password). Arrives at 200 ms.Processing: 10 ms
  6. 250 ms
    200, Set-Cookie: session=…
    Service to Client: 200, Set-Cookie: session=…. Arrives at 250 ms.
  7. Authorization: the request and the check290 ms
    GET /orders, Cookie: session=…
    Client to Service: GET /orders, Cookie: session=…. Arrives at 290 ms.Processing: 10 ms
  8. 340 ms
    200 + orders
    Service to Client: 200 + orders. Arrives at 340 ms.

Time until the first response arrives: 340 ms4 round trips on the wire · 20 ms of processing

Model notes

Assumptions

  • Each message takes half the round-trip time of the link it crosses. Messages are never lost, never queue and never overlap, and each leaves when the one before it has arrived, once its receiver has finished any processing.
  • TLS 1.3 over TCP with a full handshake is used for every new connection, as in the connection-setup flow: one round trip for TCP, one for TLS, and the client’s first request travels with its Finished message. One processing time stands for everything a server does with a message: checking a password, creating or looking up a session, issuing a token, verifying a signature, checking a permission.
  • The first request only. The authorization server is a different host from the service, so the two token variants open a connection to each. The cookie variant signs in at the service itself.

Simplifications

  • A single request with the credentials stands for the whole sign-in. A browser sign-in with the OAuth authorization code flow adds redirects and the time the person takes to type, and neither is drawn. The token request is the token endpoint of RFC 6749, which must be reached over TLS.
  • The service already holds the key that checks the signature of a JWT, so it verifies the token without any message. Fetching that key the first time, and again when it is rotated, costs a call to the authorization server that is not drawn. A JWT stays valid until it expires; the model does not show how to revoke one earlier.
  • The introspection call goes over a connection that is already open and has no cache: every request pays it. A service can keep the answer for a short time, which removes the call for the requests that follow.
  • The session is stored in the memory of the service, so finding it costs no message. A session store shared by several instances adds a call to the store on every request.
  • Refresh tokens, certificate validation time, protection against cross-site request forgery, the size of the credentials on the wire and the requests that follow the first one are left out. Later requests over the same connection cost one round trip, plus the introspection call for an opaque token.

Parameter values are illustrative. They are not benchmarks of any real product.

At the starting settings the opaque token’s first response arrives after 520 ms and the JWT’s after 500 ms: a 20 ms difference, paid on every request. Move Round trip, service to authorization server to 100 ms and the opaque variant takes 610 ms while the JWT stays at 500 ms, so each request now pays 110 ms more than a local check. That is the price of freshness, and it is lower when the authorization server is near.

RFC 7662 describes how to pay less: the service may cache the answers, with the trade-off already seen. A longer cache is a longer window in which a decision can be stale. Zero trust does not tell you how long that window may be. NIST says access policies should vary with the sensitivity of the resource, which is the same answer: a more sensitive resource asks more often.

What happens if an attacker gets into one service?

Section titled “What happens if an attacker gets into one service?”

An attacker takes over one of the five services of the last lesson, from the inside of the network.

  • Perimeter with a shared credential. The attacker is inside, so internal calls are trusted, and the shared database credential reaches all 20 tables. The service they took over also has network access to the other four.
  • Zero trust applied to the same system. Every call to another service needs a valid identity and an authorization decision, so the attacker has the permissions of that one service and no more. Its credential reaches 4 tables, and every other service sees that the caller is not allowed what it asks for, and the refused requests leave a trail for monitoring.

The attacker has not been stopped. They still have what the one service may do. Zero trust shrinks the reach and makes the intrusion visible, which is NIST’s stated aim of limiting lateral movement. It does not remove the first mistake. The arithmetic is the last lesson’s: 20 ÷ 4 = 5 times fewer tables, and it bounds the cost.

  • A perimeter model trusts what is inside, and an attacker who gets in can move freely. Zero trust grants no trust for network location alone and decides each access on identity, policy and the state of what asks.
  • NIST SP 800-207 gives seven tenets, among them: secure all communication whatever the network, grant access per session with least privilege, and enforce authentication and authorization dynamically before access.
  • A policy decision point decides and a policy enforcement point enforces; the implicit trust zone behind the last enforcement point should be as small as possible.
  • In the flow, asking the authorization server on every request adds 20 ms at the starting settings, and 110 ms when that round trip is 100 ms. A local check is cheaper and fresher only at issue time.
  • Zero trust is principles adopted step by step and not a product. It bounds what a breached service can reach, as in the example of 4 tables instead of 20, and it does not prevent the breach.

Next: the module recap, a checklist for a secure request path, and a quiz.

Your progress

Built by GhaziAlibi.

© ShardCraft. All rights reserved.