pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feed[ psqlodbc-Bugs-1000519 ] Does not pick up default username
4+ messages / 1 participants
[nested] [flat]
* [ psqlodbc-Bugs-1000519 ] Does not pick up default username
@ 2006-01-05 11:53 noreply@pgfoundry.org
0 siblings, 0 replies; 4+ messages in thread
From: noreply@pgfoundry.org @ 2006-01-05 11:53 UTC (permalink / raw)
To: noreply@pgfoundry.org
Bugs item #1000519, was opened at 2006-01-05 12:53
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000519&group_id=1000125
Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Magnus Hagander (mha)
Assigned to: Nobody (None)
Summary: Does not pick up default username
Initial Comment:
To use ODBC with Kerberos authentication, the connection needs to pick up the current username from the logged in user and use that for authentication. For normal libpq connections, this works fine if you just skip specifying the username completely. For ODBC connection, it crashes. Example vbscript:
set conn = CreateObject("ADODB.Connection")
conn.Open "Driver={PostgreSQL UNICODE};DATABASE=admin;SERVER=server.domain.se"
This gives me the error:
H:\t2.vbs(2, 1) Microsoft OLE DB Provider for ODBC Drivers: Operation was canceled.
If I specify the username (mha) with "uid=mha", it works.
A workaround is possible when connectingl ike above, because I can have my vbscript determine the userid and pass it along. But it's not possible with software using a global DSN that expect integrated login to work the same way as for SQLServer.
----------------------------------------------------------------------
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000519&group_id=1000125
^ permalink raw reply [nested|flat] 4+ messages in thread
* [ psqlodbc-Bugs-1000519 ] Does not pick up default username
@ 2006-01-05 19:41 noreply@pgfoundry.org
0 siblings, 0 replies; 4+ messages in thread
From: noreply@pgfoundry.org @ 2006-01-05 19:41 UTC (permalink / raw)
To: noreply@pgfoundry.org
Bugs item #1000519, was opened at 2006-01-05 12:53
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000519&group_id=1000125
Category: None
Group: None
Status: Open
>Resolution: Accepted
Priority: 3
Submitted By: Magnus Hagander (mha)
Assigned to: Nobody (None)
Summary: Does not pick up default username
Initial Comment:
To use ODBC with Kerberos authentication, the connection needs to pick up the current username from the logged in user and use that for authentication. For normal libpq connections, this works fine if you just skip specifying the username completely. For ODBC connection, it crashes. Example vbscript:
set conn = CreateObject("ADODB.Connection")
conn.Open "Driver={PostgreSQL UNICODE};DATABASE=admin;SERVER=server.domain.se"
This gives me the error:
H:\t2.vbs(2, 1) Microsoft OLE DB Provider for ODBC Drivers: Operation was canceled.
If I specify the username (mha) with "uid=mha", it works.
A workaround is possible when connectingl ike above, because I can have my vbscript determine the userid and pass it along. But it's not possible with software using a global DSN that expect integrated login to work the same way as for SQLServer.
----------------------------------------------------------------------
>Comment By: Ludek Finstrle (luf)
Date: 2006-01-05 20:41
Message:
I have no kerberos here. So I can't reproduce the problem.
I need you attach mylog output for unsuccessful login.
----------------------------------------------------------------------
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000519&group_id=1000125
^ permalink raw reply [nested|flat] 4+ messages in thread
* [ psqlodbc-Bugs-1000519 ] Does not pick up default username
@ 2006-01-07 17:48 noreply@pgfoundry.org
0 siblings, 0 replies; 4+ messages in thread
From: noreply@pgfoundry.org @ 2006-01-07 17:48 UTC (permalink / raw)
To: noreply@pgfoundry.org
Bugs item #1000519, was opened at 2006-01-05 12:53
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000519&group_id=1000125
Category: None
Group: None
Status: Open
Resolution: Accepted
Priority: 3
Submitted By: Magnus Hagander (mha)
Assigned to: Nobody (None)
Summary: Does not pick up default username
Initial Comment:
To use ODBC with Kerberos authentication, the connection needs to pick up the current username from the logged in user and use that for authentication. For normal libpq connections, this works fine if you just skip specifying the username completely. For ODBC connection, it crashes. Example vbscript:
set conn = CreateObject("ADODB.Connection")
conn.Open "Driver={PostgreSQL UNICODE};DATABASE=admin;SERVER=server.domain.se"
This gives me the error:
H:\t2.vbs(2, 1) Microsoft OLE DB Provider for ODBC Drivers: Operation was canceled.
If I specify the username (mha) with "uid=mha", it works.
A workaround is possible when connectingl ike above, because I can have my vbscript determine the userid and pass it along. But it's not possible with software using a global DSN that expect integrated login to work the same way as for SQLServer.
----------------------------------------------------------------------
>Comment By: Magnus Hagander (mha)
Date: 2006-01-07 18:48
Message:
I think you should be able to reproduce the same problem
when using trust authentication. Just make sure you never
specify a username in the script connecting.
Log file for a run is attached. In order to enable logging,
I created a DSN called "pgtest" with:
data source: pgtest
description: <blank>
database: postgres
sslmode: prefer
server: my.server.domain
port: 5432
user name: <blank>
password: <blank>
All other options are per default.
----------------------------------------------------------------------
Comment By: Ludek Finstrle (luf)
Date: 2006-01-05 20:41
Message:
I have no kerberos here. So I can't reproduce the problem.
I need you attach mylog output for unsuccessful login.
----------------------------------------------------------------------
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000519&group_id=1000125
^ permalink raw reply [nested|flat] 4+ messages in thread
* [ psqlodbc-Bugs-1000519 ] Does not pick up default username
@ 2006-04-28 08:31 noreply@pgfoundry.org
0 siblings, 0 replies; 4+ messages in thread
From: noreply@pgfoundry.org @ 2006-04-28 08:31 UTC (permalink / raw)
To: noreply@pgfoundry.org
Bugs item #1000519, was opened at 2006-01-05 11:53
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000519&group_id=1000125
Category: None
Group: None
>Status: Closed
Resolution: Accepted
Priority: 3
Submitted By: Magnus Hagander (mha)
Assigned to: Ludek Finstrle (luf)
Summary: Does not pick up default username
Initial Comment:
To use ODBC with Kerberos authentication, the connection needs to pick up the current username from the logged in user and use that for authentication. For normal libpq connections, this works fine if you just skip specifying the username completely. For ODBC connection, it crashes. Example vbscript:
set conn = CreateObject("ADODB.Connection")
conn.Open "Driver={PostgreSQL UNICODE};DATABASE=admin;SERVER=server.domain.se"
This gives me the error:
H:\t2.vbs(2, 1) Microsoft OLE DB Provider for ODBC Drivers: Operation was canceled.
If I specify the username (mha) with "uid=mha", it works.
A workaround is possible when connectingl ike above, because I can have my vbscript determine the userid and pass it along. But it's not possible with software using a global DSN that expect integrated login to work the same way as for SQLServer.
----------------------------------------------------------------------
>Comment By: Dave Page (dpage)
Date: 2006-04-28 08:31
Message:
This is resolved in the new codebase.
----------------------------------------------------------------------
Comment By: Magnus Hagander (mha)
Date: 2006-01-08 12:01
Message:
Oh, I'm sorry I missed to say this in my original post - I
have already worked around this in my current case by
modifying the scripts that connect to ODBC. So I'm not in
need of an urgent fix, but it's something that should be
fixed for a future version.
trust should not need a username either, when connecting
with libpq. Libpq will automatically pick up the current
username when none is specified. See pg_fe_getauthname() in
http://developer.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/libpq/fe-auth.c?rev=1.110
(However, if you explicitly set username="", that's
obviously not going to work, so that could be the problem)
For example, I can do a libpq
PQconnectdb("server=my.server.domain") and nothing more.
----------------------------------------------------------------------
Comment By: Ludek Finstrle (luf)
Date: 2006-01-08 09:12
Message:
I attach patch which solve the problem. But it breaks SQLDriverConnect with SQL_DRIVER_COMPLETE option when there is used another auth method. So it isn't complete. If you need you can use it as quick hack. I have to talk about it with other developers.
I hope it works. I'm unable to test it becouse trust auth method needs filled username (PgSQL have to know which user log in - I assume)
----------------------------------------------------------------------
Comment By: Magnus Hagander (mha)
Date: 2006-01-07 17:48
Message:
I think you should be able to reproduce the same problem
when using trust authentication. Just make sure you never
specify a username in the script connecting.
Log file for a run is attached. In order to enable logging,
I created a DSN called "pgtest" with:
data source: pgtest
description: <blank>
database: postgres
sslmode: prefer
server: my.server.domain
port: 5432
user name: <blank>
password: <blank>
All other options are per default.
----------------------------------------------------------------------
Comment By: Ludek Finstrle (luf)
Date: 2006-01-05 19:41
Message:
I have no kerberos here. So I can't reproduce the problem.
I need you attach mylog output for unsuccessful login.
----------------------------------------------------------------------
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1000519&group_id=1000125
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2006-04-28 08:31 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-01-05 11:53 [ psqlodbc-Bugs-1000519 ] Does not pick up default username noreply@pgfoundry.org
2006-01-05 19:41 [ psqlodbc-Bugs-1000519 ] Does not pick up default username noreply@pgfoundry.org
2006-01-07 17:48 [ psqlodbc-Bugs-1000519 ] Does not pick up default username noreply@pgfoundry.org
2006-04-28 08:31 [ psqlodbc-Bugs-1000519 ] Does not pick up default username noreply@pgfoundry.org
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox