Policy Tiers and Tier Selection Guide

This guide helps you choose the right KafkaGuard policy tier for your environment and understand the differences between available policy options.

Table of Contents


Policy Tier Overview

KafkaGuard provides three policy tiers designed for different environments and compliance requirements:

TierControlsFocusBest ForFile Location
baseline-dev20Reliability + OperationsDevelopment, testingpolicies/baseline-dev.yaml
enterprise-default40Security + Reliability + OperationsProduction, enterprisepolicies/enterprise-default.yaml
finance-iso50Advanced ComplianceRegulated industries (Phase 2)policies/finance-iso.yaml

Key Differentiators:

  • Control Count: More controls = stricter compliance
  • Security Focus: Baseline has no security controls, others add security requirements
  • Compliance Mapping: Enterprise and Finance tiers include PCI-DSS, SOC2, ISO 27001 mappings
  • Remediation Depth: Higher tiers provide more detailed remediation guidance

Tier Decision Framework

Choose your policy tier based on these key factors:

Primary Decision Factors

  1. Environment Type (Development vs. Production)
  2. Data Sensitivity (Internal vs. Customer data)
  3. Compliance Requirements (None vs. PCI-DSS/SOC2/ISO 27001)
  4. Security Posture (Basic vs. Enterprise-grade)

Decision Flow Chart

┌─────────────────────────┐
│   Is this production?   │
└─────────┬───────────────┘
          │
          ▼
┌─────────────────────────┐    NO     ┌─────────────────────┐
│ Handle customer data?   ├──────────►│   baseline-dev      │
│ or PII?                 │           │   (20 controls)     │
└─────────┬───────────────┘           └─────────────────────┘
          │
          ▼
┌─────────────────────────┐    NO     ┌─────────────────────┐
│ Regulated industry?     ├──────────►│ enterprise-default  │
│ (Finance, Healthcare,   │           │   (40 controls)     │
│ Government)             │           └─────────────────────┘
└─────────┬───────────────┘
          │
          ▼
┌─────────────────────────┐    YES    ┌─────────────────────┐
│ Phase 2 available?      ├──────────►│   finance-iso       │
│ (Current: Phase 1)      │           │   (50 controls)     │
└─────────┬───────────────┘           └─────────────────────┘
          │
          ▼
          NO
    ┌─────────────────────┐
    │ enterprise-default  │
    │   (40 controls)     │
    └─────────────────────┘

Tier Comparison Matrix

Use this matrix to compare policy tiers across key dimensions:

Criteriabaseline-deventerprise-defaultfinance-iso (Phase 2)
EnvironmentDev, Sandbox, TestProduction, StagingProduction (Regulated)
Security ProtocolPLAINTEXT, SSLSASL_SSL (required)SASL_SSL + mTLS
AuthenticationOptionalSASL requiredSASL + mTLS required
Compliance NeedsNonePCI-DSS, SOC2, ISO 27001PCI-DSS Level 1, HIPAA, ISO 27001 certified
Data SensitivityLow (internal only)Medium-High (customer data)High (PII, PHI, financial data)
Audit RequirementsNoneStandard auditsRegulatory audits + certifications
Control Count204050
Security Controls01525
Reliability Controls81212
Operational Controls121313
Scan Duration~8 seconds~10 seconds~12 seconds
File Locationpolicies/baseline-dev.yamlpolicies/enterprise-default.yamlpolicies/finance-iso.yaml

Control Distribution Breakdown

Control Categorybaseline-deventerprise-defaultfinance-iso (Phase 2)Description
Security01525SASL, SSL/TLS, ACLs, encryption
Reliability81212Replication, ISR, ZooKeeper quorum
Operational121313Configuration, retention, threading
Compliance000Framework-specific requirements
Total204050All categories combined

Policy Tier Details

baseline-dev (20 Controls)

Focus: Reliability and operational checks for development environments Best For: Development clusters, sandboxes, testing environments Security Level: None (no security controls)

Control Categories

  • Reliability Controls (8): Replication factors, ISR validation, ZooKeeper quorum, broker versions, partition balance, under-replicated partitions, offline partitions
  • Operational Controls (12): Auto-create topics, log directories, retention policies, thread configurations, compression settings, quotas

Example Controls

Control IDTitleSeverityCategory
KG-016Minimum replication factor ≥3MEDIUMreliability
KG-017In-Sync Replicas (ISR) ≥2MEDIUMreliability
KG-019ZooKeeper quorum odd (3+)MEDIUMreliability
KG-028Auto-create topics disabledMEDIUMoperational
KG-031Compression type configuredMEDIUMoperational

Sample Scan Commands

Development Cluster:

# Basic scan with PLAINTEXT
kafkaguard scan \
  --bootstrap localhost:9092 \
  --policy policies/baseline-dev.yaml \
  --format html,json \
  --out ./reports

Development with SSL:

# Development cluster with SSL encryption
kafkaguard scan \
  --bootstrap kafka-dev.example.com:9093 \
  --security-protocol SSL \
  --tls-ca-cert /path/to/ca-cert.pem \
  --policy policies/baseline-dev.yaml \
  --format html \
  --out ./reports

Expected Results:

  • ✅ 16-18 passed controls (typical for well-configured dev cluster)
  • ⚠️ 2-4 failed controls (configuration issues)
  • 🔵 0-1 N/A controls
  • 📊 Score: 80-90% (varies by cluster configuration)

enterprise-default (40 Controls)

Focus: Security, reliability, and operational validation for production environments Best For: Production clusters, enterprise environments, standard compliance Security Level: High (SASL_SSL required)

Control Categories

  • Security Controls (15): SASL authentication, SSL/TLS encryption, certificate validation, inter-broker encryption, ACLs
  • Reliability Controls (12): All baseline-dev reliability controls plus additional checks
  • Operational Controls (13): All baseline-dev operational controls plus additional validation

Additional Security Controls

Control IDTitleSeverityCategoryDescription
KG-001SASL authentication enabledHIGHsecurityRequires SASL for client connections
KG-002SSL/TLS enabledHIGHsecurityRequires TLS encryption
KG-003Inter-broker SSL enabledHIGHsecurityEncrypts broker-to-broker communication
KG-004SSL client authenticationHIGHsecurityRequires client certificates
KG-005TLS certificate expiry >30 daysHIGHsecurityValidates certificate expiration
KG-006TLS protocol ≥1.2HIGHsecurityEnforces modern TLS versions
KG-007SCRAM authentication enabledHIGHsecurityRequires SCRAM (not PLAIN)
KG-008ACLs enabledMEDIUMsecurityRequires ACL authorization
KG-009ACLs configuredMEDIUMsecurityValidates ACL rules exist
KG-010SASL/SCRAM SHA-512 preferredMEDIUMsecurityRecommends strongest SCRAM mechanism

Sample Scan Commands

Production SASL_SSL Scan:

# Production scan with SASL_SSL and SCRAM-SHA-512
export KAFKAGUARD_SASL_USERNAME="kafkaguard"
export KAFKAGUARD_SASL_PASSWORD="$(vault kv get -field=password secret/kafka/prod)"

kafkaguard scan \
  --bootstrap kafka1.prod:9095,kafka2.prod:9095,kafka3.prod:9095 \
  --security-protocol SASL_SSL \
  --sasl-mechanism SCRAM-SHA-512 \
  --tls-ca-cert /etc/kafkaguard/certs/ca.pem \
  --policy policies/enterprise-default.yaml \
  --format json,html,pdf \
  --out /var/reports/kafkaguard \
  --fail-on high \
  --timeout 600

Staging Environment Scan:

# Staging scan with environment variables
export KAFKAGUARD_SASL_USERNAME="kafkaguard-staging"
export KAFKAGUARD_SASL_PASSWORD="$(vault kv get -field=password secret/kafka/staging)"

kafkaguard scan \
  --bootstrap kafka-staging:9095 \
  --security-protocol SASL_SSL \
  --sasl-mechanism SCRAM-SHA-256 \
  --tls-ca-cert /etc/kafkaguard/certs/ca.pem \
  --policy policies/enterprise-default.yaml \
  --format json,html \
  --out ./reports/staging

Expected Results:

  • ✅ 32-38 passed controls (typical for compliant production cluster)
  • ❌ 2-8 failed controls (security/compliance gaps)
  • 🔵 0 N/A controls
  • 📊 Score: 80-95% (varies by security posture)

finance-iso (50 Controls - Phase 2)

Focus: Advanced compliance controls for regulated industries Best For: Financial services, healthcare, government, highly regulated environments Security Level: Highest (SASL_SSL + mTLS required)

Additional Controls (10 more beyond enterprise-default)

  • Enhanced Security (5 controls): Mutual TLS requirements, strong cipher suites, privileged user auditing, encryption at rest validation
  • Advanced Compliance (5 controls): 90+ day audit log retention, admin access restrictions, ISO 27001 specific mappings

Planned Additional Controls

Control IDTitleSeverityCategoryStatus
KG-041Audit logging retention >90 daysHIGHcompliancePhase 2
KG-042Mutual TLS required for all clientsHIGHsecurityPhase 2
KG-043Encryption at rest enabledHIGHsecurityPhase 2
KG-044Strong cipher suites onlyHIGHsecurityPhase 2
KG-045Admin access restrictionsHIGHsecurityPhase 2
KG-046Privileged user auditingMEDIUMsecurityPhase 2
KG-047PCI-DSS Level 1 complianceHIGHcompliancePhase 2
KG-048HIPAA data protectionHIGHcompliancePhase 2
KG-049ISO 27001 certification readyHIGHcompliancePhase 2
KG-050Regulatory audit trailMEDIUMcompliancePhase 2

Status: Planned for Phase 2 (post-MVP). Currently, use enterprise-default.yaml for regulated environments.


Tier Selection Checklist

Use this checklist to select the appropriate policy tier:

Environment Assessment

  • Development/Sandbox? → Use baseline-dev
  • Production with customer data? → Use enterprise-default
  • Regulated industry (finance/healthcare/gov)? → Use enterprise-default (Phase 1) or finance-iso (Phase 2)
  • Internal testing only? → Use baseline-dev
  • CI/CD integration? → Use enterprise-default for production-like scanning

Security Requirements

  • SASL authentication required? → Use enterprise-default or higher
  • SSL/TLS encryption required? → Use enterprise-default or higher
  • Mutual TLS required? → Use finance-iso (Phase 2)
  • Certificate validation needed? → Use enterprise-default or higher

Compliance Requirements

  • PCI-DSS compliance needed? → Use enterprise-default or higher
  • SOC2 Trust Service Criteria? → Use enterprise-default or higher
  • ISO 27001 alignment? → Use enterprise-default or higher
  • HIPAA/HITECH? → Use finance-iso (Phase 2)
  • Regulatory audits? → Use enterprise-default or higher

Operational Considerations

  • Scan performance critical?baseline-dev is fastest (~8 seconds)
  • Detailed remediation needed? → Higher tiers provide more guidance
  • Custom controls required? → Create custom policy based on appropriate tier
  • Team size and resources? → Higher tiers require more security expertise

Decision Matrix

Environment TypeData SensitivityCompliance LevelRecommended Tier
DevelopmentLow (internal)Nonebaseline-dev
StagingMediumBasicenterprise-default
ProductionHigh (customer)Standard (PCI/SOC2/ISO)enterprise-default
ProductionHigh (PII/PHI)Advanced (HIPAA/regulatory)finance-iso (Phase 2)

Quick Tier Selection Commands

Development Environment

# Quick dev scan
kafkaguard scan --bootstrap localhost:9092

# Dev with custom output
kafkaguard scan \
  --bootstrap localhost:9092 \
  --policy policies/baseline-dev.yaml \
  --format html \
  --out ./dev-reports

Production Environment

# Production scan with security
export KAFKAGUARD_SASL_USERNAME="kafkaguard"
export KAFKAGUARD_SASL_PASSWORD="$(vault kv get -field=password secret/kafka/prod)"

kafkaguard scan \
  --bootstrap kafka-prod:9095 \
  --security-protocol SASL_SSL \
  --sasl-mechanism SCRAM-SHA-512 \
  --tls-ca-cert /etc/kafkaguard/certs/ca.pem \
  --policy policies/enterprise-default.yaml \
  --format json,html,pdf \
  --out /var/reports/kafkaguard

CI/CD Pipeline

# CI/CD scan with appropriate tier
if [ "$ENVIRONMENT" = "production" ]; then
  POLICY="policies/enterprise-default.yaml"
  FAIL_ON="high"
else
  POLICY="policies/baseline-dev.yaml"
  FAIL_ON="medium"
fi

kafkaguard scan \
  --bootstrap $KAFKA_BROKER \
  --policy $POLICY \
  --format json \
  --fail-on $FAIL_ON \
  --no-color

Multi-Environment Scanning

# Scan multiple environments with appropriate tiers
declare -A ENV_POLICIES=(
  ["dev"]="policies/baseline-dev.yaml"
  ["staging"]="policies/enterprise-default.yaml"
  ["prod"]="policies/enterprise-default.yaml"
)

for env in "${!ENV_POLICIES[@]}"; do
  echo "Scanning $env environment..."
  kafkaguard scan \
    --bootstrap "kafka-$env:9092" \
    --policy "${ENV_POLICIES[$env]}" \
    --format json \
    --out "./reports/$env"
done

Tier Transition Strategies

From baseline-dev to enterprise-default

When: Moving from development to production

# 1. Test enterprise policy in staging
kafkaguard scan \
  --bootstrap kafka-staging:9095 \
  --security-protocol SASL_SSL \
  --sasl-mechanism SCRAM-SHA-256 \
  --tls-ca-cert /path/to/ca-cert.pem \
  --policy policies/enterprise-default.yaml \
  --format html \
  --out ./transition-test

# 2. Address security gaps
# - Enable SASL authentication
# - Configure SSL/TLS certificates
# - Set up proper ACLs

# 3. Deploy to production
kafkaguard scan \
  --bootstrap kafka-prod:9095 \
  --security-protocol SASL_SSL \
  --sasl-mechanism SCRAM-SHA-512 \
  --tls-ca-cert /etc/kafkaguard/certs/ca.pem \
  --policy policies/enterprise-default.yaml \
  --format json,html,pdf \
  --out /var/reports/kafkaguard \
  --fail-on high

Custom Policy Development

When: Standard tiers don't meet specific requirements

# 1. Start with appropriate base tier
cp policies/enterprise-default.yaml policies/custom-org.yaml

# 2. Add custom controls (KG-051+)
# Edit policies/custom-org.yaml

# 3. Validate custom policy
kafkaguard validate-policy --policy policies/custom-org.yaml

# 4. Test against cluster
kafkaguard scan \
  --bootstrap kafka-test:9092 \
  --policy policies/custom-org.yaml \
  --format json

# 5. Deploy to production
kafkaguard scan \
  --bootstrap kafka-prod:9095 \
  --policy policies/custom-org.yaml \
  --format json,html,pdf \
  --out /var/reports/kafkaguard

Gradual Rollout Strategy

# Phase 1: Baseline monitoring (no failures)
kafkaguard scan \
  --bootstrap kafka:9092 \
  --policy policies/baseline-dev.yaml \
  --fail-on none \
  --format json,html

# Phase 2: Enterprise policy (warning only)
kafkaguard scan \
  --bootstrap kafka:9095 \
  --security-protocol SASL_SSL \
  --sasl-mechanism SCRAM-SHA-512 \
  --tls-ca-cert /etc/kafkaguard/certs/ca.pem \
  --policy policies/enterprise-default.yaml \
  --fail-on none \
  --format json,html

# Phase 3: Full enforcement
kafkaguard scan \
  --bootstrap kafka:9095 \
  --security-protocol SASL_SSL \
  --sasl-mechanism SCRAM-SHA-512 \
  --tls-ca-cert /etc/kafkaguard/certs/ca.pem \
  --policy policies/enterprise-default.yaml \
  --fail-on high \
  --format json,html,pdf

Next Steps


Document Information

  • Last Updated: 2025-11-15
  • Applies to Version: KafkaGuard 1.0.0+
  • Feedback: Open an issue for corrections or improvements