SlideShare a Scribd company logo
1 of 63
Download to read offline
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Architecting security and governance through
policy guardrails in Amazon EKS
Paavan Mistry
Specialist Solutions Architect – Security
Amazon Web Services
S D D 4 1 1
Stephen Tallamy
Principal Cloud Architect
Synamedia
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Agenda
Amazon EKS overview
Amazon EKS data plane security and authentication
Governance and security for Kubernetes and Amazon EKS at Synamedia
Policy guardrails on Amazon EKS using Open Policy Agent
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Related events
Tuesday, June 25
GRC340-R – Container runtime security and automation (Builder Session)
4:00 PM – 5:00 PM | Level 1, Room 151B, Table 4
Wednesday, June 26
SDD326-R5 – Security best practices for Amazon EKS (Builder Session)
2:00 PM – 3:00 PM | Level 1, Room 151B, Table 2
Wednesday, June 26
SDD308 – Integrating security testing into your container build pipeline (Workshop)
11:15 AM – 1:15 PM | Level 2, Room 210C
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
We give you the power to choose
Amazon ECS Amazon EKS
Amazon
EC2
AWS
Fargate
Amazon
EC2
AWS
Fargate
1. Choose your
orchestration tool
2. Choose your
launch type
We’re
working
on it #32
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Kubernetes architecture
etcd
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Shared responsibility model
Customers
Data plane
Amazon EKS
Control planeContainers
AWS Cloud
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Amazon EKS compliance
Amazon EKS
Control plane
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Amazon EKS security
Customers
Data planeContainers
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Data plane security: Container runtime interface (CRI)
”Inside the CNCF Project Security Reviews”: https://www.youtube.com/watch?v=0BkKpsrUo5k
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Kubernetes and container security issues
https://aws.amazon.com/security/security-bulletins/
https://aws.amazon.com/blogs/compute/anatomy-of-cve-2019-5736-a-runc-container-escape/
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Amazon EKS update life cycle
May 21, 2019
Blog: https://aws.amazon.com/blogs/compute/updates-to-amazon-eks-version-lifecycle/
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
1. Implement a documented and operational update
and upgrade program
2. Test, update, and upgrade
Threat model input #1
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
IAM authentication with Amazon EKS
$ kubectl
$ ~/kubelet
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
IAM authentication with Amazon EKS
K8s action allowed/denied
Authorization of AWS identity
against Kubernetes RBAC
K8s API
server
Passes AWS identity
Verifies AWS identity
kubectl/kubelet/K
8s client
AWS Identity and Access
Management (IAM)
authentication
https://github.com/kubernetes-sigs/aws-iam-authenticator
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
List API endpoints
K8s API
server
Pass AWS
identity token
Remote host
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
VPC
IAM roles for nodes and pods
AWS Key Management
Service
AWS Secrets Manager Amazon GuardDuty Amazon Inspector AWS CloudTrail Amazon CloudWatch AWS Config AWS Systems Manager
“Using AWS Secrets Manager with Amazon EKS”: https://amzn.to/2KeOqzW
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
AWS containers roadmap on GitHub
https://github.com/aws/containers-roadmap/projects/1
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
AWS containers roadmap on GitHub
https://github.com/aws/containers-roadmap/projects/1
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
1. Review cluster IAM, and limit resource access to
least privilege and need to know
2. Use AWS container roadmap for feature requests
Threat model input #2
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Container security life cycle
CIS Benchmark
checks
Image
hardening and
scanning
Restrict to
approved
registries
Run signed
images only
Immutability
(Pod Security
Policies/
seccomp/ LSM
policies)
Service-to-
service identity
and mTLS
Anomaly
detection
Amazon EKS now supports Pod Security Policies with v1.13: https://amzn.to/2IrS600
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Amazon EKS security: A shared responsibility
Customers
Data planeContainers
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
About Synamedia
The largest global provider of video
solutions for pay TV operators
Trusted by over 200 pay TV
operators
Global innovation with 600 US and
non-US patents
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
China DTH
Deployed globally
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Transforming the way the world is entertained and informed
Video security Video processing Cloud DVR
Foundation platform Infinite platform
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Deployment approach
Dilemma: How to support various environments while also increasing agility?
App
➢ App teams build for a single
framework/platform
Solution: Abstract the apps from what is under the hood
App
App App
➢ Platform team enables the
framework/platform to be
deployed in different
environments
COE cluster External services
On premisesAmazon EKS
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Private subnet
Deployment of OpenShift on AWS
VPC
Node
Node
Public subnet
Network Load Balancer (NLB)
Node
Node
OpenShift workersOpenShift masters
Elastic Load Balancing
Master
Master
Master
Docker registry
Yum repo
Ansible deployer
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Successes and challenges
• Large number of production
Kubernetes deployments
• Field experience performing live
upgrades, maintenance, and war
gaming
• Consistent, repeatable deployment
on-prem and in AWS
• Challenge of keeping track with
Kubernetes version (upgrades)
• User-provisioned infrastructure
lacks features (e.g., ASGs)
• Management of guest operating
system is an overhead
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Private subnet
Deployment of OpenShift on AWS
VPC
Node
Node
Public subnet
NLB
Node
Node
OpenShift workersOpenShift masters
ELB
Master
Master
Master
Docker registry
Yum repo
Ansible deployer
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Private subnet
AWS CloudFormation
Amazon ECR
Amazon EKS AMI
Deployment of Amazon EKS
VPC
Node
Node
Public subnet
NLB
Node
Node
Amazon EKS workers
Amazon EKS
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Migrating to Amazon EKS from OpenShift
Own Docker registry to Amazon ECR
OpenShift router Nginx ingress
controller
Docker registry Amazon ECR
OpenShift built-in extensions
Kubernetes
dashboard
Cluster
Autoscaler
Metrics
server
BYO dashboard, autoscaler, metrics server
OpenShift router to ingress controller
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Private link (recap)
Private subnet Private subnet
VPC (“Provider”)
Instance
Instance
Endpoint
NLB
VPC (”Client”)
Instance
Instance
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Private subnet Private subnet
Hybrid deployment architecture
AWS Direct Connect
VPC (main)
AWS Cloud
Node
Node
Endpoint
NLB
Public subnet
NLB
VPC (proxy)
Node
Node
Customer data center
Private subnet
On-prem network
Client
Kubernetes workers
Node
Kubernetes workers
Node
NLB
Endpoint
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
“With great power
comes great
responsibility.”
—Uncle Ben, “Spiderman”
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Great deployment power – Marketplace of containers
Kubernetes
resources
(YAML)
Amazon EKS
My pod
Node
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Great deployment responsibility – Marketplace of
containers
Kubernetes
resources
(YAML)
Amazon EKS
My pod
Node
NodePort
ELB Attacker
Attacker
Attacker
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Great deployment responsibility – Marketplace of
containers
Amazon ECR
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Great integration power – IAM roles
Amazon S3
UI customization
bucket
Billing reports
bucket
Role
IAM
Frontend VM
Backend VM
Role
Amazon Kinesis
Amazon Kinesis Data
Streams
Amazon ElastiCache
Amazon ElastiCache
for Redis
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Great integration responsibility – IAM roles
Frontend pod
Node
Backend pod
Amazon S3
UI customization
bucket
Billing reports
bucket
Role
IAM
Log DaemonSet
Kinesis
Kinesis Data Streams
ElastiCache
ElastiCache for
Redis
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Great integration responsibility – IAM roles
Frontend pod
Node
Backend pod
Amazon S3
UI customization
bucket
Billing reports
bucket
IAM Kinesis
Kinesis Data Streams
Log DaemonSet
ElastiCache
ElastiCache for
RedisCredential
Credential
Credential
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Great power – Service type LoadBalancer
Service
(LoadBalancer)
ELB Users
Pod selector
(app = frontend)
Frontend pod 1
Node
NodePort
Frontend pod 2
Node
NodePort
Frontend pod 3
Node
NodePort
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Great responsibility – Service type LoadBalancer
Service
(LoadBalancer)
ELB Users
Pod selector
(type = nodejs)
Frontend pod 1
Node
NodePort
Frontend pod 2
Node
NodePort
Frontend pod 3
Node
NodePort
Backend pod 1
Node
NodePort
Generic pod selector
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Great responsibility – Service type LoadBalancer
Service
(LoadBalancer)
ELB Users
Pod selector
(app = frontend)
Frontend pod 1
Node
NodePort
Frontend pod 2
Node
NodePort
Frontend pod 3
Node
NodePort
Backend pod 1
Node
NodePortService
(LoadBalancer)
Pod selector
(app = backend)
ELB Users
Incorrect service type
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Admission controllers in Kubernetes
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Admission controllers in Kubernetes
https://kubernetes.io/blog/2019/03/21/a-guide-to-kubernetes-admission-controllers/
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Open Policy Agent – CNCF project (incubating)
https://www.youtube.com/watch?v=n94_FNhuzy4
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Amazon ECR
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Styra.com – Open Policy Agent
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Rich partner ecosystem
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Amazon EKS security resources
• Kubernetes security book: https://kubernetes-security.info/
• Running Kubernetes with Amazon EKS: https://youtu.be/-3FELDeZf_Q
• Deep dive on Amazon EKS: https://youtu.be/EDaGpxZ6Qi0
• Driving continuous security and configuration checks for Amazon EKS with
Alcide Advisor: https://amzn.to/2L8dNDK
• Using AWS Secrets Manager PrivateLink endpoint with Amazon EKS:
https://amzn.to/2KeOqzW
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
To conclude…
Clearly understand managed systems’ ownership boundaries
and your systems to build the threat model.
“With great power comes great responsibility.”
Thank you!
© 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
Paavan Mistry
Specialist Solutions Architect - Security
AWS
Stephen Tallamy
Principal Cloud Architect
Synamedia

