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

Developing an Ecosystem for More Secure Kubernetes Secrets Management

Developing an Ecosystem for More Secure Kubernetes Secrets Management

Katsuya Yamaguchi (Yahoo! JAPAN / Security & Developer PF Division, System Management Group, Technology Group / Software Engineer)

https://tech-verse.me/ja/sessions/190
https://tech-verse.me/en/sessions/190
https://tech-verse.me/ko/sessions/190

Tech-Verse2022

November 17, 2022
Tweet

More Decks by Tech-Verse2022

Other Decks in Technology

Transcript

  1. © Yahoo Japan Speaker Katsuya Yamaguchi - Joined Yahoo! JAPAN

    as a new grad in 2017 - Software Engineer - Data Protection Technology Team
  2. © Yahoo Japan About this session - Secrets Store CSI

    Driver as an ecosystem for our platforms - What is Secrets Store CSI Driver? - What are the advantages for developer? Secrets Store CSI Driver => SSCD Kubernetes => K8s
  3. © Yahoo Japan - Background - What is Secrets Store

    CSI Driver? - Overview of the ecosystem Agenda
  4. © Yahoo Japan Our in-house Secrets Manager store Revoke generation

    1 2 3 Version control - High confidentiality, integrity, and availability - Centralized secrets management - Database password - API key - Encryption Key - Services suitable for each platform
  5. © Yahoo Japan Our in-house computing platforms Secrets Manager Computing

    platforms Kubernetes Pod FaaS Function PaaS Application … Developer
  6. © Yahoo Japan Our in-house computing platforms Secrets Manager Computing

    platforms Kubernetes Pod FaaS Function PaaS Application Access Control … Authentication platform Developer
  7. © Yahoo Japan Our in-house computing platforms Secrets Manager Computing

    platforms Kubernetes Pod FaaS Function PaaS Application Access Control … Authentication platform Developer
  8. © Yahoo Japan Responsibilities of Secrets Management Developer Secrets Manager

    Application Computing platforms - Conveying secret data to platforms - Keeping secret data safe until you need to use it - Managing secret data on platforms
  9. © Yahoo Japan How do we manage secret data on

    K8s? - Kubernetes Secret Resource - Using sidecar for Secrets Manager - Using client library for Secrets Manager
  10. © Yahoo Japan How do we manage secret data on

    K8s? - Kubernetes Secret Resource - Using sidecar for Secrets Manager - Using client library for Secrets Manager
  11. © Yahoo Japan Problems: Kubernetes Secret Resource - Complex additional

    steps required to acquire secret data - Possibility of secret data leakage - Key management for etcd
  12. © Yahoo Japan How do we manage secret data on

    K8s? - Kubernetes Secret Resource - Using sidecar for Secrets Manager - Using client library for Secrets Manager
  13. © Yahoo Japan Using sidecar for Secrets Manager Secrets Manager

    Application Container Sidecar Container Security credentials for Athenz Access Control
  14. © Yahoo Japan Problems: Using sidecar for Secrets Manager -

    Additional implementation for getting secret data - Same problems as Kubernetes Secret Resource - Wastage of resources of the sidecar
  15. © Yahoo Japan How do we manage secret data on

    K8s? - Kubernetes Secret Resource - Using sidecar for Secrets Manager - Using client library for Secrets Manager
  16. © Yahoo Japan Using client library for Secrets Manager Secrets

    Manager Access Control Application that uses the client library
  17. © Yahoo Japan Problems: Using client library for Secrets Manager

    - Implementation cost - Additional dependency of this library - Learning cost for using this library
  18. © Yahoo Japan Ideal Secrets Management for developers Should not

    take much for key management Should not use special libraries or modules Confidentiality of secret data is not developer dependent
  19. © Yahoo Japan External Secrets Operator Sealed Secrets HashiCorp Vault

    Easy integration with internal platform Easy to use Popularity Installation costs Comparison of application as an ecosystem Inconsistent with internal security measures Enterprise edition is required Secrets Store CSI Driver
  20. © Yahoo Japan External Secrets Operator Sealed Secrets HashiCorp Vault

    Easy integration with internal platform Easy to use Popularity Installation costs Comparison of application as an ecosystem Inconsistent with internal security measures Enterprise edition is required Secrets Store CSI Driver
  21. © Yahoo Japan External Secrets Operator Sealed Secrets HashiCorp Vault

    Easy integration with internal platform Easy to use Popularity Installation costs Comparison of application as an ecosystem Inconsistent with internal security measures Enterprise edition is required Secrets Store CSI Driver
  22. © Yahoo Japan External Secrets Operator Sealed Secrets HashiCorp Vault

    Easy integration with internal platform Easy to use Popularity Installation costs Comparison of application as an ecosystem Inconsistent with internal security measures Enterprise edition is required Secrets Store CSI Driver ✓
  23. © Yahoo Japan Secrets Store CSI Driver (SSCD) Azure Key

    Vault AWS Secrets Manager GCP Secret Manager AWS Provider GCP Provider Azure Provider SSCD
  24. © Yahoo Japan Advantage: Easy to introduce Provider SSCD Secrets

    Manager https://github.com/kubernetes-sigs/secrets-store-csi-driver/blob/main/provider/fake/fake_server.go Enable work just by developing a provider
  25. © Yahoo Japan Control Plane Node Worker Nodes SSCD Provider

    Secrets Manager How Secrets Store CSI Volume works
  26. © Yahoo Japan Control Plane Node Worker Nodes SSCD Provider

    Secrets Manager How Secrets Store CSI Volume works
  27. © Yahoo Japan How are the secrets mounted to a

    container? Application Container tmpfs mount: e.g., /mnt/secrets/<secret name>.txt - Provider writes secret data to files - Application can read secret data from the files Secret data as files: (Provider fetches secret data from exernal secrets manager)
  28. © Yahoo Japan Secret data is not written to the

    disk on Host Unnecessary key management for etcd Only container can access secret data Advantage: High Confidentiality
  29. © Yahoo Japan Known Limitation: Mounted Secret Data is not

    Updated Automatically SecretProviderClass Application Container Secrets Manager Updated secret data is not reflected in the pod mount
  30. © Yahoo Japan Provider for In-house Secrets Manager 1. Get

    a security credential for Athenz 2. Fetch secret data using the security credential 3. Write secret data to the volume
  31. © Yahoo Japan Security credentials of Athenz X.509 certificate for

    K8s service account X.509 certificate (security credentials)
  32. © Yahoo Japan SSCD as an ecosystem for our platforms

    SSCD Provider Multi-cluster K8s as a service SSCD Provider SSCD Provider Secrets Manager
  33. © Yahoo Japan Future work Improving familiarity - How to

    use, benefits, system linking Expansion of this ecosystem - Introducing this ecosystem to other platforms Additional Functions - Considering to enable “Sync as Kubernetes Secret” feature - Mounted secret data and Kubernetes Secret are not updated automatically
  34. © Yahoo Japan Conclusion - Secrets Store CSI Driver as

    an ecosystem for our Kubernetes platforms - More secure secrets management for developer - Increased productivity for developers