Compliance Requirements Checklist 🟑 BETA

Overview

This document provides a comprehensive checklist for security and compliance requirements across multiple frameworks (GDPR, SOC 2, ISO 27001, HIPAA, LGPD) using the actual components deployed in General Bots.

Component Stack

ComponentPurposeLicense
CaddyReverse proxy, TLS termination, web serverApache 2.0
PostgreSQLRelational databasePostgreSQL License
General Bots DirectoryIdentity and access management (Zitadel/Keycloak)Apache 2.0
DriveS3-compatible object storageAGPLv3
StalwartMail server (SMTP/IMAP)AGPLv3
QdrantVector databaseApache 2.0
Cache (Valkey)In-memory cache (Redis-compatible)BSD 3-Clause
LiveKitVideo conferencingApache 2.0
UbuntuOperating systemVarious

Compliance Requirements Matrix

Legend

  • βœ… = Implemented and configured
  • ⚠️ = Partially implemented, needs configuration
  • ⬜ = Not yet implemented
  • πŸ”„ = Automated process
  • πŸ“ = Manual process required

Network & Web Server (Caddy)

StatusRequirementComponentStandardImplementation
βœ…TLS 1.3 ConfigurationCaddyAllAutomatic TLS 1.3 with modern ciphers
βœ…Access LoggingCaddyAllJSON format logs to /var/log/caddy/access.log
βœ…Rate LimitingCaddyISO 27001Per-IP rate limiting in Caddyfile
⚠️WAF RulesCaddyHIPAAConsider Caddy security plugins or external WAF
βœ…Security HeadersCaddyAllHSTS, CSP, X-Frame-Options, X-Content-Type-Options
βœ…Reverse Proxy SecurityCaddyAllSecure forwarding with real IP preservation
βœ…Certificate ManagementCaddyAllAutomatic Let’s Encrypt with auto-renewal
πŸ”„HTTPS RedirectCaddyAllAutomatic HTTP to HTTPS redirect

Configuration File: /etc/caddy/Caddyfile

app.example.com {
    tls {
        protocols tls1.3
        ciphers TLS_AES_256_GCM_SHA384
    }
    header {
        Strict-Transport-Security "max-age=31536000"
        X-Frame-Options "SAMEORIGIN"
        X-Content-Type-Options "nosniff"
        Content-Security-Policy "default-src 'self'"
    }
    rate_limit {
        zone static {
            key {remote_host}
            events 100
            window 1m
        }
    }
    reverse_proxy localhost:3000
}

Identity & Access Management (General Bots Directory)

StatusRequirementComponentStandardImplementation
βœ…MFA ImplementationDirectoryAllTOTP/SMS/Hardware token support
βœ…RBAC ConfigurationDirectoryAllRole-based access control with custom roles
βœ…Password PolicyDirectoryAllMin 12 chars, complexity requirements, history
βœ…OAuth2/OIDC SetupDirectoryISO 27001OAuth 2.0 and OpenID Connect flows
βœ…Audit LoggingDirectoryAllComprehensive user activity logs
βœ…Session ManagementDirectoryAllConfigurable timeouts and invalidation
βœ…SSO SupportDirectoryEnterpriseSAML and OIDC SSO integration
⚠️Password RotationDirectoryHIPAAConfigure 90-day rotation policy
πŸ“Access ReviewsDirectoryAllQuarterly manual review of user permissions

