Top Banner
Chris Swan, CTO, @cpswan Ensuring a secure foundation for your AWS Containers
40

Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

Jan 27, 2017

Download

Technology

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

Chris Swan, CTO, @cpswan

Ensuring a secure foundation for your AWS Containers

Page 2: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

Why me?

Used to do IT security for two major Swiss Banks Started using Docker July 2013 and decided to incorporate it into our VNS3 product as a plugin mechanism Docker became part of Cohesive Networks VNS3 in April 2014 real users in production before Docker itself went 1.0 Regular contributor to InfoQ on Docker, security and containers

Page 3: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

The Docker promise – Build, Ship, Run

Page 4: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

Running containers on EC2

Page 5: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

EC2 instances

Page 6: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

Elastic Beanstalk

Page 7: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

EC2 Container Service

Page 8: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

Where did that code come FROM (and is it secure)?

Page 9: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

Official Images with Vulnerabilities

Image credit: Banyan Ops - http://www.banyanops.com/blog/analyzing-docker-hub/

Page 10: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

Packages in Official Images with High Priority Vulnerabilities

Image credit: Banyan Ops - http://www.banyanops.com/blog/analyzing-docker-hub/

Page 11: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

General Images with Vulnerabilities

Image credit: Banyan Ops - http://www.banyanops.com/blog/analyzing-docker-hub/

Page 12: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

Packages in General Images with High Priority Vulnerabilities

Image credit: Banyan Ops - http://www.banyanops.com/blog/analyzing-docker-hub/

Page 13: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

It’s not as bad as it might look

Image bloat can mean lots of potentially vulnerable code that never gets run leaves something of an unexploded minefield Taint inheritance fix the root cause – fix a lot of images Worst cases lie in deprecated versions but the continued use of known vulnerable old versions of things is how we end up with stuff that gets attacked so easily

Page 14: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

The manifest problem

Page 15: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

Take an example Dockerfile

Page 16: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

Each active line creates a layer

Base OS

Sources Update repos Install nginx

Mod nginx.conf Mod index.html

Page 17: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

An images binds layers together

Page 18: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

The image is the unit of deployment

Page 19: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

What version of nginx is that?

Page 20: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

What version of OpenSSL is installed?

Page 21: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

And which bash?

Page 22: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

Problem 1 – non determinism

Whilst we want things to be cached in the short term e.g.: apt-get install nginx

We perhaps don’t want it cached in the long term What are those durations?

Page 23: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

Problem 2 – the manifest problem

When I run: apt-get install nginx

I don’t know which version of nginx I just got Should I? nginx –v > some.log

Or maybe? apt-cache policy nginx > some.log

Or should I have done this in the first place? apt-get install nginx=1.1.19-1ubuntu0.7

Page 24: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

NB – These are package manager problems

But Docker is ‘the new package manager’ and it typically wraps the old ones

Page 25: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

So perhaps use a more sophisticated package manager

Page 26: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

Or avoid packages altogether

FROM scratch

Page 27: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

Docker Content Trust

Page 28: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

Overview of Docker Content Trust

Image credit: Diogo Mónica (Docker) - https://blog.docker.com/2015/08/content-trust-docker-1-8/

Page 29: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

Protection against image forgery

Image credit: Diogo Mónica (Docker) - https://blog.docker.com/2015/08/content-trust-docker-1-8/

Page 30: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

Protection against replay attacks

Image credit: Diogo Mónica (Docker) - https://blog.docker.com/2015/08/content-trust-docker-1-8/

Page 31: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

Protection against key compromise

Image credit: Diogo Mónica (Docker) - https://blog.docker.com/2015/08/content-trust-docker-1-8/

Page 32: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

Key components of Docker Content Trust

Page 33: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

Docker Security Benchmark

Page 34: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

It’s a document

Page 35: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

And there’s an accompanying tool

Image credit: https://www.docker.com/docker-security

Page 36: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

The benchmark covers

1. Host configuration 2. Docker daemon configuration 3. Docker daemon configuration files 4. Container Images and build file 5. Container runtime 6. Docker security operations

Page 37: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

Wrapping up

Page 39: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

And please check out Docker plugins to our VNS3

39

Isolated Docker containers within VNS3 allows Partners and Customers to embed features and functions safely and securely into their Cloud Network.

Proxy Reverse Proxy Content Caching Load Balancer IDS Custom Container

Router Switch Firewall Protocol Redistributor

VPN Concentrator

Scriptable SDN

VNS3 Core Components

Page 40: Ensuring a secure foundation for your AWS Containers - Chris Swan's AWS Loft talk in London

© 2015

Questions?