ProficientNowTechRFCs

RFC-TENANT-SECURITY-0001 Planning Document

RFC-TENANT-SECURITY-0001 Planning Document

Overview

This planning document outlines the scope, relationships, and structure for RFC-TENANT-SECURITY-0001: Tenant Application Security Architecture. This RFC will govern network-level security controls for external traffic protection (North-South) and tenant isolation at the Kubernetes layer.


RFC Classification

FieldValue
RFC IDRFC-TENANT-SECURITY-0001
KindArchitecture
CategoryStandards Track
DomainNetwork Security, Tenant Isolation
Primary Question"How is external traffic protected and how are tenants isolated at the network layer?"

Scope Definition

In Scope

ConcernDescription
Web Application FirewallProtection against OWASP Top 10 attacks at the ingress layer
Kubernetes Network PoliciesNamespace isolation, pod-to-pod traffic restrictions
Ingress ProtectionGateway API patterns, TLS termination, request validation
Rate Limiting and Traffic ShapingDDoS mitigation, abuse prevention, traffic quotas
Tenant Network IsolationMulti-tenancy segmentation, namespace boundaries
TLS Certificate LifecycleAutomated certificate provisioning and renewal
Egress ControlsControlled outbound traffic from tenant namespaces

Out of Scope

TopicGoverned ByRationale
Web UI SSO/authenticationRFC-IAM-0001Browser-based OIDC flows handled by Keycloak
Service-to-service mTLSRFC-WORKLOAD-IDENTITYLinkerd handles East-West traffic identity
Service mesh authorization policiesRFC-WORKLOAD-IDENTITYServerAuthorization via Linkerd
Human privileged accessRFC-PAM-0001SSH, database, kubectl via Teleport
Secret storage/rotationRFC-SECOPS-0001Vault as secret authority
OAuth2 Proxy/auth middlewareRFC-IAM-0001Keycloak integration patterns

Relationship to Other RFCs

Traffic Flow Context

The platform security architecture operates in layers, each governed by a specific RFC:

Key Boundary: North-South vs East-West

DirectionRFC ResponsibilityDescription
North-SouthRFC-TENANT-SECURITYExternal traffic entering the cluster
East-WestRFC-WORKLOAD-IDENTITYService-to-service traffic within the cluster

This separation ensures clear authority boundaries and prevents overlapping concerns.

Normative Dependencies

Dependency RFCWhat RFC-TENANT-SECURITY Inherits
RFC-SECOPS-0001Vault for TLS certificate secrets, ESO for secret distribution
RFC-IAM-0001Integration patterns for authenticated routes

Informative Dependencies

Related RFCRelationship
RFC-WORKLOAD-IDENTITYService mesh handles traffic after ingress
RFC-PAM-0001Network policies may affect privileged access paths
RFC-DEVELOPER-PLATFORMSelf-service network policy requests

Architectural Concepts

Defense-in-Depth Layers

The architecture establishes multiple security layers, each with distinct responsibilities:

LayerResponsibilityFailure Mode
Edge ProtectionRate limiting, IP reputationDegraded but operational
WAFAttack signature detectionLog-only or block
TLS TerminationEncryption in transitConnection refused
Network PoliciesNamespace isolationTraffic denied

Authority Domains

DomainAuthorityScope
Global Rate LimitsPlatform TeamCluster-wide defaults
WAF RulesSecurity TeamOWASP CRS + custom rules
Namespace PoliciesTenant + PlatformTenant-specific with guardrails
TLS CertificatesAutomated (cert-manager)Per-ingress automation
Guardrail PoliciesPlatform TeamCannot be overridden by tenants

Trust Boundaries


Planned Invariants

Traffic Protection Invariants

IDInvariant Statement
INV-1All external HTTP/HTTPS traffic MUST pass through the WAF before reaching application workloads
INV-2All public endpoints MUST use TLS 1.2 or higher; TLS 1.0 and 1.1 MUST NOT be accepted
INV-3Certificate provisioning MUST be automated; manual certificate installation MUST NOT be permitted for production endpoints
INV-4WAF MUST operate in detection mode before enforcement mode is enabled for any new rule set

Network Policy Invariants

IDInvariant Statement
INV-5All tenant namespaces MUST have a default-deny ingress policy; traffic MUST be explicitly allowed
INV-6Cross-namespace traffic MUST be explicitly authorized; implicit cross-namespace access MUST NOT exist
INV-7Egress to the public internet from tenant namespaces MUST be controlled; unrestricted egress MUST NOT be permitted
INV-8Platform guardrail policies MUST NOT be overridable by tenant-level policies

Observability Invariants

IDInvariant Statement
INV-9All blocked requests MUST be logged with sufficient context for incident response
INV-10Network flow data MUST be observable for troubleshooting and audit purposes
INV-11WAF security events MUST be integrated with the platform monitoring and alerting system

