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

推荐订阅源

小众软件
小众软件
博客园_首页
博客园 - 聂微东
T
Tailwind CSS Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
J
Java Code Geeks
The Cloudflare Blog
aimingoo的专栏
aimingoo的专栏
Martin Fowler
Martin Fowler
D
Docker
人人都是产品经理
人人都是产品经理
WordPress大学
WordPress大学
博客园 - 三生石上(FineUI控件)
Microsoft Azure Blog
Microsoft Azure Blog
Recent Announcements
Recent Announcements
Apple Machine Learning Research
Apple Machine Learning Research
阮一峰的网络日志
阮一峰的网络日志
B
Blog RSS Feed
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Microsoft Security Blog
Microsoft Security Blog
L
LangChain Blog
Jina AI
Jina AI
博客园 - Franky
D
DataBreaches.Net

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(gateway): scoped no-auth local backend bypass (#75781...
yozakura-ava · 2026-05-08 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -1204,6 +1204,7 @@ Docs: https://docs.openclaw.ai

12041204

- Agents/replies: defer implicit image model discovery and keep OAuth auth-store adoption on persisted profiles during reply startup, cutting OCM MarCodex warm prep to sub-second in live checks. Thanks @shakkernerd.

12051205

- Plugins/tools: enforce `contracts.tools` as the manifest ownership contract for plugin tool registration, rejecting undeclared runtime tool names and adding bundled plugin drift coverage. Thanks @shakkernerd.

12061206

- Agents/Codex: stop prompting message-tool-only source turns to finish with `NO_REPLY`, so quiet turns are represented by not calling the visible message tool instead of conflicting final-text instructions. Thanks @pashpashpash.

1207+
12071208

- Gateway/config: report failed backup restores as failed in logs and config observe audit records instead of marking them valid. (#70515) Thanks @davidangularme.

12081209

- Compaction: use the active session model fallback chain for implicit summarization failures without persisting fallback model selection, so Azure content-filter 400s can recover. Fixes #64960. (#74470) Thanks @jalehman and @OpenCodeEngineer.

12091210

- Gateway/config: allow `gateway config.patch` to update documented subagent thinking defaults. Fixes #75764. (#75802) Thanks @kAIborg24.

Original file line numberDiff line numberDiff line change

@@ -78,6 +78,31 @@ describe("resolveConnectAuthState", () => {

7878

});

7979
8080

describe("resolveConnectAuthDecision", () => {

81+

it("sets sharedAuthOk false when auth mode is none (no shared secret provided)", async () => {

82+

const state = await resolveConnectAuthState({

83+

resolvedAuth: {

84+

mode: "none",

85+

} satisfies ResolvedGatewayAuth,

86+

connectAuth: {},

87+

hasDeviceIdentity: false,

88+

req: {

89+

headers: {},

90+

socket: { remoteAddress: "127.0.0.1" },

91+

} as never,

92+

trustedProxies: [],

93+

allowRealIpFallback: false,

94+

rateLimiter: createLimiter(),

95+

clientIp: "127.0.0.1",

96+

});

97+
98+

expect(state.authOk).toBe(true);

99+

expect(state.authMethod).toBe("none");

100+

// auth:none does NOT set sharedAuthOk globally — it's not a shared secret.

101+

// Only shouldSkipLocalBackendSelfPairing treats auth:none as shared-auth-scoped

102+

// for local backend connections specifically.

103+

expect(state.sharedAuthOk).toBe(false);

104+

});

105+
81106

it("resets the shared-secret limiter after device-token auth succeeds", async () => {

82107

const rateLimiter = createLimiter();

83108

await resolveConnectAuthDecision({

Original file line numberDiff line numberDiff line change

@@ -451,6 +451,64 @@ describe("handshake auth helpers", () => {

451451

).toBe(false);

452452

});

453453
454+

it("skips backend self-pairing when auth mode is none (scoped, sharedAuthOk-independent)", () => {

455+

const connectParams = {

456+

client: {

457+

id: GATEWAY_CLIENT_IDS.GATEWAY_CLIENT,

458+

mode: GATEWAY_CLIENT_MODES.BACKEND,

459+

},

460+

} as ConnectParams;

461+

// auth:none on local backend skips regardless of sharedAuthOk

462+

expect(

463+

shouldSkipLocalBackendSelfPairing({

464+

connectParams,

465+

locality: "direct_local",

466+

hasBrowserOriginHeader: false,

467+

sharedAuthOk: true,

468+

authMethod: "none",

469+

}),

470+

).toBe(true);

471+

expect(

472+

shouldSkipLocalBackendSelfPairing({

473+

connectParams,

474+

locality: "shared_secret_loopback_local",

475+

hasBrowserOriginHeader: false,

476+

sharedAuthOk: true,

477+

authMethod: "none",

478+

}),

479+

).toBe(true);

480+

// sharedAuthOk=false is fine for auth:none on local backend

481+

expect(

482+

shouldSkipLocalBackendSelfPairing({

483+

connectParams,

484+

locality: "direct_local",

485+

hasBrowserOriginHeader: false,

486+

sharedAuthOk: false,

487+

authMethod: "none",

488+

}),

489+

).toBe(true);

490+

// Remote connections with auth:none should NOT skip

491+

expect(

492+

shouldSkipLocalBackendSelfPairing({

493+

connectParams,

494+

locality: "remote",

495+

hasBrowserOriginHeader: false,

496+

sharedAuthOk: true,

497+

authMethod: "none",

498+

}),

499+

).toBe(false);

500+

// Browser origin with auth:none should NOT skip

501+

expect(

502+

shouldSkipLocalBackendSelfPairing({

503+

connectParams,

504+

locality: "direct_local",

505+

hasBrowserOriginHeader: true,

506+

sharedAuthOk: false,

507+

authMethod: "none",

508+

}),

509+

).toBe(false);

510+

});

511+
454512

it("classifies non-CLI loopback + shared-secret clients as shared_secret_loopback_local", () => {

455513

const connectParams = {

456514

client: {

Original file line numberDiff line numberDiff line change

@@ -262,13 +262,19 @@ export function shouldSkipLocalBackendSelfPairing(params: {

262262

if (!isBackendClient) {

263263

return false;

264264

}

265+

const isLocal =

266+

params.locality === "direct_local" || params.locality === "shared_secret_loopback_local";

267+

if (!isLocal || params.hasBrowserOriginHeader) {

268+

return false;

269+

}

270+

// No-auth local backend: scoped bypass — not shared secret, but local-only

271+

// device-less operation is safe when auth.mode is explicitly "none".

272+

if (params.authMethod === "none") {

273+

return true;

274+

}

265275

const usesSharedSecretAuth = params.authMethod === "token" || params.authMethod === "password";

266276

const usesDeviceTokenAuth = params.authMethod === "device-token";

267-

return (

268-

(params.locality === "direct_local" || params.locality === "shared_secret_loopback_local") &&

269-

!params.hasBrowserOriginHeader &&

270-

((params.sharedAuthOk && usesSharedSecretAuth) || usesDeviceTokenAuth)

271-

);

277+

return (params.sharedAuthOk && usesSharedSecretAuth) || usesDeviceTokenAuth;

272278

}

273279
274280

function resolveSignatureToken(connectParams: ConnectParams): string | null {