pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: Security question : Database access control
13+ messages / 8 participants
[nested] [flat]

* Re: Security question : Database access control
@ 2002-10-22 14:15  dima <_pppp@mail.ru>
  parent: Igor Georgiev <gory@alphasoft-bg.com>
  2 siblings, 1 reply; 13+ messages in thread

From: dima @ 2002-10-22 14:15 UTC (permalink / raw)
  To: Igor Georgiev <gory@alphasoft-bg.com>; +Cc: pgsql-admin; pgsql-hackers@postgresql.org

>     edit *pg_hba.conf *
>         # Allow any user on the local system to connect to any
>         # database under any username, but only via an IP connection:
>         host         all         127.0.0.1     255.255.255.255    trust     
>         # The same, over Unix-socket connections:
>         local        all                                          trust
what about reading pg_hba.conf comments?
           local    all                                              md5

> or *my nightmare *a cygwin on Win 98 everybody can can access everything 
> :-((((
/me shrugs
i don't use cygwin






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

* Re: Security question : Database access control
@ 2002-10-22 14:27  Bruno Wolff III <bruno@wolff.to>
  parent: Igor Georgiev <gory@alphasoft-bg.com>
  2 siblings, 1 reply; 13+ messages in thread

From: Bruno Wolff III @ 2002-10-22 14:27 UTC (permalink / raw)
  To: Igor Georgiev <gory@alphasoft-bg.com>; +Cc: pgsql-admin; pgsql-hackers@postgresql.org

On Tue, Oct 22, 2002 at 17:05:38 +0200,
  Igor Georgiev <gory@alphasoft-bg.com> wrote:
> Is there any way to prevent superuser to acces the database ?
> I mean something like "GRANT / REVOKE CONNECT" MECHANISM
> 
> I have no idea how to prevent root from access data in one of this ways :
>     root @ linux:~#su - postgres
>     postgres @ linux:/usr/local/pgsql/bin$pg_dump ....
> or
>     edit pg_hba.conf 
>         # Allow any user on the local system to connect to any
>         # database under any username, but only via an IP connection:
>         host         all         127.0.0.1     255.255.255.255    trust     
>         # The same, over Unix-socket connections:
>         local        all                                          trust
> or my nightmare a cygwin on Win 98 everybody can can access everything :-((((

They can just read the raw database files as well. You have to be able to
trust whoever has root access to the system, as well as anyone who has
physical access to the system.



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

* Security question : Database access control
@ 2002-10-22 15:05  Igor Georgiev <gory@alphasoft-bg.com>
  0 siblings, 3 replies; 13+ messages in thread

From: Igor Georgiev @ 2002-10-22 15:05 UTC (permalink / raw)
  To: pgsql-admin; +Cc: pgsql-hackers@postgresql.org

Is there any way to prevent superuser to acces the database ?
I mean something like "GRANT / REVOKE CONNECT" MECHANISM

I have no idea how to prevent root from access data in one of this ways :
    root @ linux:~#su - postgres
    postgres @ linux:/usr/local/pgsql/bin$pg_dump ....
or
    edit pg_hba.conf 
        # Allow any user on the local system to connect to any
        # database under any username, but only via an IP connection:
        host         all         127.0.0.1     255.255.255.255    trust     
        # The same, over Unix-socket connections:
        local        all                                          trust
or my nightmare a cygwin on Win 98 everybody can can access everything :-((((

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

* Re: [HACKERS] Security question : Database access control
@ 2002-10-22 15:13  scott.marlowe <scott.marlowe@ihs.com>
  parent: Igor Georgiev <gory@alphasoft-bg.com>
  3 siblings, 0 replies; 13+ messages in thread

From: scott.marlowe @ 2002-10-22 15:13 UTC (permalink / raw)
  To: Igor Georgiev <gory@alphasoft-bg.com>; +Cc: pgsql-hackers@postgresql.org; pgsql-admin

On Tue, 22 Oct 2002, Igor Georgiev wrote:

> > >     edit *pg_hba.conf *
> > >         # Allow any user on the local system to connect to any
> > >         # database under any username, but only via an IP connection:
> > >         host         all         127.0.0.1     255.255.255.255    trust     
> > >         # The same, over Unix-socket connections:
> > >         local        all                                          trust
> > what about reading pg_hba.conf comments?
> >            local    all                                              md5
> > 
> 
> Ok, but  my question actually isn't about pg_hba.conf comments, i read enough
> but what will stop root from adding this lines or doing su - postgres ??
> 

Nothing, root is GOD in unix.  He can do whatever he wants.




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

* Re: [HACKERS] Security question : Database access control
@ 2002-10-22 15:26  Rod Taylor <rbt@rbt.ca>
  parent: Igor Georgiev <gory@alphasoft-bg.com>
  3 siblings, 2 replies; 13+ messages in thread

From: Rod Taylor @ 2002-10-22 15:26 UTC (permalink / raw)
  To: Igor Georgiev <gory@alphasoft-bg.com>; +Cc: dima <_pppp@mail.ru>; PostgreSQL-development <pgsql-hackers@postgresql.org>; pgsql-admin

On Tue, 2002-10-22 at 12:12, Igor Georgiev wrote:
> > >     edit *pg_hba.conf *
> > >         # Allow any user on the local system to connect to any
> > >         # database under any username, but only via an IP connection:
> > >         host         all         127.0.0.1     255.255.255.255    trust     
> > >         # The same, over Unix-socket connections:
> > >         local        all                                          trust
> > what about reading pg_hba.conf comments?
> >            local    all                                              md5
> > 
> 
> Ok, but  my question actually isn't about pg_hba.conf comments, i read enough
> but what will stop root from adding this lines or doing su - postgres ??

Next your going to ask what will stop root from stopping your
PostgreSQL, compiling a second copy with authentication disabled and
using your data directory as it's source :)

If you want to prevent root from accomplishing these things, you're
going to have to look to your kernel for help.  The kernel must prevent
root from changing users, starting / stopping applications, or touching
certain filesystems.


PostgreSQL will let you put a password on the data.  But that only works
if they actually try to use PostgreSQL to get at the data.

There are a couple of tools which were designed to recover database data
while the db is not running.

-- 
  Rod Taylor




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

* Re: Security question : Database access control
@ 2002-10-22 15:28  Stephan Szabo <sszabo@megazone23.bigpanda.com>
  parent: Igor Georgiev <gory@alphasoft-bg.com>
  3 siblings, 0 replies; 13+ messages in thread

From: Stephan Szabo @ 2002-10-22 15:28 UTC (permalink / raw)
  To: Igor Georgiev <gory@alphasoft-bg.com>; +Cc: dima <_pppp@mail.ru>; pgsql-hackers@postgresql.org; pgsql-admin


On Tue, 22 Oct 2002, Igor Georgiev wrote:

> > >     edit *pg_hba.conf *
> > >         # Allow any user on the local system to connect to any
> > >         # database under any username, but only via an IP connection:
> > >         host         all         127.0.0.1     255.255.255.255    trust
> > >         # The same, over Unix-socket connections:
> > >         local        all                                          trust
> > what about reading pg_hba.conf comments?
> >            local    all                                              md5
> >
>
> Ok, but  my question actually isn't about pg_hba.conf comments, i read enough
> but what will stop root from adding this lines or doing su - postgres ??

Not much really.  But given that they have access to the raw data
files, preventing them access to the server doesn't gain you that
much if they really want to get the data.




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

* Re: Security question : Database access control
@ 2002-10-22 15:35  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Igor Georgiev <gory@alphasoft-bg.com>
  3 siblings, 0 replies; 13+ messages in thread

From: Tom Lane @ 2002-10-22 15:35 UTC (permalink / raw)
  To: Igor Georgiev <gory@alphasoft-bg.com>; +Cc: dima <_pppp@mail.ru>; pgsql-hackers@postgresql.org; pgsql-admin

"Igor Georgiev" <gory@alphasoft-bg.com> writes:
> Ok, but  my question actually isn't about pg_hba.conf comments, i read enough
> but what will stop root from adding this lines or doing su - postgres ??

As somebody already pointed out, you *must* trust the people with root
access to your machine; there is not anything you can do to defend
yourself against them.  If you can't trust the admins on the machine
you're using, better get your own machine.

			regards, tom lane



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

* Re: Security question : Database access control
@ 2002-10-22 16:12  Igor Georgiev <gory@alphasoft-bg.com>
  parent: dima <_pppp@mail.ru>
  0 siblings, 4 replies; 13+ messages in thread

From: Igor Georgiev @ 2002-10-22 16:12 UTC (permalink / raw)
  To: dima <_pppp@mail.ru>; +Cc: pgsql-hackers@postgresql.org; pgsql-admin

> >     edit *pg_hba.conf *
> >         # Allow any user on the local system to connect to any
> >         # database under any username, but only via an IP connection:
> >         host         all         127.0.0.1     255.255.255.255    trust     
> >         # The same, over Unix-socket connections:
> >         local        all                                          trust
> what about reading pg_hba.conf comments?
>            local    all                                              md5
> 

Ok, but  my question actually isn't about pg_hba.conf comments, i read enough
but what will stop root from adding this lines or doing su - postgres ??

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

* Re: Security question : Database access control
@ 2002-10-22 16:34  Igor Georgiev <gory@alphasoft-bg.com>
  parent: Bruno Wolff III <bruno@wolff.to>
  0 siblings, 0 replies; 13+ messages in thread

From: Igor Georgiev @ 2002-10-22 16:34 UTC (permalink / raw)
  To: ; +Cc: pgsql-admin; pgsql-hackers@postgresql.org

> They can just read the raw database files as well. 
wow I'm not sure
how about this

    edit pg_hba.conf 
        # Allow any user on the local system to connect to any
        # database under any username
        local        all                                          trust

su - posgres
psql test -U dba
or 
pg_dump test

> You have to be able to trust whoever has root access to the system, as well as anyone who has
> physical access to the system.

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

* Re: [HACKERS] Security question : Database access control
@ 2002-10-22 16:45  Igor Georgiev <gory@alphasoft-bg.com>
  parent: Rod Taylor <rbt@rbt.ca>
  1 sibling, 0 replies; 13+ messages in thread

From: Igor Georgiev @ 2002-10-22 16:45 UTC (permalink / raw)
  To: ; +Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>; pgsql-admin

> Next your going to ask what will stop root from stopping your
> PostgreSQL, compiling a second copy with authentication disabled and
> using your data directory as it's source :)

He he i'm enough paranoic :))

> If you want to prevent root from accomplishing these things, you're
> going to have to look to your kernel for help.  The kernel must prevent
> root from changing users, starting / stopping applications, or touching
> certain filesystems.
> 
> PostgreSQL will let you put a password on the data.  But that only works
> if they actually try to use PostgreSQL to get at the data.

use PostgreSQL to get at the data - Yeah this will be enough 
i want just only REVOKE CONNECT PRIVILEGES on database

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

* Re: Security question : Database access control
@ 2002-10-23 04:21  Chad R. Larson <chad@eldocomp.com>
  parent: Igor Georgiev <gory@alphasoft-bg.com>
  2 siblings, 0 replies; 13+ messages in thread

From: Chad R. Larson @ 2002-10-23 04:21 UTC (permalink / raw)
  To: Igor Georgiev <gory@alphasoft-bg.com>; +Cc: pgsql-admin; pgsql-hackers@postgresql.org

On Tue, Oct 22, 2002 at 05:05:38PM +0200, Igor Georgiev wrote:
> or my nightmare a cygwin on Win 98 everybody can can access everything

Or =my= nightmare:  Anything important on any Windows platform.

         -crl
--
Chad R. Larson (CRL22)    chad@eldocomp.com
  Eldorado Computing, Inc.   602-604-3100
     5353 North 16th Street, Suite 400
       Phoenix, Arizona   85016-3228



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

* Re: [HACKERS] Security question : Database access control
@ 2002-10-25 10:57  Igor Georgiev <gory@alphasoft-bg.com>
  parent: Rod Taylor <rbt@rbt.ca>
  1 sibling, 1 reply; 13+ messages in thread

From: Igor Georgiev @ 2002-10-25 10:57 UTC (permalink / raw)
  To: ; +Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>; pgsql-admin


> Next your going to ask what will stop root from stopping your
> PostgreSQL, compiling a second copy with authentication disabled and
> using your data directory as it's source :)

He he somebody can blow up ur home with C4, but this don't stop you from
locking ur door !?!




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

* Re: [HACKERS] Security question : Database access control
@ 2002-10-25 12:57  Stephan Szabo <sszabo@megazone23.bigpanda.com>
  parent: Igor Georgiev <gory@alphasoft-bg.com>
  0 siblings, 0 replies; 13+ messages in thread

From: Stephan Szabo @ 2002-10-25 12:57 UTC (permalink / raw)
  To: Igor Georgiev <gory@alphasoft-bg.com>; +Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>; pgsql-admin

On Fri, 25 Oct 2002, Igor Georgiev wrote:

>
> > Next your going to ask what will stop root from stopping your
> > PostgreSQL, compiling a second copy with authentication disabled and
> > using your data directory as it's source :)
>
> He he somebody can blow up ur home with C4, but this don't stop you from
> locking ur door !?!

It's more equivalent to giving him the keys and then wondering why the
lock doesn't stop him.





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


end of thread, other threads:[~2002-10-25 12:57 UTC | newest]

Thread overview: 13+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-10-22 15:05 Security question : Database access control Igor Georgiev <gory@alphasoft-bg.com>
2002-10-22 14:15 ` dima <_pppp@mail.ru>
2002-10-22 16:12   ` Igor Georgiev <gory@alphasoft-bg.com>
2002-10-22 15:13     ` scott.marlowe <scott.marlowe@ihs.com>
2002-10-22 15:26     ` Rod Taylor <rbt@rbt.ca>
2002-10-22 16:45       ` Igor Georgiev <gory@alphasoft-bg.com>
2002-10-25 10:57       ` Igor Georgiev <gory@alphasoft-bg.com>
2002-10-25 12:57         ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2002-10-22 15:28     ` Stephan Szabo <sszabo@megazone23.bigpanda.com>
2002-10-22 15:35     ` Tom Lane <tgl@sss.pgh.pa.us>
2002-10-22 14:27 ` Bruno Wolff III <bruno@wolff.to>
2002-10-22 16:34   ` Igor Georgiev <gory@alphasoft-bg.com>
2002-10-23 04:21 ` Chad R. Larson <chad@eldocomp.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