Unclassified
Data Governance & Security
Cross-cutting concerns across all Spine stores — tenants, identity, roles, permissions, policies, and compliance
Across All Spine Stores.
Data governance and security are not layers — they are cross-cutting concerns that apply to every layer, every store, and every action in SpineWorkspace.
Design Principles
- Zero trust — Every access is verified
- Least privilege — Minimum necessary permissions
- Tenant isolation — No data leaks across tenants
- Audit everything — Full traceability
- Compliance by design — Regulations built into the architecture
Governance Domains
| Domain | Scope |
|---|---|
| Tenants | Multi-tenant isolation and data boundaries |
| Identity | Authentication and identity verification |
| Roles | Role-based access control |
| Permissions | Fine-grained permission model |
| Policies | Organizational policy enforcement |
| Purpose | Purpose limitation for data use |
| Consent | Consent management for data processing |
| Data Classification | Sensitivity and handling labels |
| Audit | Immutable audit trail |
| Retention | Data lifecycle management |
Tenant Isolation
Every Spine store enforces tenant isolation:
| Store | Isolation Mechanism |
|---|---|
| Canonical Spine (Neon) | Row-level security, tenant_id column |
| Operational Spine (D1) | Per-tenant database |
| Edge / Session State (Workers) | Per-tenant namespace |
| Audit Store | Append-only, tenant-scoped queries |
| Cache (KV) | Tenant-prefixed keys |
Isolation Rules
- Queries are always scoped to tenant_id
- Cross-tenant joins are never permitted
- Tenant data is physically separated where possible
- Tenant deletion removes all associated data
Identity
| Mechanism | Description |
|---|---|
| One Auth | Single sign-on across all surfaces |
| MFA | Multi-factor authentication |
| SSO | SAML/OIDC integration |
| API Keys | Service-to-service authentication |
| JWT | Token-based session management |
Roles & Permissions
Role Hierarchy
Organization Admin → Domain Admin → Manager → Member → Viewer
Permission Model
interface Permission {
resource: string; // e.g., 'work-item', 'entity', 'communication'
action: string; // e.g., 'read', 'write', 'approve', 'execute'
scope: ScopeDef; // e.g., 'own', 'team', 'domain', 'organization'
conditions?: Condition[];
}
Permission Rules
- Permissions are additive — union of all granted permissions
- Deny always wins over allow
- Permissions are role-scoped and tenant-scoped
- Permissions are evaluated at the Spine query layer
Policies
Organizational policies are enforced at every governance gate:
| Policy Type | Description |
|---|---|
| Access policies | Who can access what |
| Action policies | Who can do what |
| Data policies | How data can be used |
| Retention policies | How long data is kept |
| Compliance policies | Regulatory requirements |
Policy Evaluation
Policies are evaluated:
- At every governance gate (before execution)
- At every Spine query (before data access)
- At every communication (before delivery)
- At every reconciliation (before memory promotion)
Purpose Limitation
Data is used only for stated purposes:
| Purpose | Scope |
|---|---|
| Business operations | Day-to-day work execution |
| Analytics | Reporting and insights |
| AI reasoning | Twin and agent context |
| Compliance | Regulatory requirements |
| Audit | Investigation and review |
Purpose Rules
- Data tagged with permitted purposes
- Access checked against purpose tags
- Purpose violations are logged and blocked
- Purpose can be updated with governance approval
Consent Management
| Consent Type | Description |
|---|---|
| Data collection | Consent to collect data from systems |
| Data processing | Consent to process data for AI reasoning |
| Data sharing | Consent to share data across domains |
| Data retention | Consent to retain data beyond active use |
Data Classification
| Classification | Description | Handling |
|---|---|---|
| Public | No restriction | Standard access |
| Internal | Organization-wide | Auth required |
| Confidential | Role-restricted | Encryption + audit |
| Restricted | Named-person access | MFA + encryption + audit + DLP |
Audit Trail
Every action in SpineWorkspace produces an audit record:
interface AuditRecord {
id: string;
tenantId: string;
timestamp: string;
actor: ActorRef;
action: string;
resource: string;
resourceId: string;
outcome: 'success' | 'failure' | 'denied';
details: Record<string, unknown>;
ipAddress?: string;
userAgent?: string;
}
Audit Rules
- Audit records are append-only
- Audit records cannot be modified or deleted
- Audit records are stored in the Audit Store
- Audit records are retained per compliance policy
Retention
| Data Type | Default Retention |
|---|---|
| Operational data | Active + 90 days |
| Communication logs | Active + 1 year |
| Audit records | 7 years |
| Memory entries | Active + 2 years |
| Archived data | Per compliance policy |
Compliance
SpineWorkspace supports compliance with:
| Regulation | Support |
|---|---|
| GDPR | Data subject rights, consent management, right to erasure |
| SOC 2 | Access controls, audit trail, monitoring |
| HIPAA | PHI handling, BAA support, encryption |
| CCPA | Consumer rights, data inventory |
| ISO 27001 | Security controls, risk management |