Skip to content

Roles and Permissions

FreeSDN controls access through three complementary mechanisms: a 5-tier role hierarchy, optional per-user site grants, and scoped API keys. Together they give you fine-grained, auditable control over who can do what on which parts of the infrastructure.


Roles are ordered by numeric level. Each role inherits all capabilities of the roles below it.

RoleLevelScopeDescription
super_admin100Cross-orgFull platform access including all organizations. The super_admin role is assigned only during the initial setup wizard - no user can assign the super_admin role via the API (the strict-lower-than rule: a super_admin at level 100 can only assign roles strictly below 100).
org_admin60Own orgOperational control within a single org. Full access to all modules, user management, agents, and discovery. Cannot upgrade firmware or modify billing/platform settings.
site_admin40Assigned sitesFull control over the sites they are assigned to. Cannot manage org-level users or upgrade firmware.
operator20Assigned sitesDay-to-day operations: reboot devices, view config, view logs, monitor VPN (read-only), run discoveries.
viewer10Assigned sitesRead-only access to all dashboards and logs. Cannot change anything.

You can only assign or modify roles whose numeric level is strictly below your own. An org_admin (60) can assign roles up to site_admin (40) but cannot create another org_admin. This is enforced at the API layer and raises HTTP 403 on violation.


The table below summarises key capabilities per role. ” - ” means the permission is not granted.

Capabilitysuper_adminorg_adminsite_adminoperatorviewer
All permissions (*)Yes----
Org / site managementYesYes (own org)ReadReadRead
User managementYesCreate/updateRead--
Firmware upgradeYes----
Device CRUD + rebootYesYesYesRead + rebootRead
Network readYesYesYesYesYes
Network writeYesYesYes--
Config pushYesYesYes--
VPN readYesYesYesYesYes
VPN writeYesYesYes--
Firewall fullYesYesYesReadRead
Cameras (view/playback)YesYesYesYesYes
VoIP managementYesYesView+phonesView onlyView only
Access control (BETA)YesYesYesView+eventsView+events
HypervisorYesYesYesReadRead
AI assistantYes----
Agent managementYesYesCreate+writeRead-
Discovery runYesYesYesYes-
Audit log readYesYesYesYesYes
Plugin installYes----
Marketplace syncYes----
Observability (flows/logs)YesYesYes (read)Read-

Within an Organization, you can restrict a user to a specific subset of Sites using UserSiteAccess grants:

  • A user with at least one site grant is site-limited: all requests are automatically filtered to their granted Sites. Accessing a resource on a non-granted Site returns 403. This applies to site_admin, operator, and viewer roles only.
  • org_admin and super_admin users are never site-limited - they always have access to every Site in their org regardless of any UserSiteAccess grants attached to their account (grants on these roles are silently ignored at runtime).
  • A user with no site grants has access to all Sites in their org (the backwards-compatible default).

Manage site grants from Settings → Users → [user] → Site Access. Grant or revoke individual Sites. Grants take effect immediately - active sessions are re-evaluated on the next request.

Site grants narrow but never expand a role’s permissions. A viewer with a site grant can only view resources on their granted Sites - the grant does not unlock actions that the viewer role itself does not permit.


When you create an API key, you select a permission scope from the permissions your account holds. The key is a hard ceiling:

  • The key can never exceed the permissions you declared at creation time.
  • Even as a super_admin, a scoped key has the super_admin wildcard bypass suppressed - it operates exactly within its declared scope.
  • Revoke keys immediately from Settings → API Keys. Revoked keys are rejected on the next request.

The is_superuser field in API responses is a convenience flag derived from role == "super_admin". It always tracks the role and cannot be set independently - there is no separate persisted column in the database. In code, explicit is_superuser checks and minimum-role checks serve different call-sites but both derive from the same role value. In practice, cross-org operations are available only to users whose role is super_admin.


The API returns your current permission set:

GET /api/v1/auth/me
Authorization: Bearer <token>

The response includes role, permissions, is_superuser, and is_org_admin, plus standard user fields (id, email, organization_id, is_active, mfa_enabled, etc.). Use this to verify what a given credential can do before configuring an integration.


Next steps: Security Model - Production Hardening Checklist