Designs 08 and 33: an adopted node refuses allowances; expired ones removed at the holder's start (H-A-312)
This commit is contained in:
@@ -58,15 +58,18 @@ home-network interfaces.
|
||||
for the holder's module: the refusal and the reason, never "nothing opened". It says it again only after a compose
|
||||
with an answer in between. The next `allowances-changed` (the holder says one when it starts serving, design 33
|
||||
control-verbs §6) or the next compose tries again.
|
||||
5. **Allowances are rendered only into a converged node's own table** (H-A-307 (2)). On an adopted node the mesh
|
||||
loads no table that holds an accept (design 08 adoption §2) and speaks the found firewall's terms through openings
|
||||
derived from what the filter would be derived from (adoption §3); an allowance is none of them, so the node-engine
|
||||
renders none there and its compose outcome names the allowances it left out. They stay kept by the holder and are
|
||||
rendered at the first compose after the node converges.
|
||||
5. **Allowances are rendered only into a converged node's own table** (H-A-307 (2), H-A-312 (1)). On an adopted node
|
||||
the mesh loads no table that holds an accept (design 08 adoption §2) and speaks the found firewall's terms through
|
||||
openings derived from what the filter would be derived from (adoption §3); an allowance is none of them. The holder
|
||||
refuses `allow` and `disallow` there and `allowed` answers none (design 33 control-verbs §9), so the node-engine
|
||||
renders none. After the node converges, allowances are set with `allow` like on any converged node.
|
||||
6. **An expired allowance is gone at the next render, and said by the holder** (H-A-308 (2)). At its `until` the
|
||||
holder deletes its key, says `allowances-changed` with change `expired` and writes a journal line (design 33
|
||||
control-verbs §4, §6); the event composes the filter again (line 3), so the port closes when the expiry passes, not
|
||||
at an unrelated compose. No expired entry is kept, and `allowed` never answers one.
|
||||
at an unrelated compose. No expired entry is kept, and `allowed` never answers one. While the holder is away, the
|
||||
loaded filter is kept (line 4), so a port whose allowance expires then stays open until the holder is back and
|
||||
removes it at its start (design 33 control-verbs §10); that is accepted and said (H-A-312 (2), ADR 0683), rather
|
||||
than closing every port of the filter.
|
||||
7. **An allowance survives every render and restart because it lives in one place.** The holder's state on the bus is
|
||||
the only copy; the rendered file is output, rewritten whole at each compose and never read back. A restart of the
|
||||
node-engine, of the holder or of the machine renders the allowances again from `allowed`; a delivery of either
|
||||
|
||||
@@ -26,7 +26,7 @@ its verb, every kept thing its read). How the node-engine renders allowances is
|
||||
|
||||
**Where.** Built in design 47's milestone H, one delivery group with design 08 control-verbs: the networking
|
||||
repository (the seat's whole definition in its contracts module), the catalog repository (the nftables module, the
|
||||
holder) and, where line 8 finds the gap, mesh-sdk's TypeScript side.
|
||||
holder) and, where line 7 finds the gap, mesh-sdk's TypeScript side.
|
||||
|
||||
## Lines
|
||||
|
||||
@@ -85,11 +85,21 @@ holder) and, where line 8 finds the gap, mesh-sdk's TypeScript side.
|
||||
stream, the state's value of line 7 as a layout, and the generated Go and TypeScript packages, as the private
|
||||
network's seat has them. The node-engine calls `allowed` and hears the event through the Go package; the holder
|
||||
serves the verbs and says the event through the TypeScript one.
|
||||
9. **How it is checked.** The holder's tests, against a state in memory: `allow` then `disallow` writes the key, then
|
||||
9. **On an adopted node the holder keeps no allowance** (H-A-312 (1); ADR 0683). `allow` and `disallow` are refused
|
||||
there, naming the adoption (the mesh speaks the found firewall's terms, design 08 adoption §2, §3), and `allowed`
|
||||
answers none, so no answer says a port is open that is not. Whether its node is adopted is the node's convergence
|
||||
state, which the node-engine keeps (ADR 0168); the verb that answers it to the holder is not yet named (a design
|
||||
question for the lead).
|
||||
10. **At every start the holder removes every expired allowance first** (H-A-312 (2)). Before it answers `allowed`,
|
||||
it deletes every key whose `until` has passed, writes a journal line for each, and says `allowances-changed` with
|
||||
change `expired` for them, then `started` (line 6).
|
||||
11. **How it is checked.** The holder's tests, against a state in memory: `allow` then `disallow` writes the key, then
|
||||
deletes it, with an `allowed` and a `disallowed` event; port 0, 65536 and `80a` are refused, as are protocol `icmp`,
|
||||
an `until` in the past, an empty `why`, an unknown argument and a 101st allowance; `allow` with no `interfaces`
|
||||
stores no interface, so the private network's interface is never in the defaults; an allowance whose `until` passes is
|
||||
deleted from the state at that time, says `expired` and writes its journal line, and `allowed` then answers
|
||||
without it; a second `allow` of one key answers what it replaced; `allow` with two interfaces keeps two keys; `rules` marks an allowance with no rule in a fixture
|
||||
ruleset as not loaded; a start says `started`. The seat's contract test holds every holder to the six verbs, and
|
||||
ruleset as not loaded; a start says `started`, and a start with a key past its `until` deletes it and says
|
||||
`expired` before its first `allowed` answers; on a node reported adopted, `allow` and `disallow` are refused naming
|
||||
the adoption and `allowed` answers none. The seat's contract test holds every holder to the six verbs, and
|
||||
the generated packages to the definition.
|
||||
|
||||
Reference in New Issue
Block a user