-
Notifications
You must be signed in to change notification settings - Fork 828
[#5013] Fixing the issue where microservices cannot be registered when enabling RBAC authentication in a dual-engine disaster recovery scenario. #5014
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ng RBAC authentication in a dual-engine disaster recovery scenario.
f5c8d6d to
e8efddc
Compare
| } | ||
|
|
||
| private void recordAndSendUnAuthorizedEvent(HttpResponse response, String address) { | ||
| if (this.eventBus != null && response.getStatusCode() == HttpStatus.SC_UNAUTHORIZED) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
401的错误有多种,只有token解析失败才能视为地址管理的异常(即一个地址的token发到了另一个地址),而token超期之类的错误不能算。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
发布UnAuthorizedOperationEvent事件主要是为了触发token重新刷新,如果是超期了,也可以提前刷新token,更友好
| if (!isAffinityAddress || (StringUtils.isEmpty(ownRegion) && StringUtils.isEmpty(ownAvailableZone))) { | ||
| return; | ||
| } | ||
| String regionAndZone = "region=" + ownRegion + "&availableZone=" + ownAvailableZone; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
region和az按照url的标准应该是无序的,建议通过url param解析后对比
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
No description provided.