Security in Elbia
Implement robust data security strategies with Elbia's built-in security frameworks and encryption capabilities.
1. Security Principles
Elbia implements security by design using these core principles:
- Zero-trust architecture
- Role-based access control
- End-to-end encryption
- Immutable audit logs
2. Data Protection
Elbia provides automatic data encryption with configurable policies:
Field Level
Encrypt sensitive fields automatically
Encrypt sensitive fields automatically
Table Level
Apply encryption at the table level
Apply encryption at the table level
Database Level
Full database encryption
Full database encryption
3. Secure Schema Example
entity User @encrypted {
id Int @id
name String @accessLevel(READ: admins)
email String @unique @encrypted(AES)
role UserRole @enum("admin", "user")
created DateTime @immutable
}
@policy
entity AccessLog {
id Int @id
user User
action String
timestamp DateTime @immutable
location String
}
This configuration:
- Encrypts sensitive fields at rest
- Adds access logging with immutable timestamps
- Enforces role-based permissions
Security Tips
- Enable audit logging for all production databases
- Rotate encryption keys quarterly
Security Anti-Patterns
- Avoid storing plaintext passwords
- Don't disable access logs for any reason