Tutorial: Security, Compliance & Multi-Tenancy
Tutorial: Security, Compliance & Multi-Tenancy
Level: Advanced | Time: 15 minutes | Version: 7.2.0
HeliosDB provides enterprise-grade security with RBAC, RLS, compliance frameworks, and multi-tenancy.
Roles & Access Control
-- View current rolesSHOW ROLES;
-- Create a roleCREATE ROLE analyst LOGIN PASSWORD 'secure123';GRANT SELECT ON orders TO analyst;
-- Row-Level Security policiesSHOW RLS POLICIES;SHOW RLS POLICIES ON orders;Compliance Frameworks
-- View compliance statusSHOW COMPLIANCE STATUS;-- Returns: GDPR, HIPAA, SOC2, PCI-DSS, ISO27001, FedRAMP
-- Create a compliance policyCREATE COMPLIANCE POLICY gdpr ON customer_data;
-- Data sovereigntyALTER TABLE customer_data SET REGION eu-west-1;SHOW DATA SOVEREIGNTY;Encryption
-- Encryption statusSHOW CERTIFICATES;
-- Initiate key rotationROTATE ENCRYPTION KEY;Multi-Tenancy
-- Create tenantsCREATE TENANT acme PLAN enterprise;CREATE TENANT startup PLAN basic;
-- View tenantsSHOW TENANTS;
-- Configure tenant quotasALTER TENANT acme SET max_storage = 100GB;ALTER TENANT startup SET max_connections = 10;
-- Remove tenantDROP TENANT startup;Audit Logging
-- View recent audit eventsSHOW AUDIT LOG LIMIT 20;
-- Threat detection statusSHOW THREAT DETECTION;Redis AUTH
# Redis connections require authentication when catalogs are configuredredis-cli AUTH admin password123redis-cli PING # → PONG (after auth)