DataGrip Mac Kerberos Authentication with PostgreSQL

When trying to connect to your Postgres server via DataGrip on a Mac, we get the error below.  We are currently using GSS Kerberos Authentication.

[08006] GSS Authentication failed

Any idea on what needs to be configured in DataGrip on the Mac for this to work?  Or is it the default PostgreSQL drivers that don't support kerberos?

9 comments
Comment actions Permalink

Hi,

Could you attach full IDE log?
Could you specify postgresql driver version you use?
How did you set up your SSL settings?
Thank you.

0
Comment actions Permalink

How do I go about getting a full IDE log?

Our postgres servers doesn't use SSL, so I am not sure what you are asking here.

the postgressql driver version is 42.1.1 (the latest)

0
Comment actions Permalink

Hi,
Here it is:

Thank you.

 

0
Comment actions Permalink

I have uploaded the log to dropbox for you to download.

https://www.dropbox.com/s/z5i8yhvpiubjnh2/idea.log?dl=0 

0
Comment actions Permalink

@Brady Clifford Hi,

Could you try to connect with other tools?


Caused by: java.lang.RuntimeException: javax.security.auth.login.LoginException: No LoginModules configured for pgjdbc


Read:


for a possible solution.

Thank you.

0
Comment actions Permalink

Following these links you sent me, how do I include a JAAS config with a DataGrip connection?

0
Comment actions Permalink

@Brady Cliffrod Hi,
According to documentation https://docs.oracle.com/javase/7/docs/technotes/guides/security/jgss/tutorials/LoginConfigFile.html you should specify -Djava.security.auth.login.config in your connection VM options:

Thank you.

0
Comment actions Permalink

How would I go about adding this to DataGrip under the JDBC settings?:

System.setProperty(“java.security.krb5.realm”, realm);
System.setProperty(“java.security.krb5.kdc”, kdc);

0
Comment actions Permalink

@ Brady Clifford 

Put the following into VM options:

-Djava.security.krb5.realm=realm -Djava.security.krb5.kdc=kdc
0

Please sign in to leave a comment.