Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hOqls-000076-Gw for pgsql-general@arkaria.postgresql.org; Thu, 09 May 2019 21:40:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hOqlp-0003N4-7g for pgsql-general@arkaria.postgresql.org; Thu, 09 May 2019 21:40:05 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hOqlo-0003Mn-Pe for pgsql-general@lists.postgresql.org; Thu, 09 May 2019 21:40:04 +0000 Received: from mail-ot1-x343.google.com ([2607:f8b0:4864:20::343]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hOqlk-0003Bc-Ui for pgsql-general@lists.postgresql.org; Thu, 09 May 2019 21:40:03 +0000 Received: by mail-ot1-x343.google.com with SMTP id l17so3746676otq.1 for ; Thu, 09 May 2019 14:40:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=XWc/bUNILGOxJ74x3QvjCQhMCyLvTSnn/7AswcRRbj8=; b=jeF9zLL8M7/fq4y3KGNkS46zLaOcFs/fB6bjh7obmAUqmZOD2ZFojY/WwW3EjyxyNc O7p1+/Ic8a5p+rEBF4PFqwuqK3SEN9vlnNVdXh2/MbzwIQeqw7W71iqOdEQAoGFUiu2R 9Jhz6nWHUx51AgojtqK7as6D5XDGedlNLqPDXom5R9ORz/F5te1K8xFceVcQae5woTZT eoSGCF0xJyHKHAY4bfFoaHh0STMFRqg5QIR2lizVQwxvuWyd8ZpOrLAeKgCS/90HHa4S ecLBwkuB0LBYCzmll6HNDas8SLhkTkRTsliMpozt/1X7QirbQb/k+jpIWrH4jGXoG8af 6Daw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=XWc/bUNILGOxJ74x3QvjCQhMCyLvTSnn/7AswcRRbj8=; b=dg3SCbS2eADvO1bKVvlbmrOWxxmlWRQUsZKU2inpJv0DVpdnOfvvDjzb9HB9E/BaJg YS94WLaK5LfTn2TVxBRNka4w4ruM3t7jeSW5JCRo4UAz9OMrjJbSJ5EOQf1DB4tdB/as LQ+iATuDCs44hLnTMPpiZ/AodKIGvRMrB//WrM9Fs2OJrIGKmCO5CYM0x50yDbVCNTFZ OGKNNUuu4smGNJ7JP5dQ8Xt9PP0Cnq5M4CAr04OyQiIWTrES46u3trExJdKSv16c9N0V D91JJydz337l1nNIr5nTzygKEQymg7UJjRd2t+Nn+nPwn22yanyVRUErt23uVdrRi5kH YyLw== X-Gm-Message-State: APjAAAWWPGkmyIgg47fo8QlhoLz04g8kpaavCPNzBmY3nW2KkTOuC1+H Sufkx+XfRinlJ1hzkW7fLNcA/PsO76c= X-Google-Smtp-Source: APXvYqyV8eMrBjs6tWEi+5HHr/Fw0JJjykHIHFyoM1DM++iVJevJH0EsZRVMt/Cqn2mrGdLsiG26kg== X-Received: by 2002:a9d:6248:: with SMTP id i8mr494161otk.276.1557437998497; Thu, 09 May 2019 14:39:58 -0700 (PDT) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id r4sm1296639oia.2.2019.05.09.14.39.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 14:39:57 -0700 (PDT) Subject: Re: User Details for PostgreSQL To: pgsql-general@lists.postgresql.org References: <7cf1fe0b6a424af9b5224d960ba2b54d@USFKL11XG20CN01.mercer.com> From: Ron Message-ID: <56cc718a-f1e2-d4e3-c9b5-ec816823c4da@gmail.com> Date: Thu, 9 May 2019 16:39:56 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------F45AE882B4D50DBB0BBBF8DA" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------F45AE882B4D50DBB0BBBF8DA Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit https://github.com/pgaudit/pgaudit might help.  It's packed for install by the Postgres team,  (Of course, it's too late for existing accounts.) On 5/9/19 4:11 PM, Kumar, Virendra wrote: > > Thanks Chris! > > Since PostgreSQL still have to have those accounts even if we authenticate > it externally we have to get at least the user creation date from the > instance as that information might be different in instance vs external > utility. Is there a possibility we can get it. > > Most of our accounts are AD authenticated however we have some like > (postgres – superuser!) which is local or peer authenticated we want to > control that as well and hence the requirement. > > Regards, > > Virendra > > *From:*Christopher Browne [mailto:cbbrowne@gmail.com] > *Sent:* Thursday, May 09, 2019 5:04 PM > *To:* Kumar, Virendra > *Cc:* pgsql-general@lists.postgresql.org > *Subject:* Re: User Details for PostgreSQL > > On Thu, 9 May 2019 at 16:43, Kumar, Virendra > wrote: > > Hello Team, > > We are looking for some audit information about user creation. We need > a few audit fields which we did not find in PostgreSQL. I would be > happy if someone help us in finding these details. Besically we need > information about: > > 1.User creation date > > 2.Last Password change date > > Do we have a way to get these values or can somebody guide us how we > can store and get these values while creating user. > > Regards, > > Virendra > > Since there is a diversity of ways of managing this information, including > outside the database, there is no way to assert a true-in-general > mechanism for this. > > Indeed, if you are interested in managing such information particularly > carefully, you may wish to use mechanisms such as PAM, Kerberos, LDAP, > GSSAPI for this, in which case PostgreSQL may have no responsibility in > the matter of managing passwords.  It is quite likely a good idea to use > something like Kerberos if you have the concerns that you describe, and if > so, the audit information you want would be collected from Kerberos, not > PostgreSQL > > > -- > > When confronted by a difficult problem, solve it by reducing it to the > question, "How would the Lone Ranger handle this?" > > > ---------------------------------------------------------------------------- > > This message is intended only for the use of the addressee and may contain > information that is PRIVILEGED AND CONFIDENTIAL. > > If you are not the intended recipient, you are hereby notified that any > dissemination of this communication is strictly prohibited. If you have > received this communication in error, please erase all copies of the message > and its attachments and notify the sender immediately. Thank you. -- Angular momentum makes the world go 'round. --------------F45AE882B4D50DBB0BBBF8DA Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit https://github.com/pgaudit/pgaudit might help.  It's packed for install by the Postgres team,  (Of course, it's too late for existing accounts.)

On 5/9/19 4:11 PM, Kumar, Virendra wrote:

Thanks Chris!

Since PostgreSQL still have to have those accounts even if we authenticate it externally we have to get at least the user creation date from the instance as that information might be different in instance vs external utility. Is there a possibility we can get it.

 

Most of our accounts are AD authenticated however we have some like (postgres – superuser!) which is local or peer authenticated we want to control that as well and hence the requirement.

 

Regards,

Virendra

 

From: Christopher Browne [mailto:cbbrowne@gmail.com]
Sent: Thursday, May 09, 2019 5:04 PM
To: Kumar, Virendra
Cc: pgsql-general@lists.postgresql.org
Subject: Re: User Details for PostgreSQL

 

On Thu, 9 May 2019 at 16:43, Kumar, Virendra <Virendra.Kumar@guycarp.com> wrote:

Hello Team,

 

We are looking for some audit information about user creation. We need a few audit fields which we did not find in PostgreSQL. I would be happy if someone help us in finding these details. Besically we need information about:

1.       User creation date

2.       Last Password change date

 

Do we have a way to get these values or can somebody guide us how we can store and get these values while creating user.

 

Regards,

Virendra

 

Since there is a diversity of ways of managing this information, including outside the database, there is no way to assert a true-in-general mechanism for this.

 

Indeed, if you are interested in managing such information particularly carefully, you may wish to use mechanisms such as PAM, Kerberos, LDAP, GSSAPI for this, in which case PostgreSQL may have no responsibility in the matter of managing passwords.  It is quite likely a good idea to use something like Kerberos if you have the concerns that you describe, and if so, the audit information you want would be collected from Kerberos, not PostgreSQL


--

When confronted by a difficult problem, solve it by reducing it to the
question, "How would the Lone Ranger handle this?"




This message is intended only for the use of the addressee and may contain
information that is PRIVILEGED AND CONFIDENTIAL.

If you are not the intended recipient, you are hereby notified that any
dissemination of this communication is strictly prohibited. If you have
received this communication in error, please erase all copies of the message
and its attachments and notify the sender immediately. Thank you.

--
Angular momentum makes the world go 'round.
--------------F45AE882B4D50DBB0BBBF8DA--