7. scott the security implications of deploying software ... · red hat enterprise linux 7 rhel 6...

28
Hanover, MD The security implications of deploying software in containers Scott McCarty Principal Technology manager @fatherlinux 1 BE SOCIAL #SECURITYSYMPOSIUM

Upload: others

Post on 20-Aug-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Hanover, MD

The security implications of deploying software in containers

Scott McCartyPrincipal Technology manager@fatherlinux

1

BE SOCIAL #SECURITYSYMPOSIUM

Page 2: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Twitter: @fatherlinux2

Scott McCartyPrincipal Product Manager,Containers - OpenShift & RHEL

@fatherlinux

Page 4: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Twitter: @fatherlinux

Concept Refresher

4

Page 5: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Twitter: @fatherlinux5

CONFIDENTIALITY

Has data leaked from the container platform?

Has somebody tampered with the container?

INTEGRITY

Is the container up and running?

AVAILABILITY

Confidentiality, Integrity, Availability (CIA)The basics still apply with containers...

Page 6: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Twitter: @fatherlinux6

Can we harden each layer?

● Image scanning, signing, and blueprinting

● Container host hardening● Platform delegation practices

Defense in Depththe practice of arranging defensive lines or fortifications so that they can defend each other, especially in case of an enemy incursion.

Page 7: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Twitter: @fatherlinux7

The Tenancy Scale

Page 8: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Twitter: @fatherlinux

Important Questions

8

Page 9: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Twitter: @fatherlinux9

Question #1Do I even need a base image?

Options:

● YUM - just pull the packages you need in a multi-stage build● Distroless - some programming languages compiled● Scratch - literally nothing, just a scratch image

Reality:

● You are likely pulling in pre-built packages● You are compiling everything yourself● When things break, it’s a developer action, not an operations action

Page 10: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Twitter: @fatherlinux10

Question #2How do I guarantee performance in production?

CONTAINER

GENERIC CONTAINER IMAGE

LANGUAGE RUNTIMES

APP

PRODUCTION

CONTAINER

GENERIC CONTAINER IMAGE

LANGUAGE RUNTIMES

APP

LAPTOP

Works on my laptop But, what about at 1M transactions per second

1M TPS

Page 11: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Twitter: @fatherlinux11

Question #3How do I guarantee security in production?

CONTAINER

GENERIC CONTAINER IMAGE

LANGUAGE RUNTIMES

APP

PRODUCTION

CONTAINER

GENERIC CONTAINER IMAGE

LANGUAGE RUNTIMES

APP

LAPTOP

Works on my laptop What about hackers?

Page 12: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Twitter: @fatherlinux12

Question #3What happens to security when the image is redistributed?

CONTAINER

OS(USER SPACE)

LANGUAGE RUNTIMES

ISV APP

Joint Red Hat Customer

Only ISV Customer

Joint Red Hat Customer

Only ISV Customer

Page 13: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Twitter: @fatherlinux13

Question #5What else am I not thinking about?

Architecture

● C Library● Core Utilities● Size● Life Cycle● Compatibility● Troubleshooting● Technical Support● ISV Support● Distributability

Security

● Updates● Tracking● Security Response

Team

Performance

● Automated● Performance

Engineering

Page 14: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Twitter: @fatherlinux

Basic Recommendations

14

Page 15: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Scott McCarty, Red Hat

Security starts at the factory, not the dock

Page 16: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Twitter: @fatherlinux16

Start With a Trusted FoundationTrusted base images, language runtime images, and software packages

ALL RED HAT ENTERPRISE LINUX PACKAGES

UNIVERSALBASE IMAGEPACKAGES

BaseImages

Pre-Built Language

Images

PackageSubset

STANDARD

MULTISERVICE

MINIMALNode.js

Node.js

Node.js

Node.js

Node.js

Node.js

Node.js

Page 17: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Twitter: @fatherlinux17

Same Bits Used in Mission Critical WorkloadsIt goes beyond works on my laptop

CONTAINER

OS(USER SPACE)

LANGUAGE RUNTIMES

APP

OS(USER SPACE)

OS(USER SPACE)

OS(USER SPACE)

OS(USER SPACE)

OS(USER SPACE)

Compute Intensive I/O Intensive Fault Sensitive Highly Secure Latency Sensitive

Page 18: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Scott McCarty, Red Hat

Security must be maintained at the dock

Page 19: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Twitter: @fatherlinux19

