Daniel-Boll / scylla-javascript-driver

A ScyllaDB Driver alternative for Nodejs, Javascript and Typescript written using Node API through Rust bindings
https://www.scylladb.com/
MIT License
41 stars 3 forks source link

Integrate TLS Support in ScyllaDB Driver Connection #3

Closed Daniel-Boll closed 11 months ago

Daniel-Boll commented 11 months ago

Overview: This issue focuses on the integration of TLS (Transport Layer Security) into the ScyllaDB driver, enhancing the security of data transmitted between the client and ScyllaDB nodes. This feature is based on the Scylla Rust Driver's TLS documentation and is a follow-up to issue #2, "Enhance connect Method to Support Authentication Parameters," since it involves modifications to the connection parameters.

Detailed Behavior: The TLS functionality should allow users to establish secure connections by specifying an ssl object in the connection parameters. This object will contain:

  1. The file path to the trusted certificate authority (CA) certificate (in PEM format).
  2. The SSL verify mode, dictated by an enum with options NONE (no verification) or PEER (verify the peer's certificate).

The proposed API change could look like this:

const session = await cluster.connect({
  keyspace: "keyspace",
  ssl: {
    caFilepath: "/path/to/ca.cert.pem",
    verifyMode: VerifyMode.PEER, // VerifyMode.NONE or VerifyMode.PEER
  },
});

Dependencies:

Implementation Considerations:

Environment:

Related Issues or Discussions:

Labels:

Assignees and Mentions:

Impact:

Progress/Updates: