Top Banner
Orchestrating Least Privilege
67

Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Jan 17, 2017

Download

Technology

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Orchestrating Least Privilege

Page 2: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

~2000 Today

Page 3: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

What is an Orchestrator?

Page 4: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

What is an Orchestra?

Page 5: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016
Page 6: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016
Page 7: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016
Page 8: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016
Page 9: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016
Page 10: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

SWARM

Page 11: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Job of a Conductor

- Casting - Assign sheet music - Unify performers - Set the tempo

Page 12: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Job of an Orchestrator

- Node management - Task assignment - Cluster state reconciliation - Resource Management

Page 13: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

What is a Least Privilege Orchestrator?

Page 14: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

What is Least Privilege?

Page 15: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016
Page 16: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

A process must be able to access only the information and resources that are necessary for its legitimate purpose.

Principle of Least Privilege

Page 17: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

An Orchestrator that follows the principle of least privilege in the

strictest manner possible.Least Privilege Orchestrator

Page 18: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Why Least Privilege?

Page 19: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016
Page 20: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Cluster

Internet

Page 21: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016
Page 22: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Cluster

Internet

A

Page 23: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016
Page 24: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

M

M M

AA A

Page 25: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016
Page 26: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

M

M M

WW W

Page 27: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016
Page 28: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

M

M M

WW W

Page 29: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

How far away are we right now?

Page 30: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016
Page 31: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

How do we achieve Least Privilege Orchestration?

Page 32: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Mitigating External Attacker

- Externally accessible service ports are explicitly defined

- Administration endpoints are authenticated and authorized

Page 33: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Mitigating External Attacker

web: image: web-app expose: 443 links: - redis redis: image: redis

Page 34: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Mitigating Internal Network Attacker

- Authentication of both network and cluster control-plane communication

- Service to service communication is authorized, with orchestrator managed ACLs

Page 35: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Mitigating Internal Network Attacker

[ { "permission": { "method": "GET", "resource": "/user" }, "allow": ["web", "fulfillment", "payments"] },

{ "permission": { "method": "POST", "resource": "/user" }, "allow": ["signup", "web"] },

{ "permission": { "method": "DELETE", "resource": "/user/.*" }, "allow": ["web"] }]

Page 36: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Mitigating MiTM Attacker

- All control and data-plane traffic is encrypted.

Page 37: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Mitigating MiTM Attacker

rails-app: image: rails-app links: - mysql mysql: image: mysql

MTLS

Page 38: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Mitigating Malicious Worker

‣Should only have access to resources currently in use ‣No ability to modify or access any

cluster state except their own. ‣Identity is assigned, never requested

Page 39: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Mitigating Malicious Worker

Push

Worker

Manager

WorkerWorker

Page 40: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Mitigating Malicious Manager

‣Disallow running arbitrary code ‣No access to secret material ‣No ability to spin up unauthorized

nodes/impersonate existing nodes. ‣No ability to read service-to-service

communication

Page 41: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Mitigating Malicious Manager

Worker

Manager

WorkerWorker

web: image: web-app expose: 443 links: - redis tls-auth: - OU: api-client redis: image: redis

web: image: web-app expose: 443 links: web:

image: web-app expose: 443 links:

web: image: web-app expose: 443 links:

Page 42: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

SWARM

Page 43: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016
Page 44: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Mutual TLS by default

• First node generates a new self-signed CA.

Page 45: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Mutual TLS by default

• New nodes can get a certificate issued w/ a token.

Page 46: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Mutual TLS by default

• Workers and managers identified by their certificate.

Page 47: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Mutual TLS by default

• Communications secured with Mutual TLS.

Page 48: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

The Token

SWMTKN-1-mx8susrv1etsmc8omaom825bet6-cm6zts22rl4hly2

Prefix to allow VCSsearches for leaked

Tokens

Token Version

Cryptographic Hashof the CA Root Certificate

for bootstrap

Randomly generatedSecret

Page 49: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Bootstrap

1. Retrieve and validate Root CA Public key material.

2. Submit new CSR along with secret token.

3. Retrieve the signed certificate.

Page 50: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Automatic Certificate Rotation

1. Submit new CSR using old key-pair.

2. Retrieve the new signed certificate.

Page 51: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Support for External CAs

• Managers support BYO CA.

• Forwards CSRs to external CA.

Page 52: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016
Page 53: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Secrets

• Secret is sent to a manager and stored encrypted at rest.

Page 54: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Secrets

• Secret gets securely replicated to other managers.

Page 55: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Secrets

• Workers get sent a secret only when they need it.

Page 56: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Secrets

• No access to secret from other workers.

Page 57: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016
Page 58: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Open Problems Opportunities.

Page 59: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Byzantine Consensus.

Page 60: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016
Page 61: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Signed Specs.

Page 62: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

SWARMweb: image: web-app expose: 443 links: - redis tls-auth: - OU: api-client redis: image: redis

web: image: web-app expose: 443 links:

web: image: web-app expose: 443 links:

web: image: web-app expose: 443 links:

Page 63: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

End-to-end Secrets.

Page 64: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

SWARM

Page 65: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016
Page 66: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016
Page 67: Orchestrating Last Privilege - Diogo Monica - DevOpsDays Tel Aviv 2016

Thank you