Definition according to wiktionary Latin • protection, safekeeping • custody, guardianship English • care (concern, responsibility) • pyx (box) ◦ housing of a ship’s compass ◦ container for consecrated bread
Custodia? 6 • Technology (not yet a product) • Secrets-as-a-Service API ◦ Existing solutions push secrets to client ◦ Actively request secrets from a service • Secrets transport and routing layer definition • Pluggable authentication and authorization • Reference implementation in Python
Custodia not? 7 • Custodia is not intended to replace CoreOS etcd, OpenStack, Barbican, Hashicorp Vault etc. • Custodia is not a secrets storage server ◦ adapter to existing solutions • Custodia is not limited to containers • Custodia is not just a proof of concept used in FreeIPA / Red Hat IdM
results 9 • No secrets on the file system ◦ config files, tempfs, /proc/PID/environ • Strong encryption at rest and in transit • End-to-end encryption • Reduce access and exposure • Audit logs • Key rotation PCI-DSS compliance
10 • Applications request secrets (active pull) • Use standard protocols and data formats • Make it easy to write clients, servers, and plugins • Simple integration • Flexible (authentication, authorization, storage) • Extensible: Generate secrets on demand Network HSM Notification API
• Simple interface for developers (API) • Decoupled layers give flexibility • Configuration and policies are moved to infrastructure Let ops take care of secrets • Vendor agnostic management and storage Standardization in progress!
to the rescue! 17 • Run Custodia in host PID namespace • Mount Unix socket into containers • getsockopt() SO_PEERCRED PID, effective UID, effective GID • getsockopt() SO_PEERSEC SELinux process label (sVirt) • /proc/PID/cgroup Get Docker container ID • Ask Docker daemon Metadata (Kubernetes pod definition) • Future: Introduce a proper API (auditd container id?) Dangerous Hack!
Architecture diagram 18 Container Custodia Application Application Custodia Custodia Key Store Key Store Key Store Key Store Key Store Integration on the system over a local socket • host • kubelet • VM