As this is a test box, my pg_hba is as follows:
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
Basically allows anything from my local development computer but no
outside connections.
On Apr 30, 2008, at 11:54 AM, Norman Palardy wrote:
>
> On 30-Apr-08, at 10:42 AM, Robert Lawrence wrote:
>
>> The password wasn't the "solution" but another part of the puzzle.
>> However, I can work around the issue now using a password AND verifiy
>> that the database it connects to is the one the user requested. I
>> will consider it a failed connection unless both of those tests pass.
>>
>> There is still strange behavior from RB's PostgreSQLDatabase
>> class. I
>> can get the .Connect to return true even if the passwords are wrong
>> --
>> but it will then report connecting to the "postgres" database. So
>> apparently I can only rely on .Connect to let me know that the server
>> host and port is correct. I need to validate the requested database
>> is connected (with select current_database() ) as well to ensure the
>> suer/pass and database names are correct.
>>
>> Basically, I have a hack to work around the problem.
>
> What does your pg_hba.conf file look like ?
> If you have "trust" set it permits a connection rand seems to ignore
> the DB you wanted to connect to (which is what my code was seeing)
>
> With this entry
> host all all 10.0.1.4/32 trust
>
> I get a connection to the wrong database
>
> With this entry
> host all all 10.0.1.4/32
> password
>
> and the correct password in my RB code it connects to the db I
> originally tried to connect to
>
> So there is still something funky
>
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|