Skip to content

Support message encryption/decryption #99

@bdkanand

Description

@bdkanand

Currently, the NodeJs client does not support encryption/decryption which is directly impacting us in terms of consuming an encrypted message. We already have our client in place and cannot switch to Java/Python to consume encrypted methods.

The example below shows: https://github.com/streamnative/pulsar-client-node/blob/master/examples/encryption-consumer.js

// Create a consumer
  const consumer = await client.subscribe({
    topic: 'persistent://public/default/my-topic',
    subscription: 'sub1',
    subscriptionType: 'Shared',
    ackTimeoutMs: 10000,
    **privateKeyPath: "./certificate/private-key.client-rsa.pem"**
  });

The above piece of code for the example directory shows how to pass the privateKeyPath while making a call to the client.subscribe
But in actual, if you see the internal Subscribe class, it uses ConsumerConfig class which do not have any property like privateKeyPath

This feature is supported in the C++ bindings, so it seems like we only would need to expose the relevant methods as part of the underlying producer config.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions