Skip to content

Architecture / Decision records / ADR-HIS-055

ADR-HIS-055 Network and workload protection: a checked zone model rendered to nftables, Cilium and the management path

Status Accepted
Decided 2026-11-25 by session RC-1-S11
Record Drafted 2026-11-25; approved 2026-11-25 by the Enterprise Architecture Board
Where the rule lives platform/network-protection/ (its README.md, model/, inventory/, netprotect/, rendered/, ansible/, test/)

Context

FR-ISE-NET-001 asks for: - separate zones with default-deny, allowlisted flows between them; - administration only through the management zone, with MFA, separate administrative identities and session recording; - an inventory of endpoints, devices, workloads and infrastructure with baseline and patch status; - rapid isolation that preserves evidence; - controlled egress from the analytics and partner zones.

Architecture section 8.5 names the eight zones. The technology stack names RKE2 (row 4), OpenTofu, Ansible and Argo CD (row 13), and Wazuh (row 16). It names no packet filter, no CNI and no way to keep zone rules. The first build session of the unit, RC-1-S11, fixes them. They shape: - the deployment topology (RC-1-S20), which builds the clusters and the networks; - the gateways (RC-1-S12) and observability (RC-1-S10), which sit in and watch the zones; - every unit, whose namespace and workloads the policies select.

Decision

  1. One model, checked, from which every enforcement point is rendered. The model is TOML files in the unit:
  2. model/zones.toml: the eight zones of ASM-ISE-003, with the restriction policy of PR-NET-001-2 per zone;
  3. model/flows.toml: the flow allowlist of DE-ISE-003 (source and destination zone, protocol, ports, purpose, owner, status Proposed, Active or Retired, review date, proposer and approver);
  4. model/admin-access.toml: the management path;
  5. model/baselines.toml: hardened baselines and the CFG-ISE-019 patch timeframes;
  6. model/environments/<env>.toml: each environment's addresses;
  7. inventory/assets.toml: the asset inventory of DE-ISE-004.

bin/netprotect check is the policy check of the requirement's validation table and business rules. A change that fails it is not merged. bin/netprotect render writes rendered/<env>/, which is committed, and the tests fail when it is stale. A rule therefore reaches the network only through a reviewed pull request, approved by someone other than its author. Each change between two revisions gives an ise.config.changed audit event (netprotect changes). 2. The tool is Python 3.11 or later, standard library only. Ansible runs on Python, and the pipeline's own tooling is Python. The unit takes no third-party package, so it has no lockfile, no dependency to scan and nothing to register in the dependency register. 3. Zone edges are nftables firewalls. Every flow between zones crosses a zone-edge firewall that loads zone-edge/his-zones.nft, one inet his_zones table replaced whole. In this order: - the isolated set, with the forensic range as its only way in; - the quarantined set, which reaches only remediation in the management zone; - established flows; - refusal of the administrative ports from outside the management zone; - the Active flows, each commented with its rule identifier; - a final rule that logs and drops everything else.

Every drop goes to netlink group 1 with the prefix his-net:<category>:<rule>. ulogd writes the drops to a file, which the Wazuh agent forwards and netprotect alerts turns into SecurityAlertRaised. Hosts outside the clusters (endpoints, devices, data, recovery) are protected by these edges. OpenTofu is not used by this unit: it owns no cloud or virtual infrastructure, and the edge hosts themselves come from the deployment topology. 4. In the clusters, Cilium. The production and analytics clusters run RKE2 with its bundled Cilium as the CNI. A cluster's zone is a namespace label, his.cema.care/zone=<zone>, that the deployment topology puts on every namespace. One CiliumClusterwideNetworkPolicy per zone allows traffic within the zone and the zone's Active flows, so everything else is denied. Hubble exports dropped flows to a file for the Wazuh agent. A workload is <namespace>/<app.kubernetes.io/name>, and isolating it adds a deny-all policy that keeps the pod for evidence. Argo CD keeps rendered/<env>/kubernetes/<cluster>/ applied, through the Application in rendered/<env>/argocd/. 5. The management path is enforced three times: - at every edge and in every cluster, by port; - by sshd on the bastion and every node, which allows only administrative identities (adm.<name>) from the privileged access workstations (bastion) or the management zone (node), requires publickey,keyboard-interactive, and runs every session through admin-gate. The gate checks the source, the identity and the methods sshd reports (ExposeAuthInfo), and refuses a session it cannot record; - by the Kubernetes API server's structured authentication, whose CEL rules accept a Domain 10 token only with a second factor (acr aal2 or an amr method) and an administrative identity. Roles are not token claims (ADR-HIS-048), so what an administrator may do in a cluster is RBAC on the user name oidc:adm.<name>. 6. Privileged sessions are recorded by a component the administrator does not control. The gate runs as the signed-in administrator, so it keeps nothing itself. A session recorder runs as its own system user, his-recorder. The gate connects to its Unix socket, and the recorder: - takes the administrator's identity from the kernel (SO_PEERCRED), not from the gate, and records only administrative identities; - receives the session through script(1), whose output goes to a pipe and on to the recorder; - writes the recording into its own directory (0750), one file per session (0640); - writes ise.privileged-session.started and .ended, and the gate's refusals as SecurityAlertRaised, into its own outbox.

