Re: user can't access own database after creation - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: user can't access own database after creation
Date
Msg-id CADK3HHKUBrz1-jBOWABXmfBhUiwqmfF9CYr3F7qhf+JxdLjYKg@mail.gmail.com
Whole thread Raw
In response to Re: user can't access own database after creation  (Nuno Zimas <nzimas@gmail.com>)
List pgsql-jdbc
Nuno,

Ok,

This code works. Note you need host and db in the url

import java.sql.DriverManager;
import java.sql.Connection;

/**
 * Created by davec on 2014-03-28.
 */
class TestUrl
{
  public static void main(String []args) throws Exception
  {
    Connection con = DriverManager.getConnection("jdbc:postgresql://localhost/test","youruser","password");
    con.createStatement().execute("select 1");
  }
}


On 2 December 2015 at 16:31, Nuno Zimas <nzimas@gmail.com> wrote:
On 2 Dec 2015, at 21:24, John R Pierce <pierce@hogranch.com> wrote:

On 12/2/2015 1:00 PM, Nuno Zimas wrote:

what does the pg_hba.conf file look like on the ubuntu server ?


You can see the file contents here:


these three lines,
  1. host    all             all             78.47.104.116/32           trust
  2. host    all             all             62.210.69.197/32           trust
  3. host    all             all             10.10.10.99/32           trust


they state that anyone on those 3 hosts can connect as any postgres user including the superuser 'postgres' without any authentication required at all

That’s pretty much the intended behaviour at this point.
As far as SSL goes, it really doesn’t make any difference.
I’ve tried adding ?ssl=true and ?ssl=false to the jdbc URL with no success.


.
Also, I see nothing in there about SSL.

-- 
john r pierce, recycling bits in santa cruz


pgsql-jdbc by date:

Previous
From: Nuno Zimas
Date:
Subject: Re: user can't access own database after creation
Next
From: Nuno Zimas
Date:
Subject: Re: user can't access own database after creation