Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fsbRI-0000tr-98 for pgsql-general@arkaria.postgresql.org; Wed, 22 Aug 2018 22:17:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fsbRG-0004P5-LS for pgsql-general@arkaria.postgresql.org; Wed, 22 Aug 2018 22:17:18 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1fsbRG-0004Oy-B2 for pgsql-general@lists.postgresql.org; Wed, 22 Aug 2018 22:17:18 +0000 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fsbRD-0003kP-AI for pgsql-general@lists.postgresql.org; Wed, 22 Aug 2018 22:17:17 +0000 Received: by mail-pf1-x430.google.com with SMTP id j8-v6so1630219pff.6 for ; Wed, 22 Aug 2018 15:17:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=DU7TlUEzYISdpJjtsFhUaH7URTY6K4m1f/thE/w8yo8=; b=akGOOjUydq71D6ll+iuSUcErITfIEsQDWM5Y2PA/0OzwIBu13j9FU+/WWl34gIv6jD JCqLy2BHtp5AOQXXQ4mzs7TIgaadLygK2BSiTMFyqk5lRksrKUllL4uj7cGkG64j2Q8l DWCmNtROJaN5nbSS1Ces1cfsQRw84FNGwYa3brTMM9R+n2yFYDOUTCoFwEZjIdD3HHrZ NWx/7xVa8OVZPrkRrX44yZ2oEX6P4DOmI4m3LbfANoQanMXI5Qp0xoNY1mDxPxPleWRz GsDnkrD1loyNXEK9pNNiSTezUPKoTNFFTvp2+R37ZJU08HQ5wEt3NFYSkkFAKUr3yaHn AqDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=DU7TlUEzYISdpJjtsFhUaH7URTY6K4m1f/thE/w8yo8=; b=bJJDmxBn4Tj9RnnwA3VwKQAf8qgvxfgarDnplDm8pMJR1NnIC9ak/AeOUqJSaw/N3A YysOlCYrFisv5M88KfBuHFqCAVMajp9V52qU1s1gvG5aq1wK3imYjcVsZ0mLEfJDrqhF TsMF6pIoBlNZEmXwia18rKU7fRQZlEJUZI32yK3xjGx+o9o/tX3rGcLis9yDueknpVM2 gg524Y4EKv6OqazRyyI16BxMbIHgEkby98o2tTVL+a+CGJvmeQmE1NbLF7FzKXxw22uH suc4uKKW7HJsK59rMNwYr55KVED1TvDH4/urMH4J/42Sfo//v+Wu1T9zitS/F+SIjd5d MEww== X-Gm-Message-State: AOUpUlGSQL9MMJn8gJ75TGBsHqJ573Poagy1ZK22fdVo8TK86yCZXaZF pDyUuS6ihI+zUwS9op7UJpKwNj7ixuE= X-Google-Smtp-Source: AA+uWPx1de1B4EcQnM3vEUvgBG+OEMPNCypjuZ932QMufM9BLEyhgHO2FDqAxdBTvMtiEq1jntkWkQ== X-Received: by 2002:a63:3c5c:: with SMTP id i28-v6mr13844123pgn.415.1534976232571; Wed, 22 Aug 2018 15:17:12 -0700 (PDT) Received: from tim-desktop (2001-44b8-31f2-bb00-d9ea-96bd-5b2a-4106.static.ipv6.internode.on.net. [2001:44b8:31f2:bb00:d9ea:96bd:5b2a:4106]) by smtp.gmail.com with ESMTPSA id r22-v6sm4393114pfl.112.2018.08.22.15.17.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Aug 2018 15:17:11 -0700 (PDT) References: <5AE89398-678C-436D-9CD0-8FDAB48546DD@aol.com> User-agent: mu4e 0.9.18; emacs 26.1 From: Tim Cross To: Dimitri Maziuk Cc: pgsql-general@lists.postgresql.org Subject: Re: Can Pg somehow recognize/honor linux groups to control user access ? In-reply-to: Date: Thu, 23 Aug 2018 08:17:06 +1000 Message-ID: <87efeq59nh.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Dimitri Maziuk writes: > On 08/22/2018 11:38 AM, Ravi Krishna wrote: >> >> In fact DBAs don't even need to get involved when a new user needs DB access. Sysadmin had to just add that user in a group and we are done. > > How is that different from giving your grants to a database role and > just telling the new user the name and password of that role to connect as? I hope your not suggesting that multiple users use the same login credentials to access the database? This would totally destroy the important security principals of attribution and repudiation. I have not looked at PAM for PG, but that is certainly something worth checking out. I have used it in other contexts and it is very powerful. Depending on the implementation, theoretically, it should be possible to have PAM provide the information to determine what database roles to give to a login. What you will probably need is some additional component to act as the 'meta-directory' so that you can have consistent usernames, uid/gid across servers/systems (i.e. ldap/ad) Something else to look at is openLDAP. Again, not yet looked at it in the PG context, but have used it successfully to manage access to other systems (including databases in other RDMS) before. Currently, we use openLDAP and PAM to manage access on Linux servers. One of the things on my 'todo' list is to look at it in a PG context, just haven't got there yet. Avoid any solution which requires a 'generic' account with shared passwords. Apart from the security implications, you will almost certainly run into problems with auditors and many regulatory standards. -- Tim Cross