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

How to set-up Redshift Connection on dBeaver CE when using Configuration file on a Mac #32349

Open
adbdkb opened this issue May 13, 2024 · 8 comments

Comments

@adbdkb
Copy link

adbdkb commented May 13, 2024

Description

I am trying to set-up a Redshift connection using dBeaver CE. I am trying to use the Configuration file option as described in the linked AWS Doc Using a Configuration Profile

You can supply the IAM credentials options and GetClusterCredentials options as settings in named profiles in your AWS configuration file. To provide the profile name, use the Profile JDBC option. The configuration is stored in a file named config or a file named credentials in a folder named .aws in your home directory.

I have not been able to determine how to supply the GetClusterCredentials options as settings in the named profile that will allow me to connect to Redshift. I also looked at this Configuration and credential file settings doc, but not sure which of those are GetClusterCredentials options

I tried various combinations here as well - but no success https://docs.aws.amazon.com/redshift/latest/mgmt/generating-iam-credentials-configure-jdbc-odbc.html

How should I supply the options so that I can use dBeaver to connect to Redshift to execute my SQLs instead of having to login to console all the time?

I was successfully able to run the below command on commandline and get the expected result

aws redshift get-cluster-credentials --cluster-identifier --db-user --db-name --duration-seconds 3600 --profile

What options do I need to provide on the url line to make it work? This is one of the examples from that document jdbc:redshift:iam://examplecluster:us-west-2/dev?Profile=user2

Thank you

DBeaver Version

Community Edition 24.0.4

Operating System

macOS Sonoma 14.4.1

Database and driver

RedShift / redshift-jdbc42-2.1.0.26.jar

Steps to reproduce

Set-up the connection using the Redshift driver from dBeaver. Tried providing different options, but did not find a doc that would list the ones to provide for a successful connection

Additional context

I was able to run the on command line as well as I can login to console and access Redshift there. So, the id used is set-up for access. ( I do not know what roles or other information is set to enable the id to access the redshift service

@adbdkb
Copy link
Author

adbdkb commented May 16, 2024

Any update on this?

@LonwoLonwo
Copy link
Member

Hello @adbdkb

It looks like a functionality of our PRO versions.
You can read about them here: https://github.com/dbeaver/dbeaver/wiki/AWS-Credentials
https://github.com/dbeaver/dbeaver/wiki/Database-driver-Amazon-Redshift
You can try it for free https://dbeaver.com/trial/

@adbdkb
Copy link
Author

adbdkb commented May 17, 2024

Ok. So, just using AWS creds part is available only in PRO version from MAC?

One of my colleagues was able to connect using CE on a Mac. Only difference is - she was able to connect using DB id - she had Redshift DB id and password directly, not having to use the creds

So, I am hoping even the AWS creds can be available in CE version

@LonwoLonwo
Copy link
Member

You can try then to use the user and password fields in the Database Native authentication tab in your connection in CE.

@adbdkb
Copy link
Author

adbdkb commented May 21, 2024

I will try the above.

One other question. The connection works from Windows dBeaver CE when below properties are added - idp_host, idp_port, DBGroups and preferred_role along with plugin_name.

But the plugin_name defined in Windows is com.amazon.redshift.plugin.AdfsCredentialsProvider, which of source does not work on the Mac.

Do you know, what plugin_name can be provided on a Mac to make this work?

Thank you

@LonwoLonwo
Copy link
Member

Do you know, what plugin_name can be provided on a Mac to make this work?

Sorry, I do not know. Google didn't return anything helpful.

@adbdkb
Copy link
Author

adbdkb commented May 23, 2024

Yeah, google didn't - that is why I was hoping the development team may have more insight into these classes and how they behave and may have a suggestion / solution.

Ok. One other question. It is connected but still separate. Let me know, if that should be a separate question

I am able to get the connection established using SQLWorkbench/J on Windows, but on the same Windows machine , not able to get dBeaver to connect either ( Of course, both cannot connect from Mac )

Do you know why would that be?

Screenshot 2024-05-22 at 10 27 06 PM Screenshot 2024-05-22 at 10 26 07 PM Screenshot 2024-05-22 at 10 25 35 PM

@adbdkb
Copy link
Author

adbdkb commented May 25, 2024

I really hope there is a way to connect to Redshift using configuration file from my Mac machine - as that is my main machine

I need guidance regarding which Credentials Provider should be used from Mac ( in place of AdfsCredentialsProvider on Windows ) and what properties are mandatory for that provider

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants