A remote desktop management plane cannot stop at “you can sign in.” Devices, policy, audit and billing each need clear tenant boundaries, and every management action needs a trail. RemoteControl puts those capabilities in one control plane.

JWT sessions are still revocable sessions

Login and self-service signup issue HS256 JWTs. The token carries a session id, tenant id and user id, but the server still checks the corresponding session row for revocation and expiry on each request. That keeps the convenience of JWT while preserving logout, refresh and forced revocation.

Tenant isolation is enforced in queries

The control plane does not rely on database RLS as the only safety net. Business queries carry an explicit tenant_id, and permission checks happen before the handler runs. Self-service signup creates an isolated tenant, owner account and owner role binding.

RBAC covers operations and finance

Built-in roles include owner, admin, operator, auditor, billing, member and viewer. Device connection, file transfer, audit reads and invoice downloads map to separate permissions, so access can follow the job.

Audit and billing share the tenant

Device, identity, policy, relay and billing events feed an append-only audit stream. Relay traffic is metered per tenant and reconciled with subscriptions, credits and invoices, so operations and finance see the same facts.