About This Page

This page covers enterprise-level security architecture — how to design, build, and operate secure systems at scale. See Cybersecurity for foundational concepts and Ethical Hacking Advanced for offensive security. This is experimental page for Design.

Security Architecture Fundamentals

What is Security Architecture?

  • The discipline of designing systems that are secure by design — not bolted on afterward.
  • Combines: risk management, technical controls, policies, and people.
  • Goal: protect CIA (Confidentiality, Integrity, Availability) across all layers.

graph TD
  RISK["Risk Management<br/>Identify · Assess · Treat · Monitor"]
  POLICY["Security Policy<br/>Governance · Standards · Procedures"]
  ARCH["Technical Architecture<br/>Network · Identity · Data · App · Endpoint"]
  OPS["Security Operations<br/>SOC · IR · Threat Hunting · Patching"]
  AUDIT["Audit & Compliance<br/>ISO 27001 · PCI DSS · GDPR · HIPAA"]
  RISK --> POLICY --> ARCH --> OPS --> AUDIT --> RISK

Security Architecture Domains

DomainScopeKey Controls
Network SecurityPerimeter, segmentation, trafficFirewall, IDS/IPS, VPN, ZTNA
Identity & AccessWho can access whatIAM, MFA, PAM, SSO
Endpoint SecurityDevices and workstationsEDR, disk encryption, patching
Application SecurityCode and APIsSAST, DAST, WAF, secure SDLC
Data SecurityData at rest and in transitEncryption, DLP, classification
Cloud SecurityCloud workloads and servicesCSPM, CWPP, CASB
Physical SecurityBuildings and hardwareAccess control, CCTV, locks
Security OperationsDetection and responseSIEM, SOAR, SOC, IR

Risk Management Framework

graph LR
   ID["Identify Assets<br/>What are we protecting?"]
   THREAT["Identify Threats<br/>What could go wrong?"]
   VULN["Identify Vulnerabilities<br/>What weaknesses exist?"]
   RISK["Calculate Risk<br/>Likelihood × Impact"]
   TREAT["Treat Risk<br/>Accept · Mitigate · Transfer · Avoid"]
   MONITOR["Monitor<br/>Continuous reassessment"]
   ID --> THREAT --> VULN --> RISK --> TREAT --> MONITOR --> ID
Risk TreatmentDescriptionExample
AcceptRisk is within toleranceLow-severity finding, cost > benefit
MitigateImplement controls to reduce riskPatch vulnerability, add MFA
TransferShift risk to third partyCyber insurance, outsource
AvoidEliminate the risky activityDon’t collect unnecessary data

Zero Trust Architecture (Deep Dive)

Zero Trust Principles


graph TD
   subgraph ZT["Zero Trust Architecture"]
   
       ID["Identity<br/>Verify every user<br/>MFA · Passwordless · PAM"]
       DEV["Device<br/>Verify device health<br/>MDM · EDR · Compliance"]
       NET["Network<br/>Micro-segmentation<br/>Encrypt all traffic<br/>ZTNA replaces VPN"]
       APP["Application<br/>Per-app access control<br/>App-level auth<br/>API security"]
       DATA["Data<br/>Classify + protect<br/>DLP · Encryption<br/>Data governance"]
   end
   POLICY["Policy Engine<br/>Continuous evaluation<br/>Context-aware decisions"]
   ID & DEV & NET & APP & DATA --> POLICY

Zero Trust vs Traditional Perimeter

AspectTraditional PerimeterZero Trust
Trust modelTrust inside networkNever trust, always verify
Network boundaryHard perimeter (castle + moat)No perimeter — identity is the boundary
VPNRequired for remote accessReplaced by ZTNA
Lateral movementEasy once insideBlocked by micro-segmentation
User verificationOnce at loginContinuous, context-aware
Device trustAssumed if on networkVerified health + compliance

Implementing Zero Trust

graph LR
   P1["Phase 1 — Visualize<br/>Inventory all assets<br/>Map data flows<br/>Identify trust boundaries"]
   P2["Phase 2 — Mitigate<br/>MFA everywhere<br/>Least privilege<br/>Micro-segmentation"]
   P3["Phase 3 — Optimize<br/>Continuous monitoring<br/>Automated response<br/>User behavior analytics"]
   P1 --> P2 --> P3