Red Hat Universal Base ImageProvides a foundation, but not the only thing to think about

CONTAINER

RED HAT UNIVERSAL BASE IMAGE

LANGUAGE RUNTIMES

APP

RED HAT PLATFORM

CONTAINER

RED HAT UNIVERSAL BASE IMAGE

LANGUAGE RUNTIMES

APP

ANY CONTAINER PLATFORM

Think about the base imageThink about platform

CONTAINER

RED HAT UNIVERSAL BASE IMAGE

LANGUAGE RUNTIMES

PARTNER CONNECT CERTIFIED APP

RED HAT PLATFORM

Think about application

Page 20: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Twitter: @fatherlinux20

Support Matrix MattersPermutations of vulnerabilities

RHEL 8 ANY CONTAINER PLATFORM

Like any upstream projectRed Hat Enterprise Linux 8

RHEL 7

Red Hat Enterprise Linux 7

RHEL 6

UBI 8 OTHER

UBI 7RHEL 6

UBI 8 OTHER

UBI 7

RED HATSUPPORT

COMMUNITYSUPPORT

RHEL 6

UBI 8 OTHER

UBI 7

Page 21: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Twitter: @fatherlinux

Advanced Recommendations

21

Page 22: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Twitter: @fatherlinux22

Container ImagesOur current operating model controls:

● Trusted Content (What’s in the container matters. Don’t install from hackme.com.)● Content Provenance (Track who changed what.)● Security Scans● Remediation/Patching● Bill of Materials● CVE Databases● Security Response Teams● Limit Root Access (Don’t oversell User Namespaces.)● Limit User Access (Who controls content)

Containers add the ability to easily apply techniques such as:

● Bill of Materials● Signing● Read-only Containers (Read-only servers were popular in the late 90s.)● Atomic diff/Docker diff to see what changed in a container

Page 23: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Twitter: @fatherlinux23

Container HostsThink about:

● Quality of Linux kernel● Quality of container engine● Quality of orchestration platform

Apply technologies and techniques:

● SECCOMP● sVirt● Hardening: NO_NEW_PRIVS, Read Only Images, –cap-drop=ALL, –user=user● Capabilities● Run read only● Limiting ssh access (root access and users)● Well understood/controlled configuration (OpenShift 4)● Tenancy

Page 24: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Twitter: @fatherlinux24

Orchestration PlatformThis layer exists in the world of physical and virtual servers but is typically an administrator only tool, such as vCenter or HPSA. In the world of containers, it’s much more common to delegate some access to developers, architects, and application owners.

● Role-Based authorization● Authentication (LDAP, network level access/restriction to the platform)● Environment isolation (development, testing, production)● User demarcation (kubectl exec)● Network separation● Key/secrets management● Well understood/controlled configuration (OpenShift 4)

Page 25: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Twitter: @fatherlinux25

Other Good Talks

1:30 – 2:20 p.m. Automating security and compliance for hybrid environments

Lucy Kerner

senior principal security global technical evangelist and strategist, Red Hat

2:30 – 3:20 p.m. Securing a multi-tenant Kubernetes cluster

Kirsten Newcomer

OpenShift senior principal product manager, Red Hat

3:30 – 4:20 p.m. Container security and new container technologies

Dan Walsh

senior distinguished engineer, Red Hat

Page 26: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Thank you to our partner

26

Security Symposium

Page 27: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Twitter: @fatherlinux27

Further Reading

1:30 – 2:20 p.m. Automating security and compliance for hybrid environments

Lucy Kerner

senior principal security global technical evangelist and strategist, Red Hat

2:30 – 3:20 p.m. Securing a multi-tenant Kubernetes cluster

Kirsten Newcomer

OpenShift senior principal product manager, Red Hat

3:30 – 4:20 p.m. Container security and new container technologies

Dan Walsh

senior distinguished engineer, Red Hat

Page 28: 7. Scott The security implications of deploying software ... · Red Hat Enterprise Linux 7 RHEL 6 UBI 8 OTHER RHEL 6UBI 7 UBI 8 OTHER RED HAT ... Containers add the ability to easily

Next Steps• Speak with a Red Hat expert here at Security

Symposium

• Look for the slides in a “Thank You” email from us in

the next few days

• Stay up to date with Red Hat at redhat.com/security

• Visit redhat.com/events to find out about workshops

and other events like this one coming to your area

Thank you for coming.

Feedback or questions?

[email protected]

om