More Related Content

What's hot

What's hot (20)

[Azure Governance] Lesson 3 : Azure Tags
[Azure Governance] Lesson 3 : Azure Tags[Azure Governance] Lesson 3 : Azure Tags
[Azure Governance] Lesson 3 : Azure Tags
 
Introducing AWS Elastic Beanstalk
Introducing AWS Elastic BeanstalkIntroducing AWS Elastic Beanstalk
Introducing AWS Elastic Beanstalk
 
AWS for Backup and Recovery
AWS for Backup and RecoveryAWS for Backup and Recovery
AWS for Backup and Recovery
 
OpenShift-Technical-Overview.pdf
OpenShift-Technical-Overview.pdfOpenShift-Technical-Overview.pdf
OpenShift-Technical-Overview.pdf
 
OpenShift Enterprise
OpenShift EnterpriseOpenShift Enterprise
OpenShift Enterprise
 
NF101: Nutanix 101
NF101: Nutanix 101NF101: Nutanix 101
NF101: Nutanix 101
 
A complete guide to azure storage
A complete guide to azure storageA complete guide to azure storage
A complete guide to azure storage
 
深探-IaC-(Infrastructure as Code-基礎設施即程式碼-)-在-AWS-上的應用
深探-IaC-(Infrastructure as Code-基礎設施即程式碼-)-在-AWS-上的應用深探-IaC-(Infrastructure as Code-基礎設施即程式碼-)-在-AWS-上的應用
深探-IaC-(Infrastructure as Code-基礎設施即程式碼-)-在-AWS-上的應用
 
