Skip to content

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

Merged
chenBright merged 3 commits into
apache:masterfrom
Paragrf:fix_grpc_auth
Jul 3, 2025
Merged

Fix the bug that the grpc protocol is incompatible with authentication(issue:#3001)#3002
chenBright merged 3 commits into
apache:masterfrom
Paragrf:fix_grpc_auth

Conversation

@Paragrf

@Paragrf Paragrf commented Jun 19, 2025

Copy link
Copy Markdown
Contributor

…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

Paragrf commented Jun 19, 2025

Copy link
Copy Markdown
Contributor Author

Close #3001

@Paragrf Paragrf changed the title 修复grpc协议与鉴权功能不兼容的bug Fix the bug that the grpc protocol is incompatible with authentication Jun 19, 2025
@Paragrf Paragrf force-pushed the fix_grpc_auth branch 2 times, most recently from 97390dc to 71e7937 Compare June 19, 2025 08:38
…y could not be parsed by the client to get the correct error code after authentication failed
@Paragrf Paragrf changed the title Fix the bug that the grpc protocol is incompatible with authentication Fix the bug that the grpc protocol is incompatible with authentication(issue:#3001) Jun 19, 2025
@Paragrf

Paragrf commented Jun 20, 2025

Copy link
Copy Markdown
Contributor Author

@chenBright please take a look :)

@chenBright

Copy link
Copy Markdown
Contributor

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

@Paragrf

Paragrf commented Jun 23, 2025

Copy link
Copy Markdown
Contributor Author

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

@chenBright done

@Paragrf

Paragrf commented Jun 24, 2025

Copy link
Copy Markdown
Contributor Author

@chenBright @wwbmmm please take a look, thx

Comment thread src/brpc/policy/http_rpc_protocol.cpp Outdated

@chenBright chenBright left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Paragrf

Paragrf commented Jul 3, 2025

Copy link
Copy Markdown
Contributor Author

@chenBright hello, can this PR be merged

@chenBright chenBright merged commit e6d803e into apache:master Jul 3, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

通过grpc协议访问时,如果鉴权失败,客户端会一直卡住直到超时

2 participants