Security Overview
Olytix Core provides enterprise-grade security features to protect your data, control access, and maintain compliance. The security layer is designed to be transparent to end users while providing comprehensive protection at every level.
Security Architecture
┌─────────────────────────────────────────────────────────────────┐
│ Olytix Core Security Layer │
├─────────────────────────────────────────────────────────────────┤
│ ┌─────────────────────────────────────────────────────────────┐│
│ │ Authentication ││
│ │ (API Keys, JWT Tokens, OAuth 2.0) ││
│ └─────────────────────────────────────────────────────────────┘│
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────────┐│
│ │ Authorization ││
│ │ (Role-Based Access, Row-Level Security, Masking) ││
│ └─────────────────────────────────────────────────────────────┘│
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────────┐│
│ │ Audit Logging ││
│ │ (Access Logs, Policy Evaluation, Compliance) ││
│ └─────────────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────────────┘
Core Security Features
Authentication
Olytix Core supports multiple authentication methods to secure API access:
| Method | Use Case | Security Level |
|---|---|---|
| API Keys | Server-to-server, scripts, automation | Medium |
| JWT Tokens | User applications, SSO integration | High |
| OAuth 2.0 | Third-party integrations, enterprise SSO | High |
Learn more about API Keys | JWT Authentication
Authorization
Control who can access what data with fine-grained authorization:
| Feature | Description |
|---|---|
| Row-Level Security (RLS) | Filter rows based on user attributes |
| Column Masking | Mask sensitive data for unauthorized users |
| Role-Based Access | Assign permissions based on user roles |
Configure RLS | Column Masking
Audit Logging
Track all security-related events for compliance and forensics:
- Data access events
- Policy evaluations
- Access denials
- Policy changes
- Authentication events
Security Context
Every request in Olytix Core operates within a security context that contains:
SecurityContext:
user:
user_id: "user123"
email: "analyst@company.com"
roles: ["analyst", "finance_team"]
groups: ["north_america"]
attributes:
department: "Finance"
region: "NA"
policies: [AccessPolicy, ...]
masking_policies: [MaskingPolicy, ...]
request_id: "req-abc123"
client_ip: "10.0.1.50"
The security context is automatically built from authentication credentials and used to evaluate all security policies.
Configuration
Environment Variables
# Authentication
OLYTIX_SECURITY__JWT_SECRET=your-secret-key
OLYTIX_SECURITY__API_KEY_PREFIX=olytix-core_key_
OLYTIX_SECURITY__REQUIRE_AUTH=true
# Policy evaluation
OLYTIX_SECURITY__CACHE_POLICIES=true
OLYTIX_SECURITY__POLICY_CACHE_TTL=300
# Audit logging
OLYTIX_SECURITY__AUDIT_ENABLED=true
OLYTIX_SECURITY__AUDIT_LOG_PATH=/var/log/olytix-core/audit.log
Project Configuration
# olytix-core_project.yml
security:
require_auth: true
jwt:
secret: ${JWT_SECRET}
algorithm: HS256
expiry: 3600
audit:
enabled: true
handlers:
- type: file
path: /var/log/olytix-core/audit.log
- type: database
connection: ${AUDIT_DB_URL}
Best Practices
Authentication
- Use JWT for user-facing applications - Provides better security with short-lived tokens
- Use API keys for service accounts - Easier to manage and rotate
- Rotate credentials regularly - Set expiration policies
- Use minimal scopes - Grant only necessary permissions
Authorization
- Define RLS policies at the cube level - Ensures consistent filtering
- Use role-based policies - Easier to manage than user-specific rules
- Test policies in staging - Verify expected behavior before production
- Document all policies - Maintain clear records for compliance
Audit Logging
- Enable audit logging in production - Required for compliance
- Set appropriate retention - Balance storage costs with compliance needs
- Monitor for anomalies - Set up alerts for unusual access patterns
- Secure audit logs - Protect logs from tampering
Compliance Support
Olytix Core's security features help meet requirements for:
| Standard | Relevant Features |
|---|---|
| SOC 2 | Audit logging, access controls, encryption |
| GDPR | Data masking, access controls, audit trails |
| HIPAA | RLS, column masking, comprehensive auditing |
| PCI DSS | Data masking, access controls, audit logs |