pulsar-client-node
pulsar-client-node copied to clipboard
Appropriate authentication method to access Tuya cloud pulsar client
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.
I would also love to know this! Didn't find a way to authenticate so far, except using the Java SDK
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
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.