Skip site navigation (1) Skip section navigation (2)

Re: libpq and auth type

From: Ludek Finstrle <luf(at)pzkagis(dot)cz>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: libpq and auth type
Date: 2006-01-11 16:11:15
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
Wed, Jan 11, 2006 at 10:12:33AM -0500, Tom Lane napsal(a):
> Ludek Finstrle <luf(at)pzkagis(dot)cz> writes:
> > When ODBC connect to backend with special parameter it needs to
> > popup dialog (on windows) to enter (unspecified) username, password,
> > etc which is needed by backend to authenticate.
> > But this is againist kerberos (and maybe trust) authentication.
> So?  Why does ODBC care which auth method gets used?  I'm not aware of
> any other client code that has ever needed to know that, and so I'm
> suspicious of your reasoning for ODBC needing to know it.

I don't know if I can describe it better. Please take a look at:

Find there "SQL_DRIVER_COMPLETE" (without quote). It ensure if some
required parameters is missing. If the parameter is missing it open
dialog window for user to complete the connect informations.
It's from previous maintainer.

There is the problem that I don't know if the parameter is required
or not (it depends on authentication method: ident, krb, trust doesn't
require uid, pwd; other auth methods does).

If I don't want break this behaviour with krb I need to know what
auth method is used. I don't see another way. Do you?

I snip following from MS ODBC spec - part "Driver Guidelines"
| Based on the value of DriverCompletion, the driver prompts the user
| for connection information, such as the user ID and password, and
| connects to the data source:
| * SQL_DRIVER_PROMPT: The driver displays a dialog box, using the
|     values from the connection string and system information (if any)
|     as initial values. When the user exits the dialog box, the driver
|     connects to the data source. It also constructs a connection
|     string from the value of the DSN or DRIVER keyword in
|     *InConnectionString and the information returned from the dialog
|     box. It places this connection string in the *OutConnectionString
|     buffer.
|     connection string contains enough information, and that
|     information is correct, the driver connects to the data source
|     and copies *InConnectionString to *OutConnectionString. If any
|     information is missing or incorrect, the driver takes the same
|     actions as it does when DriverCompletion is SQL_DRIVER_PROMPT,
|     except that if DriverCompletion is SQL_DRIVER_COMPLETE_REQUIRED,
|     the driver disables the controls for any information not required
|     to connect to the data source.
| * SQL_DRIVER_NOPROMPT: If the connection string contains enough
|     information, the driver connects to the data source and copies
|     *InConnectionString to *OutConnectionString. Otherwise, the driver
|     returns SQL_ERROR for SQLDriverConnect.

Maybe I don't understand it well (my english isn't good).



In response to


pgsql-interfaces by date

Next:From: Tom LaneDate: 2006-01-11 16:21:55
Subject: Re: libpq and auth type
Previous:From: Tom LaneDate: 2006-01-11 15:12:33
Subject: Re: libpq and auth type

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group