Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement Grpc username/password authentication. Python client, Java server

I'm trying to figure out how to authenticate with username/password when I create a connection and nothing found. So, my questions:

  • How to create a server with username/password authentication on java server?
  • How should python client connect to it?
like image 469
creedqq Avatar asked Jan 29 '23 09:01

creedqq


1 Answers

There is no built-in support for username and password authentication in gRPC as this approach is discouraged from a security standpoint: see Julien's response and other discussion of this from the grpc.io mailing list.

gRPC provides plugins to add credential objects as call metadata, and you'd have to roll your own credentials type: you can see some information and examples at https://grpc.io/docs/guides/auth.html#extending-grpc-to-support-other-authentication-mechanisms.

like image 191
Eric G Avatar answered Jan 31 '23 21:01

Eric G