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

Athena driver allow to pass credentialsProvider from config #7407

Closed
trompa opened this issue Nov 13, 2023 · 2 comments
Closed

Athena driver allow to pass credentialsProvider from config #7407

trompa opened this issue Nov 13, 2023 · 2 comments
Labels
driver:athena Issues relating to the AWS Athena driver enhancement New feature proposal help wanted Community contributions are welcome.

Comments

@trompa
Copy link
Contributor

trompa commented Nov 13, 2023

Is your feature request related to a problem? Please describe.
Hello, we are not allowed to use static credentials as per compliance with some standards, so we cannot use accesKeyID and secretAccessKey.
Passing a token wouldnt either work, as it needs to be refreshed.
Credentials field gets override by constructor so we cannot pass a crendentialsProvider

Describe the solution you'd like
I want to be able to pass a credentialsProvider on the config and have it forwarded to the AthenaClient SDK class so it handles authentication internally.
crendentials field in the AthenClientConfig accepts both credentials or credentials Provider
But it gets override.
i'd want it to left untouched if it comes filled from caller:
so a change from

        ? { accessKeyId, secretAccessKey }
        : undefined,

to

credentials = config.credentials || (accessKeyId && secretAccessKey ? { accessKeyId, secretAccessKey } : undefined);

Would be enough to allow us to pass the provider

Describe alternatives you've considered

issue #6036 explores 2 options.
Their option 2 would be superseded by this one, as it would allow to pass the object with token from outside.

So it would be their Option 1: make the config over-writeable again
Or the option presented here.

As probably the change to make the config non over-writable was done on purpose. I'd go with the option presented here.

Additional context
Add any other context or screenshots about the feature request here.

trompa pushed a commit to trompa/cube.js that referenced this issue Nov 13, 2023
@paveltiunov paveltiunov added enhancement New feature proposal help wanted Community contributions are welcome. labels Nov 15, 2023
Copy link

If you are interested in working on this issue, please leave a comment below and we will be happy to assign the issue to you.
If this is the first time you are contributing a Pull Request to Cube.js, please check our contribution guidelines.
You can also post any questions while contributing in the #contributors channel in the Cube.js Slack.

@trompa
Copy link
Contributor Author

trompa commented Nov 17, 2023

I created this PR with the proposed changes
#7429

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
driver:athena Issues relating to the AWS Athena driver enhancement New feature proposal help wanted Community contributions are welcome.
Projects
None yet
Development

No branches or pull requests

3 participants