skip to content

An address-keyed allow rule in a fleet that recycles IPs hourly: what can an attacker inherit, and what does label-keying cost?

level: juniorimportance: should knowfreq 55%

answer

  1. an address is a location, not an identity
  2. the pool hands it to somebody else
  3. the replacement broke, so somebody widened it
  4. labels decide admission, routes still decide delivery
  5. you now run the thing that hands out labels

basics

~20 s

Nothing binds an IP to a workload. When an instance dies its address returns to the pool, and whatever lands on it next inherits every rule that named it. Label-keying moves that trust onto an issuance path you now run.

solid answer

~50 s

An address is a location, not an identity. A rule saying `allow 10.0.3.17 -> 10.0.9.4:5432` encodes an unchecked claim that those addresses are still the reporting service and the ledger database. Destroy the reporting service and its address goes back to the pool; the next workload allocated it — a batch job, a build runner, something an intruder already controls — inherits the allow without anyone granting it, and the flow looks entirely normal. The second failure is quieter: replacements land on new addresses, things break, and somebody widens the rule to a subnet, so the rule base drifts back toward flat. Label-keyed policy says `tier=web may reach tier=db on 5432`, and re-addressing changes nothing because no rule ever named an address. The price is that you now operate issuance: who may set a label, what stands behind the write, and how you find drift.

go deeper

for a junior

Be ready to say plainly why an IP address is not an identity in a fleet where instances are replaced constantly, and what the next workload to receive a recycled address gets for free.

for a middle

Explain both failure directions: the silent inherited grant, and the loud broken flow that gets fixed by widening a rule. Then describe how attribute-keyed policy survives a re-addressing exercise unchanged.

for a senior

Show that you know what label-keying does not solve. Name the address-based controls that stay (edge anti-spoofing, source filtering, routing) and the new operational load that arrives with issuance.

for a principal

Frame it as an exchange of one unowned decay problem for one owned service, and be able to say who staffs the issuance path and what happens to deployments when it is unavailable.

## Why an address is not an identity In a cloud virtual network, instances are replaced rather than repaired. Addresses are drawn from a pool and returned to it, and a re-addressing exercise — a new CIDR plan, a migration, a subnet split — is a routine Tuesday. Against that background, a segmentation rule that names addresses is making a claim it cannot check. A rule of the form `allow 10.0.3.17 -> 10.0.9.4:5432` asserts two things: that `10.0.3.17` is the reporting service, and that `10.0.9.4` is the ledger database. The fabric verifies neither. It verifies that a packet arrived carrying that source address; it has no idea what is behind the address today. ## The inheritance Destroy the reporting service and `10.0.3.17` goes back to the allocation pool. The next workload to receive that address inherits every rule that named it — database reachability on 5432, granted by nobody, crossing no boundary in a way that looks unusual to any sensor. Flow records will show a permitted conversation between two addresses that are allowed to converse. The adversary in this story does not have to be sophisticated. They need to *be*, or to control, whatever lands on a recycled address: a low-trust batch workload, a build runner, a service someone else already compromised. In an estate with autoscaling and short-lived instances, that allocation lottery runs several times an hour, and the attacker's cost is patience rather than skill. Note the direction of the claim carefully: the packet proves the *address* matched, never that the *workload* is the one the rule intended. ## The second failure, which people actually notice The first failure is silent; the second is loud, and it is what erodes the rule base. A replacement instance comes up on a different address, the flow breaks, someone under time pressure widens the rule from a /32 to the subnet — and then to a larger prefix when that also breaks. Address-keyed rule bases do not stay tight under churn; they drift toward the flat network the segmentation was built to prevent. That is why "nobody dares delete a rule" and "there are four thousand rules" are the same story told twice. ## What label-keying actually changes Attribute-keyed policy expresses the rule over what a workload *is*: `tier=web may reach tier=db on 5432`. Enforcement lives in the platform dataplane, which resolves the attribute to whatever set of workloads carries it right now. Re-addressing then changes nothing in the rule set, because no rule in it mentions a number. That is the whole point of the design: what survives renumbering is a rule that never named an address. Two things do **not** change, and a strong candidate says both: | Still address-based | Now label-based | |---|---| | Delivery: routing, forwarding, anti-spoofing at the edge, source filtering (BCP38-style), uRPF checks | Admission: which workload may talk to which, on what port | Labels decide who is allowed; addresses still decide where the packet goes. Dropping address-based anti-spoofing because "we use labels now" is a real mistake — the two controls answer different questions. ## The price: issuance becomes a control you operate A label is an assertion, and an assertion has a writer. Permission to set `tier=web` is permission to be reachable as a web tier, which makes it a firewall change wearing different clothes. Holding that honestly costs you: - a *restricted set* of security-significant labels, separated from the free-form tags teams use for cost reporting; - a write path that is the deployment pipeline rather than the workload's own runtime credential; - an audit record for every write, naming the principal that made it; - a reconciliation that compares the labels workloads claim against what the deployment record says was launched, because drift is normal rather than exceptional; - an owner, a queue of exceptions, and someone who answers when the issuance path is down at 3am. You have not deleted the problem. You have exchanged a stale-address problem, which nobody owns and which degrades quietly, for an identity-issuance problem, which has an owner and a bill. That exchange is usually worth making in an estate with hourly churn, and saying so — with the cost named — is the answer an interviewer is listening for. ## Answering it in an interview Say both halves. Churn makes address-keyed rules dangerous (a recycled address inherits a grant) *and* loose (widening is the fastest fix when a replacement breaks). Labels remove both effects and hand you an issuance service to run. A candidate who describes only the renumbering convenience has described a maintenance win; a candidate who names the inherited grant and the new control has described a security decision.

  • Why do address-keyed rule bases drift toward wider prefixes over time?
    Because every replacement lands on a new address and breaks a flow, and the fastest fix under pressure is to widen the rule from a host to a subnet. Nobody ever narrows it back, because nobody can prove which of the addresses inside the prefix still need the grant. Over a few years the rule base converges on the flat network the segmentation was meant to replace.
  • Does label-keyed policy remove the need for any address-based control?
    No. Labels decide admission; addresses still decide delivery. Anti-spoofing and source filtering at the edge, uRPF-style checks, and route control all still operate on addresses and are still yours to run. A design that drops them because "policy is identity-based now" has confused who is allowed to talk with where the packet is sent.
  • Is a stale allow rule pointing at a decommissioned host harmless?
    Only until the address is reallocated. In a static estate it may sit dead for years; in a fleet with hourly churn it becomes a live grant to an unrelated workload within a day. Treat unreferenced address rules as a decay problem with a clock on it, not as tidy-up work.

A rule naming an IP is like a door badge keyed to a desk number. Move people around and the badge still opens the door for whoever is sitting there now.

saying these in an interview costs you the question

  • Treats renumbering as paperwork rather than a security event
  • Assumes an IP address identifies a workload
  • Says a stale allow rule is harmless because the host is gone
  • Claims label-keying removes the need to authorise anything
  • Drops edge anti-spoofing because policy is now identity-based

context