the 5 stages of secrets management grief, and how to prevail

76
The 5 Stages of Secrets Management Grief (And How to Prevail) Josh Bregman Conjur

Upload: bryan-sterling

Post on 20-Jan-2017

542 views

Category:

Software


2 download

TRANSCRIPT

Page 1: The 5 Stages of Secrets Management Grief, And How to Prevail

The 5 Stages of Secrets Management Grief(And How to Prevail)

Josh BregmanConjur

David Roberts
I think this is better as a talking point on slide 39
David Roberts
I'm sure this is already in your talk track but here is a good place to mention all the pitfalls around the scalability of encrypting secrets, easy at first and quickly becomes too hard to manage as the number grows. You also lack any governance such as key rotation and have zero reporting such as who's using the secrets.
Page 2: The 5 Stages of Secrets Management Grief, And How to Prevail

Josh has 20 years experience successfully architecting, evangelizing, and delivering innovative identity management and security products to customers. Prior to joining Conjur , Josh spent a decade as a solutions and pre-sales leader in the Oracle ecosystem. A developer at heart, early in his career Josh worked as a software engineer at IBM, GTE Labs, and Netegrity. He has 3 U.S. patents and received a B.A. in Math from the University of Rochester in 1995.

Page 3: The 5 Stages of Secrets Management Grief, And How to Prevail

Thanks Dave!

Page 4: The 5 Stages of Secrets Management Grief, And How to Prevail

Denial - We don’t have a problemAnger - Why is this my problem?Bargaining - A series of trade-offs?Depression - This isn’t fixed?Acceptance - We have a problem

Page 5: The 5 Stages of Secrets Management Grief, And How to Prevail

Denial - We don’t have a problemAnger - Why is this my problem?Bargaining - A series of trade-offs?Depression - This isn’t fixed?Acceptance - We have a problem

Page 6: The 5 Stages of Secrets Management Grief, And How to Prevail

You’re at Puppet Camp, so your infrastructure is coded, and your code is in source control.

Page 7: The 5 Stages of Secrets Management Grief, And How to Prevail

class { 'wordpress': db_user => 'wordpress', db_password => 'hvyH(S%t(\"0\"16', db_host => 'db.example.com', create_db => false, create_db_user => false,}

Page 8: The 5 Stages of Secrets Management Grief, And How to Prevail

If you put your secrets in source control, then anyone who has access to the repo can access all the secrets.

Page 9: The 5 Stages of Secrets Management Grief, And How to Prevail

3/10/16

Page 10: The 5 Stages of Secrets Management Grief, And How to Prevail

“Searching GitHub for AWS and Azure credentials reveals that many people are making the same mistake as Ashley Madison, Uber and D-Link.”

Page 11: The 5 Stages of Secrets Management Grief, And How to Prevail

“Ashley Madison’s leaked code included hard-coded AWS tokens, database credentials, certificate private keys and other credentials.

Page 12: The 5 Stages of Secrets Management Grief, And How to Prevail

“Uber had a database containing personal information about drivers compromised in 2014, after storing the key in a publicly available repo”

Page 13: The 5 Stages of Secrets Management Grief, And How to Prevail

“...and D-Link recently published its private code signing keys in the open source code for a firmware update.”

Page 14: The 5 Stages of Secrets Management Grief, And How to Prevail

“Your cloud credentials are likely to end up subsidizing Bitcoin miners, who scan GitHub for keys and use them to run up hundreds or thousands of dollars of bills.”

Page 15: The 5 Stages of Secrets Management Grief, And How to Prevail

(Sound of everyone making sure that repo is private)

Page 16: The 5 Stages of Secrets Management Grief, And How to Prevail

Should everyone at your company who has read access to the repo have access to the database?

Page 17: The 5 Stages of Secrets Management Grief, And How to Prevail

NO

Page 18: The 5 Stages of Secrets Management Grief, And How to Prevail

If you put your secrets in source control, then anyone who has access to the repo can access all the secrets.

David Roberts
You might mean this to drive the point home but it is a repeat slide
Page 19: The 5 Stages of Secrets Management Grief, And How to Prevail

Denial - We don’t have a problemAnger - Why is it my problem?Bargaining - A Series of Trade-offs?Depression - This isn’t fixed?Acceptance - We have a problem

David Roberts
I wonder if a better lead-in for anger would be "Why is it my problem?"
Page 20: The 5 Stages of Secrets Management Grief, And How to Prevail

Typical conversation BEFORE something bad happens…

20

David Roberts
It is a style thing but I think I would just make slides 19-23 you talking points for this slide and do it extemporaneously; I think that is more engaging than the slides themselves.
Page 21: The 5 Stages of Secrets Management Grief, And How to Prevail

Question to Information Security:I’m concerned that storing secrets in source control isn’t safe. Is there a recommended approach that I should be following?

21

Page 22: The 5 Stages of Secrets Management Grief, And How to Prevail