TechnologyZero Trust Role
IAM (Okta, Azure AD)Identity verification + SSO
MFA / FIDO2Strong authentication
PAM (CyberArk, BeyondTrust)Privileged access control
MDM (Intune, Jamf)Device health verification
EDR (CrowdStrike, SentinelOne)Endpoint security posture
ZTNA (Zscaler, Cloudflare Access)Replace VPN with app-level access
CASB (Netskope, McAfee MVISION)Cloud app visibility + control
Micro-segmentation (Illumio, NSX)East-west traffic control
SIEM + UEBAContinuous monitoring + anomaly detection

Network Security Architecture

Enterprise Network Design

graph TD
   INET["🌐 Internet"]
   DDOS["DDoS Protection<br/>Cloudflare · AWS Shield · Akamai"]
   FW1["Next-Gen Firewall<br/>Palo Alto · Fortinet · Check Point"]
   DMZ["DMZ<br/>Web servers · Reverse proxies<br/>Email gateway · DNS"]
   FW2["Internal Firewall<br/>Segment internal zones"]
   CORP["Corporate LAN<br/>User workstations"]
   SERVER["Server Zone<br/>App servers · Databases"]
   MGMT["Management Zone<br/>Jump servers · PAM<br/>Monitoring · SIEM"]
   OT["OT/IoT Zone<br/>Isolated from IT network"]
   INET --> DDOS --> FW1 --> DMZ --> FW2
   FW2 --> CORP & SERVER & MGMT & OT

Firewall Architecture

Firewall TypeLayerCapabilities
Packet FilterL3/L4IP/port rules, stateless
StatefulL4Connection tracking
Application (NGFW)L7App identification, IPS, SSL inspection
WAFL7 HTTPWeb app protection (SQLi, XSS, OWASP)
Cloud-nativeL3-L7AWS Security Groups, Azure NSG

IDS vs IPS

FeatureIDSIPS
PositionOut-of-band (mirror port)Inline (traffic passes through)
ActionAlert onlyAlert + Block
RiskNo impact on trafficCan block legitimate traffic
Use caseDetection, forensicsActive prevention
ExamplesSnort (IDS mode), ZeekSnort (IPS mode), Suricata

VPN vs ZTNA

FeatureTraditional VPNZTNA
Access modelFull network accessPer-application access
TrustImplicit once connectedContinuous verification
Lateral movementPossibleBlocked
PerformanceBackhauled through HQDirect to app
User experienceComplex clientTransparent
ExamplesOpenVPN, Cisco AnyConnectZscaler, Cloudflare Access, BeyondCorp

DNS Security Architecture

graph LR
   CLIENT["Client DNS Query"]
   FILTER["DNS Filtering<br/>Cisco Umbrella · Cloudflare Gateway<br/>Block malicious domains"]
   DNSSEC["DNSSEC Validation<br/>Verify DNS record signatures"]
   DOH["DNS over HTTPS/TLS<br/>Encrypt DNS queries"]
   RESP["DNS Response"]
   CLIENT --> FILTER --> DNSSEC --> DOH --> RESP

Identity Architecture

IAM Architecture

graph TD
   USER["👤 User / Service / Device"]
   IDP["Identity Provider<br/>Azure AD · Okta · Ping<br/>Google Workspace"]
   MFA["MFA Layer<br/>TOTP · FIDO2 · Push"]
   SSO["SSO / Federation<br/>SAML · OIDC · OAuth 2.0"]
   AUTHZ["Authorization<br/>RBAC · ABAC · PBAC"]
   PAM["PAM<br/>Privileged Access<br/>CyberArk · BeyondTrust"]
   APP["Applications<br/>SaaS · On-prem · APIs"]
   USER --> IDP --> MFA --> SSO --> AUTHZ --> APP
   AUTHZ --> PAM --> APP

Privileged Access Management (PAM)

PAM CapabilityDescription
VaultStore privileged credentials encrypted
Session recordingRecord all privileged sessions for audit
Just-in-time accessGrant privilege only when needed, auto-expire
Password rotationAuto-rotate service account passwords
Dual controlRequire approval for sensitive operations
Break-glassEmergency access with full audit trail

Directory Services

ServiceProtocolUse Case
Active DirectoryLDAP + KerberosWindows enterprise
Azure AD / Entra IDOIDC + SAMLCloud + hybrid
LDAP (OpenLDAP)LDAPLinux/Unix environments
FreeIPALDAP + KerberosLinux enterprise
OktaSAML + OIDCCloud-first IAM

Cloud Security Architecture

Cloud Security Reference Architecture

graph TD
   subgraph CLOUD["☁️ Cloud Environment"]
       CSPM["CSPM<br/>Cloud Security Posture Management<br/>Misconfig detection"]
       CWPP["CWPP<br/>Cloud Workload Protection<br/>Runtime security"]
       CASB["CASB<br/>Cloud Access Security Broker<br/>SaaS visibility + control"]
       CIEM["CIEM<br/>Cloud Infrastructure Entitlement<br/>IAM risk management"]
   end
   subgraph DETECT["Detection & Response"]
       SIEM["SIEM<br/>Log aggregation + correlation"]
       SOAR["SOAR<br/>Automated response playbooks"]
       XDR["XDR<br/>Extended Detection & Response"]
   end
   CLOUD --> DETECT

AWS Security Architecture

graph TD
   ACCOUNT["AWS Account<br/>Root account (MFA + no daily use)"]
   ORG["AWS Organizations<br/>Multi-account strategy<br/>SCPs (Service Control Policies)"]
   IAM["IAM<br/>Least privilege roles<br/>No long-term access keys<br/>IAM Access Analyzer"]
   VPC["VPC Architecture<br/>Public subnet (ALB, NAT)<br/>Private subnet (EC2, RDS)<br/>Security Groups + NACLs"]
   DETECT["Detection<br/>GuardDuty · Security Hub<br/>CloudTrail · Config · Macie"]
   PROTECT["Protection<br/>WAF · Shield · KMS<br/>Secrets Manager · Inspector"]
   ACCOUNT --> ORG --> IAM & VPC & DETECT & PROTECT

Multi-Account Strategy

AccountPurpose
Management/RootBilling, Organizations, SCPs only
SecurityGuardDuty master, Security Hub, CloudTrail aggregation
Log ArchiveImmutable centralized logging
Shared ServicesDNS, AD, CI/CD, monitoring
ProductionLive workloads
StagingPre-production testing
DevelopmentDeveloper sandboxes

Container Security Architecture

graph LR
   CODE["Source Code<br/>SAST · Secret scanning<br/>git-secrets · Semgrep"]
   BUILD["Container Build<br/>Image scanning<br/>Trivy · Snyk · Grype"]
   REGISTRY["Container Registry<br/>Signed images<br/>Vulnerability scanning<br/>ECR · ACR · GCR"]
   DEPLOY["Kubernetes Deploy<br/>Admission controllers<br/>OPA/Gatekeeper · Kyverno<br/>Pod Security Standards"]
   RUNTIME["Runtime Protection<br/>Falco · Aqua · Sysdig<br/>Network policies"]
   CODE --> BUILD --> REGISTRY --> DEPLOY --> RUNTIME

SIEM & Security Operations

SIEM Architecture

graph LR
   subgraph SOURCES["Log Sources"]
       FW["Firewalls"]
       EP["Endpoints<br/>EDR agents"]
       APP["Applications<br/>Web · DB · Auth"]
       CLOUD["Cloud<br/>AWS · Azure · GCP"]
       NET["Network<br/>Flow data · DNS · DHCP"]
   end
   COLLECT["Log Collection<br/>Syslog · Beats · Fluentd<br/>API connectors"]
   PARSE["Parsing & Normalization<br/>CEF · LEEF · ECS format"]
   ENRICH["Enrichment<br/>Threat intel · GeoIP<br/>Asset context"]
   CORRELATE["Correlation Engine<br/>Detection rules<br/>ML anomaly detection"]
   ALERT["Alerting<br/>SOC dashboard<br/>Ticketing (JIRA, ServiceNow)"]
   SOURCES --> COLLECT --> PARSE --> ENRICH --> CORRELATE --> ALERT

Detection Engineering

Sigma rule example — detect suspicious PowerShell
title: Suspicious PowerShell Encoded Command
status: stable
description: Detects PowerShell with encoded command parameter
logsource:
   category: process_creation
   product: windows
detection:
   selection:
       Image|endswith: '\powershell.exe'
       CommandLine|contains:
           - '-EncodedCommand'
           - '-enc '
           - '-ec '
   condition: selection
falsepositives:
   - Legitimate admin scripts using encoded commands
level: medium
tags:
   - attack.execution
   - attack.t1059.001

Key Detection Use Cases