Configuration: Directory Admin Console (http://localhost:9000)

Key Settings:

  • Password min length: 12 characters
  • MFA: Required for admins
  • Session timeout: 8 hours
  • Idle timeout: 30 minutes

Database (PostgreSQL)

StatusRequirementComponentStandardImplementation
βœ…Encryption at RestPostgreSQLAllFile-system level encryption (LUKS)
βœ…Encryption in TransitPostgreSQLAllTLS/SSL connections enforced
βœ…Access ControlPostgreSQLAllRole-based database permissions
βœ…Audit LoggingPostgreSQLAllpgAudit extension for detailed logging
βœ…Connection PoolingPostgreSQLAllBuilt-in connection management
⚠️Row-Level SecurityPostgreSQLHIPAAConfigure RLS policies for sensitive tables
⚠️Column EncryptionPostgreSQLGDPREncrypt PII columns with pgcrypto
πŸ”„Automated BackupsPostgreSQLAllDaily backups via pg_dump/pg_basebackup
βœ…Point-in-Time RecoveryPostgreSQLHIPAAWAL archiving enabled

Configuration: Installed and configured automatically via installer.rs

-- Enable SSL
ssl = on
ssl_cert_file = '/path/to/server.crt'
ssl_key_file = '/path/to/server.key'
ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL'

-- Enable audit logging
shared_preload_libraries = 'pgaudit'
pgaudit.log = 'write, ddl'
pgaudit.log_catalog = off

-- Connection settings
max_connections = 100
password_encryption = scram-sha-256

-- Logging
log_connections = on
log_disconnections = on
log_duration = on
log_statement = 'all'

Object Storage (Drive)

StatusRequirementComponentStandardImplementation
βœ…Encryption at RestDriveAllServer-side encryption (SSE-S3)
βœ…Encryption in TransitDriveAllTLS for all connections
βœ…Bucket PoliciesDriveAllFine-grained access control policies
βœ…Object VersioningDriveHIPAAVersion control for data recovery
βœ…Access LoggingDriveAllDetailed audit logs for all operations
⚠️Lifecycle RulesDriveLGPDConfigure data retention and auto-deletion
βœ…Immutable ObjectsDriveComplianceWORM (Write-Once-Read-Many) support
πŸ”„ReplicationDriveHIPAAMulti-site replication for DR
βœ…IAM IntegrationDriveAllIntegration with Directory Service via OIDC

Configuration: /conf/drive/config.env

Bucket Policy Example:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {"AWS": ["arn:aws:iam::*:user/app-user"]},
      "Action": ["s3:GetObject"],
      "Resource": ["arn:aws:s3:::bucket-name/*"]
    }
  ]
}

Email Server (Stalwart)

StatusRequirementComponentStandardImplementation
βœ…DKIM SigningStalwartAllDomain key authentication
βœ…SPF RecordsStalwartAllSender policy framework
βœ…DMARC PolicyStalwartAllDomain-based message authentication
βœ…Mail EncryptionStalwartAllTLS for SMTP/IMAP (STARTTLS + implicit)
βœ…Content FilteringStalwartAllSpam and malware filtering
⚠️Mail ArchivingStalwartHIPAAConfigure long-term email archiving
βœ…Sieve FilteringStalwartAllServer-side mail filtering
βœ…AuthenticationStalwartAllOIDC integration with Directory Service
πŸ“Retention PolicyStalwartGDPR/LGPDDefine and implement email retention

Configuration: /conf/mail/config.toml

[server.listener."smtp"]
bind = ["0.0.0.0:25"]
protocol = "smtp"

[server.listener."smtp-submission"]
bind = ["0.0.0.0:587"]
protocol = "smtp"
tls.implicit = false

[server.listener."smtp-submissions"]
bind = ["0.0.0.0:465"]
protocol = "smtp"
tls.implicit = true

[authentication]
mechanisms = ["plain", "login"]
directory = "oidc"

[directory."oidc"]
type = "oidc"
issuer = "http://localhost:9000"

DNS Records:

; SPF Record
example.com. IN TXT "v=spf1 ip4:203.0.113.0/24 -all"

; DKIM Record
default._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCS..."

; DMARC Record
_dmarc.example.com. IN TXT "v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com"

Cache (Valkey)

StatusRequirementComponentStandardImplementation
βœ…AuthenticationValkeyAllPassword-protected access
βœ…TLS SupportValkeyAllEncrypted connections
βœ…Access ControlValkeyAllACL-based permissions
⚠️PersistenceValkeyData RecoveryRDB/AOF for data persistence
βœ…Memory LimitsValkeyAllMaxmemory policies configured
πŸ“Data ExpirationValkeyGDPRSet TTL for cached personal data

Configuration: /etc/valkey/valkey.conf

# Authentication
requirepass <your-secure-password>

# TLS
tls-port 6380
tls-cert-file /path/to/cert.pem
tls-key-file /path/to/key.pem
tls-protocols "TLSv1.3"

# ACL
aclfile /etc/valkey/users.acl

# Memory management
maxmemory 2gb
maxmemory-policy allkeys-lru

# Persistence
save 900 1
save 300 10

Vector Database (Qdrant)

StatusRequirementComponentStandardImplementation
βœ…API AuthenticationQdrantAllAPI key authentication
βœ…TLS SupportQdrantAllHTTPS enabled
βœ…Access ControlQdrantAllCollection-level permissions
⚠️Data EncryptionQdrantHIPAAFile-system level encryption
πŸ”„Backup SupportQdrantAllSnapshot-based backups
πŸ“Data RetentionQdrantGDPRImplement collection cleanup policies

