opensearch-project / opensearch-project/sql-odbc

Add option to specify keys in the connection string for AWS_SIGv4 authentication

Open
#9 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
10
Forks
25
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem? Please describe.
According to the doc, a JDBC driver user should

  • Record access/secret keys in file ~/.aws/credentials before trying to connect
    or
  • Set env variables called AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY with corresponding values before opening an application to browse the DB (e.g. Tableau Desktop or DBeaver)

I find both options not-user-friendly for a regular user.

Describe the solution you'd like
Add option to specify keys in the connection string as it is already done for username and password
For example:

jdbc:opensearch://https://blah-blah-blah.us-east-1.es.amazonaws.com?auth=AWS_SIGV4&access_key=$AWS_ACCESS_KEY_ID&secret_key=$AWS_SECRET_ACCESS_KEY

UPD: Once both keys are specified in the connection string, the driver shouldn't create an instance of AWSCredentialsProvider. Specified = both keys are not empty and valid (checksum validation if available).

Additional context
It is relevant for JDBC driver and for ODBC if it supports AWS_SIGv4 authentication method

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing ODBC connection-string parsing and AWS_SIGv4 credential-provider setup, using the existing username and password options as a reference. Verify how both supplied keys are validated and ensure valid, non-empty keys prevent creation of an AWSCredentialsProvider. Add or update tests for connection strings containing the new options and confirm the behavior for missing or invalid keys.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, cpp
Domain
authentication, database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.