Container Security and new container technologies. Dan

Similar documents
Next Generation Tools for container technology. Dan

Replacing Docker With Podman. By Dan

THE STATE OF CONTAINERS

How to build and run OCI containers

Containers 101. with Podman on Fedora 29. Alessandro Arrichiello. Solution Architect, Red Hat

Investigating Containers for Future Services and User Application Support

The speed of containers, the security of VMs. KataContainers.io

Dockerized Tizen Platform

Multi-Arch Layered Image Build System

OCI Runtime Tools for Container Standardization

How Container Runtimes matter in Kubernetes?

Code: Slides:

Docker A FRAMEWORK FOR DATA INTENSIVE COMPUTING

Red Hat Enterprise Linux Atomic Host 7

rkt and Kubernetes What's new (and coming) with Container Runtimes and Orchestration

The speed of containers, the security of VMs

Singularity CRI User Documentation

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

Creating a Reproducible Build System for Docker Images

Kata Containers The way to run virtualized containers. Sebastien Boeuf, Linux Software Engineer Intel Corporation

RED HAT GLUSTER TECHSESSION CONTAINER NATIVE STORAGE OPENSHIFT + RHGS. MARCEL HERGAARDEN SR. SOLUTION ARCHITECT, RED HAT BENELUX April 2017

WHITE PAPER. RedHat OpenShift Container Platform. Benefits: Abstract. 1.1 Introduction

Docker Deep Dive. Daniel Klopp

Think Small to Scale Big

Convergence of VM and containers orchestration using KubeVirt. Chunfu Wen

High Performance Containers. Convergence of Hyperscale, Big Data and Big Compute

RDO container registry Documentation

Establishing Image Provenance and Security in Kubernetes

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

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

Project Kuryr. Antoni Segura Puimedon (apuimedo) Gal Sagie (gsagie)

Unified Kubernetes CRI runtimes based on Kata Containers. Xu Wang hyper.sh

Rootless Containers with runc. Aleksa Sarai Software Engineer

Creating a Reproducible Build System for Docker Images

State of Containers. Convergence of Big Data, AI and HPC

Docker und IBM Digital Experience in Docker Container

TEN LAYERS OF CONTAINER SECURITY

Container Pods with Docker Compose in Apache Mesos

Docker Security. Mika Vatanen

Container mechanics in Linux and rkt FOSDEM 2016

Introduction to containers

CONTAINERS AND MICROSERVICES WITH CONTRAIL

An introduction to Docker

Arup Nanda VP, Data Services Priceline.com

/ Cloud Computing. Recitation 5 February 14th, 2017

Cloud & container monitoring , Lars Michelsen Check_MK Conference #4

Containerisation with Docker & Kubernetes

CNI, CRI, and OCI - Oh My!

Container-based virtualization: Docker

Best Practices for Developing & Deploying Java Applications with Docker

ISLET: Jon Schipp, AIDE jonschipp.com. An Attempt to Improve Linux-based Software Training

Cross platform enablement for the yocto project with containers. ELC 2017 Randy Witt Intel Open Source Technology Center

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

OPENSTACK + KUBERNETES + HYPERCONTAINER. The Container Platform for NFV

Travis Cardwell Technical Meeting

A REFERENCE ARCHITECTURE FOR DEPLOYING WSO2 MIDDLEWARE ON KUBERNETES

MESOS A State-Of-The-Art Container Orchestrator Mesosphere, Inc. All Rights Reserved. 1

Kubernetes made easy with Docker EE. Patrick van der Bleek Sr. Solutions Engineer NEMEA

Engineering Robust Server Software

Tunir Documentation. Release Kushal Das

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

TEN LAYERS OF CONTAINER SECURITY

Network softwarization Lab session 2: OS Virtualization Networking

Portable, lightweight, & interoperable Docker containers across Red Hat solutions

Detecting Cryptojacking on Openshift with Sysdig Falco. Mark Stemm - Falco Engineer

Bringing Security and Multitenancy. Lei (Harry) Zhang

~Deep dive into Windows Containers and Docker~

Container Networking and Openstack. Fernando Sanchez Fawad Khaliq March, 2016

The State of Rootless Containers

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

The Open Container Initiative Establishing standards for an open ecosystem

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

Dockerfile & docker CLI Cheat Sheet

Container-Native Storage

Secure Kubernetes Container Workloads

Orchestrating Docker containers at scale

Container Security. Marc Skinner Principal Solutions Architect

Docker and Security. September 28, 2017 VASCAN Michael Irwin

Linux. An introduction. Aurélien Villani 01/2018

Kubernetes - Networking. Konstantinos Tsakalozos

Accelerate at DevOps Speed With Openshift v3. Alessandro Vozza & Samuel Terburg Red Hat

Kubernetes The Path to Cloud Native

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

OS Containers. Michal Sekletár November 06, 2016

AGILE DEVELOPMENT AND PAAS USING THE MESOSPHERE DCOS

Launching StarlingX. The Journey to Drive Compute to the Edge Pilot Project Supported by the OpenStack

Contain your Desktop Applications with Flatpak

/ Cloud Computing. Recitation 5 September 26 th, 2017

Red Hat Enterprise Linux Atomic Host 7

Kubernetes. An open platform for container orchestration. Johannes M. Scheuermann. Karlsruhe,

DevOps Workflow. From 0 to kube in 60 min. Christian Kniep, v Technical Account Manager, Docker Inc.

MesosCon Qian Zhang (IBM China), Jie Yu (Mesosphere) OCI Support in Mesos Mesosphere, Inc. All Rights Reserved. 1

Comparing Next-Generation Container Image Building Tools

docker & HEP: containerization of applications for development, distribution and preservation

Allowing Users to Run Services at the OLCF with Kubernetes

BEST PRACTICES FOR DOCKER

Red Hat Containers Cheat Sheet

Blockchain on vsphere By VMware

Blockchain on Kubernetes User Guide

Important DevOps Technologies (3+2+3days) for Deployment

Transcription:

Container Security and new container technologies Dan Walsh @rhatdan

Please Stand

Please read out loud all text in RED

I Promise

To say Container Registries Rather than Docker registries

I Promise

To say Container Images Rather than Docker images

I Promise

To say Containers Rather than Docker Containers

Sit Down

What do you need to run a container Standard Definition of what makes up a container image. OCI Image Bundle Definition

Introducing Skopeo https://github.com/containers/skopeo

Skopeo $ skopeo inspect docker://docker.io/fedora $ skopeo copy docker://busybox:1-glibc atomic:myns/unsigned:streaming $ skopeo copy docker://busybox:latest dir:existingemptydirectory $ skopeo copy docker://busybox:latest oci:busybox_ocilayout:latest $ skopeo delete docker://localhost:5000/imagename:latest

What do you need to run a container` Standard Definition of what makes up a container image. OCI Image Bundle Definition Mechanism to pull images from a container registry to the host github.com/containers/image

What do you need to run a container Standard Definition of what makes up a container image. Mechanism to pull images from a container registry to the host OCI Image Bundle Definition github.com/containers/image Ability to explode images onto COW file systems on disk github.com/containers/storage

What do you need to run a container Standard Definition of what makes up a container image. Mechanism to pull images from a container registry to the host github.com/containers/image Ability to explode images onto COW file systems on disk OCI Image Bundle Definition github.com/containers/storage Standard mechanism for running a container OCI Runtime Spec (1.0) runc default implementation of OCI Runtime Spec (Same tool Docker uses to run containers)

What does OpenShift/Kubernetes need run a container? CRI - Container Runtime Interface

What does OpenShift/Kubernetes need run a container? CRI - Container Runtime Interface Kubernetes tells CRI to run Container Image:

What does OpenShift/Kubernetes need run a container? CRI - Container Runtime Interface Kubernetes tells CRI to run Container Image: CRI needs to pull image from Container Registry

What does OpenShift/Kubernetes need run a container? CRI - Container Runtime Interface Kubernetes tells CRI to run Container Image: CRI needs to pull image from Container Registry CRI Needs to store image on COW File system

What does OpenShift/Kubernetes need run a container? CRI - Container Runtime Interface Kubernetes tells CRI to run Container Image: CRI needs to pull image from Container Registry CRI Needs to store image on COW File system CRI Needs to execute OCI Runtime

Introducing CRI-O

Introducing CRI-O CRI-O - OCI-based implementation of Kubernetes Container Runtime Interface Scope tied to kubernetes CRI Only supported user is kubernetes Uses standard components as building blocks Nothing more, Nothing Less

S W A R M

S W A R M

M O B Y

M O B Y

M O B Y

Overview of additional components oci-runtime-tools library is used to generate OCI configs for containers

Overview of additional components oci-runtime-tools library is used to generate OCI configs for containers CNI is used for setting up networking Tested with Flannel, Weave and openshift-sdn

Overview of additional components oci-runtime-tools library is used to generate OCI configs for containers CNI is used for setting up networking Tested with Flannel, Weave and openshift-sdn conmon is a utility for: Monitoring Logging Handling tty Serving attach clients Detecting and reporting OOM

Pod architecture (runc) conmon Infra Container conmon conmon Container A (runc) Container B (runc) Pod (ipc, net, pid namespaces, cgroups)

Pod architecture (Kata Containers) conmon conmon kata-shim kata-shim Container A (kata-runtime) Container B (kata-runtime) Virtual Machine (ipc, net, pid namespaces, cgroups) Pod (net namespace, cgroups)

Architecture

Status All e2e, cri-tools, integration, 9 test suites, (>500) tests passing. No PRs merged without passing all the tests

Status All e2e, cri-tools, integration, 9 test suites, (>500) tests passing. No PRs merged without passing all the tests. 1.0.7 (kube 1.7.x) supported. (December 2017)

Status All e2e, cri-tools, integration, 9 test suites, (>500) tests passing. No PRs merged without passing all the tests. 1.0.7 (kube 1.7.x) supported. (December 2017) 1.9.12 (kube 1.9.x) released. CRI-O fully supported in OpenShift 3.9 along with docker.

Status All e2e, cri-tools, integration, 9 test suites, (>500) tests passing. No PRs merged without passing all the tests. 1.0.7 (kube 1.7.x) supported. (December 2017) 1.9.12 (kube 1.9.x) released. CRI-O fully supported in OpenShift 3.9 along with docker. 1.10.6 (kube 1.10.x) released.

Status All e2e, cri-tools, integration, 9 test suites, (>500) tests passing. No PRs merged without passing all the tests. 1.0.7 (kube 1.7.x) supported. (December 2017) 1.9.12 (kube 1.9.x) released. CRI-O fully supported in OpenShift 3.9 along with docker. 1.10.6 (kube 1.10.x) released. 1.11.2 (Kube 1.11.x) released

Status All e2e, cri-tools, integration, 9 test suites, (>500) tests passing. No PRs merged without passing all the tests. 1.0.7 (kube 1.7.x) supported. (December 2017) 1.9.12 (kube 1.9.x) released. CRI-O fully supported in OpenShift 3.9 along with docker. 1.10.6 (kube 1.10.x) released. 1.11.2 (Kube 1.11.x) released 1.12.1 (Kube 1.12.x) released Goal for Openshift 4.0 is to fully support CRI-O by default.

Status CRI-O is now powering nodes on OpenShift Online.

" CRI-O just works for them, so they haven t had much to say"

Making running containers in production boring

Security in CRI-O - No Hard-Coded Capabilities list - Since CRI-O does not do builds, containers by default have less capabilities

Security in CRI-O - No Hard-Coded Capabilities list - Since CRI-O does not do builds, containers by default have less capabilities - Read Only Containers - In production containers should not be allowed to modify images

Security in CRI-O - Non Hard Coded Capabiltiies list - Since CRI-O does not do builds, containers by default have less capabilities - Read Only Containers - In production containers should not be allowed to modify images - Kata Containers support

Security in CRI-O - Non Hard Coded Capabiltiies list - Since CRI-O does not do builds, containers by default have less capabilities - Read Only Containers - In production containers should not be allowed to modify images - Kata Containers support - Better User Namespace support

What else does OpenShift need? Ability to build container images Ability to push container images to container registries

Introducing Buildah https://github.com/containers/buildah

https://github.com/containers/buildah

Coreutils for building containers. Simple interface

Coreutils for building containers. Simple interface # ctr=$(buildah from fedora)

Coreutils for building containers. Simple interface # ctr=$(buildah from fedora) # mnt=$(buildah mount $ctr)

Coreutils for building containers. Simple interface # ctr=$(buildah from fedora) # mnt=$(buildah mount $ctr) # cp -R src $mnt

Coreutils for building containers. Simple interface # ctr=$(buildah from fedora) # mnt=$(buildah mount $ctr) # cp -R src $mnt # dnf install --installroot=$mnt httpd

Coreutils for building containers. Simple interface # ctr=$(buildah from fedora) # mnt=$(buildah mount $ctr) # cp -R src $mnt # dnf install --installroot=$mnt httpd # make install DESTDIR=$mnt

Coreutils for building containers. Simple interface # ctr=$(buildah from fedora) # mnt=$(buildah mount $ctr) # cp -R src $mnt # dnf install --installroot=$mnt httpd # make install DESTDIR=$mnt # buildah config --entrypoint=/usr/sbin/test.sh --env foo=bar $ctr

Coreutils for building containers. Simple interface # ctr=$(buildah from fedora) # mnt=$(buildah mount $ctr) # cp -R src $mnt # dnf install --installroot=$mnt httpd # make install DESTDIR=$mnt # buildah config --entrypoint=/usr/sbin/test.sh --env foo=bar $ctr # buildah commit $ctr myhttpd

Coreutils for building containers. Simple interface # ctr=$(buildah from fedora) # mnt=$(buildah mount $ctr) # cp -R src $mnt # dnf install --installroot=$mnt httpd # make install DESTDIR=$mnt # buildah config --entrypoint=/usr/sbin/test.sh --env foo=bar $ctr # buildah commit $ctr myhttpd # buildah push myhttpd docker://rhatdan/myhttpd

Dan Wait!

Dan Wait! What about Dockerfile?????

Buildah also supports Dockerfile buildah build-using-dockerfile -f Dockerfile.

Buildah also supports Dockerfile buildah build-using-dockerfile -f Dockerfile. Or for those lazy ones: buildah bud -f Dockerfile.

Does Buildah have a scripting language? Perhaps Buildahfile?

BASH

BASH We want others to build higher level tools on Buildah.

BASH We want others to build higher level tools on Buildah. Working to make OpenShift use Buildah for S2I containers rather then use Docker.

BASH We want others to build higher level tools on Buildah. Working to make OpenShift use Buildah for S2I containers rather then use Docker. Want to work with Ansible-containers to use buildah for containers as well.

Security - No Big Fat Container Daemon - Run your container builds inside of locked down containers under Kubernetes No need to leak in the docker.sock

Security - No Big Fat Container Daemon - - Run your container builds inside of locked down containers under Kubernetes - No need to leak in the docker.sock Working on running as non root from desktop

Security - No Big Fat Container Daemon - - Run your container builds inside of locked down containers under Kubernetes - No need to leak in the docker.sock Working on running as non root from desktop Building Minimal Images - Only include content in the image required to run the image - Does not require you to use Dockerfile and therefore include Yum/Python in image

What else does OpenShift need? Ability to diagnose problems on the host If you don t use Docker to run the containers, how does an admin discover what is going on in his Container runtime, without the docker CLI?

Introducing podman part of the libpod effort

Replacing Docker With Podman By Dan Walsh @rhatdan

dnf install -y podman

dnf install -y podman alias docker=podman

Questions Blog: https://medium.com/cri-o Github: https://github.com/kubernetes-sigs/cri-o https://github.com/containers/buildah https://github.com/containers/skopeo https://github.com/containers/libpod (podman) https://github.com/containers/storage https://github.com/containers/image Site: https://cri-o.io IRC: freenode: #cri-o Site: https://podman.io IRC: freenode: #podman Site: https://buildah.io IRC: freenode: #buildah

Introducing podman podman is tool for managing POD/Containers based on the Docker CLI https://github.com/projectatomic/libpod

Introducing podman podman is tool for managing POD/Containers based on the Docker CLI # podman ps -a https://github.com/projectatomic/libpod

Introducing podman podman is tool for managing POD/Containers based on the Docker CLI # podman ps -a # podman run -ti fedora sleep 2000 https://github.com/projectatomic/libpod

Introducing podman podman is tool for managing POD/Containers based on the Docker CLI # podman ps -a # podman run -ti fedora sleep 2000 # podman exec -ti fedora sh https://github.com/projectatomic/libpod

Introducing podman podman is tool for managing POD/Containers based on the Docker CLI # podman ps -a # podman run -ti fedora sleep 2000 # podman exec -ti fedora sh # podman images... https://github.com/projectatomic/libpod

DEMO

Security - No Big Fat Container Daemon - No need to leak in the docker.sock Run Manage/Containers without being root. No need for access to the /var/run/docker.sock

Security - No Big Fat Container Daemon - - No need to leak in the docker.sock - Run Manage/Containers without being root. - No need for access to the /var/run/docker.sock Containers run as child of the process that ran it - Better Auditing - Support for socket activation

Proper Integration with Systemd Can run systemd as PID 1 in container, with no modifications

Proper Integration with Systemd Can run systemd as PID 1 in container, with no modifications Support sd_notify

Proper Integration with Systemd Can run systemd as PID 1 in container, with no modifications Support sd_notify Socket Activation

Remote API for Podman Added Varlink support Socket activation of podman system service with varlink [Unit] Description=Podman Remote API Service Requires=io.podman.socket After=io.podman.socket Documentation=man:podman-varlink(1) [Service] Type=simple ExecStart=/usr/bin/podman varlink unix:/run/podman/io.podman [Install] WantedBy=multi-user.target Also=io.podman.socket

Python Bindings python3 -c "import podman; import json; c=podman.client();print(json.dumps(c.system.info(), indent=4))" [ { "mem_free": 5796605952, "mem_total": 16679206912, "swap_free": 0, "swap_total": 0, "arch": "amd64", "cpus": 4, "hostname": "localhost.localdomain", "kernel": "4.18.9-200.fc28.x86_64", "os": "linux", "uptime": "11h 2m 32.25s (Approximately 0.46 days)" },...

Remote API Support pypodman - Python program used for running remote podman commands. https://asciinema.org/a/203590

Cockpit support https://github.com/cockpit-project/cockpit-podman

What we don t do Autostart, autorestart Swarm We do support simple signing, but would look at PRs for Notary support HealthChecks We support Kubernetes container orchestrator Notary Systemd should be handling this We are looking into this, perhaps systemd support? Side car container in pod? Docker API - We have no plans to support this, but we do have Varlink Docker volumes It is on the roadmap

https://github.com/mairin/coloringbook-container-commandos/blob/master/web.pdf

Questions Blog: https://medium.com/cri-o Github: https://github.com/kubernetes-sigs/cri-o https://github.com/containers/buildah https://github.com/containers/skopeo https://github.com/containers/libpod (podman) https://github.com/containers/storage https://github.com/containers/image Site: https://cri-o.io IRC: freenode: #cri-o Site: https://podman.io IRC: freenode: #podman Site: https://buildah.io IRC: freenode: #buildah