From: Stephen Frost <sfrost@snowman.net>
To: Allan Jensen <pglist@winge-jensen.dk>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: GSSAPI: logging principal
Date: Wed, 9 Oct 2019 09:31:22 -0400
Message-ID: <20191009133122.GV6962@tamriel.snowman.net> (raw)
In-Reply-To: <20191009104934.5b0d31ec@fujitsu.winge-jensen.dk>
References: <20191009104934.5b0d31ec@fujitsu.winge-jensen.dk>
Greetings,
* Allan Jensen (pglist@winge-jensen.dk) wrote:
> I have GSSAPI-login and user mapping to postgres working fine.
Great!
> Whenever i login to postgres I get a line like the following in the
> logfile:
>
> connection authorized: user=testrole database=testdb SSL enabled
> (protocol=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384, bits=256,
> compression=off)
Minor side-note: we have GSSAPI encryption built-in starting with v12,
removing the need to also have SSL.
> What bothers me, is that i can't see what kerberos prinicpal was used
> during authentication.
Yeah, I'm afraid that's probably right. In looking, I don't see any
particularly easy way. I could have sworn I complained about this ages
ago (there might even be a patch somewhere in the depths of -hackers
from 5 years ago or more) but clearly it never made it in.
One thing that is kind of nice is that with v12 there's a new view where
you can view the state of existing connections, including the principal
they authenticate with: pg_stat_gssapi.
> Is there any way to make postgres log the principal?
Would definitely be a good thing for us to have, and the CN for an
SSL-based connection. I don't think it'd be hard for someone to hack up
a patch to do so. I've added it to my list of "nice to haves" but it
seems unlikely I'll get any time in the near future to hack on it, so
if someone else wants to work on it, please feel free to do so...
Thanks,
Stephen
Attachments:
signature.asc (application/pgp-signature, 818B) download
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-general@postgresql.org
Cc: sfrost@snowman.net, pglist@winge-jensen.dk
Subject: Re: GSSAPI: logging principal
In-Reply-To: <20191009133122.GV6962@tamriel.snowman.net>
References: <20191009104934.5b0d31ec@fujitsu.winge-jensen.dk> <20191009133122.GV6962@tamriel.snowman.net>
* 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