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

推荐订阅源

月光博客
月光博客
IT之家
IT之家
Hugging Face - Blog
Hugging Face - Blog
J
Java Code Geeks
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 叶小钗
MyScale Blog
MyScale Blog
G
Google Developers Blog
Microsoft Azure Blog
Microsoft Azure Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
大猫的无限游戏
大猫的无限游戏
博客园 - 三生石上(FineUI控件)
Google DeepMind News
Google DeepMind News
Engineering at Meta
Engineering at Meta
The Cloudflare Blog
Martin Fowler
Martin Fowler
酷 壳 – CoolShell
酷 壳 – CoolShell
N
Netflix TechBlog - Medium
MongoDB | Blog
MongoDB | Blog
I
InfoQ
WordPress大学
WordPress大学
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
H
Help Net Security

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
Require Control UI pairing before proxy-scoped access [AI...
pgondhi987 · 2026-05-13 · via Recent Commits to openclaw:main

@@ -331,7 +331,7 @@ export function registerControlUiAndPairingSuite(): void {

331331

});

332332

});

333333334-

test("preserves trusted-proxy control ui scopes for unpaired device identity", async () => {

334+

test("requires pairing for trusted-proxy control ui device identity", async () => {

335335

const { replaceConfigFile } = await import("../config/config.js");

336336

testState.gatewayAuth = undefined;

337337

testState.gatewayControlUi = {

@@ -375,17 +375,64 @@ export function registerControlUiAndPairingSuite(): void {

375375

device,

376376

client: { ...CONTROL_UI_CLIENT },

377377

});

378+

expect(res.ok).toBe(false);

379+

expect(res.error?.message ?? "").toContain("pairing required");

380+

expect((res.error?.details as { code?: string } | undefined)?.code).toBe(

381+

ConnectErrorDetailCodes.PAIRING_REQUIRED,

382+

);

383+

} finally {

384+

ws.close();

385+

}

386+

});

387+

});

388+389+

test("clears trusted-proxy control ui scopes without device identity", async () => {

390+

const { replaceConfigFile } = await import("../config/config.js");

391+

testState.gatewayAuth = undefined;

392+

testState.gatewayControlUi = {

393+

...testState.gatewayControlUi,

394+

allowedOrigins: ["https://localhost"],

395+

};

396+

await replaceConfigFile({

397+

nextConfig: {

398+

gateway: {

399+

auth: {

400+

mode: "trusted-proxy",

401+

trustedProxy: {

402+

userHeader: "x-forwarded-user",

403+

requiredHeaders: ["x-forwarded-proto"],

404+

allowLoopback: true,

405+

},

406+

},

407+

trustedProxies: ["127.0.0.1"],

408+

controlUi: {

409+

allowedOrigins: ["https://localhost"],

410+

},

411+

},

412+

},

413+

afterWrite: { mode: "auto" },

414+

});

415+

await withControlUiGatewayServer(async ({ port }) => {

416+

const ws = await openWs(port, TRUSTED_PROXY_CONTROL_UI_HEADERS);

417+

try {

418+

const res = await connectReq(ws, {

419+

skipDefaultAuth: true,

420+

scopes: ["operator.admin", "operator.read"],

421+

device: null,

422+

client: { ...CONTROL_UI_CLIENT },

423+

});

378424

expect(res.ok).toBe(true);

379425

const payload = res.payload as

380426

| {

381427

auth?: { scopes?: string[]; deviceToken?: string };

382428

}

383429

| undefined;

384-

expect(payload?.auth?.scopes).toEqual(["operator.admin", "operator.read"]);

430+

expect(payload?.auth?.scopes).toEqual([]);

385431

expect(payload?.auth?.deviceToken).toBeUndefined();

386432387433

const admin = await rpcReq(ws, "set-heartbeats", { enabled: false });

388-

expect(admin.ok).toBe(true);

434+

expect(admin.ok).toBe(false);

435+

expect(admin.error?.message ?? "").toContain("missing scope");

389436

} finally {

390437

ws.close();

391438

}

@@ -419,6 +466,14 @@ export function registerControlUiAndPairingSuite(): void {

419466

afterWrite: { mode: "auto" },

420467

});

421468

await withControlUiGatewayServer(async ({ port }) => {

469+

const seeded = await seedApprovedOperatorReadPairing({

470+

identityPrefix: "openclaw-control-ui-trusted-proxy-bounded-",

471+

clientId: CONTROL_UI_CLIENT.id,

472+

clientMode: CONTROL_UI_CLIENT.mode,

473+

displayName: "Control UI",

474+

platform: "web",

475+

scopes: ["operator.admin", "operator.read"],

476+

});

422477

const ws = await openWs(port, {

423478

...TRUSTED_PROXY_CONTROL_UI_HEADERS,

424479

"x-openclaw-scopes": "operator.read",

@@ -431,6 +486,7 @@ export function registerControlUiAndPairingSuite(): void {

431486

scopes: ["operator.admin", "operator.read"],

432487

clientId: CONTROL_UI_CLIENT.id,

433488

clientMode: CONTROL_UI_CLIENT.mode,

489+

identityPath: seeded.identityPath,

434490

nonce: challengeNonce,

435491

});

436492

const res = await connectReq(ws, {