+ All Categories
Home > Internet > Docker security introduction-task-2016

Docker security introduction-task-2016

Date post: 14-Apr-2017
Category:
Upload: ricardo-gerardi
View: 65 times
Download: 0 times
Share this document with a friend
52
DOCKER SECURITY Fernando Montenegro, CISSP - Ricardo Gerardi - @fsmontenegro @ricardogerardi TASK Jan 27, 2016
Transcript
Page 1: Docker security introduction-task-2016

DOCKERSECURITY

Fernando Montenegro, CISSP -

Ricardo Gerardi -

@fsmontenegro

@ricardogerardi

TASK Jan 27, 2016

Page 2: Docker security introduction-task-2016

WHY ARE WE HERE?Google Trends: "Microservices"

Page 3: Docker security introduction-task-2016

Google Trends: "Docker"

Page 4: Docker security introduction-task-2016

Google Trends: "Kubernetes"

Page 5: Docker security introduction-task-2016

MICROSERVICES?

(Source: F5)

Page 6: Docker security introduction-task-2016

MICROSERVICES"Many development teams have found the microservices

architectural style to be a superior approach to amonolithic architecture. But other teams have found them

to be a productivity-sapping burden. Like any architecturalstyle, microservices bring costs and bene�ts. To make asensible choice you have to understand these and apply

them to your speci�c context.""Martin Fowler ( )http://martinfowler.com/articles/microservice-trade-o�s.html

Page 7: Docker security introduction-task-2016

SIGNIFICANT BENEFITSSupport CI/CD practicesEasier to achieve scaleOperational bene�ts of "DevOps"

Page 8: Docker security introduction-task-2016

DATADOG CONTAINER SURVEY( )https://www.datadoghq.com/docker-adoption/

Two schools of thought:

Containers as up&down microservicesContainers as "lightweight servers" that stay up

Page 9: Docker security introduction-task-2016
Page 10: Docker security introduction-task-2016
Page 11: Docker security introduction-task-2016

WHAT WE FOUND

Page 12: Docker security introduction-task-2016
Page 13: Docker security introduction-task-2016

ABOUT US - FERNANDO@fsmontenegro

Sales EngineerOnline FraudNetwork Security

CompSci ’94Greying hair Curious

Finance (DIY)Economics (EMH, Behaviour)Data Science (Coursera)

Page 14: Docker security introduction-task-2016

ABOUT US - RICARDO@ricardogerardi

Senior IT ConsultantNetworkManagement/Monitoring

IBM Netcool Certi�edUncerti�ed father (2x)Interests

Linux/UNIXEmerging technologiesData Science

Page 15: Docker security introduction-task-2016

DOCKER INTRO

Page 16: Docker security introduction-task-2016

WHAT IS DOCKER?DOCKER, THE PLATFORM

Docker is a container based platform used to packageand run applications in a variety of systems

DOCKER, THE COMPANYDocker Inc. (https://www.docker.com/company)

Page 17: Docker security introduction-task-2016

SOFTWARE PACKAGE ANDDISTRIBUTION CHALLENGEOLD WAY - HOSTED APPLICATIONS

Page 18: Docker security introduction-task-2016

VIRTUAL MACHINES

Page 19: Docker security introduction-task-2016

ENTER THE CONTAINER

Page 20: Docker security introduction-task-2016

WHY DOCKER?Linux containers

Around for a long time (Open VZ, LXC, etc)Not very "friendly"

Docker streamlines the process and makes it very easyto create and use containers

Speed (Development/Scalability)PortabilityDriver to DevOps and Microservices

Page 21: Docker security introduction-task-2016

WHAT DO YOU NEED TO RUNDOCKER?

Recent Linux Kernel (3.8+)NamespacescGroups

Network connection

Page 22: Docker security introduction-task-2016

DOCKER ARCHITECTURE IN ANUTSHELL

Source: https://www.docker.com/what-docker

Page 23: Docker security introduction-task-2016

Source: https://docs.docker.com/engine/introduction/understanding-docker/

Page 24: Docker security introduction-task-2016

DOCKER DEMO

Page 25: Docker security introduction-task-2016

DOCKERSECURITY

Page 26: Docker security introduction-task-2016

FIRST THINGS FIRST...Containers vs. VMs?

Containers not as isolated as VMs.but much more isolated than processes...cgroups & namespaces

Containers are OS-dependant.

Containers for multi-tenancy? Not so fast...

Containers & VMs :-)

Page 27: Docker security introduction-task-2016

SECURITY FOR DOCKERHow to secure the Docker "pipeline"

How to secure Docker containers themselves

Page 28: Docker security introduction-task-2016

