openclaw/extensions/googlechat
Yao 0e50fee996
fix(googlechat): log webhook auth reject reasons and warn on appPrincipal misconfig (#71145)
* fix(googlechat): log webhook auth reject reasons and warn on appPrincipal misconfig

Closes #71078

Webhook auth failures previously returned 401 with no log line, leaving
operators no signal to diagnose. Additionally, app-url audience requires
a numeric OAuth 2.0 client ID as appPrincipal, but a misconfigured email
or empty value silently caused all requests to be rejected.

Changes:
- Log a WARN with accountId and reject reason when verifyGoogleChatRequest fails.
- Add warnAppPrincipalMisconfiguration() called at provider init: warns when
  audienceType=app-url and appPrincipal is missing or contains '@'.

Tests: +9 cases in monitor-webhook.test.ts (3 reject-reason scenarios + 4 warner cases).

* fix(googlechat): defer auth rejection logs

* docs: note googlechat webhook auth fix

---------

Co-authored-by: luyao618 <luyao618@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-04-24 20:10:57 +01:00
..
src fix(googlechat): log webhook auth reject reasons and warn on appPrincipal misconfig (#71145) 2026-04-24 20:10:57 +01:00
api.ts refactor: clean bundled channel bootstrap boundaries 2026-04-05 18:18:59 +01:00
channel-config-api.ts
channel-plugin-api.ts test(ci): reduce channel contract import cost 2026-04-21 00:40:07 +01:00
contract-api.ts refactor: move channel doctor migrations to plugins 2026-04-22 18:55:18 +01:00
index.ts test(ci): reduce channel contract import cost 2026-04-21 00:40:07 +01:00
openclaw.plugin.json refactor: resolve channel env vars from plugin manifests 2026-04-06 19:53:27 +01:00
package.json refactor: declare channel add flags in manifests 2026-04-22 19:13:51 +01:00
runtime-api.ts refactor: centralize inbound mention policy 2026-04-07 07:51:00 +01:00
secret-contract-api.ts fix: repair bundled channel secret sidecars 2026-04-08 04:56:58 +01:00
setup-entry.ts fix(channels): keep bundled setup entries dependency-light 2026-04-24 06:10:07 +01:00
setup-plugin-api.ts fix(channels): keep bundled setup entries dependency-light 2026-04-24 06:10:07 +01:00
test-api.ts
tsconfig.json chore(plugins): bulk add package boundary tsconfig rollout 2026-04-07 08:48:23 +01:00