Skip to content

feat(console): accept --runtime-gids, lockkit's hub flags (#69) - #70

Merged
DavidGodefroid merged 2 commits into
mainfrom
feat/69-hub-flags
Nov 14, 2026
Merged

DavidGodefroid merged 2 commits into
mainfrom
feat/69-hub-flags

Conversation

@DavidGodefroid

Copy link
Copy Markdown
Owner

Closes #69.

What

lockhttp console now registers lockkit's hub flags (console.HubOptions) and passes them to console.Run, so lox run can give it --runtime-gids like the other locks' consoles (lockhub#212).

  • A peer of the console socket holding one of those gids is unconfined (runtime_group) and refused with CodeUnconfined unless the profile sets unconfined = true (non-production); lockkit's console decides it.
  • Fail closed: an invalid --runtime-gids is a usage error (exit 3) before the terminal or the policy is touched; --hub, --instance and the other hub flags stay refused (the console is policy-only).

Tests

  • Unit (cmd/lockhttp/loxup_test.go): the console starts with the argv lox run writes, with and without --runtime-gids 999,4242, and Run gets the gids; invalid lists are usage errors; a socket peer holding a listed gid is refused with CodeUnconfined / runtime_group.
  • Integration (test/integration): lea's gate is served by a console started with --runtime-gids (gids it does not hold); a gate holding one is refused.
  • Docker e2e (test/docker/e2e.py): the console listens with --runtime-gids, refuses an invalid one.

Docs

docs/usage.md (flag table), docs/lea.md, CHANGELOG (Unreleased: the release that takes the flag, for lockhub's family.RuntimeGIDsSince).

🤖 Generated with Claude Code

DavidGodefroid and others added 2 commits November 14, 2026 19:25
lockhttp console registers console.HubOptions as the other locks'
consoles do, so lox run can pass it the host's runtime gids
(lockhub#212). A socket peer holding one is unconfined (runtime_group),
refused with CodeUnconfined unless the profile sets unconfined = true.
An invalid list is a usage error; the other hub flags stay refused (the
console is policy-only).

Tests: unit (argv as lox run writes it, invalid lists, a runtime-group
peer refused), integration (the gate served by a console started with
--runtime-gids, a runtime-group gate refused), docker e2e (the console
listens with --runtime-gids, refuses an invalid one).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er's gid

The console adds its machine's runtime gids (confine.RuntimeGIDs): on a
CI runner in the docker group the gate is runtime_group whatever
--runtime-gids says. Check its absence only where this process holds none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DavidGodefroid
DavidGodefroid merged commit c1c0043 into main Nov 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

console: accept --runtime-gids and the hub flags (lockhub#212)

1 participant