dbTalk Databases Forums  

[BUGS] BUG #1001: Inconsistent authentication between psql and PQconnectdb - possible security implications?

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #1001: Inconsistent authentication between psql and PQconnectdb - possible security implications? in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
PostgreSQL Bugs List
 
Posts: n/a

Default [BUGS] BUG #1001: Inconsistent authentication between psql and PQconnectdb - possible security implications? - 12-05-2003 , 10:50 AM







The following bug has been logged online:

Bug reference: 1001
Logged by: Alan W. Irwin
Email address: irwin (AT) beluga (DOT) phys.uvic.ca
PostgreSQL version: 7.4
Operating system: Debian stable (Linux)
Description: Inconsistent authentication between psql and PQconnectdb - possible security implications?
Details:

I use "ident sameuser" authentication. Here are the relevant details from pg_hba.conf.

local all all ident sameuser
host all all 127.0.0.1 255.255.255.255 ident sameuser
host all all 0.0.0.0 0.0.0.0 reject

All is well with psql authentication. However, when I tried to
use knoda/hk_classes to access the database, I could not get authenticated. A typical error message was IDENT authentication failed for user "irwin". When I traced this down through the hk_classes code it was using PQconnectdb to connnect to the database, and there were complaints in the postgresql log that the identd server was not available. All knoda/hk_classes/PQconnectdb problems disappeared when I installed identd (apt-get install pidentd) on my Debian stable system. So all seems well when identd is installed, but there may be a security concern with psql when it is not. On the other hand, if psql is actually secure when identd is not running, then why isn't PQconnectdb using the exact same (secure) method of authentication for this case?

Note, this authentication inconsistency between psql and PQconnectdb in the absence of an identd server occurs both for a postgresql-7.4 version that I built and installed myself and also for the Debian stable version (7.2.1-2woody4) of postgresql.


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Reply With Quote
  #2  
Old   
Bruno Wolff III
 
Posts: n/a

Default Re: [BUGS] BUG #1001: Inconsistent authentication between psql and PQconnectdb - possible security implications? - 12-05-2003 , 11:33 AM






On Fri, Dec 05, 2003 at 12:47:58 -0400,
PostgreSQL Bugs List <pgsql-bugs (AT) postgresql (DOT) org> wrote:
Quote:
All is well with psql authentication. However, when I tried to
use knoda/hk_classes to access the database, I could not get authenticated. A typical error message was IDENT authentication failed for user "irwin". When I traced this down through the hk_classes code it was using PQconnectdb to connnect to the database, and there were complaints in the postgresql log that the identd server was not available. All knoda/hk_classes/PQconnectdb problems disappeared when I installed identd (apt-get install pidentd) on my Debian stable system. So all seems well when identd is installed, but there may be a security concern with psql when it is not. On the other hand, if psql is actually secure when identd is not running, then why isn't PQconnectdb using the exact same (secure) method of authentication for this case?
When connecting using domain sockets the local equivalent of getpeeruid
is used to determine which user is connecting rather than by asking an
ident server. When you use a network socket, then the user is checked
by asking the ident server at the same IP address as the connection
is coming from.

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.