Add security controls for Unix domain socket control interface in release builds #135

Open
opened 2025-12-24 00:31:05 +00:00 by siennathesane · 1 comment
siennathesane commented 2025-12-24 00:31:05 +00:00 (Migrated from github.com)

Context

We're adding a Unix domain socket control interface to allow programmatic control of the engine without needing screen access (e.g., sending events, triggering actions). Currently this will be debug-only.

Future Work

For release builds, we need proper security controls:

  1. Authentication: Verify that connections are authorized

    • Token-based auth
    • Or filesystem permissions + ownership checks
  2. Feature flag: Make socket opt-in for production

    • Add control-socket feature flag
    • Disabled by default in release builds
  3. Rate limiting: Prevent abuse from malicious local processes

  4. Audit logging: Track all control commands sent through socket

  5. Command allowlist: Restrict which operations can be performed remotely

Non-Goals (for now)

  • Network-based control (intentionally local-only)
  • Complex permission models

Acceptance Criteria

  • Socket disabled by default in release builds
  • Feature flag to enable socket in production if desired
  • Basic authentication mechanism
  • Documentation on secure socket usage
## Context We're adding a Unix domain socket control interface to allow programmatic control of the engine without needing screen access (e.g., sending events, triggering actions). Currently this will be debug-only. ## Future Work For release builds, we need proper security controls: 1. **Authentication**: Verify that connections are authorized - Token-based auth - Or filesystem permissions + ownership checks 2. **Feature flag**: Make socket opt-in for production - Add control-socket feature flag - Disabled by default in release builds 3. **Rate limiting**: Prevent abuse from malicious local processes 4. **Audit logging**: Track all control commands sent through socket 5. **Command allowlist**: Restrict which operations can be performed remotely ## Non-Goals (for now) - Network-based control (intentionally local-only) - Complex permission models ## Acceptance Criteria - [ ] Socket disabled by default in release builds - [ ] Feature flag to enable socket in production if desired - [ ] Basic authentication mechanism - [ ] Documentation on secure socket usage
Member

Test comment from sunbeam pm

Test comment from sunbeam pm
siennathesane self-assigned this 2026-03-20 21:14:16 +00:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: studio/marathon#135