Configuration: /etc/qdrant/config.yaml

service:
  host: 0.0.0.0
  http_port: 6333
  grpc_port: 6334

security:
  api_key: "your-secure-api-key"
  read_only_api_key: "read-only-key"

storage:
  storage_path: /var/lib/qdrant/storage
  snapshots_path: /var/lib/qdrant/snapshots

telemetry:
  enabled: false

Operating System (Ubuntu)

StatusRequirementComponentStandardImplementation
⚠️System HardeningUbuntuAllApply CIS Ubuntu Linux benchmarks
βœ…Automatic UpdatesUbuntuAllUnattended-upgrades for security patches
⚠️Audit DaemonUbuntuAllConfigure auditd for system events
βœ…Firewall RulesUbuntuAllUFW configured with restrictive rules
⚠️Disk EncryptionUbuntuAllLUKS full-disk encryption
⚠️AppArmorUbuntuAllEnable mandatory access control
πŸ“User ManagementUbuntuAllDisable root login, use sudo
πŸ“SSH HardeningUbuntuAllKey-based auth only, disable password auth

Firewall Configuration:

# UFW firewall rules
ufw default deny incoming
ufw default allow outgoing
ufw allow 22/tcp    # SSH
ufw allow 80/tcp    # HTTP
ufw allow 443/tcp   # HTTPS
ufw allow 25/tcp    # SMTP
ufw allow 587/tcp   # SMTP submission
ufw allow 993/tcp   # IMAPS
ufw enable

Automatic Updates:

# /etc/apt/apt.conf.d/50unattended-upgrades
Unattended-Upgrade::Allowed-Origins {
    "${distro_id}:${distro_codename}-security";
};
Unattended-Upgrade::Automatic-Reboot "true";
Unattended-Upgrade::Automatic-Reboot-Time "03:00";

Audit Rules: /etc/audit/rules.d/audit.rules

# Monitor authentication
-w /var/log/auth.log -p wa -k auth_log
-w /etc/passwd -p wa -k user_modification
-w /etc/group -p wa -k group_modification

# Monitor network
-a always,exit -F arch=b64 -S connect -k network_connect

# Monitor file access
-w /etc/shadow -p wa -k shadow_modification

Cross-Component Requirements

Monitoring & Logging

StatusRequirementImplementationStandard
βœ…Centralized LoggingAll logs to /var/log/ with rotationAll
⚠️Log AggregationELK Stack or similar SIEMISO 27001
βœ…Health MonitoringPrometheus + GrafanaAll
πŸ“Alert ConfigurationSet up alerts for security eventsAll
βœ…Metrics CollectionComponent-level metricsAll

Backup & Recovery

StatusRequirementImplementationStandard
πŸ”„Automated BackupsDaily automated backupsAll
βœ…Backup EncryptionAES-256 encrypted backupsAll
βœ…Off-site StorageDrive replication to secondary siteHIPAA
πŸ“Backup TestingQuarterly restore testsAll
βœ…Retention Policy90 days for full, 30 for incrementalAll

Backup Script: /usr/local/bin/backup-system.sh

#!/bin/bash
BACKUP_DATE=$(date +%Y%m%d_%H%M%S)

# PostgreSQL backup
pg_dump -h localhost -U postgres generalbots | \
  gzip | \
  openssl enc -aes-256-cbc -salt -out /backup/pg_${BACKUP_DATE}.sql.gz.enc

# Drive backup
mc mirror drive/generalbots /backup/drive_${BACKUP_DATE}/

# Qdrant snapshot
curl -X POST "http://localhost:6333/collections/botserver/snapshots"

Network Security

StatusRequirementImplementationStandard
βœ…Network SegmentationComponent isolation via firewallAll
βœ…Internal TLSTLS between all componentsISO 27001
⚠️VPN AccessWireGuard VPN for admin accessAll
βœ…Rate LimitingCaddy rate limitingAll
πŸ“DDoS ProtectionCloudFlare or similarProduction

Compliance-Specific Requirements

GDPR

StatusRequirementImplementation
βœ…Data EncryptionAES-256 at rest, TLS 1.3 in transit
βœ…Right to AccessAPI endpoints for data export
βœ…Right to DeletionData deletion workflows implemented
βœ…Right to PortabilityJSON export functionality
βœ…Consent ManagementZitadel consent flows
πŸ“Data Processing RecordsDocument all data processing activities
βœ…Breach NotificationIncident response plan includes 72h notification