Answer from Information Security: We’re super busy right now protecting the company from APT, passing our ISO 27001 audit, and assessing our compliance NIST CSF…

22

Page 23: The 5 Stages of Secrets Management Grief, And How to Prevail

Question to Information Security:Well, this initiative is super important to the business. Is there anything that you can recommend?

23

Page 24: The 5 Stages of Secrets Management Grief, And How to Prevail

Answer from Information Security: We’ll we have an existing system that we use to manage privileged accounts. You just open a ServiceNow ticket and…

24

Page 25: The 5 Stages of Secrets Management Grief, And How to Prevail

That’s OK….we’ll just figure it out

25

Page 26: The 5 Stages of Secrets Management Grief, And How to Prevail

Typical conversation AFTER something bad happens…

26

Page 27: The 5 Stages of Secrets Management Grief, And How to Prevail

“I’m going to automate those *@! out of a job.” – Anonymous DevOps“Those *@! are running with scissors” – Anonymous InfoSec

27

Page 28: The 5 Stages of Secrets Management Grief, And How to Prevail

Few organizations practice blame free post-mortems, if they are on the front page of the Wall Street Journal. This is a huge cultural change for Information Security.

28

Page 29: The 5 Stages of Secrets Management Grief, And How to Prevail

SecDevOps or DevSecOps or RuggedDevOps are all terms for the inclusion of information security in the DevOps workflow

29

Page 30: The 5 Stages of Secrets Management Grief, And How to Prevail

Automated testing that includes security tests like code scanning, application security testing, automated patching of vulnerabilities are all pretty easy…

30

Page 31: The 5 Stages of Secrets Management Grief, And How to Prevail

…because they can be added without the direct cooperation of information security teams.

31

Page 32: The 5 Stages of Secrets Management Grief, And How to Prevail

Question: How many people here have information security professionals as part of their DevOps teams?

32

Page 33: The 5 Stages of Secrets Management Grief, And How to Prevail

Question: How many people here ACTIVELY seek out the information security professionals in their organization?

33

Page 34: The 5 Stages of Secrets Management Grief, And How to Prevail

NIST CyberSecurity Framework - The Framework Implementation Tiers (“Tiers”) provide context on how an organization viewscybersecurity risk and the processes

34

Page 35: The 5 Stages of Secrets Management Grief, And How to Prevail

NIST CSF Tiers:Tier 1 -> PartialTier 2 -> Risk InformedTier 3 -> RepeatableTier 4 -> Adaptive

35

Page 36: The 5 Stages of Secrets Management Grief, And How to Prevail

Go Find your Security Engineering Team. This is the team that owns and operates security solutions. Tell them you can help them with automation.

36

Page 37: The 5 Stages of Secrets Management Grief, And How to Prevail

Denial - We don’t have a problemAnger - It’s their fault!Bargaining - A Series of Trade-offs?Depression - This isn’t fixed?Acceptance - We have a problem

Page 38: The 5 Stages of Secrets Management Grief, And How to Prevail

Two main camps on secrets management with Puppet: Masterful and Masterless

Page 39: The 5 Stages of Secrets Management Grief, And How to Prevail

Masterful: I’m OK if all of my secrets are on the master; my master is a hardened command bunker.Masterless: Secrets are ‘need to know’ and my master doesn’t.

Page 40: The 5 Stages of Secrets Management Grief, And How to Prevail

The “Masterful” approaches can be accomplished with little commitment from information security.

Page 41: The 5 Stages of Secrets Management Grief, And How to Prevail

If you don’t engage them, and something goes wrong, it’s all on you.

Page 42: The 5 Stages of Secrets Management Grief, And How to Prevail

Masterful - E-Yaml

Page 43: The 5 Stages of Secrets Management Grief, And How to Prevail

If you use E-YAML, secrets are encrypted in source control, and in the catalog.

Page 44: The 5 Stages of Secrets Management Grief, And How to Prevail

If you use E-YAML, you have to figure out how to secure the keys, and rotate the keys, and work with encrypted files...

Page 45: The 5 Stages of Secrets Management Grief, And How to Prevail

Another “Masterful” approach that some customers use is to deploy separate Production and Non-Production Puppet Masters

Page 46: The 5 Stages of Secrets Management Grief, And How to Prevail

This keeps production information limited to only those that need access to production. By design, this pattern makes Continuous Delivery hard.

Page 47: The 5 Stages of Secrets Management Grief, And How to Prevail

If you use DSL extensions or Hiera backend, then secrets are in the catalog, but not in source control.

Page 48: The 5 Stages of Secrets Management Grief, And How to Prevail

Retrieves a Secret from Conjur programmatically

https://github.com/dgrstl/puppet_conjurdemo/blob/master/lib/puppet/functions/conjur_secret.rb

Page 49: The 5 Stages of Secrets Management Grief, And How to Prevail

See it in action

https://github.com/dgrstl/puppet_conjurdemo/blob/master/tests/notify.pp

Page 50: The 5 Stages of Secrets Management Grief, And How to Prevail

