Rugged DevOps at Scale with Rich Mogull

30
Rich Mogull @rmogull Rugged DevOps at Scale

Transcript of Rugged DevOps at Scale with Rich Mogull

Page 1: Rugged DevOps at Scale with Rich Mogull

Rich Mogull@rmogull

Rugged DevOps at Scale

Page 2: Rugged DevOps at Scale with Rich Mogull

From this…

Account

Virtual Network

Subnet

Security Group

Virtual Network

Subnet

Security Group

Page 3: Rugged DevOps at Scale with Rich Mogull

To this…

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

GroupAccount

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Account

Virtual Network

Subnet

Security

Group

Virtual Network

Subnet

Security

Group

Page 4: Rugged DevOps at Scale with Rich Mogull

And this…

Page 5: Rugged DevOps at Scale with Rich Mogull

To this…

Page 6: Rugged DevOps at Scale with Rich Mogull

Scale• An average Rugged DevOps

project uses at least 3-5 cloud accounts and a dedicated deployment pipeline.

• The average enterprise has one custom application per 100 employees.

• Enterprises quickly scale from 1-2 test projects to dozens, hundreds, and even thousands of accounts.

http://thebrickboyz.blogspot.com/2012_05_01_archive.html

Page 7: Rugged DevOps at Scale with Rich Mogull

Ruggedize At Scale

• Centralize policies, patterns, and templates.

• Harden distributed pipelines.

• Automate the crap out of everything.

https://www.pinterest.com/pin/530510031078540624/

Page 8: Rugged DevOps at Scale with Rich Mogull

Source Code

GitCloudformation Templates

Jenkins

Functional Tests

Chef Recipes

Chef Server

NonFunctional Tests

Security Tests

Test Prod

Page 9: Rugged DevOps at Scale with Rich Mogull

Source Code

GitCloudformation Templates

Jenkins

Functional Tests

Chef Recipes

Chef Server

NonFunctional Tests

Security Tests

Test Prod

Build a security repo(including architectures)

Page 10: Rugged DevOps at Scale with Rich Mogull

Source Code

GitCloudformation Templates

Jenkins

Functional Tests

Chef Recipes

Chef Server

NonFunctional Tests

Security Tests

Test Prod

Provide scalable security testing

Page 11: Rugged DevOps at Scale with Rich Mogull

Source Code

GitCloudformation Templates

Jenkins

Functional Tests

Chef Recipes

Chef Server

NonFunctional Tests

Security Tests

Test Prod

Automate security operations

Page 12: Rugged DevOps at Scale with Rich Mogull

The Security Repo• Policies– Detailed, written in Markdown.

Revisable.• Design patterns– Specific, technical, flavored for

platforms.• Architectures– Diagrams.– Code templates for different

platforms.• Security tests

Page 13: Rugged DevOps at Scale with Rich Mogull

Quick Tips: Discovering Accounts

• Require consolidated/centralized billing for all accounts.

• Have accounting review credit card statements to find direct spends.

• Automate collecting, scanning, and reviewing centralized invoices.– Categorize by account identifier, and correlate to

your registry of known accounts.

Page 14: Rugged DevOps at Scale with Rich Mogull

Pattern 1: IAM• Separate

entitlement matrix per-project and account.

• Map roles to rights based on matrix, don’t just default.

• Brokers can be very useful.

• Keep code identities in the cloud.

Page 15: Rugged DevOps at Scale with Rich Mogull

Pattern 2: Rugged Hybrid

Page 16: Rugged DevOps at Scale with Rich Mogull

Pattern 3: Data Transfer

Page 17: Rugged DevOps at Scale with Rich Mogull

More Data Transfer

Page 18: Rugged DevOps at Scale with Rich Mogull

Pattern 4 (or 5, whatever): Logging

Page 19: Rugged DevOps at Scale with Rich Mogull

Automate

• Build a platform.• Create new account “deployment packages”• Automate controls, don’t just monitor and

respond.

Page 20: Rugged DevOps at Scale with Rich Mogull

Platform Architecture

Page 21: Rugged DevOps at Scale with Rich Mogull

Demo

Page 22: Rugged DevOps at Scale with Rich Mogull

New Account Deployment Packages

Page 23: Rugged DevOps at Scale with Rich Mogull

Demo• Remotely access a “new” pristine account.

– Does require a 1-time manual “hook” to allow the platform to connect.

• Fully configure monitoring (CloudTrail) with automated alerting for all IAM changes.

• Involves configuring:– CloudTrail– CloudWatch Logs– CloudWatch Alert– Simple Notification Service– IAM– S3

Page 24: Rugged DevOps at Scale with Rich Mogull

``

Account 123

SecServer

Role: Sec

• Configure IAM Roles• Create S3 bucket• Set bucket permissions• Create CloudWatch Log Group• Enable CloudTrail• Configure

CloudTrail/CloudWatch Log connection

• Create CloudWatch Alarm• Create SNS notification topic

Account 456

Page 25: Rugged DevOps at Scale with Rich Mogull

26

Demo: Self-Healing Infrastructure

Change a security group

Event Recorded to CloudTrail Passed to CloudWatch Log Stream

Triggers an CloudWatch Event

Lambda Function analyzes and reverses

Page 26: Rugged DevOps at Scale with Rich Mogull

Things I didn’t cover

• Architectures for a *lot* of security controls.• Cloud provider differences.– Because they are hella-big.

• Integrating existing security tools.– At least the ones that are still useful.

• Setting up different accounts/virtual networks for different security tool stacks.

Page 27: Rugged DevOps at Scale with Rich Mogull

Rich Mogull@rmogull

Rugged DevOps at Scale

Code at https://github.com/securosis

Page 28: Rugged DevOps at Scale with Rich Mogull

#RuggedDevOps

If you see something cool…

Page 29: Rugged DevOps at Scale with Rich Mogull

Thank You to Our Sponsors

Page 30: Rugged DevOps at Scale with Rich Mogull

Get today’s Rugged DevOps presentations in your inbox

[email protected]