Documentation
¶
Index ¶
Constants ¶
View Source
const MasterKeyEnv = "SECRETS_MASTER_KEY"
MasterKeyEnv is the shared env var name used by Supabase Edge and enclave services for secret encryption/decryption.
Variables ¶
View Source
var ( // ErrNotFound indicates the secret does not exist for the given user/name. ErrNotFound = errors.New("secret not found") // ErrForbidden indicates the caller's service ID is not allowed to access the secret. ErrForbidden = errors.New("secret access forbidden") // ErrInvalidCiphertext indicates the stored secret cannot be decrypted. ErrInvalidCiphertext = errors.New("invalid secret ciphertext") )
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(repo Repository, rawKey []byte) (*Manager, error)
type Provider ¶
Provider resolves decrypted secret values for a given user.
Implementations must enforce per-user ownership and any per-secret policy constraints (allowed services), because the enclave services treat the returned value as sensitive and must not fetch secrets they are not entitled to.
type Repository ¶
type ServiceProvider ¶
ServiceProvider is the standard Provider implementation used by enclave services.
It enforces per-secret allowlists (secret_policies) using the service ID and decrypts secrets using the configured Manager.
Click to show internal directories.
Click to hide internal directories.