Skip to content

Send unauthorized response to client when authentication fails#2744

Merged
wwbmmm merged 2 commits into
apache:masterfrom
chenBright:auth
Sep 26, 2024
Merged

Send unauthorized response to client when authentication fails#2744
wwbmmm merged 2 commits into
apache:masterfrom
chenBright:auth

Conversation

@chenBright

Copy link
Copy Markdown
Contributor

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:

  • Performance effects(性能影响):

  • Breaking backward compatibility(向后兼容性):


Check List:

  • Please make sure your changes are compilable(请确保你的更改可以通过编译).
  • When providing us with a new feature, it is best to add related tests(如果你向我们增加一个新的功能, 请添加相关测试).
  • Please follow Contributor Covenant Code of Conduct.(请遵循贡献者准则).

Comment thread src/brpc/policy/http_rpc_protocol.cpp Outdated
@chenBright chenBright force-pushed the auth branch 3 times, most recently from 353c4ef to 6ddf5d5 Compare August 29, 2024 13:45
@wwbmmm

wwbmmm commented Sep 2, 2024

Copy link
Copy Markdown
Contributor

LGTM

@wwbmmm wwbmmm merged commit f7b4a0f into apache:master Sep 26, 2024
@chenBright chenBright deleted the auth branch September 26, 2024 02:59
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.

3 participants