16
Basic Security for Deployment Subtitle if applicable Presenter’s Name Presenter’s Title, Twistlock

Basic Security for Deployment - SCALE · Basics for getting Kubernetes Running Securely in Production_q318 (2) Created Date: 10/31/2018 9:42:14 PM

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Basic Security for Deployment - SCALE · Basics for getting Kubernetes Running Securely in Production_q318 (2) Created Date: 10/31/2018 9:42:14 PM

Basic Security for DeploymentSubtitle if applicable

Presenter’s NamePresenter’s Title, Twistlock

Page 2: Basic Security for Deployment - SCALE · Basics for getting Kubernetes Running Securely in Production_q318 (2) Created Date: 10/31/2018 9:42:14 PM

TWISTLOCK | © 2018 | Confidential

What We’ll Cover Today

§ Quick overview of securing a host

§ Secure deployment and configuration of Kubernetes

§ Shift-Left Container Security

§ Q&A

Page 3: Basic Security for Deployment - SCALE · Basics for getting Kubernetes Running Securely in Production_q318 (2) Created Date: 10/31/2018 9:42:14 PM

TWISTLOCK | © 2018 | Confidential

§ Minimal install of the OS

§ Update your packages

§ Remove unneeded services

§ Close any open ports you don’t need

§ Secure login by certificates

§ Intrusion detection systems

Secure the host

Page 4: Basic Security for Deployment - SCALE · Basics for getting Kubernetes Running Securely in Production_q318 (2) Created Date: 10/31/2018 9:42:14 PM

TWISTLOCK | © 2018 | Confidential

§ RBAC

§ Layer 3 Protection

§ Configure the Master Nodes

§ Configure the Worker Nodes

§ ETCD

§ Secrets Injection

Secure Kubernetes

Page 5: Basic Security for Deployment - SCALE · Basics for getting Kubernetes Running Securely in Production_q318 (2) Created Date: 10/31/2018 9:42:14 PM

TWISTLOCK | © 2018 | Confidential

§ White list security model that is additive

§ Role / RoleBinding

§ ClusterRole / ClusterRole Binding

§ Limit access to your nodes

§ Access to containers in the cluster should be

done through kubectl

Kubernetes RBAC

Page 6: Basic Security for Deployment - SCALE · Basics for getting Kubernetes Running Securely in Production_q318 (2) Created Date: 10/31/2018 9:42:14 PM

TWISTLOCK | © 2018 | Confidential

Network Security§ Layer 3 segmentation§ Kubernetes Network Policy§ Realtime network profiling§ Automatic rule creation

Page 7: Basic Security for Deployment - SCALE · Basics for getting Kubernetes Running Securely in Production_q318 (2) Created Date: 10/31/2018 9:42:14 PM

TWISTLOCK | © 2018 | Confidential

§ Apply to the Docker Engine

§ Apply to the Master Nodes

§ Apply to the Worker Nodes

Kubernetes and Docker CIS Benchmarks

Page 8: Basic Security for Deployment - SCALE · Basics for getting Kubernetes Running Securely in Production_q318 (2) Created Date: 10/31/2018 9:42:14 PM

TWISTLOCK | © 2018 | Confidential

CIS Master Node Configuration§ Configuration changes can be made in apiserver.yaml§ Examples:

§ anonymous-auth

§ insecure-bind-address

§ The recommendations also apply to the cluster Federation api-server as well

Page 9: Basic Security for Deployment - SCALE · Basics for getting Kubernetes Running Securely in Production_q318 (2) Created Date: 10/31/2018 9:42:14 PM

TWISTLOCK | © 2018 | Confidential

CIS Worker Node Configuration§ Ensure that the kubelet (Kubernetes Agent) is configured§ Examples:

§ allow-privileged set to 0

§ Disable cAdvisor

§ Ensure proper permissions and ownership to configuration files

Page 10: Basic Security for Deployment - SCALE · Basics for getting Kubernetes Running Securely in Production_q318 (2) Created Date: 10/31/2018 9:42:14 PM

TWISTLOCK | © 2018 | Confidential

§ It holds a lot of sensitive cluster information

§ Unauthenticated so it needs to be protected

§ It is recommended that it is placed behind its own

firewall

Lock down ETCD Server

Page 11: Basic Security for Deployment - SCALE · Basics for getting Kubernetes Running Securely in Production_q318 (2) Created Date: 10/31/2018 9:42:14 PM

TWISTLOCK | © 2018 | Confidential

Kubernetes Secret Injection§ Do not include secrets in the images§ Inject them at startup as files or environment variables§ Rotate secrets often§ Ensure secrets are encrypted at rest§ Encrypt them from view when a pod is inspected

Page 12: Basic Security for Deployment - SCALE · Basics for getting Kubernetes Running Securely in Production_q318 (2) Created Date: 10/31/2018 9:42:14 PM

TWISTLOCK | © 2018 | Confidential

§ Secure the images

§ Secure the containers

§ Secure the entire CI/CD pipeline

What else can we do?

Page 13: Basic Security for Deployment - SCALE · Basics for getting Kubernetes Running Securely in Production_q318 (2) Created Date: 10/31/2018 9:42:14 PM

TWISTLOCK | © 2018 | Confidential

MinimalTypically single process entities

DeclarativeBuilt from images that are machine

readable

PredictableDo exactly the same

thing from run to kill

Page 14: Basic Security for Deployment - SCALE · Basics for getting Kubernetes Running Securely in Production_q318 (2) Created Date: 10/31/2018 9:42:14 PM

TWISTLOCK | © 2018 | Confidential

1. The minimal nature simplifies security requirements for each artifact

2. The declarative nature allows automated analysis of vulnerabilities and compliance

3. The predictable nature simplifies automation of policy creation and enforcement

Page 15: Basic Security for Deployment - SCALE · Basics for getting Kubernetes Running Securely in Production_q318 (2) Created Date: 10/31/2018 9:42:14 PM

TWISTLOCK | © 2018 | Confidential 15

Security for the entire CI/CD Pipeline

Page 16: Basic Security for Deployment - SCALE · Basics for getting Kubernetes Running Securely in Production_q318 (2) Created Date: 10/31/2018 9:42:14 PM

TWISTLOCK | © 2018 | Confidential

Thank YouAny Questions?