Upgrade to Pro — share decks privately, control downloads, hide ads and more …

2016 - Noah Kantrowitz - Behind Closed Doors

PyBay
August 20, 2016

2016 - Noah Kantrowitz - Behind Closed Doors

Description
A modern application has a lot of passwords and keys floating around. Encryption keys, database passwords, and API credentials; often typed in to text files and forgotten. Fortunately a new wave of tools are emerging to help manage, update, and audit these secrets. Come learn how to avoid being the next TechCrunch headline.

Abstract
Secrets come in many forms, passwords, keys, tokens. All crucial for the operation of an application, but each dangerous in its own way. In the past, many of us have pasted those secrets in to a text file and moved on, but in a world of config automation and ephemeral microservices these patterns are leaving our data at greater risk than ever before.

New tools, products, and libraries are being released all the time to try to cope with this massive rise in threats, both new and old-but-ignored. This talk will cover the major types of secrets in a normal web application, how to model their security properties, what tools are best for each situation, and how to use them with major Python frameworks.

Bio
Noah Kantrowitz is a web developer turned infrastructure automation enthusiast, and all around engineering rabble-rouser. By day he builds tools and teaches, and by night he works with the Python Software Foundation infrastructure team. He is an active member of the Chef community, and enjoys merge commits, cat pictures, and beards.

https://youtu.be/xZiekP_70EA

PyBay

August 20, 2016
Tweet

More Decks by PyBay

Other Decks in Programming

Transcript

  1. – Jerome Saltzer, Communications of the ACM “Every program and every

    privileged user of the system should operate using the least amount of privilege necessary to complete the job.”
  2. $ echo "P@s5wd" > secret.txt $ git commit -a -m

    "yolo!" $ git push origin master To [email protected]:me/myapp.git f35a8c0..c2f0adf master -> master
  3. Surfaces • Brute force • Code leak • Backup leak

    • Traversal
 • Code exec • Root exec • Laptop theft • Higher power
  4. Identity • Who are you? • Who am I? •

    Why are we in this
 hand basket?
  5. HVAC # local_settings.py import hvac c = hvac.Client( url='https://vaultserver:8200') DATABASES

    = { 'default': { # Other settings ... 'PASSWORD': c.read('secret/dbpass') } }
  6. Chef # recipes/myapp.rb execute 'sneaker unpack ...' template 'local_settings.py' do

    # Other properties ... variables pw: citadel['pw'] end
  7. In Summary • Check your privilege and audit trail •

    Pick types and temperatures • Think about attack surfaces • Have a disaster plan