MCPcopy Create free account
hub / github.com/PostHog/duckgres / CPUserSecretManager

Struct CPUserSecretManager

controlplane/user_secrets.go:24–27  ·  view source on GitHub ↗

CPUserSecretManager implements server.UserSecretManager on top of the config store: it seals user CREATE PERSISTENT SECRET statements with AES-GCM and persists them per (org, user, name) for replay at session creation. With no encryption key configured, writes are disabled (Ready errors, so the clie

Source from the content-addressed store, hash-verified

22// errors, so the client gets a clear message) but deletes still work, so
23// stale rows remain removable.
24type CPUserSecretManager struct {
25 store *configstore.ConfigStore
26 cipher *usersecrets.Cipher // nil when DUCKGRES_USER_SECRET_KEY is unset
27}
28
29// NewCPUserSecretManager builds the manager. encodedKey is the value of
30// DUCKGRES_USER_SECRET_KEY; empty disables persistence (not an error), a

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected