Security layers: how much security is enough
Alexandru Cozma (Principal Engineer · Lenovo), Tiberius Hodoroabă (Advisory Software Engineer · Lenovo)
DefCamp 2025 · Main Stage
Overview
In a rapidly evolving threat landscape, the concept of a "single layer" of defense is a relic of the past. Alexandru Cozma, Principal Engineer, and Tiberius Hodoroabă, Advisory Software Engineer at Lenovo, delivered a compelling talk at DefCamp, emphasizing the critical importance of implementing comprehensive security layers to safeguard cloud-based systems. Their presentation, titled "Security layers: how much security is enough," serves as an essential guide for developers and security professionals alike, advocating for a holistic and deeply integrated approach to cybersecurity.

Key moments
- 4:30 Introduction to the six security layer categories
- 8:15 Edge and Perimeter: Browser, DNS, DDoS, WAF, Bot Management
- 13:50 Authentication and Authorization: User access control
- 20:30 Protecting State and Persistent Data Strategies
- 24:50 Observability and Response: Detection, Alerting, Forensics
- 28:00 Visualizing the Full Security Layer Flow
- 42:00 Q&A: Memory Cache Encryption & Latency Trade-offs
Security layers: how much security is enough
Speakers: Alexandru Cozma (Principal Engineer, Lenovo), Tiberius Hodoroabă (Advisory Software Engineer, Lenovo)
Conference: DefCamp
YouTube: https://www.youtube.com/watch?v=s1gIz0KEyEM
Overview
In a rapidly evolving threat landscape, the concept of a "single layer" of defense is a relic of the past. Alexandru Cozma, Principal Engineer, and Tiberius Hodoroabă, Advisory Software Engineer at Lenovo, delivered a compelling talk at DefCamp, emphasizing the critical importance of implementing comprehensive security layers to safeguard cloud-based systems. Their presentation, titled "Security layers: how much security is enough," serves as an essential guide for developers and security professionals alike, advocating for a holistic and deeply integrated approach to cybersecurity.
The talk frames security as an "onion" – the more layers an attacker encounters, the more they "cry." This metaphor underscores the principle of defense-in-depth, where multiple, independent security controls are strategically placed throughout an application's architecture. Cozma and Hodoroabă, drawing from their extensive experience managing data center infrastructure for a diverse clientele including financial institutions, governments, and large retailers, highlight that security is not merely the domain of a dedicated security team but a collective responsibility across all development and operational functions. Their insights are particularly pertinent given the increasing sophistication of automated threats, such as those leveraging AI agents and Large Language Models (LLMs), which demand robust, multi-faceted protection strategies.
This article delves into the intricate web of security layers discussed by the Lenovo engineers, providing a detailed technical breakdown of each component. From the user's browser to the deepest recesses of persistent storage, the talk meticulously outlines the necessary checkpoints and mechanisms required to build resilient, unhackable systems. It emphasizes that while individual layers offer specific protections, their true strength lies in their collaborative synergy, ensuring that even if one layer is breached, others stand ready to defend against compromise.
Background
▶ Watch: Introduction to the six security layer categories (4:30)
The premise of "Security layers: how much security is enough" is rooted in the fundamental understanding that no single security measure is infallible. As the speakers eloquently put it, security is a journey through multiple checkpoints, rather than a single impenetrable wall. This concept, often visualized as an onion model, posits that attackers must peel back successive layers of defense to reach their target. The more layers present, the more complex, time-consuming, and costly the attack becomes, ideally deterring adversaries or providing ample time for detection and response.
The context for this robust security philosophy stems directly from Lenovo's operations, particularly in data center management as a service. Their customers, ranging from financial banks and government entities to edge computing and large retailers, demand an exceptionally high level of assurance. For instance, securing government contracts often necessitates security postures significantly exceeding industry norms, making obsession with security a business imperative for Lenovo. This environment necessitates protecting not just cloud systems, but "metal pieces" – physical servers and storage devices – and ensuring their continuous health and unhackability, including critical firmware updates.
The rise of sophisticated automated threats, exemplified by the R2-D2 analogy (a seemingly simple bot capable of "hacking the entire Empire system"), further accentuates the need for layered defenses. With an increasing number of talks at conferences like DefCamp focusing on AI agents and LLMs as potent tools for attackers, the traditional perimeter-based security models are proving insufficient. The speakers underscore that security is a shared responsibility, not solely resting on a "security guy" but requiring active participation from every developer and operational team member. This talk effectively serves as a blueprint for organizations to understand and implement this collaborative, multi-layered security paradigm in the face of evolving cyber threats.
Key Findings
▶ Watch: Authentication and Authorization: User access control (13:50)
The central finding of the talk is the unequivocal necessity of a multi-layered security architecture for protecting modern cloud-based and data center systems. Alexandru Cozma and Tiberius Hodoroabă systematically demonstrate that relying on isolated security controls is inadequate, advocating instead for a comprehensive, collaborative, and redundant approach.
Their key findings can be summarized as follows:
- Defense-in-Depth is Non-Negotiable: No single layer can provide complete protection. A robust security posture requires multiple, independent layers that work in concert. If one layer fails, others must be in place to prevent total system compromise.
- Six Critical Categories of Security Layers: The speakers meticulously outline six fundamental categories where security measures must be implemented:
- Edge & Perimeter: Protecting the outermost boundary where user interaction begins.
- Network & API Management: Controlling traffic flow and access at the ingress points.
- Service Communication (User-to-Service): Ensuring secure user authentication and authorization within the application.
- Service Communication (Service-to-Service): Securing inter-service communication within the application's internal network.
- State & Data: Safeguarding persistent and cached data, which is often the ultimate target of attacks.
- Observability & Response: The final, crucial layer for detecting anomalies, responding to incidents, and learning from breaches.
- Security as a Shared Responsibility: The talk explicitly states that security is not just for a dedicated security team. Developers, operations, and every stakeholder must integrate security considerations into their daily work, especially for layers deeper within the application stack.
- Proactive and Adaptive Security: The discussion emphasizes anticipating future threats, such as those posed by quantum computing, by implementing measures like frequent credential and certificate rotation (e.g., every 30 days, soon 6 days) and quantum-resistant hardware.
- Data is the Ultimate Target: The speakers repeatedly highlight that the primary reason for implementing security is to protect data. Failures at the data layer are the most severe, leading to loss of trust and significant business impact.
- Observability is the Safety Net: The Observability and Response layer acts as an "air traffic control tower" or "Sauron's eye," providing crucial insights, detecting anomalies, and enabling effective incident response and forensics. This layer turns raw data into actionable intelligence and resilience.
These findings collectively form a powerful argument for a meticulously engineered security architecture, emphasizing that true resilience comes from a layered defense that considers every potential attack vector, from the user's browser to the physical data center.
Technical Deep Dive
▶ Watch: Protecting State and Persistent Data Strategies (20:30)
The core of the talk is a detailed exploration of six distinct security layers, each comprising multiple technical mechanisms and best practices.
1. Edge & Perimeter
This is the outermost layer, where the first interaction with an application occurs.
- Browser Protections: While often compromised, browsers can offer initial defense. Mechanisms include CSRF (Cross-Site Request Forgery) protection, XSS (Cross-Site Scripting) prevention, Web Authentication (WebAuthn), FIDO2 for strong authentication, Content Security Policies (CSP) to control script execution, Subresource Integrity (SRI) for verifying hashed subroutines, and Cross-Origin Opener Policy (COOP) to protect site contexts and tabs from data leakage.
- DNS Firewall: Protects against risky websites by filtering malicious domains at the DNS level.
- DDoS (Distributed Denial of Service) Protection: Services like Cloudflare (which faced a massive attack in early 2023) can absorb and mitigate large-scale attacks, preventing application downtime.
- CDN (Content Delivery Network): Primarily known for distributing static files, CDNs also protect the origin server's IP address, delegating the entry point to a more resilient service.
- WAF (Web Application Firewall): Inspects incoming traffic for common web application vulnerabilities such as SQL injections and Cross-Site Scripting (XSS) before it reaches the application.
- Bot Management: Evolving beyond traditional CAPTCHA puzzles, this layer uses AI, LLMs, agents, and RAGs to identify and mitigate automated malicious traffic.
2. Network & API Management
This layer controls the flow of traffic into the application's internal infrastructure.
- Classical Firewall: Typically configured with strict rules, often defaulting to "drop everything" except traffic from explicitly trusted sources. Cloud providers (AWS, Azure) offer robust firewall solutions.
- API Management: Operates at Layer 7 (Application Layer) of the OSI model, providing granular checks for authentication, authorization, and license controls. This layer is crucial for preventing brute-force attacks and managing API access.
- Ingress Gateway: Acts as the first entry point into the application's internal network. Examples include Nginx in a Kubernetes cluster or dedicated gateway services. It handles TLS termination, reverse proxying, and can initiate a service mesh for in-transit data protection. It's also a common entry point for Zero Trust architectures.
3. Service Communication (User & Service)
This layer focuses on securing interactions, both from users to services and between services themselves.
User Authentication & Authorization (Passport Control)
- User Authentication: Verifies user identity using methods like passwords, MFA (Multi-Factor Authentication), TOTP (Time-Based One-Time Password) codes, push notifications, and increasingly, passwordless authentication via FIDO authenticators or implicit authentication (collecting sensor data like typing patterns or walking gait to minimize user friction).
- Authorization: Grants specific permissions based on verified identity. This can use RBAC (Role-Based Access Control), Resource-Based Access Control, or Attribute-Based Access Control.
- Single Sign-On (SSO) & Federation: Streamlines user access across multiple applications (e.g., accessing Outlook and then a web app without re-authenticating), similar to international travel agreements.
Service-to-Service Communication (Roads & Traffic Control)
- Service Mesh: Acts as the "roads" between services, enforcing traffic control rules and policies.
- TLS Encryption: Encrypts all traffic between services.
- Mutual TLS (mTLS) Authentication: Takes encryption a step further by requiring each service to present a client certificate for verification, ensuring both parties are trusted. This can be extended to single-usage client certificates for heightened security.
- Policy-Based Communication: Defines which services are allowed to communicate with others (e.g., Service A can call Service B and C, but not D, E, F).
- Layer 7 Authentication/Authorization for Services: Utilizes modern identity standards like OAuth or OpenID Connect (OIDC), where services obtain JWT (JSON Web Token) tokens from an Identity Provider (IDP) to authenticate and authorize their interactions.
4. Message Brokers
Message brokers (e.g., ActiveMQ, RabbitMQ, Kafka) are crucial for asynchronous communication.
- TLS Encryption: Essential for encrypting messages in transit between services and the broker.
- Authentication: Services must authenticate with the message broker.
- Tenant Segregation: Critical for multi-tenant applications. This can involve dedicated topics for each tenant or unique credentials per tenant or service. Lenovo uses unique credentials per service and considers dedicated databases or even clusters per tenant for very high-value customers.
- Message Encryption: Encrypting the actual message content ensures confidentiality even if the broker or network is compromised. Only authorized destinations can decrypt them.
- Message Signing: Verifies the message's origin and integrity, preventing attackers from publishing forged messages within the network.
5. State & Data
The ultimate target of many attacks, this layer focuses on securing data at rest and in cache.
Persistent Storage (Databases)
- Data Segregation: How data from different tenants is separated. Options include:
- Single Table (Gmail approach): All data in one table, filtered by a user column (requires sophisticated database design).
- Table/Collection per Customer: Each customer has their own table.
- Dedicated Database per Customer: Lenovo's preferred approach, providing stronger isolation.
- Dedicated Cluster per Customer: For high-value customers, offering dedicated CPU, memory, storage, and network links.
- Authentication: Services authenticate to the database. Lenovo uses unique credentials for every tenant, and for every service.
- Credential Rotation: Credentials (usernames/passwords, tokens, certificates) are rotated frequently. Lenovo currently rotates credentials every 30 days and aims for every 6 days next year due to concerns about quantum computing attacks.
- Traffic Encryption: All traffic to the database is encrypted using certificates, which are also rotated frequently (every 30 days, moving to 6 days).
- Resource-Based Access Control: Granular control over specific tables or even individual properties (columns) within the database (e.g., allowing access to employee data but not their salary).
Memory Caches
- TLS Encryption: Encrypts data in transit to the cache service.
- Tenant Segregation: Similar to persistent storage, data in caches is segregated by organization, often using tools like Dragonfly (a Redis alternative) with different rotating credentials.
- Data Encryption within Cache: Encrypting the actual data stored in the cache. This adds latency but significantly enhances security. Keys for cache encryption are rotated frequently (e.g., every 12 hours), leading to cache invalidation.
- Controlled Access: Best practice dictates that services responsible for a resource should manage access to its cached data, rather than exposing the cache directly to all services, thus reducing attack vectors.
6. Observability & Response
This final, crucial layer acts as the "air traffic control tower" or "Sauron's eye" for the entire system, detecting anomalies and coordinating emergency responses.
- Gathering (Telemetry & Monitoring):
- Logging: Comprehensive logging of all events.
- Metrics: Collecting performance and operational metrics.
- Tracing: Tracing requests across all services to understand their flow and identify bottlenecks or anomalies.
- Detection & Alerting:
- SIEM (Security Information and Event Management) Tools: Consolidate and analyze security data.
- Anomaly Detection: Identifying unusual patterns (e.g., authentication failures at 3 AM from a user who normally logs in during the morning).
- Behavior Analytics: Understanding typical user and system behavior to spot deviations.
- Incident Response & Automation:
- Playbooks: Predefined procedures for responding to specific security incidents (e.g., what to do when an anomaly is detected).
- Escalation Paths: Clearly defined routes for escalating incidents to higher-level support or management.
- Forensics & Root Cause Analysis (RCA): The ability to investigate breaches, replicate attacks, and understand how they occurred to prevent future occurrences (likened to NTSB investigations for plane crashes).
- Automation: Using tools like N8N to automate alerts, trigger workflows, and notify on-call personnel via AI voices.
This layer transforms raw data into actionable insights, providing resilience and forming a critical component of a Zero Trust architecture.
Demo / Proof of Concept
▶ Watch: Visualizing the Full Security Layer Flow (28:00)
While the talk did not feature a live hacking demonstration or a traditional proof of concept, the speakers dedicated a significant portion of their presentation to a conceptual walkthrough. They presented a "different view" of how a user's request flows through all the discussed security layers, illustrating their interplay and the sequential application of defenses.
This conceptual flow diagram served as a visual "demo" of the defense-in-depth strategy. It showed how a request originating from a browser would first encounter DNS firewalls, DDoS protection, CDNs, and WAFs at the perimeter. It then depicted the request passing through network firewalls, API management, and ingress gateways. Further into the system, it highlighted user authentication and authorization, followed by encryption and service mesh protections for internal service communication. Finally, the flow demonstrated how data access to persistent storage and memory caches is secured with tenant segregation, unique rotating credentials, and encryption. This detailed, step-by-step visualization effectively clarified how each layer contributes to the overall security posture, demonstrating the practical application of their multi-layered security philosophy in a real-world system architecture.
Defensive Implications
▶ Watch: Q&A: Memory Cache Encryption & Latency Trade-offs (42:00)
The comprehensive layered security model presented by Cozma and Hodoroabă offers critical defensive implications for organizations aiming to build resilient systems. Defenders should internalize the following actions:
- Implement Defense-in-Depth Universally: Adopt a mindset where security is not a single choke point but a series of overlapping controls. Evaluate existing architectures to identify and fill gaps across all six identified layers: Edge & Perimeter, Network & API Management, Service Communication (User & Service), Message Brokers, State & Data, and Observability & Response.
- Prioritize Tenant Segregation and Unique Credentials: For multi-tenant environments, invest heavily in segregating customer data at every possible layer – from dedicated database tables/clusters to separate message broker topics and memory cache partitions. Crucially, implement unique, frequently rotating credentials (passwords, tokens, certificates) for each service and tenant. Lenovo's practice of 30-day rotation, soon to be 6 days due to quantum concerns, sets a high bar.
- Harden the Perimeter: Implement robust browser protections (CSP, SRI, COOP), leverage DNS firewalls, DDoS protection services, CDNs, and WAFs. The evolution of bot management with AI/LLMs is a critical area for future investment to combat automated attacks.
- Secure Inter-Service Communication: Deploy a service mesh to enforce mTLS, policy-based communication, and Layer 7 authentication/authorization using modern identity standards like OIDC and JWTs. This protects against lateral movement even if an attacker breaches the perimeter.
- Encrypt Everything: Ensure data is encrypted at rest (in persistent storage and memory caches) and in transit (TLS/mTLS across all network segments, including message brokers). For memory caches, consider data encryption within the cache itself, accepting the slight latency trade-off for enhanced security.
- Build a Robust Observability and Response Capability: This is not an afterthought but a foundational layer. Implement comprehensive logging, metrics, and tracing. Deploy SIEM tools with anomaly detection and behavior analytics to identify threats rapidly. Develop clear incident response playbooks, defined escalation paths, and capabilities for forensics and root cause analysis to learn from every incident. The NTSB analogy underscores the importance of a thorough post-mortem.
- Integrate Security into Development (Shift Left): Emphasize that security is everyone's job, especially for developers. Security controls like authorization logic, message signing, and data segregation must be embedded within application code, not just external infrastructure.
- Consider Physical Security: As highlighted in the Q&A, physical security is the foundational layer. Implementing measures like face scans, fingerprint authentication, and dual-person access for critical infrastructure (like Lenovo's caged data centers) is paramount.
- Proactive Penetration Testing: Establish dedicated red teams or engage external pentesters who leverage advanced techniques, including AI agents, to simulate real-world, multi-vector attacks against all layers of the system. This helps uncover weaknesses that might be missed by automated scans.
- Prepare for Future Threats: Actively research and implement measures against emerging threats, such as those posed by quantum computing, by adopting quantum-resistant algorithms and extremely frequent key/certificate rotations.
By diligently implementing these defensive strategies, organizations can significantly elevate their security posture, making their systems vastly more resilient against the increasingly sophisticated and automated attacks of today and tomorrow.
Key Takeaways
- Defense-in-Depth is Paramount: No single security layer is sufficient; a robust system requires multiple, independent, and collaborating layers to deter and mitigate attacks effectively.
- Data is the Ultimate Target: All security efforts ultimately converge on protecting data, whether at rest or in transit. Prioritize tenant segregation, encryption, and strict access controls for both persistent storage and memory caches.
- Security is a Shared Responsibility: It's not just for security teams. Developers, operations, and leadership must integrate security considerations into every stage of architecture, development, and deployment.
- Observability is Your Safety Net: A comprehensive observability and incident response layer (logging, metrics, tracing, anomaly detection, playbooks) is critical for detecting breaches, understanding their impact, and enabling rapid, effective remediation.
- Frequent Rotation of Credentials and Certificates: Implement aggressive rotation policies (e.g., 30 days, or even daily/hourly for critical systems) for all credentials, tokens, and certificates, especially in anticipation of future threats like quantum computing.
- Proactive Threat Simulation: Utilize advanced penetration testing, including AI-driven attack simulations, to continuously validate the effectiveness of all security layers and uncover vulnerabilities before adversaries do.
About the Speaker(s)
Alexandru Cozma is a Principal Engineer at Lenovo. His work, alongside Tiberius Hodoroabă, focuses on the intricate world of data center management as a service. Drawing from extensive experience, Alexandru provides architectural and strategic guidance, particularly in securing complex cloud-based systems and physical infrastructure for a diverse range of high-stakes customers, including financial institutions and governments. His insights are deeply rooted in the practical challenges and stringent requirements of enterprise-level security.
Tiberius Hodoroabă is an Advisory Software Engineer at Lenovo. Collaborating with Alexandru Cozma, Tiberius plays a key role in the software development aspects of Lenovo's data center management solutions. His expertise lies in implementing the detailed technical mechanisms and protocols that form the various layers of security, ensuring that software designs and deployments adhere to the highest standards of protection against evolving cyber threats.
Reviews
Dr. Zero (Offensive Security Researcher) — WEAK
A checklist tour of security controls dressed up as architecture guidance. Nothing here you couldn't get from a vendor whitepaper or a 'Cloud Security 101' blog post. The speakers have real operational experience, but they spent 45 minutes naming layers instead of teaching how to think about them.
Heather Calloway (CISO) — WEAK
A well-intentioned walkthrough of defense-in-depth concepts that never rises above a checklist. There's no original research, no incident data, no prioritization framework — just a catalog of security controls any practitioner already knows. Not worth leadership time.