Skip to main content

πŸ” Stacktic Security Framework Documentation

πŸ“‹ Table of Contents​

  1. Executive Summary
  2. Introduction
  3. Chapter 1: Network Security
  4. Chapter 2: Access Control
  5. Chapter 3: Policy Enforcement
  6. Chapter 4: Traffic Management
  7. Chapter 5: Data Protection
  8. Chapter 6: Compliance & Governance
  9. Chapter 7: Source Code Security
  10. Key Takeaways

πŸ“ Executive Summary​

Stacktic provides an automated, metadata-driven security framework that transforms complex security implementations into simplified, manageable processes. This document outlines how Stacktic automates security from infrastructure protection to policies and RBAC, ensuring enterprise-grade security with minimal manual effort.


🎯 Introduction​

Why Stacktic Security Framework?​

Stacktic is designed to automate securityβ€”from infrastructure protection to policies and RBAC. As a metadata-based solution, Stacktic understands stack layers and can automatically deploy and enforce security best practices.

Core Security Principles​

  • πŸ”„ Automation First: Security configurations generated automatically
  • 🧩 Metadata-Driven: Intelligent security based on stack relationships
  • πŸ›‘οΈ Defense in Depth: Multi-layered security approach
  • πŸ“Š Continuous Compliance: Real-time auditing and reporting

Chapter 1: Network Security​

1.1 πŸ›‘οΈ Network Policies and Micro-Segmentation​

The Challenge​

In real-world Kubernetes environments, NetworkPolicies are rarely used to their full potential because:

  • ❌ They're complex to manage
  • ❌ Many security teams apply policies only at the cluster level, not at the stack level
  • ❌ Micro-segmentationβ€”isolating traffic between stack layersβ€”is challenging and often avoided

The Stacktic Solution​

Stacktic automates this complexity by:

  • βœ… Analyzing link directions and metadata to generate hundreds of NetworkPolicies automatically
  • βœ… Delivering out-of-the-box micro-segmentation in minutesβ€”work that would normally take months
  • βœ… Creating granular policies at the stack layer level

Implementation Example​

# Example: Generated NetworkPolicy structure
tree networkpolicy | wc -l
3146

# Sample generated policies:
β”œβ”€β”€ networkpolicy__test__strimzi__all__strimzi__egress__ports__strimzi__nr101__lines15.yaml
β”œβ”€β”€ networkpolicy__test__strimzi__all__strimzi__ingress__ports__strimzi__nr100__lines15.yaml
β”œβ”€β”€ networkpolicy__test__strimzi__exception__system__egress__ports__443__nr36__lines18.yaml
β”œβ”€β”€ networkpolicy__test__strimzi__to__minio__egress__ports__9000__nr70__lines18.yaml
└── networkpolicy__test__strimzi__to__postgresql__egress__ports__5432__nr71__lines18.yaml

⚠️ Best Practice: Test and apply these policies in staging first. If your source code or images communicate outside the relationships defined in Stacktic metadata, the application may break. This is expected behavior for the highest security level.


Chapter 2: Access Control​

2.1 πŸ‘₯ RBAC Simplified​

The Three-Layer RBAC Approach​

RBAC (Role-Based Access Control) can be difficult to manage. Stacktic addresses this using a three-layer approach:

LayerDescriptionBenefit
1. Component-Level RBACEnabled by default on every componentAutomatic service account management
2. Link-Level RBACRelationships between source code and componentsAuto-generated app-level permissions
3. User-Level RBACDirect user/group to component linkingSimplified kubectl access management

Key Features​

  • πŸ” Automatic Service Account Creation
  • πŸ”— Relationship-Based Permissions
  • πŸ‘€ Intuitive User Management
  • πŸ“ Maintainable Configuration

USER LEVEL RBAC

alt text

APP RELATION LEVEL RBAC

alt text

Chapter 3: Policy Enforcement​

3.1 πŸ“œ OPA (Open Policy Agent) Integration​

Overview​

OPA is central to Stacktic's security enforcement, providing policy-as-code capabilities.

Core Capabilities​

Policy Automation​
  • βœ… Automate policies using labels or namespaces
  • βœ… Choose between Dry Run and Enforce modes
  • βœ… Dynamic policy testing based on environment
Example Workflow​
1. Add securityContext β†’ Check labels
2. Label source code β†’ Apply policies
3. Integrate metadata β†’ Generate audit reports
alt text

Advanced Features​

FeatureDescription
Dynamic TestingAutomates tests based on test environment
LiveView IntegrationTrue/false insights directly in UI
Source Code TuningAdjusts code to meet OPA policies

πŸ’‘ Tip: Keep security definitions inside Stacktic to maintain full audit and reporting capabilities. External labels or policies may not appear in audit reports.


Chapter 4: Traffic Management​

4.1 🌐 Traffic Security​

Layer 7 Security Management​

Traffic security is managed through components like Istio or APISIX. Stacktic abstracts complex configurations into links and attributes.

Key Capabilities​

  • 🚦 Traffic Control
    • Block, route, or control traffic at Layer 7
    • Limit traffic to specific routes or IP ranges
  • πŸ” Authentication
    • OIDC integration (e.g., Keycloak)
    • mTLS between services
  • πŸ”„ Traffic Policies
    • CORS configuration
    • URL rewriting rules
    • Rate limiting
alt text

  • πŸ”„ Links your Services Mesh
    • Full Mesh in minutes
    • Add rules, and specific configuraiton per link
    • Centrelized Mesh control

alt text

Chapter 5: Data Protection​

5.1 πŸ”’ Secrets Management​

Comprehensive Secret Lifecycle​

Stacktic provides enterprise-grade secrets management with multiple layers of protection.

Core Features​

Default Protection​
  • βœ… All environment variables saved as Kubernetes secrets
  • βœ… Automatic secret rotation capabilities
  • βœ… Version-controlled secret management
Advanced Security (SOPS Integration)​
Features:
- Encrypt secret files in public repositories
- Decrypt only with appropriate keys
- Full lifecycle management:
β€’ Rotate secrets
β€’ Update configurations
β€’ Re-encrypt on demand

Secret Management Workflow​

  1. Create β†’ Environment variables automatically secured
  2. Encrypt β†’ SOPS encryption for repository storage (optional)
  3. Deploy β†’ Secrets injected securely at runtime
  4. Rotate β†’ Automated rotation without disruption
  5. Audit β†’ Full tracking and compliance reporting

This ensures secrets remain secure, manageable, and version-controlled throughout the entire stack lifecycle.


Chapter 6: Compliance & Governance​

6.1 πŸ“Š Security Audits and Reports​

Comprehensive Reporting​

Every configuration and status generated by Stacktic is translated into comprehensive audit reports.

Report Features​

Report TypeContentUse Case
Configuration AnalysisPolicy conflicts, misconfigurationsPre-deployment validation
Security PostureOverall security score and gapsExecutive reporting
Compliance ReportStandards adherence (CIS, PCI-DSS)Audit preparation
Change TrackingConfiguration drift detectionContinuous monitoring

Benefits​

  • πŸ“ˆ Validate compliance continuously
  • πŸ” Identify security gaps proactively
  • πŸ“‹ CISO-grade reporting out of the box

Chapter 7: Source Code Security​

7.1 πŸ” Code Security​

Overview​

Stacktic provides pre-defined configuration for the container and image level security

Key Features​

  • βœ… tune your level security: switch on sec, add allowed directories.
alt text
  • βœ… Enable OPA validation: IEnforce OPA to validate your source codee configuration
alt text
  • βœ… Audit report: Audit report will identify the source code security level of the full stack

identify missing Policies

alt text

identify missing Source code Security

alt text

🎯 Key Takeaways​

What Stacktic Security Framework Delivers​

FeatureTraditional ApproachStacktic ApproachTime Saved
Network PoliciesManual creation, months of workAuto-generated from metadata95%
RBAC SetupComplex role definitionsThree-layer automation80%
OPA PoliciesManual policy writingTemplate-based automation70%
Traffic SecurityComplex Istio/APISIX configsAbstracted link attributes85%
Security AuditsManual assessmentContinuous automated reports90%
Secrets ManagementMultiple tools neededIntegrated lifecycle75%

Summary Benefits​

βœ… Automated Security: Minimal manual configuration required
βœ… Compliance Ready: CISO-grade reports out of the box
βœ… Best Practices: Enterprise security patterns by default
βœ… Micro-segmentation: Zero-trust networking simplified
βœ… Full Lifecycle: From development to production security

Next Steps​

  1. πŸš€ Deploy test environment with full security enabled
  2. πŸ“Š Review generated security reports
  3. πŸ”§ Tune policies based on your requirements
  4. βœ… Validate in staging before production
  5. πŸ“ˆ Monitor continuous compliance

This document ensures your stacks are secure, compliant, and auditableβ€”with minimal manual effort.