pulsar-client-node icon indicating copy to clipboard operation
pulsar-client-node copied to clipboard

Appropriate authentication method to access Tuya cloud pulsar client

Open deekshith-elear opened this issue 3 years ago • 3 comments

Hi, Tuya cloud is providing accesskey and accessId to authenicate to their pulsar message queue. What is the appropriate authentication between AuthenticationTls, AuthenticationAthenz, AuthenticationToken. Can anyone help me to achieve this. Thanks.

deekshith-elear avatar Mar 26 '21 06:03 deekshith-elear

I would also love to know this! Didn't find a way to authenticate so far, except using the Java SDK

simonszalai avatar Mar 29 '21 19:03 simonszalai

It seems similar to oauth2 http://pulsar.apache.org/docs/en/security-oauth2/, cpp already supports oauth2 https://github.com/apache/pulsar/tree/master/pulsar-client-cpp/lib/auth authentication, the node client is a wrapper around cpp, but the node client hasn't added this feature

tuteng avatar Mar 30 '21 13:03 tuteng

I looked at the following Tuya's codes. It appears that clients connect to pulsar cluster with its own authentication method.

  • https://github.com/TuyaInc/TuyaDemo/blob/084582bd39c3f6b6f8ee6976da996e694ee40f25/open-mq-sdk/src/main/java/com/tuya/open/sdk/mq/MqAuthenticationDataProvider.java#L11-L19
  • https://github.com/TuyaInc/tuya_pulsar_sdk_go/blob/46c1e459e32e2f9ebd76bf39bebe50a904b17c29/auth.go#L19-L34

If this method is implemented in pulsar-client-cpp, we will be able to implement it in pulsar-client-node.

k2la avatar Apr 05 '21 06:04 k2la