Skip to content

feat(sentinel): add authenticated robot policy enforcement - #205

Draft
enkerewpo wants to merge 1 commit into
dev-keystonefrom
agent/sentinel-keystone
Draft

feat(sentinel): add authenticated robot policy enforcement#205
enkerewpo wants to merge 1 commit into
dev-keystonefrom
agent/sentinel-keystone

Conversation

@enkerewpo

Copy link
Copy Markdown
Member

What changed

  • add a typed Sentinel rule engine and ListRules / ReplaceRules management contracts
  • carry a Keystone-validated session on the internal Liaison -> Pilot -> Executor path, redact it from public Plan events, and re-resolve identity before execution
  • enforce robot-level rules immediately before capability dispatch using typed RFC 6901 state paths, user/role, capability, time, and region inputs
  • require an authenticated Keystone admin for rule management
  • advertise the Sentinel provider, validate explicit and derived listen-port collisions, and bootstrap a versioned Webots demo policy only on first run

Why

This provides the minimum end-to-end Sentinel loop for the Keystone demo branch without hard-coding robot predicates such as moving or gripper_open. Robot state remains generic and typed, so deployments can address boolean, integer-range, and float-range conditions through stable state paths.

Security properties

  • caller-supplied identity is overwritten after Keystone resolution
  • Executor derives canonical identity from Keystone instead of trusting Plan user/role fields
  • the reusable session token is cleared from client-visible Plan events
  • malformed capability arguments and missing/wrongly typed policy state fail closed
  • only Keystone admins can list or replace rules

Validation

  • cargo fmt --all -- --check
  • cargo test -p robonix-sentinel -p robonix-executor -p robonix-cli (7 Sentinel, 44 Executor, 32 CLI tests)
  • cargo clippy -p robonix-sentinel -p robonix-executor -p robonix-cli --all-targets -- -D warnings
  • python3 -m unittest scripts/tests/test_check_commit_authorship.py
  • python3 scripts/check_commit_authorship.py --base origin/dev-keystone --head HEAD
  • git diff --check

Companion change

The admin rule-management page is being published separately from the robonix-client Keystone branch.

This PR intentionally targets dev-keystone; it does not change dev or dev-next.

Add the typed Sentinel rule engine and admin management contracts, carry Keystone-authenticated identity through the internal planning path, enforce rules before capability dispatch, and ship a reproducible Webots demo configuration.

Assisted-by: Codex:gpt-5.6
@github-actions github-actions Bot added comp:executor system/executor comp:pilot system/pilot comp:liaison system/liaison comp:sentinel system/sentinel comp:rbnx tools/rbnx comp:capabilities capabilities/ contracts comp:docs docs/ and READMEs type:feature New feature (feat:) labels Aug 2, 2026
@enkerewpo

Copy link
Copy Markdown
Member Author

Companion Client PR: syswonder/robonix-client#9 (targets feat/keystone-accounts). Please review/land the backend contract before or together with the Client UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp:capabilities capabilities/ contracts comp:docs docs/ and READMEs comp:executor system/executor comp:liaison system/liaison comp:pilot system/pilot comp:rbnx tools/rbnx comp:sentinel system/sentinel type:feature New feature (feat:)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant