Slide 1

Slide 1 text

API與Kubernetes世界的零信任安全— 基於F5分散式雲架構、NGINX

Slide 2

Slide 2 text

© 2022 F5 2 零信任模型 zero trust requires an “assume breach” mentality 假設攻擊者已在內網 始終驗證 verify 永不信任 持續監控

Slide 3

Slide 3 text

© 2022 F5 3 零信任存取 專注用戶與設備

Slide 4

Slide 4 text

© 2022 F5 4 CONFIDENTIAL 零信任存取架構 IDaaS 用戶通過本地 (AAA) 或 IDaaS 進行身份驗證 3 驗證並持續監視設備狀態 和完整性。 根據組織策略,設備狀態 和/或完整性的任何更改 都會導致訪問許可權授予 的更改。 2 允許經過身份驗證的流量通過。 用戶標識將傳遞給應用。 標識是聯合的,但訪問許可權 僅在具有最低特權訪問許可權 的每個應用請求的基礎上授予。 如果使用者請求訪問其他應用, 則會複製驗證和整個過程。 6 Azure Active Directory 使用者請求應用訪問,代理攔 截。 1 利用第三方安全解決方案的 API(透過 API 連 接器)收集其他上下文和屬性。 4 Third-party APIs 應用基於身份和上下文的策略,以及基於角色 的訪問控制 (RBAC) 和基於屬性的訪問控制 (ABAC)。 根據組織策略,用戶標識、上下文、角色或屬 性的任何更改都會導致訪問許可權授予發生變 化。 5

Slide 5

Slide 5 text

© 2022 F5 5 只有“正確”的用戶才能在“正確”的時間、“正確”的設 備、“正確”的配置和“正確”的地點訪問“正確”的應用 • 是“正確”的用戶嗎? • 應用對時間或日期敏感嗎? • 此時用戶是否有許可權訪問 app ? • 是“正確的”設備嗎? • 設備安全嗎? • 在整個應用會話期間,它是 否滿足並堅持安全基線? • 是否存在無法訪問應用的 位置? • 應用安全嗎? • 應用敏感嗎? • 訪問應用的網路安全嗎? • 使用者是否擁有該應 用的存取權限? • 還有其他存取控制或限制 嗎? 存取相關的方法在於試圖阻止違規行為的發生

Slide 6

Slide 6 text

© 2022 F5 6 連線存取與身分驗證是零信任架構的基礎, 但還有應用與API 的安全架構需要注意 應用與API級別的零信任則側重於 最大限度地減少持續違規行為的影響 應用與API一樣需要“身分”,就像使用者和設備一樣 workloads require “identities” just as users and devices do

Slide 7

Slide 7 text

© 2022 F5 7 多雲的現況與未來 Public cloud Data Center

Slide 8

Slide 8 text

© 2022 F5 8 API的類型 • 任何人都可以免費使用。 Public APIs • 從外部連接的授權用戶端。 External APIs • 可供選定和授權的外部開發人員或 API 消費 者使用。 Partner APIs • 在企業內使用,以連接企業內的系統和數據。 Internal APIs

Slide 9

Slide 9 text

© 2022 F5 9 API 生態架構

Slide 10

Slide 10 text

© 2022 F5 10 API 安全不是 API 管理 • Versioning • Publishing • Schemas/definition • Onboarding and documentation • Schema Validation • Protocol Conformance • Protection Against Vulnerabilities • Fraud prevention • DDoS & Bot Mitigation • Access Management • Authentication, authorization • Rate limiting / Thresholding • Monitoring and Dashboards

Slide 11

Slide 11 text

© 2022 F5 11 OWASP API Top 10 Broken Object Level Authorization Broken User Authentication Excessive Data Exposure Lack of Resource & Rate Limiting Broken Function Level Authorization Mass Assignment Security Misconfiguration Injection Improper Assets Management Insufficient Logging & Monitoring OWASP API Top 10 Access Control 存取控制 Network Security 網路安全 Runtime Protection 即時防護 5 1 4

Slide 12

Slide 12 text

© 2022 F5 12 API 安全性的三大要素 Access Control • 管理 API 端點的身份驗證和授權 Network Security • 提供安全網路通訊 (mTLS) • 在網路層防護不需要的流量(DDoS、速率 限制) App Security • 緩解常見的軟體漏洞 • 使用機器人緩解技術防止 API 濫用。

Slide 13

Slide 13 text

© 2022 F5 13 攻擊者與防禦者(典範轉移) vs Human Human vs Bots (Automated) Human vs Bots (AI/ML Attackers) Machines (AI/ML Defenders) vs Bots (Automated) Machines (AI/ML Defenders) 使用機器人執行 API 濫用(Sneaker Bots, ATO, 3rd Party Payment APIs, Content Scaping)

Slide 14

Slide 14 text

© 2022 F5 14 隨時隨地保護應用程式和 API Securing Apps & APIs Everywhere 您需要為混合、多雲制定API安全思維 NGINX BIG-IP Distributed Cloud Services

Slide 15

Slide 15 text

© 2022 F5 15 API 安全成熟度模型

Slide 16

Slide 16 text

© 2022 F5 16 5 Levels of the API Security Model Gartner’s API 安全模型 Level 0 Level 1 Level 2 Level 3 Level 4 Level 5 Predictive Security Proactive Security No Security Reactive Security No Security Understand the importance of the ‘API Security’ API G/W Traffic Management Basic Authentication OAuth Access Control Compliance Runtime Protection API Discovery Behavioral Detection Level 4: “There is active monitoring and proactive intervention ensuing compliance with the defined standards.” Level 5: “Organizations are transitioning their security and traffic management capabilities from proactive to predictive.”

Slide 17

Slide 17 text

© 2022 F5 17 持續 API 安全生命週期的 6 個關鍵階段 API Discovery API Inventory API Governance API Protection API Development API Testing 安全程式碼 API 安全威脅與風險 自動化安全測試 識別所有公開的 API 了解您擁有哪些 API 安全合規與治理 主動監控 即時檢測與預防

Slide 18

Slide 18 text

© 2022 F5 18 Gartner and API Security Vendors Frame of API Security API 安全生命週期 Dev Shift & Protect Right Shift Left

Slide 19

Slide 19 text

© 2022 F5 19 Reactive Security Proactive Security Predictive Security API安全成熟度模型 at Runtime Runtime Threat Protection Access Control AI Enabled Shift & Protect Right Behavioral App Security

Slide 20

Slide 20 text

© 2022 F5 20 Recommended API Security Improved Model API 安全成熟度模型 Micr o API G/W WAF Load Balancer WAAP • Shadow API discovery • Real-time blocking • Bot protection • DDoS prevention Outer API G/W • OAuth-enabled • Advanced Access Control • API G/W functions • OAuth Identity Server • OAuth token management • Identity-based Zero-trust • OAuth-enabled • Advanced Access Control • E-W Traffic Protection • Predictive Security Solution • Using AI/ML to detect suspicious behaviors Proactive API Security Solutions Proactive API Security Solutions Predictive API Security Solutions

Slide 21

Slide 21 text

© 2022 F5 21 API 安全架構 Detection 或 Prevention

Slide 22

Slide 22 text

© 2022 F5 22 惡意軟體防護“Detection & Response” 方法 Malware matters only in this phase. 560,000 new malwares per day. • 每天有超過 500K 的新惡意軟體。 • 在「初始入侵」階段幾乎不可能阻止所有新的惡意軟體. • 惡意軟體感染筆記型電腦並不意味著立即“數據洩露”’. • Detection & Response是 惡意軟體防護策略的關鍵. A data leak happens here. Source: Mandiant Attack Lifecycle

Slide 23

Slide 23 text

© 2022 F5 23 為什麼 API 是攻擊者的主要目標? AV WAF NG F/W NG IPS 現有安全解決方案旨在查找惡意Payload 但 API 攻擊通常沒有惡意或可疑的Payload 現有安全解決方案無法檢測 API 攻擊, 例如 BOLA

Slide 24

Slide 24 text

© 2022 F5 24 API 安全需要新方法 Client Server Request Data Response Data Vulnerable API Server 資訊洩露 • 即時預防是 API 安全的關鍵 • 持續改進是保護 API 的策略 • 無 API 安全保護意味著立即的資訊洩露風險 在 API安全領域,“Detection & Response” 效果有限

Slide 25

Slide 25 text

© 2022 F5 25 -No effective BLOCKING -It can NOT stop 1st victim case -High potential FPs (Gartner) API logs Attacker James BOLA Attack Authorization header: access_token, GET /f5api/v1/userinfo/users?id=1001 IP or URL blocking thru Firewall?? It’s not helpful to stop the BOLA attack!! 獨立API安全方案

Slide 26

Slide 26 text

© 2022 F5 26 Defense-in-Depth for APIs Client (Mobile app) Client (Web browser) API Endpoints User 邊界防禦 • DDoS Protection • Rate-limiting • Bot Defense 網路防禦 • SSL Decryption • Intrusion Prevention • Firewall Monitoring 應用防禦 • WAAP • Anomaly Detection • Shadow API Discovery 資訊與存取防禦 • Modern Authentication • Advanced Access Control • Sensitive Data Masking 策略與流程管理 • Risk Management • Audit and Monitoring

Slide 27

Slide 27 text

© 2022 F5 27 安全分散式部署模型 App & Network Security Layer (WAAP) Access Control Layer Cloud Architect Persona API AppDev Persona NetSecOps Persona DevOps Platform Persona E/W APIs N/S APIs API Sec Real-Time API

Slide 28

Slide 28 text

© 2022 F5 28 Multi-Layer API 安全平臺

Slide 29

Slide 29 text

© 2022 F5 29 什麼是WAAP? 到2023年,30%以上的面向公眾的Web應用程式和API將受到 雲Web應用程式和API保護(WAAP)服務的保護,這種服務結 合了分佈式拒絕服務(DDoS)保護、機器人程式緩解(bot mitigation)、API保護和Web應用防火牆(WAF)。 ---- Gartner

Slide 30

Slide 30 text

© 2022 F5 30 Shadow Shadow APIs & 解決方案 OWASP API9:2019 – Improper Assets Management Discovered Inventory (Documented) API Inventory Analyse Traffic Discover Unknown Endpoints Mitigate Threat Export & Analyse Update Inventory Threat mitigation techniques • Allow/Deny request • Rate Limits • Detect and block Malicious Users (Predictive Security) • Detect and block Advanced Bots (Predictive Security)

Slide 31

Slide 31 text

© 2022 F5 31 Identification of APIs – internal/external including shadow APIs API Inventory Analyse Traffic Discover Unknown Endpoints Mitigate Threat Export & Analyse Update Inventory

Slide 32

Slide 32 text

© 2022 F5 32 API Endpoint Discovery 發現 • 自動學習API surface • 使用 AI/ML,構建模型以對 API 行 為進行基線和跟蹤 API 行為 • 對於每個 API 分支,會以錯誤、延 遲和請求指標構建一個模型 • 檢測異常值和影子 API • 匯出swagger以改進 API 定義 •

Slide 33

Slide 33 text

© 2022 F5 33 Behavioral Analysis 行為分析 API Endpoints • 監控和基線 API 行為 • 輕鬆識別異常(例如,請求速率、 延遲、回應大小等的峰值) • 識別 API 通信中的任何 PII

Slide 34

Slide 34 text

© 2022 F5 34 驗證 API Authentication • 發現和查看所有 API 端點的身份驗 證狀態、詳細資訊和風險評分 • 輕鬆創建保護規則 (e.g. Blocking, rate limiting etc.)

Slide 35

Slide 35 text

© 2022 F5 35 CONFIDENTIAL AI/ML-Powered 風險評分 全面的客戶分析suspicion scoring 用於快速決策

Slide 36

Slide 36 text

Kubernetes 的零信任架構

Slide 37

Slide 37 text

© 2022 F5 37 CONFIDENTIAL 如果你是駭客從哪裡下手? ETCD controller manager scheduler API Server kubelet kube-proxy kubelet kube-proxy POD APP POD APP dashboard kubectl git 公有雲 / DC 代碼倉庫 容器鏡像 製品庫 CI/CD IaaS 控制平面 憑證 存儲 控制台API 管理 應用流量 CI/CD管道 三個入口 ◆ 集群管理員的管理入口 ◆ 正面突破的應用流量入口 ◆ 有漏洞的程式碼/供應鏈研發入口

Slide 38

Slide 38 text

© 2022 F5 38 如何保護Kubernetes中的應用? 認證和授權 WAAP pod pod po d po d pod pod po d po d pod pod pod pod Applications pod NGINX IC pod External Services NGINX IC 外部 內部 實施K8S集群入口安全

Slide 39

Slide 39 text

© 2022 F5 39 全面的容器雲應用服務 KUBERNETES應用流量與安全防護 Kubernetes 系統平台:部署多集群應用 用戶 GSLB:F5 DNS 統一功能變數名稱發佈 多中心/多集群智能調度 1 F5保障管理平面高可用性與安全 2 3 Ingress 服務 4 TCP/UDP 服務 5 更強的安全能力 可視化能力

Slide 40

Slide 40 text

© 2022 F5 40 Zero Trust Security for Kubernetes Apps with NGINX • Policy decision/enforcement point (PDP/PEP) • Authentication • Authorization • Access control • Dynamic policy • Encryption • Auditing Identity-based security

Slide 41

Slide 41 text

© 2022 F5 41 F5 NGINX Connectivity Stack for Kubernetes Enterprise-class Secure end-to-end Infrastructure-agnostic (Kubernetes-native)

Slide 42

Slide 42 text

© 2022 F5 42 CONFIDENTIAL ▪zero trust requires an “assume breach” mentality ▪假設攻擊者已在內網 ▪存取相關的方法在於試圖阻止違規行為的發生 ▪應用與API級別的零信任則側重最大限度地減少持續違規行為的影響 ▪在 API安全領域,“Detection & Response” 失效 ▪Defense-in-Depth for APIs ▪Multi-Layer API 安全平臺 : WAAP 小結

Slide 43

Slide 43 text

© 2022 F5 43