droboticflow-new/docs/drosync/permissions-security.md
2026-07-28 20:43:46 +08:00

2.5 KiB

Permissions and security

Roles

Role Access
admin Spaces, capability probe, exclusive-prefix confirmation, device approval, credential rotation/revocation, force lease release, reconcile, and client rollout policy.
data_operator Intended for owned operational sessions, failures, conflict review, retry, and abort. Production enablement is blocked until the ownership model in decisions.md is selected; the current API boundary is organization-wide.
pipeline_engineer Read final sessions and create/view immutable release records.
compliance_auditor / auditor Organization-wide read-only audit and CSV/NDJSON export.

Device credentials are independently scoped to sync space, allowed relative prefixes, and actions. They remain valid until administrator revocation. The API rechecks credential and device state on every new control request.

Local boundaries

  • The daemon owns SQLite writes.
  • Unix IPC is mode 0600.
  • Windows per-user daemons use the process token's default DACL and a domain-plus-user pipe name. The LocalSystem service uses \\.\pipe\drosync-system; CLI/GUI try the private user pipe first and fall back to the system pipe, whose service-token DACL is expected to restrict access to administrators. Both reject remote pipe clients and enforce a single first server instance. Windows acceptance must still include standard-user/admin/cross-user denial tests because that DACL behavior cannot be certified from a macOS build.
  • User credentials are stored in Keychain, Credential Manager, or Secret Service.
  • Headless secret files must be 0600; environment injection is accepted for orchestrated services.
  • unsafe Rust is forbidden in workspace crates.

Accepted residual risk

Existing BOS AK/SK records remain stored in MongoDB using the project's current storage representation. API responses mask secrets and organization/role checks isolate access, but no new at-rest application encryption is introduced in v1. This is an explicitly accepted, not eliminated, production security risk. Compensating controls are database encryption at rest, secret-aware backups, least-privilege BOS accounts, rotation, access logging, and restricted Mongo administration.

Prefix exclusivity

Do not enable update mode if any non-drosync writer can mutate the prefix. x-bce-forbid-overwrite is not a substitute, especially when bucket versioning is enabled. A drift observation immediately disables the space; reconciliation does not reopen it automatically.