From: Tom Lane <tgl@sss.pgh.pa.us>
To: Brian Crowell <brian@fluggo.com>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #9337: SSPI/GSSAPI with mismatched user names
Date: Mon, 24 Feb 2014 14:58:21 -0500
Message-ID: <7069.1393271901@sss.pgh.pa.us> (raw)
In-Reply-To: <CAAQkdDq+qQxPS=S0TtrzZ1CjPO1+Qfwcb1-YVOchnz1W9K57vw@mail.gmail.com>
References: <20140224183440.1162.91110@wrigleys.postgresql.org>
<5500.1393267495@sss.pgh.pa.us>
<CAAQkdDpU8z6KhxyAUROERzzN5HwQqt0LbCSPpQacx+3K83e4OQ@mail.gmail.com>
<CAAQkdDocR8b8ka=-qJFMgEoNdafzU2naaGh8wEaL7RCYH75DfA@mail.gmail.com>
<20140224190159.GO2921@tamriel.snowman.net>
<CAAQkdDq+qQxPS=S0TtrzZ1CjPO1+Qfwcb1-YVOchnz1W9K57vw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Brian Crowell <brian@fluggo.com> writes:
> I'm starting to see that this appears very differently to Postgres
> people. I'm coming here from SQL Server, where in our company we've
> now got it set up that each user's SQL Server login _is_ their domain
> login. Not just named the same--SQL Server understands the domain, and
> each user is coming in as their Windows identity.
> However, to Postgres, Kerberos is not about identities at all, it's
> just a fancy password mechanism. Really you just want to know a
> Postgres user, and it's never been a problem for users to specify
> that. I guess what I'm asking is if Kerberos can be used to specify my
> Postgres username as well.
Hm. That's an interesting way of putting it, and you're right --- we
don't expect Kerberos to be a source of identity. Which is not the
world view Kerberos users have.
I wonder whether there would be any value in an option for SSPI (and
maybe other auth methods) to say "after authentication is complete,
substitute the authenticated principal name for the database user
name" (possibly after realm-stripping, case-folding, etc).
The usage pattern would be that you'd pass say "use_kerberos_username"
as the user name in the startup packet, and that would select a
pg_hba.conf entry along the lines of
host use_kerberos_username all samenet sspi use_principal=without_realm
I'm not sure if that'd solve Npgsql's problem or not, though. As sketched
here, the existence of such an auth entry, as well as the spelling of the
magic username, would be at the whim of the Postgres installation's DBA.
That might not be stable enough for you; I'm betting you're wishing you
could hard-wire a dummy name. On the other hand, you weren't complaining
about the fact that you can't use Kerberos at all without a suitable
pg_hba entry; so maybe some additional constraints on its form would be OK
for your use-case.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, brian@fluggo.com, sfrost@snowman.net
Subject: Re: BUG #9337: SSPI/GSSAPI with mismatched user names
In-Reply-To: <7069.1393271901@sss.pgh.pa.us>
References: <20140224183440.1162.91110@wrigleys.postgresql.org> <5500.1393267495@sss.pgh.pa.us> <CAAQkdDpU8z6KhxyAUROERzzN5HwQqt0LbCSPpQacx+3K83e4OQ@mail.gmail.com> <CAAQkdDocR8b8ka=-qJFMgEoNdafzU2naaGh8wEaL7RCYH75DfA@mail.gmail.com> <20140224190159.GO2921@tamriel.snowman.net> <CAAQkdDq+qQxPS=S0TtrzZ1CjPO1+Qfwcb1-YVOchnz1W9K57vw@mail.gmail.com> <7069.1393271901@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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