pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #13782: gss auth with libpq does not include realm by default
2+ messages / 2 participants
[nested] [flat]

* BUG #13782: gss auth with libpq does not include realm by default
@ 2015-11-23 21:04  jkew@tableau.com
  0 siblings, 1 reply; 2+ messages in thread

From: jkew@tableau.com @ 2015-11-23 21:04 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      13782
Logged by:          John Kew
Email address:      jkew@tableau.com
PostgreSQL version: 9.5beta1
Operating system:   Windows 7
Description:        

Recently a change was made to set include_realm=1 by default. This is
sensible.

Clients and drivers using libpq, however, default to sending just the
username w/o the realm, leading to a gss username error in these
configurations.

You can force psql and postgres-odbc to use a specific username which
includes the realm; but it would be useful if libpq had the same default as
the server and sent the current realm by default e.g: joe@realm.com.

Seems like a minor thing; but it means you can share the same connection
string configuration between users for when postgres is configured the
recommended way.


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #13782: gss auth with libpq does not include realm by default
@ 2015-11-23 21:30  Stephen Frost <sfrost@snowman.net>
  parent: jkew@tableau.com
  0 siblings, 0 replies; 2+ messages in thread

From: Stephen Frost @ 2015-11-23 21:30 UTC (permalink / raw)
  To: jkew@tableau.com; +Cc: pgsql-bugs

John,

* jkew@tableau.com (jkew@tableau.com) wrote:
> The following bug has been logged on the website:
> 
> Bug reference:      13782
> Logged by:          John Kew
> Email address:      jkew@tableau.com
> PostgreSQL version: 9.5beta1
> Operating system:   Windows 7
> Description:        
> 
> Recently a change was made to set include_realm=1 by default. This is
> sensible.
> 
> Clients and drivers using libpq, however, default to sending just the
> username w/o the realm, leading to a gss username error in these
> configurations.

That's not exactly correct.  libpq does not determine the username to
send to the server based on the auth method chosen by the server.  The
username is chosen based on what the OS tells libpq the local username
is.

> You can force psql and postgres-odbc to use a specific username which
> includes the realm; but it would be useful if libpq had the same default as
> the server and sent the current realm by default e.g: joe@realm.com.

Note that the username sent is the PG user to log in as.  If libpq sent
this then there would have to exist a 'joe@realm.com' user in the PG
database.  That's certainly possible to do with PG, but, in my view at
least, it comes across a bit like having unix users named
'joe@realm.com', which isn't typical.

> Seems like a minor thing; but it means you can share the same connection
> string configuration between users for when postgres is configured the
> recommended way.

The recommendation is to use include_realm=1, but that doesn't imply
that users in the database should be 'joe@realm.com'- that's a
completely different consideration.

I would suggest you refer to pg_ident.conf and the mapping capabilities
available there to see how you can have a 'joe' unix/Windows user, a
'joe' PG user, and have include_realm=1 by having a mapping in
pg_ident.conf which allows the system-identified user of 'joe@realm.com'
to connect as the PG user 'joe'.

Thanks!

Stephen

Attachments:

  signature.asc (application/pgp-signature, 818B) download

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2015-11-23 21:30 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-11-23 21:04 BUG #13782: gss auth with libpq does not include realm by default jkew@tableau.com
2015-11-23 21:30 ` Stephen Frost <sfrost@snowman.net>

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