Security model

Status: 0.9 release-candidate security baseline.

CommandCore intentionally provides powerful remote administration. Security is based on authenticated identities, explicit authority, device-local ceilings, privilege separation, lifecycle integrity, controlled rollout and audit—not shell blacklists.

Northbound identity

Bootstrap/admin path

OAuth resource-server path

When enabled, CommandCore validates externally issued OAuth/OIDC JWT access tokens against configured issuer, audience and JWKS. It validates signature, issuer, audience, expiry, issued-at and subject. client_id/azp, when present, becomes audited client identity.

Scopes:

commandcore:admin is management authority, not automatic machine FULL_CONTROL. Machine execution still requires execution scope plus device grant/profile/local authority.

Device access and policy intersection

A valid token alone does not grant every machine. A subject must own the device or receive a per-device grant with a maximum profile.

Final execution permission is the minimum of:

  1. caller execution scope;
  2. per-device subject grant;
  3. server-selected device profile;
  4. root-owned device-local maximum and helper availability.

Device identity

Linux privilege separation

The network Agent runs unprivileged. FULL_CONTROL delegates over local Unix IPC to commandcore-helper, which runs as root.

Helper checks:

Update and fleet trust

Remote Agent replacement is a root/supply-chain boundary.

A device is eligible for remote signed update only when its root-owned local policy contains both:

  1. the trusted Ed25519 release public key; and
  2. one or more allowed HTTPS manifest origins.

The control plane cannot provide or replace either trust anchor. agent.update.stage verifies the signed manifest, origin, size and SHA-256; privileged activation independently re-verifies the signed manifest and staged artifact before changing the version pointer. Fresh authenticated health commits the candidate; failure rolls back.

Fleet rollout adds canary/ring orchestration only. It does not weaken the device-local release trust boundary. Offline devices wait rather than being marked failed, failures pause by default, and every rollout transition is durable/auditable.

Tool classification

Docker daemon access is FULL_CONTROL because conventional Docker socket access is effectively host-root authority.

Filesystem integrity

fs.patch uses an unpredictable same-directory temporary file, fsync + atomic replace, preserves mode and refuses symlinks by default. follow_symlinks=true must be explicit. This reduces predictable-temp/symlink attacks; it is not a chroot or complete openat2 sandbox.

Audit

Audit records include authenticated user, client ID, resolved device, tool, redacted argument summary, execution ID, result, duration, exit code and risk class. Fleet management actions and rollout events are also persisted. Secret-bearing inputs, raw file payloads and environment values are not blindly logged.

Residual risks