Thanks Eric. I get your point that the gRPC  client could make multiple 
connections during a session. But if we use a local cache on the server, 
the tricky problem then becomes when the cache item should expire? 


On Friday, January 26, 2018 at 5:57:36 AM UTC+8, Eric Anderson wrote:
>
> On Tue, Jan 23, 2018 at 3:44 AM, 'yz' via grpc.io <[email protected] 
> <javascript:>> wrote:
>
>> We are implementing authentication on gRPC  Golang server. When a client 
>> connect to the server, it needs to send the token to the server to 
>> authenticate itself, and the server will save the auth info. When the 
>> client disconnect, the server should remove the auth info. But I could not 
>> find a way to be notified when the connection is closed. Does this kind of 
>> transportation supported on gRPC golang server?
>>
>
> I strongly discourage this sort of design. I'd suggest the client provide 
> some authentication token in each RPC (this is inexpensive on-the-wire with 
> HPACK) and optimize using a cache on server-side if necessary.
>
> gRPC is free to recreate connections at any point, or use multiple 
> connections. Also such a service would not work through an L7 load 
> balancer, although I admit many people don't care about that case.
>

-- 
*Grab is hiring. Learn more at **https://grab.careers 
<https://grab.careers/>*

By communicating with Grab Inc and/or its subsidiaries, associate companies 
and jointly controlled entities (“Grab Group”), you are deemed to have 
consented to processing of your personal data as set out in the Privacy 
Notice which can be viewed at https://grab.com/privacy/

This email contains confidential information and is only for the intended 
recipient(s). If you are not the intended recipient(s), please do not 
disseminate, distribute or copy this email and notify Grab Group 
immediately if you have received this by mistake and delete this email from 
your system. Email transmission cannot be guaranteed to be secure or 
error-free as any information therein could be intercepted, corrupted, 
lost, destroyed, delayed or incomplete, or contain viruses. Grab Group do 
not accept liability for any errors or omissions in the contents of this 
email arises as a result of email transmission. All intellectual property 
rights in this email and attachments therein shall remain vested in Grab 
Group, unless otherwise provided by law.

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/12970a7f-3ca2-4180-b87b-d835237e5452%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to