how set gRPC credentials for AWS ALB

321 views
Skip to first unread message

Gabriel Casa

unread,
Sep 6, 2022, 5:36:11 PM9/6/22
to grpc.io
guys I'm trying to build an application that's based on python-gRPC microservices
and one mobile app in React Native as the gRPC client.
I'm using ECS fargate to run the containers, and the ALB so i can call all by the same DNS,
so far so good, everything is working well
now i start to use Cognito to do the Auth by the AWS, i use Amplify in my React Native App
and there i can do the Auth,
i can apply one rule to the ALB that will make the call gRPC needs Auth, anyone know how to send this type of Auth via gRPC? or any other info about this AWS things with gRPC.
I try to search some answers but with no good results, and try some AWS discords too, but is hard find people that uses gRPC in real life

Easwar Swaminathan

unread,
Sep 14, 2022, 1:28:35 PM9/14/22
to grpc.io
Are you looking to use transport credentials (e.g. TLS) or call credentials (e.g. OAuth) or both?

This section lists the supported APIs with regards to passing credentials to the gRPC server: https://grpc.github.io/grpc/python/grpc.html#create-server-credentials.

Damian Akpan

unread,
Sep 26, 2022, 11:32:33 AM9/26/22
to Easwar Swaminathan, grpc.io
I'd suggest that you look at gRPC metadata [1] (like http-headers) and interceptors (like middlewares) [2].

One way I did this was to set the Authorization credentials obtained from my authentication server in the client call, then you can use an interceptor in the backend that checks if the credentials are valid.



--
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/49770d0c-12bf-4296-b628-dca1034c9755n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages