Skip to content

Rate-limit bootstrap and device signature auth#78015

Closed
bryce-d-greybeard wants to merge 1 commit into
openclaw:mainfrom
bryce-d-greybeard:bryce/issue-77980-bootstrap-device-auth-rate-limit
Closed

Rate-limit bootstrap and device signature auth#78015
bryce-d-greybeard wants to merge 1 commit into
openclaw:mainfrom
bryce-d-greybeard:bryce/issue-77980-bootstrap-device-auth-rate-limit

Conversation

@bryce-d-greybeard

Copy link
Copy Markdown
Contributor

Summary

  • add dedicated auth rate-limit scopes for bootstrap-token and device-signature
  • check bootstrap-token lockout before serialized bootstrap token verification
  • record bootstrap-token failures and reset on success
  • check device-signature lockout before repeated signature verification work
  • record device-signature failures and reset on success

Fixes #77980.

Verification

  • Local workflow batch verification passed before PR branch extraction.
  • Targeted regressions cover bootstrap-token limiter behavior and repeated invalid device signatures.

@bryce-d-greybeard
bryce-d-greybeard requested a review from a team as a code owner May 5, 2026 18:51
@openclaw-barnacle openclaw-barnacle Bot added triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. gateway Gateway runtime size: S labels May 5, 2026
@clawsweeper

clawsweeper Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

Close as superseded: this branch overlaps the already-open per-surface gateway auth fixes for bootstrap-token and device-signature rate limiting, while the umbrella issue should stay with those canonical PRs and its remaining alerting work.

So I’m closing this here and keeping the remaining discussion on the canonical linked item.

Review details

Best possible solution:

Continue review on #77527 and #77492 as the canonical narrow fixes, then keep the umbrella issue open for any remaining failed-auth alerting policy.

Do we have a high-confidence way to reproduce the issue?

Yes. Source inspection on current main shows bootstrap-token and device-signature verification happening before the new limiter scopes, and the canonical linked PRs include concrete PoC-style reproduction details.

Is this the best way to solve the issue?

No. This branch is a plausible partial fix, but the narrower canonical PRs already track the same surfaces with more complete proof and should be the review targets.

Security review:

Security review cleared: The diff is security-sensitive but narrow and does not introduce a concrete supply-chain, secrets, workflow, dependency, or privilege regression.

What I checked:

Likely related people:

  • Shakker: Current-main blame attributes the relevant auth-context, message-handler, auth-rate-limit, and device-bootstrap code in this checkout to commit 0720c1f. (role: introduced current gateway auth path; confidence: medium; commits: 0720c1f77d; files: src/gateway/server/ws-connection/auth-context.ts, src/gateway/server/ws-connection/message-handler.ts, src/gateway/auth-rate-limit.ts)
  • @openclaw/openclaw-secops: CODEOWNERS routes gateway auth files to the secops team, and this PR changes pre-auth gateway authentication behavior. (role: security reviewer; confidence: high; files: .github/CODEOWNERS, src/gateway/server/ws-connection/auth-context.ts, src/gateway/server/ws-connection/message-handler.ts)
  • fede-kamel: Authored the already-open per-surface PRs fix(gateway): rate-limit pre-auth bootstrap-token verify to prevent mutex DoS #77527 and security fix(gateway): defend pre-auth device-signature verify against CPU DoS #77492 with detailed reproduction and validation for the same bootstrap-token and device-signature rate-limit surfaces. (role: canonical fix proposer; confidence: medium; files: src/gateway/server/ws-connection/auth-context.ts, src/gateway/server/ws-connection/message-handler.ts, src/gateway/auth-rate-limit.ts)
  • Jacob Tomlinson: Recent history shows adjacent paired-device and gateway role/scope approval work in commits touching the same device-pairing security area. (role: adjacent gateway device-pairing maintainer; confidence: low; commits: 4d7cc6bb4f, 4ee4960de2, d3d8e316bd; files: src/gateway/server/ws-connection/message-handler.ts, src/infra/device-pairing.ts)

Codex review notes: model gpt-5.5, reasoning high; reviewed against 7dc6007aeea2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime size: S triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: bootstrap token path lacks rate limiting, lockout, and alerting on failed verifies

1 participant