brpc icon indicating copy to clipboard operation
brpc copied to clipboard

Fix the bug that the grpc protocol is incompatible with authentication(issue:#3001)

Open Paragrf opened this issue 6 months ago • 5 comments

…y could not be parsed by the client to get the correct error code after authentication failed

What problem does this PR solve?

Issue Number: #3001

Problem Summary:

What is changed and the side effects?

Changed:

  • grpc协议和http协议当前共用同一个鉴权函数,所以在鉴权函数中增加了对http协议类型的判断,如果是http2.0版本,按grpc格式返回错误

Side effects:

BossHi-20250619160635

  • Performance effects:

  • Breaking backward compatibility:


Check List:

Paragrf avatar Jun 19 '25 08:06 Paragrf

Close #3001

Paragrf avatar Jun 19 '25 08:06 Paragrf

@chenBright please take a look :)

Paragrf avatar Jun 20 '25 02:06 Paragrf

Please add unit test for this case in test/brpc_server_unittest.cpp.

chenBright avatar Jun 20 '25 02:06 chenBright

Please add unit test for this case in test/brpc_server_unittest.cpp.

@chenBright done

Paragrf avatar Jun 23 '25 03:06 Paragrf

@chenBright @wwbmmm please take a look, thx

Paragrf avatar Jun 24 '25 02:06 Paragrf

@chenBright hello, can this PR be merged

Paragrf avatar Jul 03 '25 05:07 Paragrf