SECURITY FOR DOCKER IMAGESSecure Registry/Mirror AccessGetting trustworthy images

trusted sources - docker hub, private registrybuilding secureDocker Content Trust (1.8) [Notary]

"only signed content in production"Yubico Keys

Page 29: Docker security introduction-task-2016

DOCKER'S PROJECT NAUTILUSDocker securing images on DockerHubImage securityComponent inventory/license managementImage optimizationBasic functional testing

Page 30: Docker security introduction-task-2016

CLAIR BY COREOSSecurity scanning of images -

Available on QuaySecurity Scanning Beta -

https://coreos.com/blog/vulnerability-analysis-for-containers/

https://blog.quay.io/security-scanning-beta/

Page 31: Docker security introduction-task-2016

OTHER CONSIDERATIONSContainers are stateless

Can mount additional volumesHow to do Secrets Management?

ENV variables - not recommendedKey/Value Pair solutions

Embedded in orchestration ( )Vault & Keywhiz

KubernetesCustom solutions

Page 32: Docker security introduction-task-2016

SECURITY FROM DOCKERHow to contain Docker & containers?

Page 33: Docker security introduction-task-2016

NAMESPACES & CGROUPSPID – process isolationNetwork – NICs, IPs, routing tabes et al.UTS – hostnamesMount – �lesystem layouts/ propertiesIPC – interprocess communication

User – users ("root" != root)

Control groups: resource utilization (RAM, swap, CPU,IO, controls)

Page 34: Docker security introduction-task-2016

ADDITIONAL FEATUREScapabilities - add or drop capabilitiesseccomp - �ltering of system callsnetwork isolation via iptables

limit inter-container communication

Page 35: Docker security introduction-task-2016

SECURITY BY DOCKERLeveraging Docker features for security

Page 36: Docker security introduction-task-2016

LEVERAGING DOCKER FOR SECURITYmicroservice -> reduced attack surfaceenforce content trust to protect productionr/o FileSystemsdrop capabilities when possibleseccomp - �ltering system callsjournaled changes

Page 37: Docker security introduction-task-2016

OPERATIONSAND ECOSYSTEM

Page 38: Docker security introduction-task-2016

WHERE TO DEPLOY DOCKER?ON PREMISESBaremetal (on Linux)Virtual MachinesIaaS, OpenStack, etc

Page 39: Docker security introduction-task-2016

PUBLIC CLOUD PROVIDERS

Page 40: Docker security introduction-task-2016

PAAS PROVIDERS

Page 41: Docker security introduction-task-2016

ORCHESTRATION /SCHEDULING

Page 42: Docker security introduction-task-2016

NETWORKINGBASIC NETWORKING

Page 43: Docker security introduction-task-2016

OVERLAY NETWORKING

Page 44: Docker security introduction-task-2016

MONITORINGCHALLENGES

Scalability (100s of containers in a single host)Host Monitoring x Container MonitoringContainer instrumentation (1 process/containerphilosophy)API instability

Page 45: Docker security introduction-task-2016

CONTAINER MONITORING SOLUTIONS

Sysdig CloudWeaveworksNew relic

Google cAdvisor

Page 46: Docker security introduction-task-2016

CONTAINER LOG MANAGEMENTELK StackSplunk

Page 47: Docker security introduction-task-2016

WRAPPING UP

Page 48: Docker security introduction-task-2016

LOOKING AT THE FUTURE

Containers exist in a continuum of options.

Unikernels

one degree furthercompile kernel for application

Undebuggable?

Serverless Architecture?

AWS LambdaAzure Service Fabric

potentially bad idea?

Page 49: Docker security introduction-task-2016
Page 50: Docker security introduction-task-2016

WRAPPING UP

Docker Security "Anti-Patterns"

free-for-all (unrestricted containers in Prod)treating containers as servers

Recommendations for Security

Don't try to stop it!!!recognize massive potential for disruptionno agents on containerswatch for outbound tra�ckeep up to date (news!)rethink approach ("cattle, not pets")

Page 52: Docker security introduction-task-2016

RESOURCES!Twitterfolk:

- AWS architect, tons ofDocker links

- Docker Security - Tons of Container work

- Pluralsight course - KeepingItClassless,

TechFieldDay

- WebScale @ Shopify - DevOps

- Shmoocon 2016 preso and - Company &

Conference - Kubernetes confab

Websites:

- Checklist - portal of all things "modern" stacks

- Network-focused approach - Open Container Initiative

@mattnowina

@diogomonica@frazelledazzell@nigelpoulton@mierdin

@Sirupsen@blinken_lichten@jaybeale@docker @dockercon

@kubeconio

DockerBenchTheNewStackPacket PushersRunC


Recommended