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 1iKQSj-0002jN-SN for pgsql-general@arkaria.postgresql.org; Tue, 15 Oct 2019 17:18:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iKQSi-0004mP-I6 for pgsql-general@arkaria.postgresql.org; Tue, 15 Oct 2019 17:18:20 +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 1iKQSi-0004m6-5A for pgsql-general@lists.postgresql.org; Tue, 15 Oct 2019 17:18:20 +0000 Received: from mail-ot1-x331.google.com ([2607:f8b0:4864:20::331]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iKQSf-0006tJ-9t for pgsql-general@lists.postgresql.org; Tue, 15 Oct 2019 17:18:19 +0000 Received: by mail-ot1-x331.google.com with SMTP id 41so17616989oti.12 for ; Tue, 15 Oct 2019 10:18:16 -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=jyLLtTL1E/64kOL5PI7Nw3ct0dHIbur4BNCpcmG5sUo=; b=UrylvNXw13MHbUTP9S8lc9aoiT6DHd4ojAtKghQ2RkcXGOPhPWrXQ2kbSymmZXYP8k w2cD7/MVnsFcQ8RAS303yJnFBP4LQP9jjfBc0lMuDYtX9QCTH5DitUhNXPJfTTMSCbep uKFbxT65lDFfdIeOe+h4JUnpr4YZXjkA08cBbU5DQZHipZPaLKEtKKTUOsaSm9/s2Urn roeJxxNINrRn+T6Mm5jlMw/g7wd+2CWXwhN74/cZ248wCCfqummPCNQTwoB8j5TMi4Je 6IzeXWcuA6S3rehvgDzQe1YlkXZu8qkiZsYhWGaC7AcMUMktkFtv5YwC4EHBh2sPYsoa AqRg== 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=jyLLtTL1E/64kOL5PI7Nw3ct0dHIbur4BNCpcmG5sUo=; b=VJTJcyGRkd5pkG6CZBcPZiVBi35Oyn9tTPIwzU/E2Tt4E08q9GX70jsFLbp5DWObCS PK4R6iw810JK9INbuOq+UGImFi8vumBxPqx4t0KN/EDK5h7qGfNThX938NCFnKyCJWQh Rg3v9UUQhPX3yrBrY2BbMUTxSEUnotzHTO0onDxuulbBpJvtGy2hqCs19y1uJ4hCRmrY JDO/h2ehXneatZ88vWqDxRkxQ3SoMGYgowrNVJwVUcN1wdidhJOkktdch2v6ZgU+q2ec R6zqIZNP2GD8GFLtEniZdqRy0LhS8FqNh2YjjvzvK4hsTEGez4+bysRewsrdRjuYfMj1 +8rA== X-Gm-Message-State: APjAAAUIRDEk+OwjaWmdo2QUOwAZGQNFZjvHB6gHNxGSXkVp4opXKFvr 7xbgt+y1WjZU4IK7vXsiBmwnmNweqj0ASg== X-Google-Smtp-Source: APXvYqzLpikUCoHNeGjKvUTMtqrXZImyqmpE8zQ4vUxgho52xnYHGW7d+8eUwWil/P0ZuWRGvabWOg== X-Received: by 2002:a05:6830:1d8a:: with SMTP id y10mr1778935oti.48.1571159894727; Tue, 15 Oct 2019 10:18:14 -0700 (PDT) Received: from [192.168.1.10] (ip70-186-126-197.no.no.cox.net. [70.186.126.197]) by smtp.googlemail.com with ESMTPSA id z5sm6425751oto.77.2019.10.15.10.18.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 Oct 2019 10:18:13 -0700 (PDT) Subject: Re: Securing records using linux grou permissions To: pgsql-general@lists.postgresql.org References: From: Ron Message-ID: Date: Tue, 15 Oct 2019 12:18:13 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------2BD60DE20E659BDAF216140D" 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. --------------2BD60DE20E659BDAF216140D Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit It can be done, but you'd need much tighter integration with the OS, which would probably lock you in to only one platform ("Unix", not just Linux). On 10/15/19 12:10 PM, David Gauthier wrote: > Ok, thanks. > I was hoping there was a way to integrate the user/permissions/groups in > linux with the PG permissions functionality. > > On Tue, Oct 15, 2019 at 12:32 PM Michael Lewis > wrote: > > It sounds like you want row level security- > https://www.postgresql.org/docs/9.6/ddl-rowsecurity.html > > But, you will need to define separate roles on the database and ensure > that the users and connecting with separate roles. The db can't > magically know about the permissions on the OS side. > -- Angular momentum makes the world go 'round. --------------2BD60DE20E659BDAF216140D Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit It can be done, but you'd need much tighter integration with the OS, which would probably lock you in to only one platform ("Unix", not just Linux).

On 10/15/19 12:10 PM, David Gauthier wrote:
Ok, thanks. 
I was hoping there was a way to integrate the user/permissions/groups in linux with the PG permissions functionality. 

On Tue, Oct 15, 2019 at 12:32 PM Michael Lewis <mlewis@entrata.com> wrote:
It sounds like you want row level security-

But, you will need to define separate roles on the database and ensure that the users and connecting with separate roles. The db can't magically know about the permissions on the OS side.

--
Angular momentum makes the world go 'round.
--------------2BD60DE20E659BDAF216140D--