-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
optimize: add jwt authentication for RegisterXXRequests #6317
base: 2.x
Are you sure you want to change the base?
Conversation
# Conflicts: # changes/en-us/2.x.md # changes/zh-cn/2.x.md
# Conflicts: # changes/zh-cn/2.x.md
# Conflicts: # core/src/main/java/org/apache/seata/core/auth/JwtAuthManager.java # core/src/main/java/org/apache/seata/core/rpc/RegisterCheckAuthHandler.java # core/src/main/java/org/apache/seata/core/rpc/netty/AbstractNettyRemotingClient.java # core/src/main/java/org/apache/seata/core/rpc/netty/NettyPoolableFactory.java # core/src/main/java/org/apache/seata/core/rpc/netty/TmNettyRemotingClient.java # core/src/main/java/org/apache/seata/core/rpc/processor/server/RegRmProcessor.java # core/src/main/java/org/apache/seata/core/rpc/processor/server/RegTmProcessor.java # server/src/main/java/org/apache/seata/server/auth/AbstractCheckAuthHandler.java # server/src/main/java/org/apache/seata/server/auth/DefaultCheckAuthHandler.java # server/src/main/java/org/apache/seata/server/auth/JwtCheckAuthHandler.java # server/src/main/resources/META-INF/services/io.seata.core.rpc.RegisterCheckAuthHandler
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.
当一个陌生的连接,未认证通过,应该不进行任何处理,直接返回一个未认证的response。
When an unfamiliar connection, unauthenticated, passes, it should be left unprocessed and an unauthenticated response should be returned directly.
core/src/main/java/org/apache/seata/core/auth/JwtAuthManager.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/apache/seata/server/auth/JwtCheckAuthHandler.java
Outdated
Show resolved
Hide resolved
Currently, unauthenticated or failed authentication requests or unfamiliar requests will be immediately closed, without further execution of the channel. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## 2.x #6317 +/- ##
============================================
- Coverage 52.07% 51.75% -0.33%
+ Complexity 5199 5188 -11
============================================
Files 921 923 +2
Lines 32140 32341 +201
Branches 3869 3906 +37
============================================
+ Hits 16737 16738 +1
- Misses 13779 13962 +183
- Partials 1624 1641 +17
|
Ⅰ. Describe what this PR did
implements JwtCheckAuthHandler for RegisterTMRequest and RegisterRMRequest
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews