accessing authentication context from Python?

158 views
Skip to first unread message

JI Ioannidis

unread,
Aug 3, 2016, 7:59:07 AM8/3/16
to grpc.io
Consider a simple RPC setup protected with http/2, such as https://github.com/jayeye/grpc/tree/ji/secure-hello/examples/python/helloworld

The server will know that the client was properly authenticated, but if it wants to know which of its zillion clients it was, how does it access the contents of the cert that was used by the client? I would have assumed context.auth_context() would be the answer, but there is no such method for context.

Thanks

/ji

Varun Talwar

unread,
Aug 3, 2016, 1:11:36 PM8/3/16
to JI Ioannidis, grpc.io, Nathaniel Manista
+Nathaniel


--
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 post to this group, send email to grp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/5f7436b0-9c6a-4529-bc11-92ca65d85e20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Varun Talwar | Product Manager | varun...@google.com | 415-341-7352


Nathaniel Manista

unread,
Aug 11, 2016, 2:02:18 PM8/11/16
to JI Ioannidis, grpc.io
On Wed, Aug 3, 2016 at 4:59 AM, JI Ioannidis <jay...@gmail.com> wrote:
Consider a simple RPC setup protected with http/2, such as https://github.com/jayeye/grpc/tree/ji/secure-hello/examples/python/helloworld

The server will know that the client was properly authenticated, but if it wants to know which of its zillion clients it was, how does it access the contents of the cert that was used by the client? I would have assumed context.auth_context() would be the answer, but there is no such method for context.

I don't believe that this is possible today. I've opened issue 7710 to see about adding it in the future.
-Nathaniel
Reply all
Reply to author
Forward
0 new messages