[#5013] Fixing the issue where microservices cannot be registered when enabling RBAC authentication in a dual-engine disaster recovery scenario.#5014
Merged
chengyouling merged 14 commits intoapache:2.8.xfrom Nov 24, 2025
Conversation
…ng RBAC authentication in a dual-engine disaster recovery scenario.
f5c8d6d to
e8efddc
Compare
humingcheng
requested changes
Nov 12, 2025
| } | ||
|
|
||
| private void recordAndSendUnAuthorizedEvent(HttpResponse response, String address) { | ||
| if (this.eventBus != null && response.getStatusCode() == HttpStatus.SC_UNAUTHORIZED) { |
There was a problem hiding this comment.
401的错误有多种,只有token解析失败才能视为地址管理的异常(即一个地址的token发到了另一个地址),而token超期之类的错误不能算。
Contributor
Author
There was a problem hiding this comment.
发布UnAuthorizedOperationEvent事件主要是为了触发token重新刷新,如果是超期了,也可以提前刷新token,更友好
mojieshui
reviewed
Nov 24, 2025
| if (!isAffinityAddress || (StringUtils.isEmpty(ownRegion) && StringUtils.isEmpty(ownAvailableZone))) { | ||
| return; | ||
| } | ||
| String regionAndZone = "region=" + ownRegion + "&availableZone=" + ownAvailableZone; |
There was a problem hiding this comment.
region和az按照url的标准应该是无序的,建议通过url param解析后对比
mojieshui
approved these changes
Nov 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.