Slide 1

Slide 1 text

ROTATING PASSWORDS WITH ANSIBLE AND HASHIVAULT OUR PRACTICAL OVERVIEW OF SECRET MANAGEMENT BY INTEGRATING HASHICORP'S VAULT WITH ANSIBLE Keith Resar @KeithResar

Slide 2

Slide 2 text

@KeithResar Keith Resar: Bio Wear many hats @KeithResar [email protected] Coder Open Source Contributor and Advocate Infrastructure Architect

Slide 3

Slide 3 text

7 PRINCIPLES OF DEVSECOPS ● Humans create poor quality passwords, let’s generate them automatically ● An automated task would allow increased password rotation frequency ● Continuous deployment of password rotations would be ideal ● An automated task can be tested, and will never go beyond its scope ● Storing the password in a shared-secret vault is our break glass ● Integrating with AD would be great, allowing seamless runtime access control ● Passwords should not be stored in Git, deploy scripts, etc

Slide 4

Slide 4 text

ANSIBLE VAULT VS HASHICORP VAULT

Slide 5

Slide 5 text

ANSIBLE VAULT ENABLES STORING SENSITIVE DATA SUCH AS PASSWORDS OR KEYS IN ENCRYPTED FILES, RATHER THAN AS PLAINTEXT IN YOUR PLAYBOOKS OR ROLES.

Slide 6

Slide 6 text

ANSIBLE VAULT ● No External dependencies ● Encrypt entire files or individual secrets ● Version control, commit alongside playbooks

Slide 7

Slide 7 text

ANSIBLE VAULT USAGE > ansible-vault {create,rekey,edit,encrypt} foo.yml > ansible-playbook foo.yml --ask-vault-pass

Slide 8

Slide 8 text

MOVING BEYOND ANSIBLE VAULT ● Storing static information vs. Dynamic database ● Separation of automation from secrets ● Supporting password leases

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

HASHICORP VAULT PRIMER

Slide 11

Slide 11 text

HASHICORP VAULT VIA ANSIBLE

Slide 12

Slide 12 text

DEMO APPLICATION KEY ROTATION

Slide 13

Slide 13 text

DEMO SECRET LOOKUP

Slide 14

Slide 14 text

WHAT’S NEXT ● Application Support ● Notifications ● Tests ● External verification of secret inventory and change date

Slide 15

Slide 15 text

RESOURCES ROTATE PASSWORDS WITH ANSIBLE AND HASHIVAULT http://far-oeuf.com/.../...ansible-hashivault ANSIBLE LOOKUP PLUGIN FOR HV SECRETS https://github.com/jhaals/ansible-vault ANSIBLE MINNEAPOLIS MEETUP https://www.meetup.com/Ansible-Minneapolis/

Slide 16

Slide 16 text

@KeithResar @KeithResar THANKS!