GitOps Invariants

IDInvariant Statement
INV-12Network policy definitions MUST be stored in Git and applied via GitOps
INV-13WAF rule customizations MUST be version controlled
INV-14TLS secrets MUST be managed via automated systems (cert-manager or ESO); manual secret creation MUST NOT be used

Component Taxonomy

Primary Components

ComponentTechnologyResponsibilityAuthority
Ingress + WAFBunkerWebTraffic entry, TLS termination, routing, attack preventionPlatform Team
Certificate Managercert-managerTLS certificate lifecycle automationAutomated
CNI ProviderCalicoNetwork policy enforcementPlatform Team
Network Policy ControllerCalicoPolicy compilation and distributionPlatform Team

Component Relationships


Technology Context

Existing Infrastructure Constraints

ComponentCurrent StateImplication
CNICalico deployedNetwork policies use Calico/Kubernetes NetworkPolicy
IngressNGINX IngressEvaluate replacement (retiring March 2026)
TLScert-manager with Let's EncryptContinue existing pattern
Service MeshLinkerd (RFC-WORKLOAD-IDENTITY)Coordinate ingress-to-mesh handoff

WAF Recommendation: BunkerWeb

BunkerWeb is the recommended WAF solution for this architecture.

Selection Criteria

CriterionBunkerWeb Assessment
OWASP CRS CompatibilityFull OWASP Core Rule Set integration via ModSecurity
Kubernetes NativeOfficial Helm chart, can act as Ingress controller
LicenseAGPLv3 (free, open source, no app limits)
Operational ModelWeb UI for rule management, plugin system
Ingress ReplacementCan serve as combined WAF + Ingress (addresses NGINX retirement)
Bot ProtectionMultiple challenge types (CAPTCHA, hCaptcha, reCAPTCHA, Turnstile)
MaintenanceActive development, frequent updates

Alternatives Evaluated

AlternativeReason Not Selected
SafeLineNo OWASP CRS compatibility; proprietary semantic engine (black-box); free tier limited to 10 apps
CorazaLibrary only (requires separate integration); no built-in UI; better suited for Envoy Gateway
ModSecurityEnd-of-life (July 2024); maintenance mode only
Cloud WAFNot permitted; requires free/open-source solution

Key Capabilities

CapabilityDescription
Reverse ProxyNGINX-based, can replace existing ingress
WAF EngineModSecurity with OWASP CRS integration
Bot MitigationChallenge-based verification (cookie, JavaScript, CAPTCHA providers)
Rate LimitingConnection and request limits per client
IP ReputationExternal blacklists and DNSBL integration
TLS AutomationNative Let's Encrypt support
Web UIConfiguration and rule management interface

Gateway API Consideration

FactorAssessment
Standard MaturityGateway API is the successor to Ingress API
Feature CoverageSupports advanced routing, traffic policies
Migration PathBunkerWeb can coexist during transition; future versions may support Gateway API
NGINX Ingress RetirementMarch 2026 end-of-life makes migration planning necessary

RFC Section Structure

Following RFC-RFCSTD-0002 (Architecture Kind):

SectionFileRequirementContent Summary
Index00-index.mdREQUIREDMetadata, abstract, TOC, reading paths
Introduction01-introduction.mdREQUIREDProblem statement, current state, motivation
Requirements02-requirements.mdREQUIREDDesign goals, non-goals, invariants, success criteria
Architecture03-architecture.mdREQUIREDDefense layers, trust boundaries, authority domains
Components04-components.mdREQUIREDComponent taxonomy, responsibilities, interfaces
Ingress Security05-ingress-security.mdCONDITIONALGateway patterns, TLS architecture
WAF Architecture06-waf-architecture.mdCONDITIONALWAF placement, rule lifecycle, exception handling
Network Policies07-network-policies.mdCONDITIONALPolicy hierarchy, tenant isolation model
Rate Limiting08-rate-limiting.mdCONDITIONALTraffic shaping, DDoS mitigation patterns
Tenant Isolation09-tenant-isolation.mdCONDITIONALMulti-tenancy model, namespace boundaries
Rationale10-rationale.mdREQUIREDTechnology decisions, alternatives rejected
Evolution11-evolution.mdRECOMMENDEDFuture considerations, Gateway API migration
Glossaryappendix-a-glossary.mdREQUIREDTerms, diagram index
Referencesappendix-b-references.mdREQUIREDNormative, informative, internal references

OWASP Protection Scope

Web Application (OWASP Top 10 2021)

