Docker and Security. September 28, 2017 VASCAN Michael Irwin

Similar documents
ViryaOS RFC: Secure Containers for Embedded and IoT. A proposal for a new Xen Project sub-project

[Docker] Containerization

Docker A FRAMEWORK FOR DATA INTENSIVE COMPUTING

DevOps in the Cloud A pipeline to heaven?! Robert Cowham BCS CMSG Vice Chair

Investigating Containers for Future Services and User Application Support

SQL Server inside a docker container. Christophe LAPORTE SQL Server MVP/MCM SQL Saturday 735 Helsinki 2018

Logging, Monitoring, and Alerting

CONTINUOUS DELIVERY WITH MESOS, DC/OS AND JENKINS

Think Small to Scale Big

Fixing the "It works on my machine!" Problem with Docker

Docker Security. Mika Vatanen

DEPLOYMENT MADE EASY!

Advanced Continuous Delivery Strategies for Containerized Applications Using DC/OS

ovirt and Docker Integration

Red Hat Atomic Details Dockah, Dockah, Dockah! Containerization as a shift of paradigm for the GNU/Linux OS

Introduction to Docker. Antonis Kalipetis Docker Athens Meetup

Amir Zipory Senior Solutions Architect, Redhat Israel, Greece & Cyprus

CONTINUOUS DELIVERY WITH DC/OS AND JENKINS

Securing Containers on the High Seas. Jack OWASP Belgium September 2018

Who is Docker and how he can help us? Heino Talvik

Running MarkLogic in Containers (Both Docker and Kubernetes)

A DEVOPS STATE OF MIND WITH DOCKER AND KUBERNETES. Chris Van Tuin Chief Technologist, West

Container Deployment and Security Best Practices

Developing and Testing Java Microservices on Docker. Todd Fasullo Dir. Engineering

Deployment Patterns using Docker and Chef

Sunil Shah SECURE, FLEXIBLE CONTINUOUS DELIVERY PIPELINES WITH GITLAB AND DC/OS Mesosphere, Inc. All Rights Reserved.

Docker 101 Workshop. Eric Smalling - Solution Architect, Docker

Unify DevOps and SecOps: Security Without Friction

Docker II - Judgement Day

Microservices. Chaos Kontrolle mit Kubernetes. Robert Kubis - Developer Advocate,

/ Cloud Computing. Recitation 5 February 14th, 2017

Table of Contents 1.1. Introduction. Overview of vsphere Integrated Containers 1.2

Con$nuous Deployment with Docker Andrew Aslinger. Oct

Container Security. Marc Skinner Principal Solutions Architect

OpenShift 3 Technical Architecture. Clayton Coleman, Dan McPherson Lead Engineers

An introduction to Docker

Building A Better Test Platform:

Midterm Presentation Schedule

Docker in Appsoma PaaS. Containers FTW

In-cluster Open Source Testing Framework

TEN LAYERS OF CONTAINER SECURITY. Kirsten Newcomer Security Strategist

Table of Contents 1.1. Overview. Containers, Docker, Registries vsphere Integrated Containers Engine

/ Cloud Computing. Recitation 5 September 26 th, 2017

CS 356 Operating System Security. Fall 2013

Getting Started With Containers

Automating Security Practices for the DevOps Revolution

Azure DevOps. Randy Pagels Intelligent Cloud Technical Specialist Great Lakes Region

Docker at Lyft Speeding up development Matthew #dockercon

The age of orchestration

TEN LAYERS OF CONTAINER SECURITY

Welcome to Docker Birthday # Docker Birthday events (list available at Docker.Party) RSVPs 600 mentors Big thanks to our global partners:

Travis Cardwell Technical Meeting

Hacking and Hardening Kubernetes

Using DC/OS for Continuous Delivery

SAINT LOUIS JAVA USER GROUP MAY 2014

How Container Runtimes matter in Kubernetes?

Orchestrate JBoss Middleware with Ansible Tower Red Hat Summit San Francisco

Containers: Exploits, Surprises, And Security

USING DOCKER FOR MXCUBE DEVELOPMENT AT MAX IV

Docker for People. A brief and fairly painless introduction to Docker. Friday, November 17 th 11:00-11:45

Introduction to containers

Brainstorm K Containerization with Docker. Crown Palm 2:30-3:30. Adam W Zheng Nebraska Educational Service Unit 10

A DEVOPS STATE OF MIND. Chris Van Tuin Chief Technologist, West

Industry-leading Application PaaS Platform

Best Practices for Developing & Deploying Java Applications with Docker

Making Immutable Infrastructure simpler with LinuxKit. Justin Cormack

Docker CaaS. Sandor Klein VP EMEA

Kuber-what?! Learn about Kubernetes

Red Hat OpenShift Roadmap Q4 CY16 and H1 CY17 Releases. Lutz Lange Solution

Testbed-12 TEAM Engine Virtualization User Guide

Cloud & container monitoring , Lars Michelsen Check_MK Conference #4

Overcoming the Challenges of Automating Security in a DevOps Environment

Docker und IBM Digital Experience in Docker Container

Secure Containers with EPT Isolation

Simple custom Linux distributions with LinuxKit. Justin Cormack

Establishing Technology Trust in a Containerised World

Run containerized applications from pre-existing images stored in a centralized registry

Linux Containers Roadmap Red Hat Enterprise Linux 7 RC. Bhavna Sarathy Senior Technology Product Manager, Red Hat

Splunk N Box. Splunk Multi-Site Clusters In 20 Minutes or Less! Mohamad Hassan Sales Engineer. 9/25/2017 Washington, DC

CONTAINERS AND MICROSERVICES WITH CONTRAIL

Docker Live Hacking: From Raspberry Pi to Kubernetes

Aspirin as a Service: Using the Cloud to Cure Security Headaches

Overhauling Dev Arch with Ansible Tower and Docker

Flip the Switch to Container-based Clouds

Container Adoption for NFV Challenges & Opportunities. Sriram Natarajan, T-Labs Silicon Valley Innovation Center

Practical Approaches to Cloud Native Security

Go Faster: Containers, Platforms and the Path to Better Software Development (Including Live Demo)

AGILE DEVELOPMENT AND PAAS USING THE MESOSPHERE DCOS

InterSystems Cloud Manager & Containers for InterSystems Technologies. Luca Ravazzolo Product Manager

/ Cloud Computing. Recitation 5 September 27 th, 2016

FROM VSTS TO AZURE DEVOPS

Going Journey to Docker Production. Add picture here. Bret Fisher. DevOps Consultant Docker Captain Author of Udemy's Docker Mastery

Secure Kubernetes Container Workloads

BUILDING APPLICATION SECURITY INTO PRODUCTION CONTAINER ENVIRONMENTS Informed by the National Institute of Standards and Technology

DevOps Anti-Patterns. Have the Ops team deal with it. Time to fire the Ops team! Let s hire a DevOps unit! COPYRIGHT 2019 MANICODE SECURITY

Multi-Arch Layered Image Build System

Container Detection and Forensics, Gotta catch them all!

Configuration Management: Stability in Your Pipeline sascha bates. Saturday, November 2, 13

Knative: Building serverless platforms on top of Kubernetes

Container Isolation at Scale (... and introducing gvisor) Dawn Chen and Zhengyu He

Transcription:

Docker and Security September 28, 2017 VASCAN Michael Irwin

Quick Intro - Michael Irwin 2011 - Graduated (CS@VT); started full-time at VT Sept 2015 - Started using Docker for QA June 2016 - Attended first DockerCon August 2016 - Deployed Summit (research admin app) First production IT project using Docker First IT project deployed on AWS Sept 2016 - Started Blacksburg Docker Meetup Have met monthly since then March 2017 - Recognized as Docker Captain

Any sufficiently advanced technology is equivalent to magic. - Arthur C. Clarke

In order to truly utilize any technology, you must first understand how it works and its motivations. - Someone, somewhere (me, now)

A container is... NOT a VM, but simply an isolated process Isolation is provided by kernel namespaces Process - PID 1 in container may be PID 3753 on host Network - container can have its own network interfaces/ip address/sockets Mount - container can have its own root filesystem/mountpoints User - root/user ID 1 in container may actually be user ID 10976 on host UTS - container gets its own hostname

Enough talk! Show me a container! github.com/soulwing/can

VMs vs Containers App 1 App 2 App 3 Bins/Libs Bins/Libs Bins/Libs Guest OS Guest OS Guest OS Hypervisor App 1 App 2 App 3 Bins/Libs Bins/Libs Bins/Libs Host Operating System Operating System Infrastructure Infrastructure

The container recipe A root filesystem Networking setup... To let the container talk to the world To let one container talk to others To expose ports from container to host Various namespaces Launch the initial command Clean things up afterwards

Introducing Docker Docker provides an integrated technology suite that enables development and IT operations teams to build, ship, and run applications anywhere. Build - package an application with its dependencies and environment Ship - share the package with all deployment environments Run - run, scale, and monitor your application

Let s run a Docker container!

Docker Images Every image contains a manifest and a collection of layers Each layer consists of... Metadata (json) - container config, reference to parent layer, etc A tarball of filesystem diffs

Using Layers Layers can be reused by multiple children Provides ability to have common base layers Since each layer is immutable, only one copy is needed Reduces both registry and local storage requirements App 1 App 2 Tomcat App 3 Wildfly OpenJDK 9 App 4 App 5 PHP 7.1 PHP 5.6 Apache httpd 2.4 Alpine Base Image

Creating Docker Images Preferred method is to create a Dockerfile Text-based script with commands to configure/create filesystem layers Allows it to be version controlled with a project Each command ends up being another layer in the Dockerfile Multi-stage builds allow final images to contain only runtime dependencies FROM mvn:3.5-jdk8 AS build WORKDIR /app COPY.. RUN mvn package FROM tomcat:7-jre8-alpine COPY --from=build /app/target/*.war /usr/local/tomcat/webapps

One environment to rule them all http://lotrminecraftmod.wikia.com/wiki/file:the-one-ring.jpg

Consistency in all Tiers Development CI/CD Server Developer pulls environment images and code Performs development in environment Pushes code Builds code and runs automated test suites Produces image using same environment base, but with build artifact added Push to image registry Staging/Production Images pulled on to various infrastructure (on-prem/cloud/hybrid)

Doing development in containers... Forces earlier collaboration with sysadmins Do you actually trust your devs to come up with safe base images? Gives confidence that the app will work the same everywhere Has allowed Summit to be deployed 49 times in the last year Images in registries can then be scanned for vulnerabilities!

Simplified Application Patching https://www.youtube.com/watch?v=k37g2j0k8ba

Updated Patch Model No longer need to go to each individual machine and patch Simply update images to point to patched parent App 1 Tomcat App 2 App 3 Wildfly App 1 Tomcat OpenJDK 9 (VULNERABLE!!) Alpine Base Image App 2 App 3 Wildfly OpenJDK 9 (PATCHED)

Patch Demo!

Cattle, not Pets!

Leaner Hosts! Hosts only need to run containers Reduces potential attack vectors Reduces number of things that need to be patched Makes host machines easily replaceable No need to have direct access to the machine to "make tweaks" Lock yourself out of production "Use container-specific host OSs instead of general-purpose ones to reduce attack surfaces. When using a container-specific host OS, attack surfaces are typically much smaller than they would be with a general-purpose host OS, so there are fewer opportunities to attack and compromise a container-specific host OS. Accordingly, whenever possible, organizations should use container-specific host OSs to reduce their risk. However, it is important to note that container-specific host OSs will still have vulnerabilities over time that require remediation." -NIST draft Application Container Security Guide

New Hosts with Every Deploy! (why not?) Deployment (and patching) becomes Spin up new hosts Start containers on new hosts Transfer traffic to new containers Burn down old machines

Orchestration!

Some best practices... Base from official images as much as possible Keep images as minimal as possible Use --privileged very, very sparingly Install only what you need Use multi-stage builds to keep final images focused Treat such a container as any other process running as root Run containers in read-only mode (if possible) Limit user capabilities by using AppArmor, seccomp, SELinux Sign images when pushing to repos using Use Docker Bench benchmark to evaluate container host security

Get Started! Start experimenting you re already doing most of the work You don t need to do everything Day One Still deploy on the hosts you re using, but move artifacts using Docker

Keep in touch! Twitter - @mikesir87 Email - mikesir@vt.edu Docker Blacksburg Meetup (or another one near your location) Docker Community Slack

Thanks! Any questions?