Mrmr888 opened a new pull request, #7879:
URL: https://github.com/apache/shenyu/pull/7879

   Fixes #7725
   
   ## Problem
   
   Heartbeat reporting keeps reusing a cached token after Admin rejects it.
   The HTTP helper also discards response status information, preventing
   callers from distinguishing authentication rejection from other failures.
   
   ## Changes
   
   - Preserve unsuccessful HTTP status codes through an IOException subtype.
   - Invalidate only the affected Admin's cached token after HTTP 401.
   - Reauthenticate through subsequent heartbeat ticks, with per-Admin
     exponential backoff from 5 seconds up to 60 seconds.
   - Reset backoff only after a successful heartbeat.
   - Retain cached tokens on network errors, HTTP 403 and server errors.
   - Preserve registration retry and unregistration behavior.
   
   ## Validation
   
   - Reproduced rejected-token reuse using a controlled loopback HTTP server.
   - 81 tests passed across the three affected modules:
     - shenyu-register-common: 29
     - shenyu-register-client-http: 26
     - shenyu-register-client-beat: 26
   - Includes 12 HTTP regression scenarios covering renewal, backoff,
     recovery, transport failures and independent Admin tokens.
   - Checkstyle and git diff --check passed.
   
   Full-project clean install and deployed Admin integration were not run.
   
   ## Checklist
   
   - [ ] I have read the contribution guidelines.
   - [x] I have submitted tests covering the changes.
   - [ ] My local tests passed ./mvnw clean install -Dmaven.javadoc.skip=true.


-- 
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]

Reply via email to