mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 12:11:23 +00:00
Config: add secret ref schema and redaction foundations
This commit is contained in:
committed by
Peter Steinberger
parent
6daf40d3f4
commit
c3a4251a60
31
src/config/types.secrets.ts
Normal file
31
src/config/types.secrets.ts
Normal 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;
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user