The administrator can neither read, alter nor delete the record. A session whose gate disappears without the closing frame is recorded as ended with outcome failure. 7. Isolation is decided for the person a token proves. isolate, authorize and lift take the acting person's own Domain 10 access token, from a file or an environment variable, never from the command line. The token is verified: RS256 against the issuer's published keys, then iss, exp and nbf. It must be issued for the unit's commands (aud names the environment's commandAudience, or azp is that client), and service identities are refused. The policy decision point is asked about that identity, with the incident the isolation is made under among the attributes (part 3, "incident authority"). The call carries the unit's own service token. In order: - isolate writes the record to isolations/. Where the scope holds a Tier 1 asset, or is a Tier 1 zone, the record stays Awaiting authorization and nothing is isolated. - The Incident Commander then runs authorize with their own token. The networks and Tier 1 services are recomputed from the model and must match the request, so a record edited in between is refused. The decision point decides authorize for that person, knowing who requested it and what it cuts. - Only then are the addresses added to the edge's isolated set at once, and SecurityAlertRaised (isolation) and ise.isolation.applied emitted.

Each record names its environment, and its file is created exclusively, so two requests made at once never share an identifier. The edge keeps every live change in a state folder of its own before it changes the set (netprotect edge set). It loads its rule set only through netprotect edge load, which adds that state in the same transaction, so a reload never reconnects a contained asset. The rendered rule set of an environment carries its Applied records, with their addresses recomputed from the model and never taken from the record, so a reload keeps the containment and an edited record cannot widen it. Every step is audited: requests, refusals and authorizations under ise.isolation.applied, with the action and outcome saying which step, and lifting under ise.isolation.lifted. netprotect lift reverses it. Quarantine of unmanaged and non-compliant assets is the quarantined set, filled by netprotect reconcile. 8. Everything the unit emits goes through an outbox. The outbox is files synced before sending, as IF-ISE-006 requires durable buffering. netprotect deliver sends audit events to the audit intake and hands alerts, keyed by aggregate, to the command that publishes on the backbone. The unit publishes his.ise.SecurityAlertRaised as producer ise-network-protection, source /his/ise/network-protection. 9. The enforcement is tested with real packets and real sessions. The testbed (test/testbed/) builds the zones as Docker networks, routes them through a container that loads the rendered rule set, and probes every acceptance criterion with real connections, against the Domain 10 stubs. Its bastion runs OpenSSH with the rendered settings, the gate and the recorder, and it is reached with real SSH sessions. It needs only Docker, so the pipeline runs it on every change.

Consequences

  • RC-1-S20 (deployment topology) sets cni: cilium in the RKE2 configuration, labels every namespace with its zone, applies cilium-settings.yaml, and sizes the zone-edge firewalls and their addresses (a real environment file in place of reference). It runs the Ansible roles of this unit on the edges, the bastion, the nodes and the RKE2 servers.
  • Every unit's namespace carries his.cema.care/zone, and every workload app.kubernetes.io/name. A unit that needs a new flow between zones adds it to model/flows.toml in a change of this unit, not in its own folder.
  • The Domain 10 policy decision service registers the resource types ise.NetworkIsolation (actions isolate, authorize, lift; the attributes scope, tier1Impact, incident, requestedBy), and the audit service registers ise.config.changed, ise.isolation.applied, ise.isolation.lifted, ise.privileged-session.started and .ended.
  • The integration segment of architecture section 10.1 (Kafka, Camel, HAPI FHIR) is part of the application zone, not a ninth zone. The PRS and ASM-ISE-003 name eight.
  • In-cluster enforcement is verified when a cluster exists (RC-1-S20, RC-1-S26). The zone-edge enforcement is verified by the testbed now.

Alternatives considered

  • Calico, RKE2's default (Canal). Its global policies need the Calico API server or calicoctl to apply, which Argo CD cannot drive without it. Cilium's cluster-wide policies are plain custom resources, and Hubble gives the dropped-flow log that PR-NET-001-1 asks for.
  • Kubernetes NetworkPolicy alone. It is namespaced, it has no cluster-wide default for a zone, and it logs nothing.
  • Zone rules kept in a firewall manager's database. That would put the allowlist outside review and outside the repository's history, against part 3 ("reviewed change") and part 12.
  • A Python YAML or Kafka library. Each would be the unit's only third-party runtime dependency. The model reads TOML with the standard library, the manifests are written by a small writer, and publishing is delegated to the backbone's producer.