-
Notifications
You must be signed in to change notification settings - Fork 0
RBAC
SPARC implements a granular Role-Based Access Control system with 29 roles aligned with NIST SP 800-37 Rev. 2 (Risk Management Framework). The system is designed to mirror real-world security authorization workflows, ensuring that each user in the compliance lifecycle has precisely the access they need and nothing more.
Authorization is enforced through three layers, evaluated in order:
| Layer | Mechanism | Scope |
|---|---|---|
| 1. Instance Admin | Boolean flag on User model |
Global bypass -- all checks pass |
| 2. Role-based | has_role?(role_name, project_id:) |
Structural access by job function |
| 3. Permission-based | has_permission?(key, project_id:) |
Granular control over specific resources |
Backward Compatibility: All authorization checks are no-ops when SparcConfig.any_auth_enabled? returns false. This allows existing deployments to upgrade without breaking changes until RBAC is explicitly enabled.
Instance Admin is a boolean column on the User model, not a role. It provides unrestricted access to the entire SPARC instance.
- Bypasses ALL authorization checks across all projects and resources.
- The first Instance Admin account is bootstrapped during
db:seedwith a randomly generated 16-character password. - The bootstrapped admin must change their password on first login.
- Instance Admin status can only be granted by another Instance Admin through the admin interface.
Instance Admin is intended for platform operators and initial setup only. Day-to-day users should be assigned appropriate roles instead.
SPARC roles are divided into two categories based on their scope:
-
Instance-Scoped Roles (10 roles) -- Apply globally across all projects. Stored with
project_id = NULLin theuser_rolestable. -
Project-Scoped Roles (19 roles) -- Apply only to the specific project they are assigned to. Stored with a
project_idvalue in theuser_rolestable.
A single user can hold:
- Multiple instance-scoped roles simultaneously.
- Different project-scoped roles across different projects.
- A combination of instance-scoped and project-scoped roles.
SPARC defines 20 permission keys across 10 resource areas. Each key controls either read or write access to a specific resource type.
| Resource | Read Key | Write Key |
|---|---|---|
| Catalogs | catalogs.read |
catalogs.write |
| Profiles | profiles.read |
profiles.write |
| Projects | projects.read |
projects.write |
| Project Members | -- | projects.manage_members |
| SSP | ssp.read |
ssp.write |
| SAR | sar.read |
sar.write |
| SAP | sap.read |
sap.write |
| POA&M | poam.read |
poam.write |
| CDEF | cdef.read |
cdef.write |
| Evidence | evidence.read |
evidence.write |
| Mappings | mappings.read |
mappings.write |
When a permission check is performed, the system resolves the effective permission set by combining both instance-scoped and project-scoped roles:
Effective permissions = permissions from user_roles
WHERE project_id IN (target_project_id, NULL)
This means:
- Instance-scoped role permissions always apply, regardless of the target project.
- Project-scoped role permissions apply only when the target project matches.
- If a user has multiple roles (instance or project), their permissions are the union of all granted permissions.
A user with the Global Viewer instance role and the ISSO project role on Project A would have:
- Read access to all resources globally (from Global Viewer).
- Read/write access to SSP, SAR, SAP, POA&M, and Evidence on Project A (from ISSO).
- Only read access on Project B (from Global Viewer alone).
These 10 roles apply across the entire SPARC instance and are not tied to any specific project.
Full CRUD on catalogs and profiles. Controls enterprise baselines and organizational policy overlays.
Read-only access to all shared catalogs, profiles, and organizational resources. Intended for auditors and oversight staff who need visibility without modification rights.
Risk oversight role with read access to all resources. Responsible for ensuring organizational risk posture aligns with mission objectives.
Privacy risk management role. Read access to all resources for reviewing privacy controls and ensuring PII protections are adequate.
Ultimate accountability for the organization's security program. Read access to all resources.
Organization-wide risk tolerance and strategy. Read access to all resources for making enterprise risk decisions.
Oversees the IT security program. Read access to all resources for strategic technology and security oversight.
Supply chain security oversight. Read access to catalogs, profiles, projects, CDEFs, evidence, and mappings. Does not have access to SSP, SAR, SAP, or POA&M resources.
FedRAMP program management office oversight. Read access to all resources for monitoring FedRAMP authorization activities.
Provisional Authority to Operate (P-ATO) reviews. Read access to all resources for evaluating cloud service provider security packages.
| Role | Catalogs | Profiles | Projects | SSP | SAR | SAP | POA&M | CDEF | Evidence | Mappings |
|---|---|---|---|---|---|---|---|---|---|---|
| Policy Manager | R/W | R/W | R | R | R | R | R | R | R | R/W |
| Global Viewer | R | R | R | R | R | R | R | R | R | R |
| Senior Accountable Official | R | R | R | R | R | R | R | R | R | R |
| SAOP | R | R | R | R | R | R | R | R | R | R |
| Head of Agency / CEO | R | R | R | R | R | R | R | R | R | R |
| Risk Executive | R | R | R | R | R | R | R | R | R | R |
| CIO | R | R | R | R | R | R | R | R | R | R |
| Chief Acquisition Officer | R | R | R | - | - | - | - | R | R | R |
| FedRAMP PMO | R | R | R | R | R | R | R | R | R | R |
| JAB | R | R | R | R | R | R | R | R | R | R |
These 19 roles are assigned per-project and only grant access within the context of that project.
Accepts risk and issues Authority to Operate (ATO) decisions. Has read access to project documentation and write access to POA&M items to track risk acceptance.
Agency-specific ATO authority. Same permission set as the Authorizing Official role, scoped to agency-level authorization decisions.
Owns the information system. Broad read/write access to SSP, POA&M, CDEF, and evidence to maintain the system's security posture documentation.
Chief Information Security Officer. Strategic oversight with read access across all project resources. Does not have direct write access to project artifacts.
Oversees the security posture of the system. Read/write access to SSP, POA&M, and evidence. Read access to SAR, SAP, CDEF, and mappings.
Day-to-day security operations. Broadest write access among project roles -- read/write to SSP, SAR, SAP, POA&M, and evidence.
SSP and CDEF implementation for cloud systems. Read/write access to SSP, POA&M, CDEF, and evidence. Read access to SAR, SAP, and mappings.
Independent assessment role (Third Party Assessment Organization). Read/write access to SAR and SAP. Read access to SSP, POA&M, CDEF, evidence, and mappings.
Manages shared/inherited controls. Read/write access to SSP, CDEF, and evidence.
Security design and architecture. Read/write access to SSP and CDEF. Read access to evidence.
Builds reusable security components. Read/write access to CDEF and evidence.
Daily system operations. Read access to SSP and POA&M. Read/write access to evidence.
Data governance and classification. Read access to SSP, CDEF, and evidence.
Tracks vendor security dependencies. Read access to SSP. Read/write access to CDEF and evidence.
Evaluates tools and services for security fitness. Read access to SSP, SAR, CDEF, and evidence.
General project contributor. Read/write access to SSP, POA&M, CDEF, and evidence. Read access to profiles.
Broad expertise across the SPARC platform. Read access to catalogs, profiles, and mappings. Read/write access to SSP, SAR, SAP, POA&M, CDEF, and evidence.
Manages the evidence lifecycle including collection, validation, and linking to controls. Read access to catalogs, profiles, SSP, SAP, POA&M, CDEF, and mappings. Read/write access to SAR and evidence.
Read-only project access for stakeholders who need visibility but no modification rights. Read access to projects, SSP, SAR, POA&M, CDEF, and evidence.
| Role | Catalogs | Profiles | Projects | SSP | SAR | SAP | POA&M | CDEF | Evidence | Mappings |
|---|---|---|---|---|---|---|---|---|---|---|
| Authorizing Official (AO) | - | - | R | R | R | R | R/W | R | R | R |
| Agency Authorizing Official | - | - | R | R | R | R | R/W | R | R | R |
| System Owner (SO/ISO) | - | - | R | R/W | R | R | R/W | R/W | R/W | R |
| CISO | R | R | R | R | R | R | R | R | R | R |
| ISSM | - | - | R | R/W | R | R | R/W | R | R/W | R |
| ISSO | - | - | R | R/W | R/W | R/W | R/W | R | R/W | R |
| CSP | - | - | R | R/W | R | R | R/W | R/W | R/W | R |
| Assessor / 3PAO | - | - | R | R | R/W | R/W | R | R | R | R |
| Common Control Provider | - | - | R | R/W | - | - | - | R/W | R/W | - |
| System Architect / Engineer | - | - | R | R/W | - | - | - | R/W | R | - |
| Component Supplier / Product Engineer | - | - | R | - | - | - | - | R/W | R/W | - |
| System Operator / Administrator | - | - | R | R | - | - | R | R | R/W | - |
| Information Owner / Steward | - | - | R | R | - | - | - | R | R | - |
| Vendor Dependency Manager | - | - | R | R | - | - | - | R/W | R/W | - |
| Solution Evaluator | - | - | R | R | R | - | - | R | R | - |
| Project Member | - | R | R | R/W | - | - | R/W | R/W | R/W | - |
| SPARC SME | R | R | R | R/W | R/W | R/W | R/W | R/W | R/W | R |
| Evidence Integration Engineer | R | R | R | R | R/W | R | R | R | R/W | R |
| View Only | - | - | R | R | R | - | R | R | R | - |
Authorization is enforced in controllers using three methods, each corresponding to one of the three authorization layers:
# Layer 1: Require Instance Admin (boolean flag check)
authorize_admin!
# Layer 2: Require a specific role (instance or project-scoped)
authorize_role!("isso", project_id: @project.id)
# Layer 3: Require a specific permission (most granular)
authorize_permission!("ssp.write", project_id: @project.id)All three methods raise Authorization::NotAuthorizedError on failure. When this exception is raised:
- An
authorization_failureaudit event is logged with details about the user, requested resource, and missing authorization. - The user receives an appropriate HTTP error response (typically 403 Forbidden).
| Use Case | Method |
|---|---|
| Admin-only settings pages | authorize_admin! |
| Pages restricted to a job function (e.g., only assessors) | authorize_role! |
| Actions on specific resource types (e.g., editing an SSP) | authorize_permission! |
For most controller actions, authorize_permission! is the preferred method because it provides the most granular control and automatically accounts for both instance-scoped and project-scoped roles.
| Reference | Description |
|---|---|
| PR #73 | Initial authentication, users, roles, and registration |
| PR #112 | RBAC Admin Screens (Issues #92, #93, #94) |
| PR #115 | RBAC enforcement, summary tiles, full role coverage |
| Issue #96 | Added SPARC SME and Evidence Integration Engineer roles |
| Issue #99 | Restricted catalog/baseline edit to Policy Manager and Admin |
docs/groups_users.md |
Foundation RBAC reference document |
Getting Started
User Guides
- User Guides (index)
- Getting Oriented
- Authorization Boundaries
- Control Catalogs & Baselines
- Converters & Imports
- System Security Plans (SSP)
- Component Definitions (CDEF)
- Security Assessment Plan (SAP)
- Security Assessment Results (SAR)
- POA&M
- Evidence & Attestations
- HDF Amendment Triage
- Compliance Library
- Security Keys & Smart Cards
- Administration
Documentation
- RBAC (Role-Based Access Control)
- Data Isolation
- Screens & UI
- Core Functions & Features
- Framework Mapping
- Integrations
- Architecture
- API Reference
Reference
Links