SOC 2

StatusRequirementImplementation
βœ…Access ControlsRBAC via Zitadel
βœ…Audit LoggingComprehensive logging across all components
βœ…Change ManagementVersion control and deployment procedures
βœ…MonitoringReal-time monitoring with Prometheus
πŸ“Risk AssessmentAnnual risk assessment required
βœ…EncryptionData encrypted at rest and in transit

ISO 27001

StatusRequirementImplementation
βœ…Asset InventoryDocumented component list
βœ…Access ControlZitadel RBAC
βœ…CryptographyModern encryption standards
πŸ“Physical SecurityData center security documentation
βœ…Operations SecurityAutomated patching and monitoring
πŸ“Incident ManagementDocumented incident response procedures
πŸ“Business ContinuityDR plan and testing

HIPAA

StatusRequirementImplementation
βœ…EncryptionPHI encrypted at rest and in transit
βœ…Access ControlsRole-based access with MFA
βœ…Audit ControlsComprehensive audit logging
⚠️Integrity ControlsChecksums and versioning
βœ…Transmission SecurityTLS 1.3 for all communications
πŸ“Business Associate AgreementsRequired for third-party vendors
⚠️Email ArchivingStalwart archiving configuration needed

LGPD (Brazilian GDPR)

StatusRequirementImplementation
βœ…Data EncryptionSame as GDPR
βœ…User RightsSame as GDPR
βœ…ConsentZitadel consent management
πŸ“Data Protection OfficerDesignate DPO
⚠️Data RetentionConfigure lifecycle policies in Drive
βœ…Breach NotificationSame incident response as GDPR

Implementation Priority

High Priority (Critical for Production)

  1. βœ… TLS 1.3 everywhere (Caddy, PostgreSQL, Drive, Stalwart)
  2. βœ… MFA for all admin accounts (Zitadel)
  3. βœ… Firewall configuration (UFW)
  4. βœ… Automated security updates (unattended-upgrades)
  5. πŸ”„ Automated encrypted backups

Medium Priority (Required for Compliance)

  1. ⚠️ Disk encryption (LUKS)
  2. ⚠️ Audit daemon (auditd)
  3. ⚠️ WAF rules (Caddy plugins or external)
  4. πŸ“ Access reviews (quarterly)
  5. ⚠️ Email archiving (Stalwart)

Lower Priority (Enhanced Security)

  1. ⚠️ VPN access (WireGuard)
  2. ⚠️ Log aggregation (ELK Stack)
  3. ⚠️ AppArmor/SELinux
  4. πŸ“ CIS hardening
  5. πŸ“ Penetration testing

Verification Checklist

Weekly Tasks

  • Review security logs (Caddy, PostgreSQL, Zitadel)
  • Check backup completion status
  • Review failed authentication attempts
  • Update security patches

Monthly Tasks

  • Access review for privileged accounts
  • Review audit logs for anomalies
  • Test backup restoration
  • Update vulnerability database

Quarterly Tasks

  • Full access review for all users
  • Compliance check (run automated checks)
  • Security configuration audit
  • Disaster recovery drill

Annual Tasks

  • Penetration testing
  • Full compliance audit
  • Risk assessment update
  • Security policy review
  • Business continuity test

Quick Start Implementation

# 1. Enable firewall
sudo ufw enable
sudo ufw allow 22,80,443,25,587,993/tcp

# 2. Configure automatic updates
sudo apt install unattended-upgrades
sudo dpkg-reconfigure --priority=low unattended-upgrades

# 3. Enable PostgreSQL SSL
sudo -u postgres psql -c "ALTER SYSTEM SET ssl = 'on';"
sudo systemctl restart postgresql

# 4. Set Drive encryption
mc admin config set drive/ server-side-encryption-s3 on

# 5. Configure Zitadel MFA
# Via web console: Settings > Security > MFA > Require for admins

# 6. Enable Caddy security headers
# Add to Caddyfile (see Network & Web Server section)

# 7. Set up daily backups
sudo crontab -e
# Add: 0 2 * * * /usr/local/bin/backup-system.sh

Support & Resources

  • Internal Security Team: security@generalbots.org
  • Compliance Officer: compliance@generalbots.org
  • Documentation: https://docs.generalbots.org
  • Component Documentation: See β€œComponent Security Documentation” in security-features.md

Document Control

  • Version: 1.0
  • Last Updated: 2024-01-15
  • Next Review: 2024-07-15
  • Owner: Security Team
  • Approved By: CTO