pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Using the public schema
5+ messages / 3 participants
[nested] [flat]

* Using the public schema
@ 2018-04-23 14:59  Charlin Barak <charlinbarak@gmail.com>
  0 siblings, 2 replies; 5+ messages in thread

From: Charlin Barak @ 2018-04-23 14:59 UTC (permalink / raw)
  To: pgsql-general

Hi,
We will be developing three new applications in PostgreSQL, each having its
own database instance running on different hosts. We will only have one
schema per Postgres instance. The data is read-write only by one
application/schema in the DB instance and the data is published to other
applications via API calls.

In such a standalone database configuration, are there any security
implications or any downsides to creating the application in the public
schema?

Thanks.

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Using the public schema
@ 2018-04-23 19:16  Thomas Poty <thomas.poty@gmail.com>
  parent: Charlin Barak <charlinbarak@gmail.com>
  1 sibling, 0 replies; 5+ messages in thread

From: Thomas Poty @ 2018-04-23 19:16 UTC (permalink / raw)
  To: Charlin Barak <charlinbarak@gmail.com>; +Cc: pgsql-general

Hi charlin,
I invite you to  read this doc it explains very well  the security issue
with the public schéma :
https://wiki.postgresql.org/wiki/A_Guide_to_CVE-2018-1058:_Protect_Your_Search_Path

The main problem with the public schéma is the default privileges (execute)
granted to all users able to connect.

Personally, each time i create a database, i remove the public schema

Regards
Thomas

Le lun. 23 avr. 2018 à 17:00, Charlin Barak <charlinbarak@gmail.com> a
écrit :

> Hi,
> We will be developing three new applications in PostgreSQL, each having
> its own database instance running on different hosts. We will only have one
> schema per Postgres instance. The data is read-write only by one
> application/schema in the DB instance and the data is published to other
> applications via API calls.
>
> In such a standalone database configuration, are there any security
> implications or any downsides to creating the application in the public
> schema?
>
> Thanks.
>
>
>

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Using the public schema
@ 2018-04-24 03:26  Thomas Poty <thomas.poty@gmail.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Thomas Poty @ 2018-04-24 03:26 UTC (permalink / raw)
  To: Charlin Barak <charlinbarak@gmail.com>; +Cc: pgsql-general

Erratum :

The main problem with the public schéma is the default privileges (*create*)
granted to all users able to connect.


Le lun. 23 avr. 2018 à 21:16, Thomas Poty <thomas.poty@gmail.com> a écrit :

> Hi charlin,
> I invite you to  read this doc it explains very well  the security issue
> with the public schéma :
> https://wiki.postgresql.org/wiki/A_Guide_to_CVE-2018-1058:_Protect_Your_Search_Path
>
> The main problem with the public schéma is the default privileges
> (execute) granted to all users able to connect.
>
> Personally, each time i create a database, i remove the public schema
>
> Regards
> Thomas
>
> Le lun. 23 avr. 2018 à 17:00, Charlin Barak <charlinbarak@gmail.com> a
> écrit :
>
>> Hi,
>> We will be developing three new applications in PostgreSQL, each having
>> its own database instance running on different hosts. We will only have one
>> schema per Postgres instance. The data is read-write only by one
>> application/schema in the DB instance and the data is published to other
>> applications via API calls.
>>
>> In such a standalone database configuration, are there any security
>> implications or any downsides to creating the application in the public
>> schema?
>>
>> Thanks.
>>
>>
>>

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Using the public schema
@ 2018-04-24 20:00  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: Charlin Barak <charlinbarak@gmail.com>
  1 sibling, 1 reply; 5+ messages in thread

From: Laurenz Albe @ 2018-04-24 20:00 UTC (permalink / raw)
  To: Charlin Barak <charlinbarak@gmail.com>; pgsql-general

Charlin Barak wrote:

> We will be developing three new applications in PostgreSQL, each having its own
> database instance running on different hosts. We will only have one schema per
> Postgres instance. The data is read-write only by one application/schema in the
> DB instance and the data is published to other applications via API calls.
> 
> In such a standalone database configuration, are there any security implications
> or any downsides to creating the application in the public schema?

No, that's fine.

Just REVOKE CREATE ON SCHEMA public FROM PUBLIC.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Using the public schema
@ 2018-04-25 15:35  Charlin Barak <charlinbarak@gmail.com>
  parent: Laurenz Albe <laurenz.albe@cybertec.at>
  0 siblings, 0 replies; 5+ messages in thread

From: Charlin Barak @ 2018-04-25 15:35 UTC (permalink / raw)
  To: Laurenz Albe <laurenz.albe@cybertec.at>; +Cc: pgsql-general

Thanks Laurenz. That works.



On Tue, Apr 24, 2018 at 4:00 PM, Laurenz Albe <laurenz.albe@cybertec.at>
wrote:

> Charlin Barak wrote:
>
> > We will be developing three new applications in PostgreSQL, each having
> its own
> > database instance running on different hosts. We will only have one
> schema per
> > Postgres instance. The data is read-write only by one application/schema
> in the
> > DB instance and the data is published to other applications via API
> calls.
> >
> > In such a standalone database configuration, are there any security
> implications
> > or any downsides to creating the application in the public schema?
>
> No, that's fine.
>
> Just REVOKE CREATE ON SCHEMA public FROM PUBLIC.
>
> Yours,
> Laurenz Albe
> --
> Cybertec | https://www.cybertec-postgresql.com
>

^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2018-04-25 15:35 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-04-23 14:59 Using the public schema Charlin Barak <charlinbarak@gmail.com>
2018-04-23 19:16 ` Thomas Poty <thomas.poty@gmail.com>
2018-04-24 20:00 ` Laurenz Albe <laurenz.albe@cybertec.at>
2018-04-25 15:35   ` Charlin Barak <charlinbarak@gmail.com>
2018-04-24 03:26 Re: Using the public schema Thomas Poty <thomas.poty@gmail.com>

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