mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-12 07:20:45 +00:00
Gateway Auth: allowlist bootstrap password references
This commit is contained in:
@@ -304,9 +304,12 @@ export function assertGatewayAuthConfigured(
|
||||
);
|
||||
}
|
||||
if (auth.mode === "password" && !auth.password) {
|
||||
if (rawAuthConfig?.password != null && typeof rawAuthConfig.password !== "string") {
|
||||
if (
|
||||
rawAuthConfig?.password != null && // pragma: allowlist secret
|
||||
typeof rawAuthConfig.password !== "string" // pragma: allowlist secret
|
||||
) {
|
||||
throw new Error(
|
||||
"gateway auth mode is password, but gateway.auth.password contains a provider reference object instead of a resolved string — bootstrap secrets (gateway.auth.password) must be plaintext strings or set via the OPENCLAW_GATEWAY_PASSWORD environment variable because the secrets provider system has not initialised yet at gateway startup",
|
||||
"gateway auth mode is password, but gateway.auth.password contains a provider reference object instead of a resolved string — bootstrap secrets (gateway.auth.password) must be plaintext strings or set via the OPENCLAW_GATEWAY_PASSWORD environment variable because the secrets provider system has not initialised yet at gateway startup", // pragma: allowlist secret
|
||||
);
|
||||
}
|
||||
throw new Error("gateway auth mode is password, but no password was configured");
|
||||
|
||||
Reference in New Issue
Block a user