惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
A
About on SuperTechFans
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
B
Blog RSS Feed
U
Unit 42
Stack Overflow Blog
Stack Overflow Blog
Recent Announcements
Recent Announcements
雷峰网
雷峰网
罗磊的独立博客
Microsoft Security Blog
Microsoft Security Blog
Hugging Face - Blog
Hugging Face - Blog
L
LangChain Blog
人人都是产品经理
人人都是产品经理
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Help Net Security
P
Proofpoint News Feed
The Cloudflare Blog
D
Docker
大猫的无限游戏
大猫的无限游戏

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix: honor inherited Gemini auth policy · openclaw/opencl...
shakkernerd · 2026-06-17 · via Recent Commits to openclaw:main

@@ -104,7 +104,13 @@ describe("google gemini cli backend auth bridge", () => {

104104

await fs.writeFile(

105105

inheritedSettingsPath,

106106

`${JSON.stringify({

107-

security: { auth: { selectedType: "vertex-ai" } },

107+

security: {

108+

auth: {

109+

selectedType: "vertex-ai",

110+

enforcedType: "oauth-personal",

111+

useExternal: true,

112+

},

113+

},

108114

mcp: { allowed: ["openclaw"] },

109115

mcpServers: { openclaw: { url: "http://127.0.0.1:23119/mcp" } },

110116

})}\n`,

@@ -148,7 +154,13 @@ describe("google gemini cli backend auth bridge", () => {

148154

expect(JSON.parse(rootSettingsRaw)).toEqual(JSON.parse(nestedSettingsRaw));

149155

const systemSettingsRaw = await fs.readFile(systemSettingsPath ?? "", "utf8");

150156

expect(JSON.parse(systemSettingsRaw)).toEqual({

151-

security: { auth: { selectedType: "oauth-personal" } },

157+

security: {

158+

auth: {

159+

selectedType: "oauth-personal",

160+

enforcedType: "oauth-personal",

161+

useExternal: true,

162+

},

163+

},

152164

mcp: { allowed: ["openclaw"] },

153165

mcpServers: { openclaw: { url: "http://127.0.0.1:23119/mcp" } },

154166

});

@@ -229,6 +241,76 @@ describe("google gemini cli backend auth bridge", () => {

229241

}

230242

});

231243244+

it("rejects inherited Gemini system settings that enforce a different auth type", async () => {

245+

const backend = buildGoogleGeminiCliBackend();

246+

const workspaceDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-test-workspace-"));

247+248+

try {

249+

const inheritedSettingsPath = path.join(workspaceDir, "generated-mcp-settings.json");

250+

await fs.writeFile(

251+

inheritedSettingsPath,

252+

`${JSON.stringify({

253+

security: { auth: { enforcedType: "gemini-api-key" } },

254+

})}\n`,

255+

"utf8",

256+

);

257+

const context = buildGeminiOAuthPrepareContext(workspaceDir);

258+

context.env = { GEMINI_CLI_SYSTEM_SETTINGS_PATH: inheritedSettingsPath };

259+260+

await expect(backend.prepareExecution?.(context)).rejects.toThrow(/enforce gemini-api-key/);

261+

} finally {

262+

await fs.rm(workspaceDir, { recursive: true, force: true });

263+

}

264+

});

265+266+

it("inherits process Gemini system settings when no generated settings path is present", async () => {

267+

const backend = buildGoogleGeminiCliBackend();

268+

const workspaceDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-test-workspace-"));

269+

const originalSystemSettingsPath = process.env.GEMINI_CLI_SYSTEM_SETTINGS_PATH;

270+

let prepared:

271+

| Awaited<ReturnType<NonNullable<typeof backend.prepareExecution>>>

272+

| null

273+

| undefined;

274+275+

try {

276+

const inheritedSettingsPath = path.join(workspaceDir, "ambient-system-settings.json");

277+

await fs.writeFile(

278+

inheritedSettingsPath,

279+

`${JSON.stringify({

280+

security: {

281+

auth: {

282+

selectedType: "oauth-code-assist",

283+

enforcedType: "oauth-personal",

284+

},

285+

folderTrust: { enabled: true },

286+

},

287+

})}\n`,

288+

"utf8",

289+

);

290+

process.env.GEMINI_CLI_SYSTEM_SETTINGS_PATH = inheritedSettingsPath;

291+292+

prepared = await backend.prepareExecution?.(buildGeminiOAuthPrepareContext(workspaceDir));

293+294+

const systemSettingsRaw = await fs.readFile(

295+

prepared?.env?.GEMINI_CLI_SYSTEM_SETTINGS_PATH ?? "",

296+

"utf8",

297+

);

298+

expect(JSON.parse(systemSettingsRaw)).toEqual({

299+

security: {

300+

auth: {

301+

selectedType: "oauth-personal",

302+

enforcedType: "oauth-personal",

303+

},

304+

folderTrust: { enabled: true },

305+

},

306+

});

307+

} finally {

308+

restoreEnv("GEMINI_CLI_SYSTEM_SETTINGS_PATH", originalSystemSettingsPath);

309+

await prepared?.cleanup?.();

310+

await fs.rm(workspaceDir, { recursive: true, force: true });

311+

}

312+

});

313+232314

it("rejects Vercel AI Gateway profiles for the Gemini CLI backend", async () => {

233315

const backend = buildGoogleGeminiCliBackend();

234316

const workspaceDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-test-workspace-"));