confluent-kafka-python icon indicating copy to clipboard operation
confluent-kafka-python copied to clipboard

Added example with oauth/oidc example with CCloud logicalCluster and identityPoolId

Open sarwarbhuiyan opened this issue 2 years ago • 12 comments

The following example shows how to configure the producer with OAUTH. For Confluent Cloud where we need to pass extensions for "logicalCluster" and "identityPoolId" we need to pass some additional paramters.

sarwarbhuiyan avatar Jun 24 '23 01:06 sarwarbhuiyan

This example is more specific to Confluent Cloud. Can we move it to a new file?

pranavrth avatar Jun 26 '23 07:06 pranavrth

Just make sure that this example is tested.

pranavrth avatar Jun 26 '23 07:06 pranavrth

the example was tested against confluent cloud

sarwarbhuiyan avatar Jun 27 '23 16:06 sarwarbhuiyan

@pranavrth there seems to be two issues here:

  1. the original client example for oauth seems to be using the incorrect callbackhandler. it should be using the librd one - can we fix this asap?
  2. ccloud example is missing (for sasl extensions) - this is ok in a separate file, but we should create it

homestealth avatar Jul 11 '23 23:07 homestealth

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: pranavrth
:x: sarwarbhuiyan
You have signed the CLA already but the status is still pending? Let us recheck it.

cla-assistant[bot] avatar Aug 15 '23 18:08 cla-assistant[bot]

@pranavrth there seems to be two issues here:

  1. the original client example for oauth seems to be using the incorrect callbackhandler. it should be using the librd one - can we fix this asap?
  2. ccloud example is missing (for sasl extensions) - this is ok in a separate file, but we should create it

@homestealth the ccloud example is here in my PR with two additional parameters that does the trick and since this is a cli example I've added optional parameters to the cli which make it work. It seems overkill to have a separate file for the exact same code to be copied.

sarwarbhuiyan avatar Aug 29 '23 14:08 sarwarbhuiyan

I think it is fine to keep only one file but we should add a comment stating the two new configs are for CC case only.

Please also sign the CLA.

pranavrth avatar Aug 31 '23 07:08 pranavrth

@emasab - Any comment from your side before we can merge this?

pranavrth avatar Aug 31 '23 07:08 pranavrth

This is a valuable example, since it is config-based and removes the callback. How can we close this out?

dylanmei avatar Oct 27 '23 16:10 dylanmei

Hi everyone, any plans to have this uploaded in some capacity? Ran into this issue today and this example would have been very helpful.

jriester avatar Jan 24 '24 15:01 jriester

@sarwarbhuiyan - Can you please address my last comment to add some documentation? Please sign the CLA as well. We should merge this PR.

pranavrth avatar Jan 25 '24 08:01 pranavrth

Hi team, two more customers have reported issues with our current example. GTS has been finding this pull and giving the customer the example here, any way we can move this to live?

jriester avatar May 06 '24 17:05 jriester