Use CaseLog SourceKey Indicators
Brute forceAuth logsMultiple 4625 events → 4624
Lateral movementWindows Security4624 type 3, unusual source
Privilege escalationWindows Security4672, 4673, 4674
New persistenceWindows Security7045, 4698, Run key changes
Data exfiltrationNetwork/DLPLarge outbound transfers
C2 communicationDNS/ProxyDGA domains, beaconing
Credential dumpingWindows Security4656 on LSASS, 4663
RansomwareEndpointMass file renames, shadow copy deletion

SOAR Playbooks

graph LR
   ALERT["🚨 SIEM Alert<br/>Phishing email detected"]
   ENRICH["Enrich<br/>Check sender reputation<br/>Analyze URLs/attachments<br/>VT · URLScan · Hybrid Analysis"]
   DECIDE{"Malicious?"}
   CONTAIN["Contain<br/>Block sender domain<br/>Quarantine email<br/>Isolate endpoint if clicked"]
   NOTIFY["Notify<br/>Create ticket<br/>Alert SOC analyst<br/>Notify user"]
   CLOSE["Close<br/>Document findings<br/>Update blocklists<br/>Tune detection rule"]
   ALERT --> ENRICH --> DECIDE
   DECIDE -->|Yes| CONTAIN --> NOTIFY --> CLOSE
   DECIDE -->|No| CLOSE

DevSecOps Architecture

Secure CI/CD Pipeline

graph LR
   CODE["💻 Code<br/>IDE security plugins<br/>Pre-commit hooks<br/>git-secrets"]
   PR["Pull Request<br/>Code review<br/>SAST scan<br/>Secret detection"]
   BUILD["Build<br/>Dependency scan (SCA)<br/>Container image scan<br/>License compliance"]
   TEST["Test<br/>DAST scan<br/>Pentest (scheduled)<br/>Fuzz testing"]
   STAGE["Staging<br/>IAC security scan<br/>Compliance check<br/>Penetration test"]
   PROD["Production<br/>Runtime protection<br/>Monitoring + alerting<br/>Patch management"]
   CODE --> PR --> BUILD --> TEST --> STAGE --> PROD

Security Tools by Pipeline Stage

StageTool CategoryExamples
IDESecurity pluginsSonarLint, Snyk IDE, Semgrep
Pre-commitSecret scanninggit-secrets, truffleHog, gitleaks
PR/BuildSASTSonarQube, Checkmarx, Semgrep
BuildSCA (dependencies)Snyk, Dependabot, OWASP Dependency-Check
BuildContainer scanningTrivy, Grype, Snyk Container
TestDASTOWASP ZAP, Burp Suite Enterprise
DeployIaC scanningCheckov, tfsec, KICS
RuntimeRASPSqreen, Contrast Security
RuntimeCWPPFalco, Aqua, Sysdig

Infrastructure as Code Security

IaC security scanning
# Terraform security scanning
checkov -d ./terraform/                 # scan Terraform files
tfsec ./terraform/                      # Terraform security scanner
terrascan scan -t terraform             # policy-as-code scanner
 
# Kubernetes manifest scanning
checkov -d ./k8s/                       # scan K8s manifests
kubesec scan deployment.yaml            # K8s security risk analysis
kube-score score deployment.yaml        # best practice check
 
# Docker security
hadolint Dockerfile                     # Dockerfile linting
trivy image myapp:latest                # container image CVE scan
docker scout cves myapp:latest          # Docker Scout scanning

Compliance & Governance

Major Compliance Frameworks

FrameworkScopeKey Requirements
ISO/IEC 27001Global ISMSRisk assessment, 114 controls, annual audit
SOC 2 Type IIUS SaaS/cloudTrust Service Criteria, 6-month audit
PCI DSS v4Payment cards12 requirements, quarterly scans
HIPAAUS healthcarePHI protection, breach notification
GDPREU dataConsent, data rights, 72hr breach notification
NIST CSFUS federalIdentify/Protect/Detect/Respond/Recover
CIS Controls v8General18 controls, implementation groups
FedRAMPUS federal cloudNIST 800-53 controls, continuous monitoring

Security Policy Hierarchy

graph TD
   POL["Policy<br/>High-level management intent<br/>'All data must be encrypted'"]
   STD["Standard<br/>Specific requirements<br/>'Use AES-256 for data at rest'"]
   PROC["Procedure<br/>Step-by-step instructions<br/>'How to enable disk encryption'"]
   GUIDE["Guideline<br/>Recommended practices<br/>'Consider using LUKS on Linux'"]
   POL --> STD --> PROC --> GUIDE

More Learn

Github & Webs

Master Playlists YouTube