pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rob Sargent <robjsargent@gmail.com>
To: Adrian Klaver <adrian.klaver@aklaver.com>
To: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: localhost ssl
Date: Fri, 22 Jan 2021 16:02:29 -0700
Message-ID: <9dbb446b-8060-b571-8556-e17e76fcc399@gmail.com> (raw)
In-Reply-To: <8d6c56b4-ec30-bae9-c570-a80df9955582@aklaver.com>
References: <e77dddba-3c98-4cb2-5492-c0cf694c084d@gmail.com>
	<1ca17e3b-14de-69ff-5f0b-4082376571ca@aklaver.com>
	<73ae4494-3b65-6ecd-b610-9a9ac5c9cce1@gmail.com>
	<5f8db865-2f0e-6764-f2f0-b344feb42368@aklaver.com>
	<2f653f6c-5f27-13fd-49be-90845a45ef43@gmail.com>
	<4665f2de-d2a2-4623-8c61-0f42c899e8a3@aklaver.com>
	<e7ed512c-9d9e-3c0e-64e2-247224076c98@gmail.com>
	<8d6c56b4-ec30-bae9-c570-a80df9955582@aklaver.com>



On 1/22/21 3:54 PM, Adrian Klaver wrote:
> On 1/22/21 2:48 PM, Rob Sargent wrote:
>>
>> Honest, I've been reading 18.9 but as you can see it uses CN for host 
>> and then 20.12 suggests using CN for role.
> 
> Difference between server certificate and client certificate.
> 
> To get a handle on this is going to take an outline of what your 
> authentication needs are?
> 
> 
>>
>> Yes, I'm confused.  As I said in reply to Jeff, I would rather not 
>> need to remember to set the search_path, which I can avoid if I login 
>> as "role".
> 
> I have not seen that conversation and I do not see it in the archive 
> either. Is that off-list, different thread, something else?
> 
> 
I missed reply-all on responding to Jeff.  Here is that for the list:

 > This is what I use.  We have a user and schema per client in a 
multi->tenant database, as in user = bob, schema = bob, database = 
our_company
 >
 > alter user bob set search_path to bob,our_company_common,public;
 >
 > Not sure your use case is the same though...

Yes, my case is very similar.  I just want to avoid needing to remember 
to set the search_path every time.  Since I alter the role to have a 
specific search_path as follows, all I need to do is login as "bob":

create schema if not exists sgstemplate\p\g
create role sgstemplate with login encrypted password '<SOMETHING>'\p\g
alter role sgstemplate set search_path=sgstemplate,base,public\p\g
grant connect on database PROJDB to sgstemplate\p\g

"sgstemplate" gets reset by "sed s/sgstemplate/bob/g"

I only wish I could set a default database as well, but IMHO that's a 
failing of JDBC as much as postgres.
> 





view thread (11+ messages)  latest in thread

Message-ID: <9dbb446b-8060-b571-8556-e17e76fcc399@gmail.com>
Permalink:  ../9dbb446b-8060-b571-8556-e17e76fcc399@gmail.com/
Also on:    postgresql.org/message-id/9dbb446b-8060-b571-8556-e17e76fcc399@gmail.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-general@postgresql.org
  Cc: robjsargent@gmail.com, adrian.klaver@aklaver.com
  Subject: Re: localhost ssl
  In-Reply-To: <9dbb446b-8060-b571-8556-e17e76fcc399@gmail.com>
  References: <e77dddba-3c98-4cb2-5492-c0cf694c084d@gmail.com> <1ca17e3b-14de-69ff-5f0b-4082376571ca@aklaver.com> <73ae4494-3b65-6ecd-b610-9a9ac5c9cce1@gmail.com> <5f8db865-2f0e-6764-f2f0-b344feb42368@aklaver.com> <2f653f6c-5f27-13fd-49be-90845a45ef43@gmail.com> <4665f2de-d2a2-4623-8c61-0f42c899e8a3@aklaver.com> <e7ed512c-9d9e-3c0e-64e2-247224076c98@gmail.com> <8d6c56b4-ec30-bae9-c570-a80df9955582@aklaver.com> <9dbb446b-8060-b571-8556-e17e76fcc399@gmail.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