Python zeebe-grpc and OAuth

Hi there,

I’m trying to test my Python gRPC Library (https://gitlab.com/stephane.ludwig/zeebe_python_grpc) with Camunda Cloud but I’m a little bit lost in space with OAuth 2.0.
I would like to integrate oauthlib (https://oauthlib.readthedocs.io/) and gRPC. Does anyone have know-how on this topic?

Yo @gizmo84 , “OAuth” is a red herring. See the Node client implementation here:

You just send the env vars over REST to the specified validator service (also in the env vars), and it will give you back a token.

You then put that token in the headers for the gRPC calls. See here: https://github.com/creditsenseau/zeebe-client-node-js/blob/master/src/lib/GrpcClient.ts#L257

So if you are googling for how to implement this in Python, you would never touch an OAuth lib. You would be googling for:

  • How to read an env var in Python
  • How to do a REST POST in Python
  • How to set a metadata header in gRPC in Python

That’s pretty much it!

HTH,
Josh

Thanks Josh! You helped me a lot. The two first points are easy. I will see how to manage the third one.

1 Like