Skip to content

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 roles
SHOW ROLES;
-- Create a role
CREATE ROLE analyst LOGIN PASSWORD 'secure123';
GRANT SELECT ON orders TO analyst;
-- Row-Level Security policies
SHOW RLS POLICIES;
SHOW RLS POLICIES ON orders;

Compliance Frameworks

-- View compliance status
SHOW COMPLIANCE STATUS;
-- Returns: GDPR, HIPAA, SOC2, PCI-DSS, ISO27001, FedRAMP
-- Create a compliance policy
CREATE COMPLIANCE POLICY gdpr ON customer_data;
-- Data sovereignty
ALTER TABLE customer_data SET REGION eu-west-1;
SHOW DATA SOVEREIGNTY;

Encryption

-- Encryption status
SHOW CERTIFICATES;
-- Initiate key rotation
ROTATE ENCRYPTION KEY;

Multi-Tenancy

-- Create tenants
CREATE TENANT acme PLAN enterprise;
CREATE TENANT startup PLAN basic;
-- View tenants
SHOW TENANTS;
-- Configure tenant quotas
ALTER TENANT acme SET max_storage = 100GB;
ALTER TENANT startup SET max_connections = 10;
-- Remove tenant
DROP TENANT startup;

Audit Logging

-- View recent audit events
SHOW AUDIT LOG LIMIT 20;
-- Threat detection status
SHOW THREAT DETECTION;

Redis AUTH

Terminal window
# Redis connections require authentication when catalogs are configured
redis-cli AUTH admin password123
redis-cli PING # → PONG (after auth)