pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: John R Pierce <pierce@hogranch.com>
Cc: salianjag@gmail.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14103: stored function encryption
Date: Sat, 30 Apr 2016 19:01:00 -0400
Message-ID: <20160430230100.GA8849@momjian.us> (raw)
In-Reply-To: <20160430020130.GB28568@momjian.us>
References: <20160420105947.22934.66599@wrigleys.postgresql.org>
	<57178A1D.8010309@hogranch.com>
	<20160430020130.GB28568@momjian.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On Fri, Apr 29, 2016 at 10:01:30PM -0400, Bruce Momjian wrote:
> On Wed, Apr 20, 2016 at 06:54:37AM -0700, John R Pierce wrote:
> > On 4/20/2016 3:59 AM, salianjag@gmail.com wrote:
> > >how to encrypt functions in Postgresql so that we can hide all my business
> > >logic ?
> > 
> > write them in C or another compiled language, supply them as .SO (or .dll)
> > files.
> 
> FYI, you can often run 'strings' on the object file to see the SQL
> queries.

Seeing the SQL with 'strings' requires you have read access to the *.so
library files.

Also, this thread suggests that removing SELECT permission on
pg_proc.prosrc allows you to prevent users from seeing the function,
though it doesn't prevent a Postgres super-user from seeing it:

	http://www.postgresql.org/message-id/0100015338ce42f6-58727615-2385-4a80-9a73-c321c21c6928-000000@em...

I am surprised you can still call the function if you do that.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+                     Ancient Roman grave inscription +


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (5+ messages)

Message-ID: <20160430230100.GA8849@momjian.us>
Permalink:  ../20160430230100.GA8849@momjian.us/
Also on:    postgresql.org/message-id/20160430230100.GA8849@momjian.us

 · 

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-bugs@postgresql.org
  Cc: bruce@momjian.us, pierce@hogranch.com, salianjag@gmail.com
  Subject: Re: BUG #14103: stored function encryption
  In-Reply-To: <20160430230100.GA8849@momjian.us>
  References: <20160420105947.22934.66599@wrigleys.postgresql.org> <57178A1D.8010309@hogranch.com> <20160430020130.GB28568@momjian.us> <20160430230100.GA8849@momjian.us>

* 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