ObliviOS Developer portal Project site

Home / Decisions / ADR-187

Implement Compartments v1 with four choices that amend ADR-186.

Proposed, recorded 22 October 2026.

Decision
ADR-187
Date
2026-10-22
Status
ProposedProposed
Part
Compartments, Network exit
Mentions
ADR-186
Mentioned by
ADR-196

1Decision

Implement Compartments v1 with four choices that amend ADR-186: (1) the Tor client is created when the exit daemon starts and bootstrapped only when the exit app's class table first holds a Tor or masked class, and the app asks the daemon to exit when nothing needs it any more, instead of starting the daemon on demand; (2) the consent of the masked tier is one per device, given by the owner, and the exit app runs in the owner user only (its copies in other users idle), instead of one consent per user at its first unlock; (3) the control sockets of the daemon and the route helper are created by init with mode 0666, protected by the SELinux policy (only exit_app may connect) and by the services' check of the peer's SELinux context before the first byte; (4) the neverallow rules of the exit domains are checked by check-neverallows.sh of freeholdos-platform (privacy/exit/tools), because the Pixel board configurations set SELINUX_IGNORE_NEVERALLOWS and the build checks none.

2Why and evidence

(1) An app cannot set a system property (SystemProperties.set is not in the SDK stubs), so it cannot start an init service on demand; a daemon that waits for its first class gives the same guarantee, that no Tor traffic leaves before the user asked, and MSK-005 checks it on a device. (2) One controller and one peer for the daemon; a second user's controller would take the connection. The decoy user must not show the owner's choices.

(3) The exit app has its own uid, which no group of the services holds; the discretionary mode cannot name it. (4) A build that ignores neverallows hides violations: the first neverallows of the exit domains were wrong in the combined policy and the build said nothing, and the Data Map's own neverallow is violated by shell (2026-10-compartments-close-out-review.md, R1, R2).

3Consequences

The daemon runs from boot, idle and unbootstrapped. A decoy or work user is masked by the owner's choice. One discretionary layer fewer on two sockets (recorded in exit-daemon/RISKS.md). A policy change of the exit domains needs check-sepolicy.py and check-neverallows.sh to pass.

4Review when

Per-user consent if a second user is to choose for itself; any move of the sockets to a mode that names the peer; a Pixel configuration that enables neverallow checking.

Read from docs/governance/decision-log.md, entry ADR-187.