You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2020/08/19 11:09:37 UTC

[GitHub] [incubator-brpc] wasphin opened a new issue #1210: Support to customize the response of the very first request.

wasphin opened a new issue #1210:
URL: https://github.com/apache/incubator-brpc/issues/1210


   **Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)**
   
   No.
   
   **Describe the solution you'd like (描述你期望的解决方法)**
   
   When a client connects to the server, the server can verify the request with an ``Authenticator``, but with ``Authenticator`` we can only reply an unauthorized if something is wrong, this is not enough, we may need to send more info to the client.
   
   This is a one time check with the same purpose as ``Authenticator``, to make the following requests passed.
   
   **Describe alternatives you've considered (描述你想到的折衷方案)**
   
   The client calls a special method first, the server verifies it,
   1. if success, mark the connection as established, set some custom data to the connection, like the ``AuthContext``;
   1. else, close the connection, see #800, which has no reply.
   
   **Additional context/screenshots (更多上下文/截图)**
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] wasphin commented on issue #1210: Support to customize the response of the very first request.

Posted by GitBox <gi...@apache.org>.
wasphin commented on issue #1210:
URL: https://github.com/apache/incubator-brpc/issues/1210#issuecomment-677489379


   When the server receives the first request(e.g. login) from the client, it needs to check whether the client is allowed to log in or not. We need to do some customized check, e.g.:
   1. the username and password, which can be handled in `Authenticator`;
   1. the IP address, which has been passed to `Authenticator`, but if an IP is blocked, the server should report that back to the client, so the client knew it has been blocked;
   
   This is just a very simple scenario, the check process may be different.
   
   We need to customize the process of requests, there may be two kinds of RPC requests:
   1. the *login* request, do not need to authenticate, itself is some kinds of an Authenticator;
   1. other requests, which are not allowed to be called if the *login* has not been successfully called.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] gydong edited a comment on issue #1210: Support to customize the response of the very first request.

Posted by GitBox <gi...@apache.org>.
gydong edited a comment on issue #1210:
URL: https://github.com/apache/incubator-brpc/issues/1210#issuecomment-677459916


   Can u show a concrete scenario in which this feature is applied? we may understand this issue better then


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] gydong commented on issue #1210: Support to customize the response of the very first request.

Posted by GitBox <gi...@apache.org>.
gydong commented on issue #1210:
URL: https://github.com/apache/incubator-brpc/issues/1210#issuecomment-677459916


   Can u show a concrete senario in which this feature is applied? we may understand this issue better then


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] gydong commented on issue #1210: Support to customize the response of the very first request.

Posted by GitBox <gi...@apache.org>.
gydong commented on issue #1210:
URL: https://github.com/apache/incubator-brpc/issues/1210#issuecomment-677506868


   It seems these "process" can be done in the normal RPC calls? what makes it necessary to be done in the autentication process


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] wasphin edited a comment on issue #1210: Support to customize the response of the very first request.

Posted by GitBox <gi...@apache.org>.
wasphin edited a comment on issue #1210:
URL: https://github.com/apache/incubator-brpc/issues/1210#issuecomment-677489379


   When the server receives the first request(e.g. login) from the client, it needs to check whether the client is allowed to log in or not. We need to do some customized check, e.g.:
   1. the username and password, which can be handled in `Authenticator`;
   1. the IP address, which has been passed to `Authenticator`, but if an IP is blocked, the server should report that back to the client, so the client knew it has been blocked, in this case, the server should close the connection.
   
   This is just a very simple scenario, the check process may be different.
   
   We need to customize the process of requests, there may be two kinds of RPC requests:
   1. the *login* request, do not need to authenticate, itself is some kinds of an Authenticator;
   1. other requests, which are not allowed to be called if the *login* has not been successfully called.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] wasphin commented on issue #1210: Support to customize the response of the very first request.

Posted by GitBox <gi...@apache.org>.
wasphin commented on issue #1210:
URL: https://github.com/apache/incubator-brpc/issues/1210#issuecomment-677569375


   > It seems these "process" can be done in the normal RPC calls?
   
   In this way, we have to check/verify the client in all RPC calls, which is very inconvenient.
   
   > what makes it necessary to be done in the authentication process
   
   If *login* has not been called, it cannot call any other RPC calls, and if the client cannot pass the *login* check, the connection should be closed. From this point of view, it's very similar to the ``Authenticator``.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [incubator-brpc] gydong commented on issue #1210: Support to customize the response of the very first request.

Posted by GitBox <gi...@apache.org>.
gydong commented on issue #1210:
URL: https://github.com/apache/incubator-brpc/issues/1210#issuecomment-678034257


   OK, I'll carry out a discussion with other committers about this, and reply then


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org