π Stacktic Security Framework Documentation
π Table of Contentsβ
- Executive Summary
- Introduction
- Chapter 1: Network Security
- Chapter 2: Access Control
- Chapter 3: Policy Enforcement
- Chapter 4: Traffic Management
- Chapter 5: Data Protection
- Chapter 6: Compliance & Governance
- Chapter 7: CVE Analysis and SBOM
- Chapter 8: LiveView Security Automation
- Chapter 9: Source Code Security
- Chapter 10: Multi-tenancy
- 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?β
Security Framework Overviewβ
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:
| Layer | Description | Benefit |
|---|---|---|
| 1. Component-Level RBAC | Enabled by default on every component | Automatic service account management |
| 2. Link-Level RBAC | Relationships between source code and components | Auto-generated app-level permissions |
| 3. User-Level RBAC | Direct user/group to component linking | Simplified kubectl access management |
Key Featuresβ
- π Automatic Service Account Creation
- π Relationship-Based Permissions
- π€ Intuitive User Management
- π Maintainable Configuration
Visual Examplesβ
USER LEVEL RBAC
APP RELATION LEVEL RBAC
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
Advanced Featuresβ
| Feature | Description |
|---|---|
| Dynamic Testing | Automates tests based on test environment |
| LiveView Integration | True/false insights directly in UI |
| Source Code Tuning | Adjusts 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
Service Mesh Integrationβ
- π Full Mesh in minutes
- π Add rules, and specific configuration per link
- π Centralized Mesh control
See Mesh Exampleβ
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β
- Create β Environment variables automatically secured
- Encrypt β SOPS encryption for repository storage (optional)
- Deploy β Secrets injected securely at runtime
- Rotate β Automated rotation without disruption
- 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 Type | Content | Use Case |
|---|---|---|
| Configuration Analysis | Policy conflicts, misconfigurations | Pre-deployment validation |
| Security Posture | Overall security score and gaps | Executive reporting |
| Compliance Report | Standards adherence (CIS, PCI-DSS) | Audit preparation |
| Change Tracking | Configuration drift detection | Continuous monitoring |
Benefitsβ
- π Validate compliance continuously
- π Identify security gaps proactively
- π CISO-grade reporting out of the box
Report Locationβ
Reports exist in the audit folder in every generated stack repo:

Chapter 7: CVE Analysis and SBOMβ
7.1 Vulnerability Managementβ
Overviewβ
Stacktic provides comprehensive vulnerability management through CVE (Common Vulnerabilities and Exposures) analysis and SBOM (Software Bill of Materials) generation for every component in your stack.
Core Capabilitiesβ
Offline CVE Reportsβ
Stacktic generates offline CVE reports for each component automatically:
| Feature | Description | Benefit |
|---|---|---|
| Component-Level Analysis | CVE reports per component | Identify vulnerabilities before deployment |
| Offline Access | Reports available without external dependencies | Security analysis in air-gapped environments |
| Version-Specific | CVE data matched to exact component versions | Accurate vulnerability assessment |
| Automated Updates | Reports regenerate with version changes | Stay current with security landscape |
Full SBOM Generationβ
Stacktic creates complete versioning dependency XMLs for SBOM tools out of the box:
SBOM Features:
- Complete dependency tree for all components
- Version tracking across the full stack
- Export formats compatible with standard SBOM tools
- Automated updates on stack changes
Key Benefitsβ
- π Proactive Security: Identify vulnerabilities before deployment
- π Compliance Ready: SBOM generation for regulatory requirements
- π Automated Analysis: CVE reports generated with every build
- π¦ Complete Visibility: Full dependency tracking across stack layers
- π Zero Configuration: Works out of the box for all components
Integration with Security Workflowβ
Design Stack β Build β Generate SBOM β CVE Analysis β Deploy
β β
audit/sbom/ audit/cve/
Use Casesβ
| Scenario | How Stacktic Helps |
|---|---|
| Pre-Deployment | Review CVE reports before production |
| Compliance Audits | Provide SBOM documentation instantly |
| Version Upgrades | Compare CVE profiles between versions |
| Security Reviews | Complete dependency analysis available |
π‘ Best Practice: Review CVE reports during the build phase and address high-severity vulnerabilities before deployment to production.
Chapter 8: LiveView Security Automationβ
8.1 Real-time Security Assessmentβ
Overviewβ
Stacktic LiveView agent provides continuous, real-time security assessment directly from your live cluster, automating security validation across all critical security layers.
Core Capabilitiesβ
The LiveView agent validates security posture continuously by monitoring:
Security Validation Areasβ
| Validation Type | What It Checks | Real-time Alerts |
|---|---|---|
| RBAC Compliance | Role assignments, service accounts, permissions | β Unauthorized access attempts |
| Policy Enforcement | NetworkPolicies, OPA rules, admission controls | β Policy violations |
| Secrets Strength | Encryption status, rotation compliance, exposure | β Weak or exposed secrets |
| Security Breaches | Suspicious activity, unauthorized changes | β Immediate breach detection |
| Endpoints Security | Exposed services, TLS configuration, ingress rules | β Insecure endpoints |
LiveView Architectureβ
Live Cluster β LiveView Agent β API β Stacktic Platform β UI Dashboard
β β β β
Metrics Validation Real-time Security
Collection Engine Analysis Insights
Key Featuresβ
Automated Security Assessmentβ
- β Continuous Monitoring: Real-time validation of security controls
- β Automated Remediation: Suggestions for fixing detected issues
- β Compliance Verification: Ensures all security policies are active
- β Drift Detection: Identifies configuration changes from desired state
Security Validation Coverageβ
RBAC Validation:
- Service account permissions
- Role bindings accuracy
- Cluster role assignments
- User access patterns
Policy Validation:
- NetworkPolicy enforcement
- OPA Gatekeeper constraints
- Pod security standards
- Admission webhook status
Secrets Management:
- Encryption verification
- Rotation compliance
- Secret exposure check
- SOPS integration status
Endpoint Security:
- TLS certificate validation
- Ingress configuration
- Service exposure audit
- mTLS verification
Benefitsβ
- π Proactive Detection: Identify security issues before they become incidents
- π Real-time Insights: Live security posture in UI dashboard
- π Continuous Compliance: Automated validation of security controls
- π¨ Instant Alerts: Immediate notification of security violations
- π Trend Analysis: Track security improvements over time
LiveView Dashboardβ
The LiveView agent provides real-time visibility into:
- Security Score: Overall security posture percentage
- Active Violations: Current policy and RBAC issues
- Vulnerability Status: Live CVE exposure from running components
- Compliance Status: Real-time adherence to security standards
- Remediation Queue: Prioritized list of security improvements
Integration with Audit Reportsβ
LiveView complements static audit reports by providing:
Static Reports (Build Time) LiveView (Runtime)
β β
CVE Analysis β Active Vulnerability Status
SBOM Generation β Runtime Dependency Validation
Policy Configuration β Policy Enforcement Status
RBAC Design β Active Permission Verification
Secrets Setup β Secrets Strength Monitoring
β‘ Key Advantage: LiveView transforms security from a build-time check into a continuous runtime validation system, ensuring your security posture remains strong throughout the stack lifecycle.
Use Casesβ
| Scenario | LiveView Response |
|---|---|
| Policy Drift | Alerts when runtime differs from design |
| Unauthorized Access | Immediate notification of RBAC violations |
| Weak Secrets | Flags secrets not meeting strength requirements |
| Security Breach | Real-time detection of suspicious activity |
| Compliance Audit | Live proof of security controls enforcement |
Chapter 9: Source Code Securityβ
9.1 Code Securityβ
Overviewβ
Stacktic provides pre-defined configuration for the container and image level security.
Key Featuresβ
1. Tune Your Security Levelβ
Switch on security, add allowed directories:
2. Enable OPA Validationβ
Enforce OPA to validate your source code configuration:
3. Audit Reportβ
Audit report will identify the source code security level of the full stack.
Identify Missing Policies:
Identify Missing Source Code Security:
Chapter 10: Multi-tenancyβ
10.1 Multi-tenancy Isolationβ
The Complete Security Architectureβ
Kubernetes Namespace Isolation: Recreating VM-Style Security Boundariesβ
The Lost Art of Workload Isolationβ
Companies spent 20 years perfecting VM isolation with VLANs, firewalls, and DMZ zones. Then moved to Kubernetes and deployed everything in one flat network with no boundaries.
Stacktc operates on a principle of isolation by default. This means every part of the stack is completely isolated and managed separately. We automate the security relationships between these isolated stack layers β which can represent components like databases, backends, messaging, or observability. Each layer is fully separated and secured by design.
The Security Architecture Evolutionβ
The Complete Isolation Matrixβ
| Category | Benefit | Without Separation | With Full Separation | Real-World Impact |
|---|---|---|---|---|
| SECURITY | ||||
| Resource Isolation | Larger blast radius; cross-app name/secret clashes | Scoped RBAC/Secrets/NetworkPolicy; smaller blast radius | Breach in app A can't access app B's secrets | |
| RBAC Scope | Complex role definitions with many exceptions | Simple, namespace-scoped roles | Dev team can't accidentally delete prod resources | |
| Network Policies | Difficult to enforce traffic rules | Clear rules per namespace | Database only accessible from its app namespace | |
| Microsegmentation | Not supported | PCI-DSS compliant zones | Pass compliance audits | |
| Admission Control | Forcing rules is complicated | Easy enforcement per namespace | Automated security policies | |
| RESOURCE MANAGEMENT | ||||
| Quota Enforcement | Hard to prevent resource hogging | ResourceQuotas per namespace | Team A can't starve Team B | |
| Cost Attribution | Unclear who's using what | Clear cost per namespace | Accurate billing per department | |
| Capacity Planning | Guesswork on resource needs | Predictable allocation | Guaranteed resources per team | |
| OPERATIONS | ||||
| Cleanup | Manual tracking of resources | kubectl delete ns <name> removes all | One command cleanup | |
| Troubleshooting | Issues affect entire cluster | Problems contained in namespace | Faster debugging | |
| Service Discovery | Complex naming needed | Simple: <service>.<namespace>.svc.cluster.local | db-service vs prod-eu-mysql-primary-db-service | |
| Kustomize/Helm | Harder to isolate environments | Reuse configs across dev/test/prod | Clean environment separation | |
| COMPLIANCE | ||||
| Audit Trails | Mixed logs, hard to filter | Clean audit boundaries | Compliance reports per namespace | |
| Data Sovereignty | Difficult to enforce location | Namespace-specific policies | GDPR compliance | |
| Security Standards | One-size-fits-all policies | Different standards per workload | PCI namespace stricter than dev | |
| DEVELOPMENT | ||||
| Environment Isolation | Risk of cross-environment pollution | Clear dev/staging/prod boundaries | Dev won't affect production | |
| CI/CD Pipelines | Complex deployment logic | Namespace-based deployments | Deploy to namespace = environment | |
| Testing | Hard to create isolated test environments | Spin up temporary namespaces | Each PR gets its own namespace | |
| ADVANCED | ||||
| Service Mesh | Difficult to manage Istio labels | Per-namespace mesh config | mTLS between components | |
| Label Management | Complex across entire cluster | Simple per namespace | Easy GitOps automation |
Implementation Comparisonβ
Without Namespace Separation (What Most Do)β
# Everything in default or one namespace
kubectl apply -f entire-stack.yaml
# Problems:
# - All secrets visible to all pods
# - Any pod can talk to database
# - One misconfigured pod can consume all resources
# - Developer mistake can delete production database
# - Compliance auditor fails you immediately
The Bottom Lineβ
Without proper namespace isolation, NetworkPolicies, and multi-layer RBAC, you have LESS security in Kubernetes than you had with VMs from 2005.
This means every part of the stack must be completely isolated and managed separately. We automate the security relationships between these isolated stack layers β which can represent components like databases, backends, messaging, or observability. Each layer is fully separated and secured by design.
Remember: Namespace isolation is not just about NetworkPoliciesβ
- β RBAC boundaries
- β Secret isolation
- β Resource quotas
- β Audit separation
- β Cost tracking
- β Compliance scope
- β Service mesh configuration
- β Admission controls
It's about creating proper security boundaries that match or exceed what we had in the VM world.
π― Key Takeawaysβ
What Stacktic Security Framework Deliversβ
| Feature | Traditional Approach | Stacktic Approach | Time Saved |
|---|---|---|---|
| Network Policies | Manual creation, months of work | Auto-generated from metadata | 95% |
| RBAC Setup | Complex role definitions | Three-layer automation | 80% |
| OPA Policies | Manual policy writing | Template-based automation | 70% |
| Traffic Security | Complex Istio/APISIX configs | Abstracted link attributes | 85% |
| Security Audits | Manual assessment | Continuous automated reports | 90% |
| Secrets Management | Multiple tools needed | Integrated lifecycle | 75% |
| CVE Analysis | Manual vulnerability scanning | Automated offline CVE reports | 85% |
| SBOM Generation | Manual dependency tracking | Auto-generated XMLs | 90% |
| Security Monitoring | Manual cluster inspection | LiveView real-time validation | 95% |
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β
- π Deploy test environment with full security enabled
- π Review generated security reports
- π§ Tune policies based on your requirements
- β Validate in staging before production
- π Monitor continuous compliance
This document ensures your stacks are secure, compliant, and auditableβwith minimal manual effort.