Helm – The package manager for Kubernetes
Helm – The package manager for KubernetesHelm – The package manager for Kubernetes
Helm – The package manager for Kubernetes
 
MicroServices with Containers, Kubernetes & ServiceMesh
MicroServices with Containers, Kubernetes & ServiceMeshMicroServices with Containers, Kubernetes & ServiceMesh
MicroServices with Containers, Kubernetes & ServiceMesh
 
Service mesh
Service meshService mesh
Service mesh
 
Introduction on Amazon EC2
 Introduction on Amazon EC2 Introduction on Amazon EC2
Introduction on Amazon EC2
 
End-End Security with Confluent Platform
End-End Security with Confluent Platform End-End Security with Confluent Platform
End-End Security with Confluent Platform
 
Deep Dive: Scaling Up to Your First 10 Million Users
Deep Dive: Scaling Up to Your First 10 Million UsersDeep Dive: Scaling Up to Your First 10 Million Users
Deep Dive: Scaling Up to Your First 10 Million Users
 
OCI Overview
OCI OverviewOCI Overview
OCI Overview
 
Spring Boot+Kafka: the New Enterprise Platform
Spring Boot+Kafka: the New Enterprise PlatformSpring Boot+Kafka: the New Enterprise Platform
Spring Boot+Kafka: the New Enterprise Platform
 
Microsoft Azure Technical Overview
Microsoft Azure Technical OverviewMicrosoft Azure Technical Overview
Microsoft Azure Technical Overview
 
[WhaTap DevOps Day] 세션 1 : Observability Practice on AWS
[WhaTap DevOps Day] 세션 1 : Observability Practice on AWS[WhaTap DevOps Day] 세션 1 : Observability Practice on AWS
[WhaTap DevOps Day] 세션 1 : Observability Practice on AWS
 
(CMP201) All You Need To Know About Auto Scaling
(CMP201) All You Need To Know About Auto Scaling(CMP201) All You Need To Know About Auto Scaling
(CMP201) All You Need To Know About Auto Scaling
 
OpenStack Architecture
OpenStack ArchitectureOpenStack Architecture
OpenStack Architecture
 

Similar to Architecting security and governance through policy guardrails in Amazon EKS - SDD411 - AWS re:Inforce 2019

DevOps - Moving to DevOps the Amazon Way
DevOps - Moving to DevOps the Amazon WayDevOps - Moving to DevOps the Amazon Way
DevOps - Moving to DevOps the Amazon Way
Amazon Web Services
 

Similar to Architecting security and governance through policy guardrails in Amazon EKS - SDD411 - AWS re:Inforce 2019 (20)

Amazon EKS - Elastic Container Service for Kubernetes
Amazon EKS - Elastic Container Service for KubernetesAmazon EKS - Elastic Container Service for Kubernetes
Amazon EKS - Elastic Container Service for Kubernetes
 
Fast-Track Your Application Modernisation Journey with Containers - AWS Summi...
Fast-Track Your Application Modernisation Journey with Containers - AWS Summi...Fast-Track Your Application Modernisation Journey with Containers - AWS Summi...
Fast-Track Your Application Modernisation Journey with Containers - AWS Summi...
 
AWS App Mesh (Service Mesh Magic)- AWS Container Day 2019 Barcelona
AWS App Mesh (Service Mesh Magic)- AWS Container Day 2019 BarcelonaAWS App Mesh (Service Mesh Magic)- AWS Container Day 2019 Barcelona
AWS App Mesh (Service Mesh Magic)- AWS Container Day 2019 Barcelona
 
Breaking the Monolith using AWS Container Services
Breaking the Monolith using AWS Container ServicesBreaking the Monolith using AWS Container Services
Breaking the Monolith using AWS Container Services
 
Modernizing legacy applications with Amazon EKS - MAD301 - Chicago AWS Summit
Modernizing legacy applications with Amazon EKS - MAD301 - Chicago AWS SummitModernizing legacy applications with Amazon EKS - MAD301 - Chicago AWS Summit
Modernizing legacy applications with Amazon EKS - MAD301 - Chicago AWS Summit
 
AWS Containers Day.pdf
AWS Containers Day.pdfAWS Containers Day.pdf
AWS Containers Day.pdf
 
Modernizing applications with Amazon EKS - MAD304 - Santa Clara AWS Summit.pdf
Modernizing applications with Amazon EKS - MAD304 - Santa Clara AWS Summit.pdfModernizing applications with Amazon EKS - MAD304 - Santa Clara AWS Summit.pdf
Modernizing applications with Amazon EKS - MAD304 - Santa Clara AWS Summit.pdf
 
AWS Summit London 2019 - Containers on AWS
AWS Summit London 2019 - Containers on AWSAWS Summit London 2019 - Containers on AWS
AWS Summit London 2019 - Containers on AWS
 
Kubernetes on AWS with Amazon EKS - MAD301 - New York AWS Summit
Kubernetes on AWS with Amazon EKS - MAD301 - New York AWS SummitKubernetes on AWS with Amazon EKS - MAD301 - New York AWS Summit
Kubernetes on AWS with Amazon EKS - MAD301 - New York AWS Summit
 
Containers on AWS: An Introduction
Containers on AWS: An IntroductionContainers on AWS: An Introduction
Containers on AWS: An Introduction
 
Breaking the Monolith Using AWS Container Services
Breaking the Monolith Using AWS Container ServicesBreaking the Monolith Using AWS Container Services
Breaking the Monolith Using AWS Container Services
 
Amazon EKS multi-cluster gitops-bridge
Amazon EKS multi-cluster gitops-bridgeAmazon EKS multi-cluster gitops-bridge
Amazon EKS multi-cluster gitops-bridge
 
DevOps - Moving to DevOps the Amazon Way
DevOps - Moving to DevOps the Amazon WayDevOps - Moving to DevOps the Amazon Way
DevOps - Moving to DevOps the Amazon Way
 
From Code to a running container | AWS Summit Tel Aviv 2019
From Code to a running container | AWS Summit Tel Aviv 2019From Code to a running container | AWS Summit Tel Aviv 2019
From Code to a running container | AWS Summit Tel Aviv 2019
 
From Code to a running container | AWS Summit Tel Aviv 2019
From Code to a running container | AWS Summit Tel Aviv 2019From Code to a running container | AWS Summit Tel Aviv 2019
From Code to a running container | AWS Summit Tel Aviv 2019
 
Securing Container-Based Applications at the Speed of DevOps
Securing Container-Based Applications at the Speed of DevOpsSecuring Container-Based Applications at the Speed of DevOps
Securing Container-Based Applications at the Speed of DevOps
 
Getting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS Summit
Getting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS SummitGetting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS Summit
Getting Started with ARM-Based EC2 A1 Instances - CMP302 - Anaheim AWS Summit
 
Secure and Fast microVM for Serverless Computing using Firecracker
Secure and Fast microVM for Serverless Computing using FirecrackerSecure and Fast microVM for Serverless Computing using Firecracker
Secure and Fast microVM for Serverless Computing using Firecracker
 
Breaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdfBreaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdf
 
Application Portability with Kubernetes (CMP310-S) - AWS re:Invent 2018
Application Portability with Kubernetes (CMP310-S) - AWS re:Invent 2018Application Portability with Kubernetes (CMP310-S) - AWS re:Invent 2018
Application Portability with Kubernetes (CMP310-S) - AWS re:Invent 2018
 

More from Amazon Web Services

Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
Amazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
Amazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
Amazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
Amazon Web Services
 

