apache / brpc

brpc is an Industrial-grade RPC framework using C++ Language, which is often used in high performance system such as Search, Storage, Machine learning, Advertisement, Recommendation etc. "brpc" means "better RPC".
https://brpc.apache.org
Apache License 2.0
16.56k stars 3.98k forks source link

Send unauthorized response to client when authentication fails #2744

Closed chenBright closed 2 months ago

chenBright commented 3 months ago

What problem does this PR solve?

Issue Number:

Problem Summary:

当前server鉴权失败时,会直接关闭连接。client只有EEOF的错误,没法快速定位问题。

What is changed and the side effects?

Changed:

Authenticator增加一个接口,支持返回一个错误响应给client再关闭连接。

Side effects:


Check List:

wwbmmm commented 2 months ago

LGTM