Masterless approach - a.k.a - Node Side Secrets - secrets aren’t in source control and they are not on the master

Page 51: The 5 Stages of Secrets Management Grief, And How to Prevail

Scenario 1 - Write a configuration file on the node that has a list of secrets

Page 52: The 5 Stages of Secrets Management Grief, And How to Prevail

Puppet::conjur_demo {‘/opt/foo.conf’:secrets =>

[‘/production/db/user’,’/production/db/password’],

}

Page 53: The 5 Stages of Secrets Management Grief, And How to Prevail

Scenario 2 - Control the value of an attribute via Conjur

Page 54: The 5 Stages of Secrets Management Grief, And How to Prevail

Puppet::conjurdemo_secert_value { ‘foo’:secret_key_name => ‘bar’,resource => Wordpress[‘server1’],field => ‘db_password’,

}

Page 55: The 5 Stages of Secrets Management Grief, And How to Prevail

datacat_collector { "$title Conjur secret": template_body => template('puppet_conjurdemo/conjur_simple_secret.erb'), target_resource => $resource, target_field => $field, notify => $resource, }

Page 56: The 5 Stages of Secrets Management Grief, And How to Prevail

<%% require 'conjur/cli' require 'yaml' Conjur::Config.load Conjur::Config.apply api = Conjur::Authn.connect-%><% @secrets.each do |secret_key| %><%% secret = api.variable "<%=secret_key%>" %><%=secret_key%> = <%%=secret.value-%><%end%>

Page 57: The 5 Stages of Secrets Management Grief, And How to Prevail

Want to learn more?

Request a Conjur Demo

Page 58: The 5 Stages of Secrets Management Grief, And How to Prevail

Denial - We don’t have a problemAnger - It’s their fault!Bargaining - A Series of Trade-offs?Depression - This isn’t fixed?Acceptance - We have a problem

Page 59: The 5 Stages of Secrets Management Grief, And How to Prevail

In both the masterful and masterless models, the secrets wind up on the nodes.

Page 60: The 5 Stages of Secrets Management Grief, And How to Prevail

This represents a whole new threat surface - a way that your secret information can be compromised

Page 61: The 5 Stages of Secrets Management Grief, And How to Prevail

Applications and services, not just infrastructure also need access to credentials. And applications are stored in source control.

Page 62: The 5 Stages of Secrets Management Grief, And How to Prevail

Summon is an open-source project that allows for the retrieval of secrets safely without checking the secrets into source control

Page 63: The 5 Stages of Secrets Management Grief, And How to Prevail

Summon works well with 12 factor apps - those that expect to get their configuration from the environment - e.g. Java Application

Page 64: The 5 Stages of Secrets Management Grief, And How to Prevail

secrets.yaml

MYSECRET: !var secret/pathMYSECRET2: !var secret/path2

Page 65: The 5 Stages of Secrets Management Grief, And How to Prevail

USAGE: summon [global options] command [command options] [arguments...]Ex: summon -f /opt/secrets.yaml printenv

Page 66: The 5 Stages of Secrets Management Grief, And How to Prevail

Supports simple provider interface

variable = sys.argv[1] value = keyring.get_password( os.environ.get('SUMMON_KEYRING_SERVICE', 'summon'), variable )

Page 67: The 5 Stages of Secrets Management Grief, And How to Prevail

https://github.com/jbregman/puppet-summon/tree/master/jbregman-summon/tests

Test 1 - Simple secrets.yamlTest 1a - Parameterized secrets.yamlTest 2a - Creating Config Test 3 - facter

Page 68: The 5 Stages of Secrets Management Grief, And How to Prevail

Denial - We don’t have a problemAnger - It’s their fault!Bargaining - A Series of Trade-offs?Depression - This isn’t fixed?Acceptance - We have a problem

Page 69: The 5 Stages of Secrets Management Grief, And How to Prevail

This is an evolution from the Conjur Puppet integration that I presented at Puppet Conf in 2015

Page 70: The 5 Stages of Secrets Management Grief, And How to Prevail

Integration with Puppet is an important but emerging area. These modules and repos are works in progress.

Page 71: The 5 Stages of Secrets Management Grief, And How to Prevail

Customers are very interested in additional capabilities such as rotation, versioning, secure service lifecycle

Page 72: The 5 Stages of Secrets Management Grief, And How to Prevail

Resources:https://github.com/dgrstl/puppet_conjurdemohttps://puppetlabs.com/blog/using-node-side-secrets-with-puppethttps://conjurinc.github.io/summon/

Page 73: The 5 Stages of Secrets Management Grief, And How to Prevail

Call to action:• Have a discussion “Are we a

masterless or masterful shop?”• Make friends with information

security

Page 74: The 5 Stages of Secrets Management Grief, And How to Prevail

QUESTIONS?

Page 75: The 5 Stages of Secrets Management Grief, And How to Prevail

Want to learn more?

Request a Conjur Demo