More from Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Architecting security and governance through policy guardrails in Amazon EKS - SDD411 - AWS re:Inforce 2019

  • 1. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Architecting security and governance through policy guardrails in Amazon EKS Paavan Mistry Specialist Solutions Architect – Security Amazon Web Services S D D 4 1 1 Stephen Tallamy Principal Cloud Architect Synamedia
  • 2. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Agenda Amazon EKS overview Amazon EKS data plane security and authentication Governance and security for Kubernetes and Amazon EKS at Synamedia Policy guardrails on Amazon EKS using Open Policy Agent
  • 3. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Related events Tuesday, June 25 GRC340-R – Container runtime security and automation (Builder Session) 4:00 PM – 5:00 PM | Level 1, Room 151B, Table 4 Wednesday, June 26 SDD326-R5 – Security best practices for Amazon EKS (Builder Session) 2:00 PM – 3:00 PM | Level 1, Room 151B, Table 2 Wednesday, June 26 SDD308 – Integrating security testing into your container build pipeline (Workshop) 11:15 AM – 1:15 PM | Level 2, Room 210C
  • 4. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
  • 5. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. We give you the power to choose Amazon ECS Amazon EKS Amazon EC2 AWS Fargate Amazon EC2 AWS Fargate 1. Choose your orchestration tool 2. Choose your launch type We’re working on it #32
  • 6. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Kubernetes architecture etcd
  • 7. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Shared responsibility model Customers Data plane Amazon EKS Control planeContainers AWS Cloud
  • 8. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Amazon EKS compliance Amazon EKS Control plane
  • 9. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Amazon EKS security Customers Data planeContainers
  • 10. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
  • 11. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
  • 12. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
  • 13. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Data plane security: Container runtime interface (CRI) ”Inside the CNCF Project Security Reviews”: https://www.youtube.com/watch?v=0BkKpsrUo5k
  • 14. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Kubernetes and container security issues https://aws.amazon.com/security/security-bulletins/ https://aws.amazon.com/blogs/compute/anatomy-of-cve-2019-5736-a-runc-container-escape/
  • 15. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Amazon EKS update life cycle May 21, 2019 Blog: https://aws.amazon.com/blogs/compute/updates-to-amazon-eks-version-lifecycle/
  • 16. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. 1. Implement a documented and operational update and upgrade program 2. Test, update, and upgrade Threat model input #1
  • 17. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
  • 18. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. IAM authentication with Amazon EKS $ kubectl $ ~/kubelet
  • 19. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. IAM authentication with Amazon EKS K8s action allowed/denied Authorization of AWS identity against Kubernetes RBAC K8s API server Passes AWS identity Verifies AWS identity kubectl/kubelet/K 8s client AWS Identity and Access Management (IAM) authentication https://github.com/kubernetes-sigs/aws-iam-authenticator
  • 20. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. List API endpoints K8s API server Pass AWS identity token Remote host
  • 21. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
  • 22. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. VPC IAM roles for nodes and pods AWS Key Management Service AWS Secrets Manager Amazon GuardDuty Amazon Inspector AWS CloudTrail Amazon CloudWatch AWS Config AWS Systems Manager “Using AWS Secrets Manager with Amazon EKS”: https://amzn.to/2KeOqzW
  • 23. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. AWS containers roadmap on GitHub https://github.com/aws/containers-roadmap/projects/1
  • 24. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. AWS containers roadmap on GitHub https://github.com/aws/containers-roadmap/projects/1
  • 25. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. 1. Review cluster IAM, and limit resource access to least privilege and need to know 2. Use AWS container roadmap for feature requests Threat model input #2
  • 26. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Container security life cycle CIS Benchmark checks Image hardening and scanning Restrict to approved registries Run signed images only Immutability (Pod Security Policies/ seccomp/ LSM policies) Service-to- service identity and mTLS Anomaly detection Amazon EKS now supports Pod Security Policies with v1.13: https://amzn.to/2IrS600
  • 27. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Amazon EKS security: A shared responsibility Customers Data planeContainers
  • 28. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
  • 29. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. About Synamedia The largest global provider of video solutions for pay TV operators Trusted by over 200 pay TV operators Global innovation with 600 US and non-US patents
  • 30. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. China DTH Deployed globally
  • 31. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Transforming the way the world is entertained and informed Video security Video processing Cloud DVR Foundation platform Infinite platform
  • 32. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
  • 33. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Deployment approach Dilemma: How to support various environments while also increasing agility? App ➢ App teams build for a single framework/platform Solution: Abstract the apps from what is under the hood App App App ➢ Platform team enables the framework/platform to be deployed in different environments COE cluster External services On premisesAmazon EKS
  • 34. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Private subnet Deployment of OpenShift on AWS VPC Node Node Public subnet Network Load Balancer (NLB) Node Node OpenShift workersOpenShift masters Elastic Load Balancing Master Master Master Docker registry Yum repo Ansible deployer
  • 35. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Successes and challenges • Large number of production Kubernetes deployments • Field experience performing live upgrades, maintenance, and war gaming • Consistent, repeatable deployment on-prem and in AWS • Challenge of keeping track with Kubernetes version (upgrades) • User-provisioned infrastructure lacks features (e.g., ASGs) • Management of guest operating system is an overhead
  • 36. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Private subnet Deployment of OpenShift on AWS VPC Node Node Public subnet NLB Node Node OpenShift workersOpenShift masters ELB Master Master Master Docker registry Yum repo Ansible deployer
  • 37. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Private subnet AWS CloudFormation Amazon ECR Amazon EKS AMI Deployment of Amazon EKS VPC Node Node Public subnet NLB Node Node Amazon EKS workers Amazon EKS
  • 38. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Migrating to Amazon EKS from OpenShift Own Docker registry to Amazon ECR OpenShift router Nginx ingress controller Docker registry Amazon ECR OpenShift built-in extensions Kubernetes dashboard Cluster Autoscaler Metrics server BYO dashboard, autoscaler, metrics server OpenShift router to ingress controller
  • 39. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
  • 40. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Private link (recap) Private subnet Private subnet VPC (“Provider”) Instance Instance Endpoint NLB VPC (”Client”) Instance Instance
  • 41. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Private subnet Private subnet Hybrid deployment architecture AWS Direct Connect VPC (main) AWS Cloud Node Node Endpoint NLB Public subnet NLB VPC (proxy) Node Node Customer data center Private subnet On-prem network Client Kubernetes workers Node Kubernetes workers Node NLB Endpoint
  • 42. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
  • 43. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. “With great power comes great responsibility.” —Uncle Ben, “Spiderman”
  • 44. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Great deployment power – Marketplace of containers Kubernetes resources (YAML) Amazon EKS My pod Node
  • 45. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Great deployment responsibility – Marketplace of containers Kubernetes resources (YAML) Amazon EKS My pod Node NodePort ELB Attacker Attacker Attacker
  • 46. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Great deployment responsibility – Marketplace of containers Amazon ECR
  • 47. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Great integration power – IAM roles Amazon S3 UI customization bucket Billing reports bucket Role IAM Frontend VM Backend VM Role Amazon Kinesis Amazon Kinesis Data Streams Amazon ElastiCache Amazon ElastiCache for Redis
  • 48. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Great integration responsibility – IAM roles Frontend pod Node Backend pod Amazon S3 UI customization bucket Billing reports bucket Role IAM Log DaemonSet Kinesis Kinesis Data Streams ElastiCache ElastiCache for Redis
  • 49. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Great integration responsibility – IAM roles Frontend pod Node Backend pod Amazon S3 UI customization bucket Billing reports bucket IAM Kinesis Kinesis Data Streams Log DaemonSet ElastiCache ElastiCache for RedisCredential Credential Credential
  • 50. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Great power – Service type LoadBalancer Service (LoadBalancer) ELB Users Pod selector (app = frontend) Frontend pod 1 Node NodePort Frontend pod 2 Node NodePort Frontend pod 3 Node NodePort
  • 51. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Great responsibility – Service type LoadBalancer Service (LoadBalancer) ELB Users Pod selector (type = nodejs) Frontend pod 1 Node NodePort Frontend pod 2 Node NodePort Frontend pod 3 Node NodePort Backend pod 1 Node NodePort Generic pod selector
  • 52. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Great responsibility – Service type LoadBalancer Service (LoadBalancer) ELB Users Pod selector (app = frontend) Frontend pod 1 Node NodePort Frontend pod 2 Node NodePort Frontend pod 3 Node NodePort Backend pod 1 Node NodePortService (LoadBalancer) Pod selector (app = backend) ELB Users Incorrect service type
  • 53. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
  • 54. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Admission controllers in Kubernetes
  • 55. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Admission controllers in Kubernetes https://kubernetes.io/blog/2019/03/21/a-guide-to-kubernetes-admission-controllers/
  • 56. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Open Policy Agent – CNCF project (incubating) https://www.youtube.com/watch?v=n94_FNhuzy4
  • 57. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Amazon ECR
  • 58. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved.
  • 59. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Styra.com – Open Policy Agent
  • 60. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Rich partner ecosystem
  • 61. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Amazon EKS security resources • Kubernetes security book: https://kubernetes-security.info/ • Running Kubernetes with Amazon EKS: https://youtu.be/-3FELDeZf_Q • Deep dive on Amazon EKS: https://youtu.be/EDaGpxZ6Qi0 • Driving continuous security and configuration checks for Amazon EKS with Alcide Advisor: https://amzn.to/2L8dNDK • Using AWS Secrets Manager PrivateLink endpoint with Amazon EKS: https://amzn.to/2KeOqzW
  • 62. © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. To conclude… Clearly understand managed systems’ ownership boundaries and your systems to build the threat model. “With great power comes great responsibility.”
  • 63. Thank you! © 2019, Amazon Web Services, Inc. or its affiliates.All rights reserved. Paavan Mistry Specialist Solutions Architect - Security AWS Stephen Tallamy Principal Cloud Architect Synamedia