Skip to content

feat(policy): add portable UI policy controls - #3221

Open
shailendra-nv wants to merge 6 commits into
NVIDIA:mainfrom
shailendra-nv:shailendras/mxc-ui-policies
Open

feat(policy): add portable UI policy controls#3221
shailendra-nv wants to merge 6 commits into
NVIDIA:mainfrom
shailendra-nv:shailendras/mxc-ui-policies

Conversation

@shailendra-nv

@shailendra-nv shailendra-nv commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Add a platform-neutral, deny-by-default ui policy section and compute-driver
capability negotiation. MXC process_container maps the policy to MXC UI
controls, while unsupported runtimes reject every explicit UI section before
provisioning and preserve existing behavior when the section is omitted.

Related Issue

Closes #3022

Changes

  • Add portable allow_graphical_ui, directional clipboard, and
    allow_input_injection policy controls to the Rust and protobuf models.
  • Add a compute-driver capability for complete UI-policy enforcement and expose
    it through gateway health output and the Go SDK.
  • Reject every explicit UI object, including ui: {}, when a selected driver
    does not advertise support. Docker, Podman, Kubernetes, VM, non-Windows
    builds, older extensions, and MXC isolation_session therefore remain
    default-deny for the new policy surface.
  • Map UI policy only for MXC process_container; keep omitted policy
    restrictive and reject unknown enum values or lossy mappings.
  • Update policy hashing/static-update checks, schema documentation,
    architecture documentation, MXC documentation, policy-generation skills,
    Windows validation tasks, and Go SDK conversions.
  • Add policy parsing/validation, capability, unsupported-driver, mapper,
    lifecycle, real-MXC schema, SDK, and end-to-end tests.

Testing

Validated head: 69ee7d145f9c4c0e0637f830a134700b5b96da70

  • mise run pre-commit on native Windows x64
  • windows:check:x64
  • windows:build:x64
  • windows:test:x64 — 3,569 passed, 18 skipped, 0 failed
  • windows:test:unsupported:x64 — all driver/feature combinations passed
  • windows:test:mxc-real:x64 — 11 passed, 0 failed; unavailable live
    backend facilities reported as explicit skips
  • windows:e2e:mxc:mock — 4 passed, 0 failed
  • Windows ARM64 check, build, lint, workspace tests, unsupported-driver
    tests, real-MXC schema tests, and mock E2E validation
  • Unit tests added/updated
  • E2E tests added/updated

The broader Windows test aggregate also completed 3,569 Rust tests, SBOM tests,
release-range tests, and documentation tests successfully. It then reached a
Unix bash parity task that does not apply on native Windows.

MXC compatibility:

  • Latest released MXC 0.8.0+6cd3d58f passes the real-MXC suites.
  • Microsoft MXC main at 3a22a2b94a81da081d260b087c4c7faeb7be7f14
    builds with and without isolation_session, and passes the real-MXC suite in
    both configurations.
  • Representative mapper output validates against MXC stable 0.8.0-alpha, dev
    0.9.0-alpha, and rolling 0.9.0-dev schemas.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

Signed-off-by: Shailendra Singh <shailendras@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Sep 8, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@drew drew left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed commit de2f834. Found four issues, detailed inline: global-policy ingress bypasses UI enforcement checks, MXC accepts grants suppressed by its disable flag, YAML roundtrips change the default clipboard representation, and the Go fake client shares mutable UI state.

Validation: all 10 targeted existing Rust UI tests and the Go converter/fake suites pass. Additional regression checks reproduced global-policy acceptance and the clipboard roundtrip mismatch; a Go reproduction confirmed fake-client aliasing. The MXC finding is based on the mapper and Microsoft's documented enforcement contract; Windows enforcement was not executed on this Linux host. Required branch CI was still pending when reviewed.

Comment thread crates/openshell-server/src/compute/mod.rs
Comment thread crates/openshell-driver-mxc/src/policy_map/map.rs Outdated
Comment thread crates/openshell-policy/src/lib.rs
Comment thread sdk/go/openshell/v1/types/policy.go
Signed-off-by: Shailendra Singh <shailendras@nvidia.com>
Signed-off-by: Shailendra Singh <shailendras@nvidia.com>
Signed-off-by: Shailendra Singh <shailendras@nvidia.com>
Signed-off-by: Shailendra Singh <shailendras@nvidia.com>
Signed-off-by: Shailendra Singh <shailendras@nvidia.com>
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.

feat(policy): add portable UI controls for MXC sandboxes

2 participants