Skip to content

Latest commit

 

History

History
48 lines (29 loc) · 1.83 KB

store.md

File metadata and controls

48 lines (29 loc) · 1.83 KB

Keyhouse Backend Storage

General Layout

Keyhouse organizes its storage into composable layers, all of which must implement the Store trait.

DB Engines provide a layer implementation, and then other layers can compose and modify those underlying layers to provide a powerful storage engine to suit different needs.

Engines Supported

Intermediate Layers Supported

  • Cache: Writethrough eventually-consistent cache
  • Mask: Provides a read-only mask for when Keyhouse is in readonly mode.

Current Setup

  • ETCD
  • Cache
  • Mask

ETCD

ETCD is the primary store for Keyhouse. Other backend store may be implemented in the future.

Communication

Production deployments of Keyhouse should have SPIFFE authentication and authorization. To shim support into ETCD, we can use spire-proxy to handle mTLS and SPIFFE authorization.

Prefix Layout

keys/<customer_key_id>

This prefix stores JSON blobs corresponding to specific customer keys. See CustomerKey struct for structure.

Note that all sensitive data (keys, seeds, intermediate keys) is encrypted at rest in ETCD.

key_aliases/<keyring alias>/<customer key alias>

This prefix stores alias lookups for key id. The contents of each entry in ETCD are customer key ids.

keyrings/<alias>

This prefix stores JSON blobs corresponding to specific keyrings. See Keyring struct for structure.

secrets/<keyring alias>/<customer key alias>/<secret name>

This prefix stores JSON blobs corresponding to specific secrets under a specific customer key. See Secret struct for structure.

Secrets are encrypted at rest in ETCD by a data key generated by their corresponding customer key.