AppSec USA 2014 Denver, Colorado Implications & Opportunities at the Bleeding Edge of DevOps Chris...

Post on 01-Apr-2015

217 views 0 download

Tags:

Transcript of AppSec USA 2014 Denver, Colorado Implications & Opportunities at the Bleeding Edge of DevOps Chris...

AppSec USA 2014

Denver, Colorado

Implications & Opportunities at the

Bleeding Edge of DevOpsChris Swan, CTO CohesiveFT

@cpswan

@cpswanCTO – CohesiveFTCloud native networking

Chris Swan – why me?

Introduction

Dockerfile is awesomely productive Great for DevOps

Containers don’t contain At least not yet

Images have a manifest problemKeep track of your stuff

TL;DR

What do I mean when I say ‘DevOps’?

Part 1

Let’s start with a demo

Demo time

John Boyd’s OODA loop

Industrial design maturity – the auto example

Design for purpose

Design for manufacture

Design for operations

Industrial design maturity - software

Design for purpose

Design for manufacture

Design for operations

DevOps is just an artefact

Containers and containment

Part 2

Containers don’t contain

With thanks to Dan Walsh @rhatdanWatch his DockerCon 2014 presentation at http://is.gd/dcrhdw

Shocker

The issue

The responsehttp://stealth.openwall.net/xSports/shocker.c

https://news.ycombinator.com/item?id=7910117

Because containers aren’t VMs

And this has yet to come:

Possible to have our cake and eat it?

cgroups

namespaces

mnt mount points, filesystemspid processesnet networkipc inter process communicationuts hostnamedevice devicesuser UIDs

Fine grained control over ‘root’ privileges:• deny all "mount" operations;• deny access to raw sockets (to prevent packet

spoofing);• deny access to some filesystem operations, like

creating new device nodes, changing the owner of files, or altering attributes (including the immutable flag);

• deny module loading;• etc.

capabilities

AppArmor and SELinux

Mandatory Access Control (MAC)

• Use of namespaces, capabilities and MAC will improve– Might be a game of ‘whack a mole’

• Hard to tell when we’re done (is @solomonstre’s word going to be enough?)

• Libcontainer can drive other mechanisms– More secure options might come

• Hardware support might come– Existing rings 1 & 2 aren’t used much, but aren’t really suitable– VT-x introduced ring -1, do we need a ring 0.5?

<optimist>Containers will contain</optimist>

The manifest problem

Part 3

My Dockerfile from (much) earlier

Each active line creates a layer

An image binds layers together

The image is the unit of deployment

Which version of Nginx is that?

Which version of OpenSSL is installed?

Whilst we want this to be cached in the short term:

apt-get install nginx

We perhaps don’t want it cached in the long term

What are those durations?

Problem 1 – non determinism

When I runapt-get install nginxI don’t know which version of Nginx I just got

Should I?nginx –v > some_log.txtOr maybe?apt-cache policy nginx > some_log.txt

Problem 2 – the manifest problem

Dockerfile is awesomely productive Great for DevOps

Containers don’t contain At least not yet

Images have a manifest problemKeep track of your stuff

TL;DR

Questions?

Ask now, or on Twitter: @cpswan

Question time