Skip to content

fix(gateway): allow health method for all authenticated roles#19699

Merged
mbelinky merged 1 commit intoopenclaw:mainfrom
Nachx639:fix/gateway-health-role-auth
Feb 20, 2026
Merged

fix(gateway): allow health method for all authenticated roles#19699
mbelinky merged 1 commit intoopenclaw:mainfrom
Nachx639:fix/gateway-health-role-auth

Conversation

@Nachx639
Copy link
Contributor

@Nachx639 Nachx639 commented Feb 18, 2026

Summary

  • authorizeGatewayMethod rejects health calls from connections with role node or operator without admin scope
  • Paired devices (macOS/iOS apps) connect as role node and spam unauthorized role: node errors on every health check, flooding the gateway log and breaking node<->gateway communication
  • Fix: add early return for method === "health" before role checks — health is a read-only status probe and should be allowed for any authenticated connection

Reproduction

  1. Pair a macOS app with the gateway
  2. The app connects with role node and periodically sends health RPC
  3. Gateway rejects every health call → log floods with unauthorized role: node
  4. App shows "thinking..." but never receives replies

Test plan

  • Verify paired macOS/iOS node can successfully call health
  • Verify health no longer produces unauthorized role log spam
  • Verify role restrictions still apply to other methods (send, agent, etc.)

🤖 Generated with Claude Code

Greptile Summary

Allows health method calls from any authenticated role by adding an early return before role checks. This fixes log spam and broken communication when paired macOS/iOS devices (with role node) send periodic health checks to the gateway.

Confidence Score: 5/5

  • This PR is safe to merge - it fixes a legitimate authorization issue
  • The fix correctly allows health checks from node-role connections, which are read-only status probes. The change is minimal (3 lines), well-scoped, and consistent with health being in READ_METHODS
  • No files require special attention

Last reviewed commit: 520da47

@arosstale

This comment was marked as spam.

@mbelinky mbelinky force-pushed the fix/gateway-health-role-auth branch from 520da47 to b976443 Compare February 20, 2026 17:48
@mbelinky mbelinky merged commit 868fe48 into openclaw:main Feb 20, 2026
10 checks passed
@mbelinky
Copy link
Contributor

Merged via squash.

Thanks @Nachx639!

rodrigogs pushed a commit to rodrigogs/openclaw that referenced this pull request Feb 20, 2026
…aw#19699)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: b976443
Co-authored-by: Nachx639 <71144023+Nachx639@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
Hansen1018 added a commit to Hansen1018/openclaw that referenced this pull request Feb 21, 2026
…aw#19699)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: b976443
Co-authored-by: Nachx639 <71144023+Nachx639@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
vincentkoc pushed a commit that referenced this pull request Feb 21, 2026
Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: b976443
Co-authored-by: Nachx639 <71144023+Nachx639@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
dgarson pushed a commit to dgarson/clawdbot that referenced this pull request Feb 21, 2026
…aw#19699)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: b976443
Co-authored-by: Nachx639 <71144023+Nachx639@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
mmyyfirstb pushed a commit to mmyyfirstb/openclaw that referenced this pull request Feb 21, 2026
…aw#19699)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: b976443
Co-authored-by: Nachx639 <71144023+Nachx639@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
obviyus pushed a commit to guirguispierre/openclaw that referenced this pull request Feb 22, 2026
…aw#19699)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: b976443
Co-authored-by: Nachx639 <71144023+Nachx639@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
mreedr pushed a commit to mreedr/openclaw-custom that referenced this pull request Feb 24, 2026
…aw#19699)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: b976443
Co-authored-by: Nachx639 <71144023+Nachx639@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
…aw#19699)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: b976443
Co-authored-by: Nachx639 <71144023+Nachx639@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants