pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Holger Jakobs <holger@jakobs.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: setting up pg_ident for peer auth with unix groups
Date: Thu, 30 Jan 2020 13:08:52 +0100
Message-ID: <a27dc52b-9878-0a66-6c16-8bc8808fd70f@jakobs.com> (raw)
In-Reply-To: <CAEzk6ff_b7s9NDgLrYrOZ59UsFp3ERNRTx54UGD6jQFVQcVqWg@mail.gmail.com>
References: <CAEzk6ff_b7s9NDgLrYrOZ59UsFp3ERNRTx54UGD6jQFVQcVqWg@mail.gmail.com>

Hi Geoff,

No, there is no such mechanism. The ident service (it's not safe as you
probably know) only delivers the name of the user who has initiated the
TCP connection to the PG server.

This will be matched to the PG user the connection is supposed to be
established as. If they match, the respective line of pg_hba.conf might
grant access.

pg_ident.conf can be used to match system usernames (of the client
machine) to PG usernames.

The /etc/group file which technically could be accessed by PG processes
resides on the server and thus could be very different from the one on
the client machine. Plus, the system username used on the client machine
may not even exist on the server, nor does the PG username have to exist
as a system username on client or server.

Therefore, using Unix groups wouldn't make much sense.

Regards,

Holger

Am 30.01.20 um 12:59 schrieb Geoff Winkless:
> Hi
>
> Not sure if I'm missing something obvious but I can't see a way to set
> up pg_ident with unix groups in the username maps.
>
> https://www.postgresql.org/docs/12/auth-username-maps.html 
>  
> Is it possible or do I have to set up one entry for every user?
>
> Ta
>
> Geoff
-- 

Holger Jakobs, Bergisch Gladbach
instant messaging: xmpp:holger@jakobs.com
+49 178 9759012 <tel:+491789759012> oder +49 2202 817157 <tel:+492202817157>

view thread (3+ messages)  latest in thread

Message-ID: <a27dc52b-9878-0a66-6c16-8bc8808fd70f@jakobs.com>
Permalink:  ../a27dc52b-9878-0a66-6c16-8bc8808fd70f@jakobs.com/
Also on:    postgresql.org/message-id/a27dc52b-9878-0a66-6c16-8bc8808fd70f@jakobs.com

 · 

reply

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-admin@postgresql.org
  Cc: holger@jakobs.com
  Subject: Re: setting up pg_ident for peer auth with unix groups
  In-Reply-To: <a27dc52b-9878-0a66-6c16-8bc8808fd70f@jakobs.com>
  References: <CAEzk6ff_b7s9NDgLrYrOZ59UsFp3ERNRTx54UGD6jQFVQcVqWg@mail.gmail.com> <a27dc52b-9878-0a66-6c16-8bc8808fd70f@jakobs.com>

* 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