dockerfile编写规则 w10_asd w10 practical approaches to cloud native security

1.SESSIONID:ASD-W10 Practical Approaches to Cloud Native Security Karthik Gaekwad Principal Engineer Oracle Inc @iteration1 #RSAC

2.#RSAC Hello • I’m Karthik Gaekwad • NOT a DBA •https://cloudnative.oracle.com/• Cloud Native Evangelist at Oracle Cloud •Past:Developer on the Oracle Managed Kubernetes Team @iteration1

3.Hello Been in Industry 15 years. In general, I like building stuff with friends. – Maintainer for Gauntlt- Open source security scanner. Love Teaching and building community. – Run Devopsdays Austin, Container Days, Cloud Austin. – Chair All Day Devops Cloud Native track. – LinkedIn Learning Author for Learning Kubernetes (and more). #RSAC

4.#RSAC I mustache you a question…

5.The Cloud Native Journey #RSAC Core to Edge Docker Speed Efficiency Agility Kubernetes Phase I Developer Focus Container Adoption Focus Applications Automation Community Developer adoption Dev/Test apps Simple orchestration Individual developers Phase II DevOps Focus Application Deployment DevOps deployment Production apps Advanced orchestration Teams & lines of business 5 Phase III Business Focus (end-to-end) Intelligent Operations End-to-end integration Digital business apps Serverless, DevSecOps, & ML Cloud native enterprises

6.#RSAC CNCFSurvey:August 2018 How Does Your Company Use Containers and Where? Lots of adoption on dev/staging Continued production increase

7.#RSAC CNCFSurvey:August 2018 How Does Your Company Use Containers and Where? Adoption over public and on-prem

8.Kubernetes Dominates Container Management Your company/organization manages containerswith:Kubernetes #RSAC

9.#RSAC Good News, Bad News… Many Projects… Good usage in dev/prod But...

10.Top 5 challenges to cloud native adoption… Monitoring Security Lack of Training Cultural Challenges Complexity 0 5 10 15 Percentages 20 25 30 35 40 45 #RSAC

11.#RSAC Kubernetes & Cloud Native Challenges Managing, maintaining, upgrading Kubernetes Control Plane – API Server, etcd, scheduler etc…. Managing, maintaining, upgrading Kubernetes Data Plane – In place upgrades, deploy parallel cluster etc…. Figuring out container networking & storage – Overlays, persistent storage etc… - it should just work Managing Teams – How do I manage & control team access to my clusters? Security, security, securitySource:Oracle Customer Survey 2018 11

12.How Are Teams Addressing Complexity, Training Issues? Customer Managed Fully-Managed App Management App Management App Deployment Scaling App Deployment Scaling YOU High Availability High Availability Platform Backup & Recovery Platform Backup & Recovery Upgrades & Patching Upgrades & Patching Software Installation Server Provisioning #RSAC Software Installation Server Provisioning Rack and Stack Rack and Stack Power, HVAC Power, HVAC Benefits  Faster Time to Deploy  Lower Risk  Accelerate Innovation

13.#RSAC Which brings us to security…

14.#RSAC Where no news, is good news!

15.#RSAC Unsecured K8s dashboards Unsecured Kubernetes Dashboard with account creds. Used this to mine cryptocurrency. 2017: Aviva 2018: Tesla, Weight Watchershttps://redlock.io/blog/cryptojacking-tesla

16.#RSAC Kubelet credentials hackShopify:Server Side request Forgery Get kubelet certs/private key Root access to any container in part of infrastructure.https://hackerone.com/reports/341876

17.#RSAC

18.#RSAC

19.#RSAC

20.#RSAC

21.#RSAC

22.#RSAC How did we get here?

23.#RSAC “Kubernetes is too complicated”

24.#RSAC “Kubernetes is too complicated” “We hope it’ll get easier”

25.#RSAC What is your strate

26.#RSAC Let’s lookat:Attack Surface – More importantly, how to limit damage Security related features in K8s – The more you know, the better you build Opensource Tooling to help – Because we all need help

27.#RSAC Attack Surface

28.Attack SurfaceGoal:Reduce the attack surface Analysisfor:–Host(s) –Container (Images and running) –Kubernetes Cluster #RSAC

29.AttackSurface:Host These are the machines you’re running Kubernetes on. Age old principles of Linux stillapply:– Enable SELinux – AppArmor – Seccomp – Hardened ImagesGoal:Minimize privilege to applications running on the host Goodnews:Already a wealth of information on this subject! –http://lmgtfy.com/?q=how+to+reduce+attack+surface+linux#RSAC

30.AttackSurface:Container ImagesGOAL:Know your base image when building containers #RSAC

31.AttackSurface:Container ImagesGOAL:Know your base image when building containers **BTW, this is just a ruby helloworld app #RSAC

32.AttackSurface:Container ImagesGOAL:Know your base image when building containers **BTW, this is just a ruby helloworld app #RSAC

33.AttackSurface:Container ImagesGOAL:Know your base image when building containers Fulldisclosure:I’m karthequian; I created this as a ruby 101 container for learning purposes only #RSAC

34.AttackSurface:Container ImagesGOAL:Know your base image when building containers When in doubt, stick to an official images! Or start from a sane base image (example:alpine linux) #RSAC

35.AttackSurface:Container ImagesGOAL:Smaller the image, the better Less things for an attacker to exploit. Quicker to push, quicker to pull. #RSAC

36.AttackSurface:Container ImagesGOAL:Don’t rely on :latest tag :latest image yesterday might not be :latest image tomorrow Instead, you’d want to know what specific version you’re operating with. Sidebenefit:If there is a new vulnerability announced for OS version x.y.z, you know immediately whether you’re running that version! #RSAC

37.AttackSurface:Container Images #RSACGOAL:Check for vulnerabilities periodically Plenty of ways to do this in registries. We’ll cover more in the tooling section

38.AttackSurface:Running ContainersGOAL:Don’t run as root Containers running as root might be completely unnecessary for the actual application. If compromised, attacker can do a lot more things.. Pod security policies can help (we’ll see how later). #RSAC

39.AttackSurface:Running Containers #RSACGOAL:Limit host mounts Be wary of images that require broad access to paths on the host Limit your host mount to a smaller subset of directories Reduces blast radius on compromise

40.#RSAC AttackSurface:Kubernetes Cluster

41.Kubernetes Cluster- TLS TLS ALL THE THINGS #RSAC

42.Kubernetes Cluster- TLS TLSChecklist:1. Nodes and Master 2. User and Master 3. Everything etcd 4. Kubelet to API Server #RSAC

43.#RSAC Kubernetes Cluster- TLS

44.Kubernetes Cluster- TLS TLSChecklist:1. User and Master 2. Nodes and Master 3. Everything etcd 4. Kubelet to API Server #RSAC

45.CVE’s Happen… #RSAC

46.CVE’s Happen… #RSAC

47.#RSAC CVE’sGOAL:Have an upgrade strategy Because…CVE’s are fixed in new minor versions. Don’t treat K8s as “install once, run all the time”. Make your K8s install repeatable for different versions. ..Or use a Managed Provider. – Either automatically patch for you, or tell you what to do. 47

48.We’re a little better off now. #RSAC But what else to do?

49.#RSAC K8s Features How can the platform help me make secure choices?

50.#RSAC K8s Features Authentication Authorization Audit Logging Network Policies Pod security policies Kubernetes Secrets

