Config: add secret ref schema and redaction foundations

This commit is contained in:
joshavant
2026-02-21 10:55:17 -08:00
committed by Peter Steinberger
parent 6daf40d3f4
commit c3a4251a60
12 changed files with 253 additions and 8 deletions

View File

@@ -0,0 +1,31 @@
export type SecretRefSource = "env" | "file";
/**
* Stable identifier for a secret in a configured source.
* Examples:
* - env source: "OPENAI_API_KEY"
* - file source: "/providers/openai/api_key" (JSON pointer)
*/
export type SecretRef = {
source: SecretRefSource;
id: string;
};
export type SecretInput = string | SecretRef;
export type EnvSecretSourceConfig = {
type?: "env";
};
export type SopsSecretSourceConfig = {
type: "sops";
path: string;
timeoutMs?: number;
};
export type SecretsConfig = {
sources?: {
env?: EnvSecretSourceConfig;
file?: SopsSecretSourceConfig;
};
};