Top Banner
@el_suisse – tuleap.org – enalean.com FOSDEM - 03/02/2018 @el_suisse – tuleap.org – enalean.com Building an safe access into your cloud app with HashiCorp Vault
12

Building an safe access into your - FOSDEM · HashiCorp Vault Backends Authentication – AppRole – AWS – Google Cloud – Kubernetes – GitHub – LDAP – MFA – Okta –

Jul 14, 2020

Download

Documents

dariahiddleston
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: Building an safe access into your - FOSDEM · HashiCorp Vault Backends Authentication – AppRole – AWS – Google Cloud – Kubernetes – GitHub – LDAP – MFA – Okta –

@el_su isse – tu leap.org – ena lean.com

FOSDEM - 03/02/2018

@el_su isse – tu leap.org – ena lean.com

Building an safe access into your cloud app with HashiCorp Vault

Page 2: Building an safe access into your - FOSDEM · HashiCorp Vault Backends Authentication – AppRole – AWS – Google Cloud – Kubernetes – GitHub – LDAP – MFA – Okta –

@el_su isse – tu leap.org – ena lean.com

Who Am I

● Thomas Gerbet (@el_suisse)

● @TuleapOpenALM contributor and maintainer

● @GreHackConf organizer

● Alpaca lover

Page 3: Building an safe access into your - FOSDEM · HashiCorp Vault Backends Authentication – AppRole – AWS – Google Cloud – Kubernetes – GitHub – LDAP – MFA – Okta –

@el_su isse – tu leap.org – ena lean.com

A Bit of Context

● SaaS provider

● Main contributors of the software– We can develop specifc feature for the SaaS usage

● Web based– REST API

– PHP

● Single Tenant

● Support

Page 4: Building an safe access into your - FOSDEM · HashiCorp Vault Backends Authentication – AppRole – AWS – Google Cloud – Kubernetes – GitHub – LDAP – MFA – Okta –

@el_su isse – tu leap.org – ena lean.com

SaaS and Access Management: Challenges

● Customer’s data are only as safe as the provider is– Do not maintain unnecessary or permanent accesses

– Restrict access to selected team members

– Something bad will happen someday, plan for it

● Accountability / Auditability– What?

– When?

– Who?

● Keep things usable– Must work for people doing the day-to-day job

Page 5: Building an safe access into your - FOSDEM · HashiCorp Vault Backends Authentication – AppRole – AWS – Google Cloud – Kubernetes – GitHub – LDAP – MFA – Okta –

@el_su isse – tu leap.org – ena lean.com

HashiCorp Vault

Page 6: Building an safe access into your - FOSDEM · HashiCorp Vault Backends Authentication – AppRole – AWS – Google Cloud – Kubernetes – GitHub – LDAP – MFA – Okta –

@el_su isse – tu leap.org – ena lean.com

HashiCorp Vault Backends

Authentication– AppRole

– AWS

– Google Cloud

– Kubernetes

– GitHub

– LDAP

– MFA

– Okta

– RADIUS

– TLS certs

– Tokens

– Username/Password

Audit– File

– Syslog

– Socket

Secrets– AWS

– Consul

– Databases

– Key/Value

– Nomad

– PKI

– RabbitMQ

– SSH

– TOTP

– Transit

Page 7: Building an safe access into your - FOSDEM · HashiCorp Vault Backends Authentication – AppRole – AWS – Google Cloud – Kubernetes – GitHub – LDAP – MFA – Okta –

@el_su isse – tu leap.org – ena lean.com

Building its own dynamic Vault secret backend

● Vault supports plugins since August 2017– Basic knowledge of Go is enough

– You can build for your specifc use case

– Still get all the nice Vault features

● Support is needed in your software– Be able to create (and revoke) short lived accounts

– Authenticate requests coming from Vault

Page 8: Building an safe access into your - FOSDEM · HashiCorp Vault Backends Authentication – AppRole – AWS – Google Cloud – Kubernetes – GitHub – LDAP – MFA – Okta –

@el_su isse – tu leap.org – ena lean.com

Public-Key Cryptography is Awesome

● No hardcoded credentials– Vault generates and stores the private key

– Instances of your app only knows the public key to authenticate requests

● libsodium (Ed25519 signatures)– Modern cryptography

– Bindings widely available

● Go– golang.org/x/crypto/ed25519

● PHP– ≥ 7.2: standard library– ≤ 7.1: extension or polyfll (thanks @ParagonIE)

Page 9: Building an safe access into your - FOSDEM · HashiCorp Vault Backends Authentication – AppRole – AWS – Google Cloud – Kubernetes – GitHub – LDAP – MFA – Okta –

@el_su isse – tu leap.org – ena lean.com

Requesting an account

Page 10: Building an safe access into your - FOSDEM · HashiCorp Vault Backends Authentication – AppRole – AWS – Google Cloud – Kubernetes – GitHub – LDAP – MFA – Okta –

@el_su isse – tu leap.org – ena lean.com

Plan for the worst

● Revocation– Immediate

– Granularity:

● One specifc lease● All leases of a specifc user● All leases

● Seal the Vault– All operations are blocked

– Lets you minimize and assess damage in case of a detected intrusion

Page 11: Building an safe access into your - FOSDEM · HashiCorp Vault Backends Authentication – AppRole – AWS – Google Cloud – Kubernetes – GitHub – LDAP – MFA – Okta –

@el_su isse – tu leap.org – ena lean.com

Outcome

● HashiCorp Vault– Integrates nicely in your existing infrastructure

– Highly fexible secrets management

– Audit capabilities

● One more sensitive endpoint in our software ☹ – Still better than hardcoded credentials though

● Usability– Authenticate against Vault → Request account → Log into the

instance

– Only CLI �

Page 12: Building an safe access into your - FOSDEM · HashiCorp Vault Backends Authentication – AppRole – AWS – Google Cloud – Kubernetes – GitHub – LDAP – MFA – Okta –

@el_su isse – tu leap.org – ena lean.com

Questions?