zqr10159 commented on PR #4279:
URL: https://github.com/apache/hertzbeat/pull/4279#issuecomment-5137908371

   Follow-up for the reopened registration review is available on head 
`a6429a297b`.
   
   The reviewed head failed three new outcome contracts:
   
   - a second TCP peer received HTTP 429 after the first peer filled the global 
16-request window;
   - a newly issued 24-hour refresh token outlived its registered client;
   - 1,024 live but never-authorized registrations caused a legitimate 
replacement to receive HTTP 503.
   
   The registration limiter is now per resolved source with a bounded 
4,096-source table. It uses the socket peer by default. Deployments behind a 
proxy can explicitly configure exact trusted CIDRs; only those peers may 
provide `X-Forwarded-For`, the rightmost untrusted hop is used, malformed or 
overlong chains fall back to the socket peer, and `/0` trust is rejected.
   
   Successful token issue and rotation now keep the registered client valid 
through the complete refresh-token lifetime. At client capacity, only the 
oldest never-activated registration is reclaimed; a client with a live refresh 
credential is protected.
   
   All 67 Rust tests, rustfmt, Clippy for all targets/features with warnings 
denied, and Git whitespace checks pass locally. The three old-head failures and 
trusted-proxy spoofing/bounded-state cases are included in that result. GitHub 
CI is running on the new head.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to