Share and manage secrets (certificates, passwords, keys) for your applications using Vault and Spring Vault.
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/Managing Secrets at Scalewith VaultChristoph StroblPivotal Software, Inc.@stroblchristoph#devone
View Slide
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 2
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/Apache TomEEEncryption to the Rescue3JdbcDriver com.mysql.jdbc.DriverJdbcUrl jdbc:mysql:!//localhost/testUserName testPassword Passw0rd!
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/Apache TomEEEncryption to the Rescue4JdbcDriver com.mysql.jdbc.DriverJdbcUrl jdbc:mysql:!//localhost/testUserName testPassword xMH5uM1V9vQzVUv5LG7YLA!==PasswordCipher Static3DES!
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/Symmetric vs. Asymmetric5
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 6https://www.flickr.com/photos/dahlstroms/4188244058
7Say,change that Password once again!
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 8
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 9
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/• Secure secret storage• Sealing• Revocation• Leasing and renewal• Multiple secret backends• Access control policies• HTTP endpoint10
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 11• Secret Storage• Tokens & ACL• Dynamic Secrets• Leasing and renewal• Key Rolling• Audit Logs• Hardware Security Modules• 24x7 SupportCommunity Enterprise
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/Getting Started – Init Vault12$ vault init -key-shares=1 -key-threshold=1Key 1: a9cbc3e47e4635ff2e8239bf43397fad3d659500cc7a0d42deea0ffd4d307244Initial Root Token: eb5229d6-9858-d494-a1d7-820cae1ea31e$Sealed: trueKey Shares: 1Key Threshold: 1Unseal Progress: 0$vault status
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/Getting Started – Unseal Vault & Auth Client13$ vault unseal a9cbc3e47e4635ff2e8239bf43397fad3d65950…vault auth eb5229d6-9858-d494-a1d7-820cae1ea31eSealed: falseKey Shares: 1Key Threshold: 1Unseal Progress: 0$Successfully authenticated!token: eb5229d6-9858-d494-a1d7-820cae1ea31etoken_duration: 0token_policies: [root]$
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/Getting Started – Write & Read Secrets14$ vault write secret/devone value=awesomevault read secret/devoneSuccess! Data written to: secret/devone$Key Valuelease_duration 2592000value awesome$
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/Getting Started - HTTP API15$ curl –H”X-Vault-Token eb5229d6-9858-d494 :49222/v1/secret/devone{lease_id : null,renewable : false,lease_duration : 2592000,data : {value : awesome},wrap_info : null,…}$
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/Getting Started – Seal Vault16$ vault sealvault read secret/devoneVault is now sealed.$Error reading secret/devone: Error makingAPI request.URL: GET :49222/v1/secret/devoneCode: 503. Errors:* Vault is sealed$
17How is this any better?What if someone’s got your token?
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/Use APP ID Auth maybe?1818$ vault auth-enable app-idSuccessfully enabled 'app-id' at 'app-id'!$ vault write auth/app-id/map/app-id/devone value=admin$ vault write auth/app-id/map/user-id/awesome value=devone&cidr_block=10.0.0.0/16$
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/Spring Cloud In General19Service Discovery Circuit Breakers Routing & MessagingCi PipelinesTracingAPI GatewayConfiguration
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/Spring Cloud20ConfigurationConfig Server
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/Spring Cloud21Service DiscoveryService Reg.ConsumerProducerConnect
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/Spring Cloud...• Circuit Breakers withNetflix Hystrix.• Messaging using RabbitMQ or Apache Kafka.• Tracing with Spring Cloud Sleuth & Zipkin.• Spring Cloud Bus• Spring Cloud Stream (pre. Dataflow)• Spring Cloud Task• Spring Cloud AWS• … and many more!22
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/Spring Cloud Vault23Token / Auth
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 24org.springframework.cloud!spring-cloud-starter-vault-config!!src/main/resources/bootstrap.propertiesspring.application.name=spring-devone-appspring.cloud.vault.token=eb5229d6-9858-d494-a1d7-820!!...Project Setup – Dependencies & Properties
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/Resolved environment properties$ curl :8080/env | jq{vault:secret/spring-devone-app : {secret-key : “!!***!!***”},vault:secret/applicaton : {message: “Hello #devone!”},…}$
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/Spring Profile support built in$ curl :8080/env | jq{profiles : [test, dev],vault:secret/spring-devone-app/dev : {local : “!!***!!***”},vault:secret/spring-devone-app/test : {secret-key : “!!***!!***”},vault:secret/spring-devone-app : {secret-key : “!!***!!***”},vault:secret/applicaton : {message: “Hello #devone!”},$ mvn -Dspring.profiles.active=test,dev…
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/Secret Backends27
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/Different Backends281. Configure2. Setup3. Auth4. Credentials5. Auth
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/Vault with different Backends2929$ vault mount mysql$ vault write &mysql/config/connection&connection_url=spring:[email protected](localhost:3306)$ vault read mysql/creds/readonlyLease_id mysql/creds/eb5229d6-9858Lease_duration 2592000Password: a9cbc3e47e4635ff2e8239bUsername: token-eb5229d6-9858
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/Spring Cloud Vault with different Backends.30src/main/resources/bootstrap.propertiesspring.application.name=spring-devone-appspring.cloud.vault.token=eb5229d6-9858-d494-a1d7-820!!...spring.cloud.vault.mysql.enabled=truespring.cloud.vault.mysql.role=readonlyspring.datasource.url=jdbc:mysql:!//localhost:3306
Unless otherwise indicated, these slides are © 2013-2017 Pivotal Software, Inc. and licensed under aCreative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ 31Spring Framework 5 RC1Spring Boot 2 M1Check out the latest releases!