RiskWAF ResponsibilityApplication Responsibility
A01: Broken Access ControlPath-based blockingAuthorization logic
A02: Cryptographic FailuresTLS enforcementKey management
A03: InjectionInput validation, signature detectionParameterized queries
A04: Insecure DesignApplication architecture
A05: Security MisconfigurationProtocol enforcementConfiguration management
A06: Vulnerable ComponentsDependency management
A07: Auth FailuresBrute force rate limitingAuthentication logic
A08: Software IntegritySupply chain security
A09: Logging FailuresRequest loggingApplication logging
A10: SSRFEgress controlsInput validation

API Security (OWASP API Top 10 2023)

RiskNetwork-Level Mitigation
API4: Unrestricted Resource ConsumptionRate limiting per client/route
API7: Server Side Request ForgeryEgress network policies
API8: Security MisconfigurationProtocol and header enforcement

Rationale Topics

The Rationale section will document decisions on:

Decision AreaRecommendationAlternatives Considered
WAF SolutionBunkerWebSafeLine, Coraza, ModSecurity
Ingress ArchitectureBunkerWeb (combined WAF + Ingress)Gateway API, NGINX Ingress, Service Mesh Ingress
Network Policy ModelKubernetes NetworkPolicyCalico-specific CRDs
Rate Limiting LocationGateway-level (BunkerWeb)Application-level, Both
Certificate AuthorityLet's Encrypt via cert-managerVault PKI, Hybrid

WAF Decision Rationale Summary

BunkerWeb was selected over alternatives for these reasons:

FactorBunkerWebSafeLineCoraza
OWASP CRSIntegratedNot compatibleCompatible
KubernetesHelm + Ingress controllerDocker-first (kompose)Envoy plugin
UIWeb UI includedWeb UI includedNone
LicenseAGPLv3 (unlimited)GPL-3.0 (10 app limit free)Apache 2.0
Rule TransparencyAuditable (OWASP CRS)Black-box semanticAuditable
Ingress ReplacementYesNoNo

Cross-RFC Coordination

Integration Points with RFC-WORKLOAD-IDENTITY

ConcernCoordination Required
Ingress-to-mesh handoffDefine where network policy ends and mesh mTLS begins
Ingress controller identityIngress controller needs mesh identity for backend calls
Policy precedenceClarify network policy vs mesh authorization priority

Integration Points with RFC-SECOPS-0001

ConcernCoordination Required
TLS certificate storageCertificates stored in Vault or Kubernetes Secrets
WAF secret managementAPI tokens, custom rule credentials via ESO
Audit log storageCentralized logging for compliance

Integration Points with RFC-IAM-0001

ConcernCoordination Required
Authentication endpointsWAF exceptions for Keycloak OIDC flows
OAuth2 Proxy routesRate limiting considerations for auth callbacks

Success Criteria

CriterionVerification Method
OWASP Top 10 protectionWAF blocks standard attack payloads
Tenant isolationCross-namespace traffic denied by default
Certificate automationNo manual certificate operations required
ObservabilityAll security events visible in monitoring
GitOps complianceAll policies managed via Git

References (Draft)

Normative References

IDTitleURL
OWASP-TOP10OWASP Top 10 2021https://owasp.org/Top10/
OWASP-API-TOP10OWASP API Security Top 10 2023https://owasp.org/API-Security/
OWASP-CRSOWASP Core Rule Sethttps://coreruleset.org/
K8S-NETPOLKubernetes Network Policieshttps://kubernetes.io/docs/concepts/services-networking/network-policies/
GATEWAY-APIKubernetes Gateway APIhttps://gateway-api.sigs.k8s.io/
RFC2119Key words for use in RFCshttps://www.rfc-editor.org/rfc/rfc2119

Informative References

IDTitleURL
BUNKERWEBBunkerWeb Official Documentationhttps://docs.bunkerweb.io/
BUNKERWEB-GHBunkerWeb GitHub Repositoryhttps://github.com/bunkerity/bunkerweb
BUNKERWEB-HELMBunkerWeb Helm Charthttps://github.com/bunkerity/bunkerweb-helm
CALICO-NETPOLCalico Network Policy Documentationhttps://docs.tigera.io/calico/latest/network-policy/
CERT-MANAGERcert-manager Documentationhttps://cert-manager.io/docs/
NGINX-RETIREIngress NGINX Retirement Announcementhttps://kubernetes.io/blog/2025/11/11/ingress-nginx-retirement/
SAFELINESafeLine WAF (alternative evaluated)https://github.com/chaitin/SafeLine
CORAZACoraza WAF Project (alternative evaluated)https://coraza.io/

Internal References

IDDocument
RFC-IAM-0001Federated Identity and Access Management Architecture
RFC-SECOPS-0001GitOps-Native, Vault-First Secret Management Architecture
RFC-WORKLOAD-IDENTITYWorkload Identity Architecture
RFC-PAM-0001Privileged Access Management Architecture

End of RFC-TENANT-SECURITY-0001 Planning Document