Repository navigation
Gate device services using image capabilities - #73
Merged
Merged
Conversation
This was referenced Nov 13, 2026
Merged
pjeweb
added a commit
that referenced
this pull request
Nov 16, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 17, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 17, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 18, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 18, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 19, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 21, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 22, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 23, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 24, 2026
pjeweb
added a commit
that referenced
this pull request
Nov 24, 2026
Author
|
Still carried in the integration train and not upstream, so it continues as #240. |
pjeweb
added a commit
that referenced
this pull request
Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The app decides which services a box may use, such as sharing internet with connected clients, by guessing from a short list of known hardware (the legacy RK3588/x86 mini-PC list). A board outside that list misses services it actually has, for example client internet.
What it adds
How
One capability module reads the image's board record,
/etc/ceralive/release. A valid record is authoritative, even with an empty list. Development/mock mode and explicit overrides keep their precedence. Device control stays fail-closed (it refuses when it cannot verify), now under the explicit namerequireVerifiedControl. Mocks and test fixtures use the same capability-named permissions, and a source check rejects direct production imports of the legacy classifier.Targets the fork integration branch. Companion image PR: openstreambox/image-building-pipeline#24. #75 builds on this PR.
Technical detail
A valid image board record enables the services its profile supplies, including client internet on boards outside the legacy RK3588/x86 mini-PC list. A single capability module reads
/etc/ceralive/release; subsystem gates ask for their actual network, modem, SIM, regulatory, update, add-on, display, audio or control capability.Injected contracts, mock providers and fixtures also use permission names such as
canRouteClients,canUnlockSim,canManageAddonsandcanManageModems. Control verification retains its fail-closed policy under the explicit namerequireVerifiedControl. A source regression rejects direct production imports of the legacy classifier and old injected gate calls.Branding-only older images retain the existing detector. Development/mocks and explicit overrides keep their precedence. A valid record is authoritative, including an empty list; an attempted but malformed record denies permissions. The legacy detector stays exported for compatibility. The record does not add engine drivers, sensor mappings, OTA channels or hardware qualification for a new family.
Validation
Validation: Bun 1.4.4 backend with one isolated worker: 12,663 pass, 19 skip, zero failures across 1,100 files. Node 24 frontend with one worker: 7,650/7,650 across 459 files, plus four hardware-preflight tests. Lint/types, debt and production build pass. Coverage includes non-RK3588 client internet, unknown-board legacy fallback, four family fixtures, selective permissions, development/mock precedence, malformed/unreadable records and the source guard. No hardware qualification was performed.
Review fixes
Validation: Bun 1.4.4 backend, one isolated worker: 12,675 pass / 19 skip / 0 fail across 1,101 files. Node 24 frontend, one worker: 7,650/7,650 across 459 files. RPC 827, i18n 797, sender 123, hardware preflight 4 pass. Lint/types (Svelte: zero errors/warnings), debt and production build pass. Regressions cover malformed-record legacy fallback, denied control/update effects, both asymmetric ingest RPC profiles and test-environment isolation. Image companion unchanged; no hardware qualification claimed.