51.Authentication and Authorization Do you know how you are authenticating with Kubernetes? Many ways to Authenticate – Client Certs – Static token file – Service Account tokens – OpenID – Webhook Mode – And more (https://kubernetes.io/docs/reference/access-authn-authz/authentication/)#RSAC

52.#RSACGoal:Pick a strategy that fits your use case Whatever you do, DO NOT YOLO!

53.#RSAC If you DO NOT YOLO… You can pick an authz strategy..

54.Authentication and Authorizationhttps://kubernetes.io/docs/reference/access-authn-authz/authorization/ #RSAC

55.Authentication and Authorization Protip:Nobody uses ABAC anymore. Don’t be that guy…. RBAC is the defacto standard – Based on roles and role bindings – Good set ofdefaults:https://github.com/uruddarraju/kubernetes-rbac-policiesCan use multiple authorizers together, but can get confusing. – 1st authorizer to authorize passes authz #RSAC

56.Kubernetes Cluster- Audit Logs #RSAC Wat? “Kubernetes auditing provides a security-relevant chronological set of records documenting the sequence of activities that have affected system by individual users, administrators or other components of the system.”Answers:What/when/who/where information on security events. Yourjob:Periodically watch Kubernetes Audit logshttps://kubernetes.io/docs/tasks/debug-application-cluster/audit/

57.#RSAC

58.Kubernetes Cluster- Network Policies Consider adding a network policy to the cluster… DefaultPolicy:All pods can talk to all other pods. Consider limiting this with a Network Policyhttps://kubernetes.io/docs/concepts/services-networking/network-policies/#RSAC

59.Kubernetes Cluster- Pod Security Policies Consider adding Pod Security policiesPodSecurityPolicy:A Defined set of conditions a pod must run with. Think of this as authorization for pods. #RSAC

60.KubernetesCluster:Pod Security Policies Capability for an admin to control specific actionshttps://kubernetes.io/docs/concepts/policy/pod-security-policy/#what-is-a-pod-security-policy#RSAC

61.Kubernetes Secrets #RSACGOAL:Use Kubernetes secrets to store sensitive data instead of config maps. Also lookat:secrets encryption provider. – Controls how etcd encrypts API data – --experimental-encryption-provider-confighttps://kubernetes.io/docs/tasks/administer-cluster/encryptdata/

62.Tooling Opensource Tooling #RSAC

63.Keep tabs on the CNCF Security landscape #RSAChttps://landscape.cncf.io/landscape=security-complia

64.#RSAC CNCF Projects “The Update Framework” Is a project. Is a framework or a methodology. Based on TUF. Used for secure software updates. Based on ideas surrounding trust and integrity. A solution to secure software updates and distribution. Used in Docker Trusted Registry.

65.Clair Open source project for the static analysis of vulnerabilities in containers. Find vulnerable images in your repo. Built into quay.io, but you can add to your own repo.https://github.com/coreos/clair#RSAC

66.#RSAC

67.#RSAC Harbor Newer! CNCF Project Registry product Supports vulnerability scanning, image signing and identity control Scope is larger than clair

68.Harbor #RSAC

69.Kube-bench Checks whether a Kubernetes cluster is deployed according to security best practices. Run this after creating your K8s cluster.https://github.com/aquasecurity/kube-benchDefined by the CIS BenchmarksDocs:https://www.cisecurity.org/cis-benchmarks/Run it against your Kubernetes Master, or Kubernetes node. #RSAC

70.Kube-bench example #RSAC

71.Kubesec Helps you quantify risk for Kubernetes resources. Run against your K8s applications (deployments/pods/daemonsets etc)https://kubesec.io/from controlplane Can be used standalone, or as a kubectl plugin (https://github.com/stefanprodan/kubectl-kubesec)#RSAC

72.Kubesec example #RSAC

73.Kubeaudit Opensourced from Shopify. Auditing your applications in your K8s cluster.https://github.com/Shopify/kubeauditLittle more targeted than Kubesec. #RSAC

74.#RSAC

75.Kubeaudit example #RSAC

76.Couple more resources to lookat:11 ways not to gethacked:https://kubernetes.io/blog/2018/07/18/11-ways-not-to-gethackedK8s security (from Image Hygiene to Network Policy):https://speakerdeck.com/mhausenblas/kubernetes-securityfrom-image-hygiene-to-network-policies#RSAC

77.Apply It! 77

78.#RSAC Apply It! Day 1: Know what version of Docker and Kubernetes you use. Understand if your control and data plane nodes are hardened. Understand how your Docker containers are built. Find out how you authenticate and authorize for your clusters. 78

79.#RSAC Apply It! Week 1: Build an AutomationPipeline:– To build Docker images on code pushes – Versioning strategy for code – To build your Kubernetes clusters 79

80.#RSAC Apply It! 1st Month Sanitize yourcode:– Know your base images – Implement versioning for your containers – Invest in a registry (or tooling) that does vulnerability scanningKubernetes:– Have an upgrade strategy in place – Analyze secrets/sensitive cluster data – Turn on audit logging 80

81.#RSAC Apply It! 3Months:Continuously Monitor – Tooling like Kubesec/Kube-audit Plan how to address vulnerabilities/CVE’sK8s:– Strategy for Pod Security Policies – Strategy for Network Policies – Run scans (like kube-bench) on cluster creation 81

82.#RSAC Apply It! 6Months:Re-ask day 1 questions. Review strategies- is it working? What needs tweaking? Review tooling- are there new tools that help? Review CVE’s 82

83.KEEP CALM AND KUBE ON @iteration1 #RSAC

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
代码下载:完整代码,可直接运行 ;运行版本:2022a或2019b或2014a;若运行有问题,可私信博主; **仿真咨询 1 各类智能优化算法改进及应用** 生产调度、经济调度、装配线调度、充电优化、车间调度、发车优化、水库调度、三维装箱、物流选址、货位优化、公交排班优化、充电桩布局优化、车间布局优化、集装箱船配载优化、水泵组合优化、解医疗资源分配优化、设施布局优化、可视域基站和无人机选址优化 **2 机器学习和深度学习方面** 卷积神经网络(CNN)、LSTM、支持向量机(SVM)、最小二乘支持向量机(LSSVM)、极限学习机(ELM)、核极限学习机(KELM)、BP、RBF、宽度学习、DBN、RF、RBF、DELM、XGBOOST、TCN实现风电预测、光伏预测、电池寿命预测、辐射源识别、交通流预测、负荷预测、股价预测、PM2.5浓度预测、电池健康状态预测、水体光学参数反演、NLOS信号识别、地铁停车精准预测、变压器故障诊断 **3 图像处理方面** 图像识别、图像分割、图像检测、图像隐藏、图像配准、图像拼接、图像融合、图像增强、图像压缩感知 **4 路径规划方面** 旅行商问题(TSP)、车辆路径问题(VRP、MVRP、CVRP、VRPTW等)、无人机三维路径规划、无人机协同、无人机编队、机器人路径规划、栅格地图路径规划、多式联运运输问题、车辆协同无人机路径规划、天线线性阵列分布优化、车间布局优化 **5 无人机应用方面** 无人机路径规划、无人机控制、无人机编队、无人机协同、无人机任务分配 **6 无线传感器定位及布局方面** 传感器部署优化、通信协议优化、路由优化、目标定位优化、Dv-Hop定位优化、Leach协议优化、WSN覆盖优化、组播优化、RSSI定位优化 **7 信号处理方面** 信号识别、信号加密、信号去噪、信号增强、雷达信号处理、信号水印嵌入提取、肌电信号、脑电信号、信号配时优化 **8 电力系统方面** 微电网优化、无功优化、配电网重构、储能配置 **9 元胞自动机方面** 交通流 人群疏散 病毒扩散 晶体生长 **10 雷达方面** 卡尔曼滤波跟踪、航迹关联、航迹融合

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值