Re: [grpc-io] GRPC Get Server Address

2023-05-01 Thread 'yas...@google.com' via grpc.io
Wow, I forgot to respond to this. Apologies!

`ServerContext` does give you `peer()` which I believe is filled with the 
appropriate address. For security related purposes, we do not recommend 
that this be used though.

You probably want to use a proper authentication mechanism like the ones 
documented at https://grpc.io/docs/guides/auth/ and then use 
`grpc::AuthContext()` to get the context per request.

On Wednesday, April 13, 2022 at 5:50:13 PM UTC-7 Mingyu Lu wrote:

> Can anyone give any advice ?
>
> On Monday, April 11, 2022 at 8:54:32 AM UTC+8 Mingyu Lu wrote:
>
>> C/C++
>>
>> On Friday, April 8, 2022 at 11:54:06 PM UTC+8 Eric Anderson wrote:
>>
>>> What programming language are you using?
>>>
>>> On Fri, Apr 8, 2022 at 7:55 AM Mingyu Lu  wrote:
>>>
 Hi, 
 I am using GRPC with UNIX domain socket. I'd like to have one server 
 listen on two sockets A and B.
 If requests come from A, I'd like to do something but if from B, I want 
 to do something different.
 For security concern, I can't trust what comes from request.
 I suppose if I can get server address when requests come in, problem 
 solved.
 Does anyone have any idea ? Thanks.

 -- 
 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 grpc-io+u...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/grpc-io/b4c59951-59c3-4b2c-9773-9a5ba6f589f3n%40googlegroups.com
  
 
 .

>>>

-- 
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 grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/df9d0687-3aa3-4271-a711-36b5a51e00dfn%40googlegroups.com.


Re: [grpc-io] GRPC Get Server Address

2022-04-13 Thread Mingyu Lu
Can anyone give any advice ?

On Monday, April 11, 2022 at 8:54:32 AM UTC+8 Mingyu Lu wrote:

> C/C++
>
> On Friday, April 8, 2022 at 11:54:06 PM UTC+8 Eric Anderson wrote:
>
>> What programming language are you using?
>>
>> On Fri, Apr 8, 2022 at 7:55 AM Mingyu Lu  wrote:
>>
>>> Hi, 
>>> I am using GRPC with UNIX domain socket. I'd like to have one server 
>>> listen on two sockets A and B.
>>> If requests come from A, I'd like to do something but if from B, I want 
>>> to do something different.
>>> For security concern, I can't trust what comes from request.
>>> I suppose if I can get server address when requests come in, problem 
>>> solved.
>>> Does anyone have any idea ? Thanks.
>>>
>>> -- 
>>> 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 grpc-io+u...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/grpc-io/b4c59951-59c3-4b2c-9773-9a5ba6f589f3n%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>

-- 
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 grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/503520ab-a07d-4ba2-addf-9ab9a5397accn%40googlegroups.com.


Re: [grpc-io] GRPC Get Server Address

2022-04-10 Thread Mingyu Lu
C/C++

On Friday, April 8, 2022 at 11:54:06 PM UTC+8 Eric Anderson wrote:

> What programming language are you using?
>
> On Fri, Apr 8, 2022 at 7:55 AM Mingyu Lu  wrote:
>
>> Hi, 
>> I am using GRPC with UNIX domain socket. I'd like to have one server 
>> listen on two sockets A and B.
>> If requests come from A, I'd like to do something but if from B, I want 
>> to do something different.
>> For security concern, I can't trust what comes from request.
>> I suppose if I can get server address when requests come in, problem 
>> solved.
>> Does anyone have any idea ? Thanks.
>>
>> -- 
>> 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 grpc-io+u...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/grpc-io/b4c59951-59c3-4b2c-9773-9a5ba6f589f3n%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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 grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/1543204d-7e8c-4adb-99b0-93c2101a098fn%40googlegroups.com.


Re: [grpc-io] GRPC Get Server Address

2022-04-08 Thread 'Eric Anderson' via grpc.io
What programming language are you using?

On Fri, Apr 8, 2022 at 7:55 AM Mingyu Lu  wrote:

> Hi,
> I am using GRPC with UNIX domain socket. I'd like to have one server
> listen on two sockets A and B.
> If requests come from A, I'd like to do something but if from B, I want to
> do something different.
> For security concern, I can't trust what comes from request.
> I suppose if I can get server address when requests come in, problem
> solved.
> Does anyone have any idea ? Thanks.
>
> --
> 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 grpc-io+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/grpc-io/b4c59951-59c3-4b2c-9773-9a5ba6f589f3n%40googlegroups.com
> 
> .
>

-- 
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 grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CA%2B4M1oOo7rMeGPc10MKezeXQqY03n2%2BxNp8WQVGO%2BU9%2BjRftjQ%40mail.gmail.com.


smime.p7s
Description: S/MIME Cryptographic Signature


[grpc-io] GRPC Get Server Address

2022-04-08 Thread Mingyu Lu
Hi, 
I am using GRPC with UNIX domain socket. I'd like to have one server listen 
on two sockets A and B.
If requests come from A, I'd like to do something but if from B, I want to 
do something different.
For security concern, I can't trust what comes from request.
I suppose if I can get server address when requests come in, problem solved.
Does anyone have any idea ? Thanks.

-- 
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 grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/b4c59951-59c3-4b2c-9773-9a5ba6f589f3n%40googlegroups.com.