Access Control & Permissions
Comprehensive guide to Torvus Security's access control model, authentication, and authorization.
Access Control Model​
Torvus Security implements a multi-layered access control system:
������������������������������������������������
Authentication Layer
� User Authentication (Email + Password)
� Multi-Factor Authentication (MFA/TOTP)
� WebAuthn (Hardware Keys)
� API Key Authentication
������������������������������������������������
������������������������������������������������
Authorization Layer
� Role-Based Access Control (RBAC)
� Attribute-Based Access Control (ABAC)
� Resource-Level Permissions
� Row-Level Security (RLS)
������������������������������������������������
������������������������������������������������
Audit & Monitoring Layer
� Access Logging
� Permission Changes
� Anomaly Detection
� Real-Time Alerts
������������������������������������������������
Authentication​
User Authentication Methods​
Primary Methods:
| Method | Security Level | Use Case | MFA Required |
|---|---|---|---|
| Email + Password | Medium | Standard login | Yes |
| WebAuthn | High | Passwordless login | Built-in |
| SSO (SAML/OIDC) | High | Enterprise users | Delegated to IdP |
| Magic Link | Medium | Temporary access | Yes (on setup) |
| API Key | Medium-High | Programmatic access | N/A |
Multi-Factor Authentication (MFA)​
Required for all accounts, MFA adds an extra security layer:
Supported MFA Methods:
-
TOTP (Time-Based One-Time Password)
- Authenticator apps: Google Authenticator, Authy, 1Password, Bitwarden
- 6-digit codes rotated every 30 seconds
- Offline capability (no network required)
- Recommended for most users
-
WebAuthn (Hardware Security Keys)
- YubiKey, Titan Security Key, Thetis
- Phishing-resistant authentication
- USB, NFC, or Bluetooth
- Recommended for high-security users
-
SMS (Text Message)
- 6-digit code via SMS
- Available in 190+ countries
- Not recommended (SIM swapping risk)
MFA Setup:
- Log in to Torvus Security
- Go to Settings � Security � Two-Factor Authentication
- Choose MFA method and follow setup wizard
- Save backup codes in secure location
- Test MFA before closing setup
MFA Recovery:
- Backup Codes: 10 single-use recovery codes generated during setup
- Account Recovery: Email-based recovery (with identity verification)
- Support Recovery: Contact support with identity proof (ID verification required)
WebAuthn (Passwordless)​
What is WebAuthn?
- Web Authentication API standard
- Passwordless authentication via hardware/biometrics
- Resistant to phishing, credential stuffing, replay attacks
Supported Devices:
- Security Keys: YubiKey, Titan, Thetis, Feitian
- Platform Authenticators: Face ID, Touch ID, Windows Hello, Android Biometric
- Hybrid Authenticators: Phone as security key (via Bluetooth/QR)
Setup Process:
- Navigate to Settings � Security � WebAuthn
- Click Add Security Key
- Insert key or trigger biometric prompt
- Name your authenticator (e.g., "YubiKey 5C", "MacBook Touch ID")
- Complete registration
Best Practices:
- Register multiple authenticators (primary + backup)
- Use hardware security keys for maximum security
- Platform authenticators for convenience
- Keep one backup key in secure location (safe, safe deposit box)
Single Sign-On (SSO)​
Enterprise Feature: Centralized authentication via your identity provider.
Supported Protocols:
- SAML 2.0: Okta, Azure AD, OneLogin, Google Workspace
- OIDC (OpenID Connect): Auth0, Keycloak, AWS Cognito
Benefits:
- Centralized user management
- Automatic provisioning/deprovisioning
- Compliance with corporate policies
- Reduced password fatigue
- Enhanced audit capabilities
SSO Setup (Admin):
- Contact Torvus Sales for SSO enablement
- Provide IdP metadata (XML or metadata URL)
- Configure attribute mappings (email, name, role)
- Test with pilot user group
- Roll out to organization
Just-in-Time (JIT) Provisioning:
- Users auto-created on first SSO login
- Attributes synced from IdP (name, email, department)
- Role assignment based on IdP groups
- Deprovisioning on IdP account deletion
Authorization​
Role-Based Access Control (RBAC)​
Torvus uses hierarchical RBAC with predefined roles and permissions.
User Roles​
| Role | Description | Typical User | Permissions |
|---|---|---|---|
| Owner | Account owner | Individual user, company founder | Full control |
| Admin | Account administrator | IT admin, security officer | Manage users, vaults, billing |
| Manager | Vault manager | Team lead, department head | Manage assigned vaults |
| Member | Standard user | Employee, team member | Create vaults, access assigned vaults |
| Guest | Limited access | Contractor, temp staff | View-only access to specific vaults |
| Auditor | Audit access | Compliance officer, auditor | Read-only access to logs and audit trail |
Vault Roles​
Granular permissions within each vault:
| Vault Role | Can View | Can Upload | Can Download | Can Modify | Can Delete | Can Share | Can Configure |
|---|---|---|---|---|---|---|---|
| Vault Owner | |||||||
| Collaborator | L | L | |||||
| Contributor | L | L | L | L | L | ||
| Viewer | L | L | L | L | L | ||
| Recipient | =* | L | * | L | L | L | L |
*= Recipients gain access only upon vault release
Permission Inheritance:
- Account-level roles apply to all vaults
- Vault-level roles override account roles
- Explicit permissions take precedence
- Deny rules override allow rules
Attribute-Based Access Control (ABAC)​
Enterprise Feature: Fine-grained access control based on attributes.
Supported Attributes:
User Attributes:
- Department (Engineering, Finance, Legal)
- Location (US, EU, APAC)
- Clearance Level (Public, Internal, Confidential, Secret)
- Employment Type (Full-time, Contractor, Consultant)
Resource Attributes:
- Vault Classification (Personal, Business, Legal, Compliance)
- Data Sensitivity (Low, Medium, High, Critical)
- Compliance Tag (GDPR, HIPAA, SOX, PCI)
- Project Code (PROJECT-001, CASE-2024-123)
Environmental Attributes:
- Time of Day (Business Hours: 9am-5pm)
- IP Address (Corporate Network, VPN, Public)
- Device Type (Managed, BYOD)
- Geolocation (Office, Home, International)
Example Policy:
ALLOW access to vault
WHERE
user.department = "Legal" AND
user.clearance >= "Confidential" AND
vault.classification = "Legal" AND
request.time IN business_hours AND
request.ip IN corporate_network
Row-Level Security (RLS)​
Database-Enforced Access Control:
Torvus uses PostgreSQL Row-Level Security (RLS) policies to enforce authorization at the database level:
RLS Policies:
-- Users can only see their own vaults
CREATE POLICY user_vaults_policy ON vaults
FOR SELECT
USING (owner_id = current_user_id());
-- Users can only access documents in vaults they own or are shared with
CREATE POLICY user_documents_policy ON documents
FOR SELECT
USING (
vault_id IN (
SELECT id FROM vaults WHERE owner_id = current_user_id()
UNION
SELECT vault_id FROM vault_shares WHERE user_id = current_user_id()
)
);
-- Admins can see all vaults (for support)
CREATE POLICY admin_vaults_policy ON vaults
FOR SELECT
USING (
current_user_role() = 'admin' OR
owner_id = current_user_id()
);
Benefits:
- Defense in Depth: Authorization enforced at database level
- No Bypass: Even direct SQL queries respect RLS
- Performance: Database-optimized filtering
- Auditability: Policy changes tracked in database
API Access Control​
API Key Authentication​
API Key Types:
| Type | Use Case | Scope | Expiration |
|---|---|---|---|
| Personal API Key | Individual automation | User's vaults only | 1 year |
| Service Account Key | Application integration | Specific vaults/operations | 90 days (recommended) |
| Admin API Key | Administrative tasks | Account-wide | 30 days (required rotation) |
| Webhook Secret | Webhook signature verification | Webhook-specific | No expiration |
API Key Permissions:
{
"key_id": "key_abc123",
"name": "CI/CD Integration",
"scopes": [
"vaults:read",
"vaults:create",
"documents:upload",
"documents:read"
],
"vault_restrictions": ["vault_xyz789"],
"ip_whitelist": ["192.168.1.0/24"],
"rate_limit": 1000
}
Best Practices:
- Minimum Scope: Grant only necessary permissions
- Vault Restrictions: Limit to specific vaults
- IP Whitelisting: Restrict to known IPs (if possible)
- Regular Rotation: Rotate keys every 90 days
- Monitoring: Review API key usage logs weekly
OAuth 2.0 (Third-Party Apps)​
Authorization Code Flow with PKCE:
������������� �������������
User Torvus
OAuth
������������� �������������
1. Initiate Login
������������������������������������������������>
2. Redirect to Torvus Login
<������������������������������������������������$
3. User Authenticates & Approves
������������������������������������������������>
4. Authorization Code (with PKCE)
<������������������������������������������������$
������������� �������������
Third-Party 5. Exchange Code for Token Torvus
App ���������������������������������> OAuth
6. Access Token + Refresh Token
<���������������������������������$
������������� �������������
OAuth Scopes:
vaults:read: Read vault metadatavaults:write: Create and modify vaultsdocuments:read: Download documentsdocuments:write: Upload documentsrecipients:manage: Add/remove recipientspolicies:manage: Configure policiesprofile:read: Read user profile
Token Lifetimes:
- Access Token: 1 hour (short-lived)
- Refresh Token: 30 days (long-lived)
- Authorization Code: 10 minutes (single-use)