Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance connect Method to Support Authentication Parameters #2

Closed
Daniel-Boll opened this issue Oct 14, 2023 · 0 comments · Fixed by #7
Closed

Enhance connect Method to Support Authentication Parameters #2

Daniel-Boll opened this issue Oct 14, 2023 · 0 comments · Fixed by #7
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed security

Comments

@Daniel-Boll
Copy link
Owner

Overview:
This task aims to extend the connect method's functionality within the ScyllaDB driver to support authentication, following the Scylla Rust Driver documentation. The enhancement is crucial for applications requiring secure access to ScyllaDB clusters through authentication credentials.

Detailed Behavior:
The proposed enhancement will modify the connect function to accept multiple types, allowing for an optional authentication object. The authentication object will contain username and password fields for ScyllaDB authentication. This change aims to offer flexibility for establishing authenticated sessions without altering the method's current behavior when authentication details are not provided.

The method should support the following invocations:

  1. Connecting with just the keyspace (current behavior):

    const session = await cluster.connect("keyspace");
  2. Connecting with keyspace and an authentication object (new behavior):

    const session = await cluster.connect("keyspace", {
      auth: {
        username: "username",
        password: "password",
      },
    });
  3. Connecting with an options object that can contain keyspace and authentication details (new behavior):

    const session = await cluster.connect({
      keyspace: "keyspace",
      auth: {
        username: "username",
        password: "password",
      },
    });

Implementation Considerations:

  • The function should perform a check to determine the parameter's type(s) passed to the connect method and behave accordingly.
  • If introducing multiple types to the connect function proves problematic, the function should be transitioned to use the latter approach (option 3 above), and the initial approach (option 1) should be deprecated with clear communication to the users about this change.
  • Proper error handling should be implemented for scenarios where authentication fails or inputs are invalid.

Assignees and Mentions:

  • Depending on who has relevant experience or interest, they can be '@' mentioned or assigned to this task.

Impact:

  • This task is crucial for users who require secure connections to their ScyllaDB clusters, ensuring that their databases are protected against unauthorized access.

Progress/Updates:

  • This issue marks the initiation of this task. Updates on the progress, including discussions, decisions, and implementation phases, will be documented in this thread.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed security
Projects
None yet
1 participant