Skip to content

Commit 4ac8e89

Browse files
committed
docs(rfc): policy DNS mappings are judged by the current policy
The egress adapter design said a mapping holds an endpoint identifier and allowed ports and that a reload invalidates mappings whose endpoint contract changed. A mapping now holds the addresses some eligible endpoint permitted, each connection is decided by the current policy, and the deciding endpoint's rules filter the pinned addresses. Signed-off-by: mr-miles <Miles@luma-energy.co.uk>
1 parent aadf2a1 commit 4ac8e89

1 file changed

Lines changed: 18 additions & 12 deletions

File tree

‎rfc/0005-sandbox-proxy-egress-adapter/technical-design.md‎

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -338,26 +338,32 @@ Policy DNS is query-driven rather than a static `/etc/hosts` snapshot.
338338
upstream query.
339339
5. Policy DNS resolves an eligible name through trusted upstream DNS and
340340
filters every answer through endpoint metadata and SSRF controls.
341-
6. The adapter allocates a supervisor-owned synthetic IP and creates an active
342-
mapping containing the synthetic IP, normalized name, endpoint identifier,
343-
allowed ports, validated real addresses, policy generation, distinct DNS
344-
mapping generation, opaque mapping ID, and expiration.
341+
6. The adapter allocates a supervisor-owned synthetic IP for the normalized
342+
name and address family, and creates an active mapping containing the
343+
synthetic IP, normalized name, the real addresses that passed the
344+
destination rules of at least one eligible endpoint, the policy generation
345+
it was published under, a distinct DNS mapping generation, an opaque
346+
mapping ID, and expiration.
345347
7. The adapter publishes the mapping and capture state atomically before
346348
returning the synthetic IP to userland with a bounded TTL.
347349
8. Userland later calls `connect(synthetic_ip:port)`.
348350
9. Transparent TCP recovers the synthetic original destination and requires an
349-
unexpired exact mapping whose allowed ports contain the requested port.
350-
10. Normal egress authorization and relay selection run against a policy
351-
generation consistent with the mapping contract.
352-
11. The connector dials only a real address pinned in that mapping. It does not
353-
re-resolve the name independently at connect time.
351+
unexpired exact mapping.
352+
10. Normal egress authorization and relay selection run against the current
353+
policy for the mapped name and the requested port.
354+
11. The connector dials only a real address pinned in that mapping that the
355+
deciding endpoint's destination rules permit. It does not re-resolve the
356+
name independently at connect time.
354357

355358
The resolved endpoint store is active state produced by policy-eligible lookups
356359
and consumed by transparent TCP connects. Policy generation and DNS mapping
357360
generation are separate values: a DNS refresh can replace mappings without a
358-
policy reload, while a policy reload can invalidate mappings whose endpoint
359-
contract is no longer current. A captured connection with no mapping, a stale
360-
mapping, or a mismatched endpoint/port fails closed. An unrelated bare-IP
361+
policy reload. A policy reload does not invalidate mappings: every connection
362+
is decided by the policy current when it is made, and the pinned addresses are
363+
filtered again through that decision's destination rules, so a reload can never
364+
add a real address to a kept answer, and the TTL bounds how long it is used. A
365+
captured connection with no mapping, an expired mapping, or no pinned address
366+
the deciding endpoint permits fails closed. An unrelated bare-IP
361367
connection cannot inherit a policy-DNS authorization merely because it targets
362368
a real IP present in the mapping store. Synthetic IPs are correlation handles,
363369
not upstream destinations, and must never be routed directly or reassigned

0 commit comments

Comments
 (0)