Thread: Permissions & Ownership (BUG?)

Permissions & Ownership (BUG?)

From
Jeff Waugh
Date:
Hi all,

Having had a play with GRANT, REVOKE and database ownership, a couple of
things have come to my attention. I'm pretty sure I've covered everywhere
these may be explained in the documentation, but please send me off in the
right direction if I've missed something:

1) There doesn't seem to be a way to limit connections to a particular
database. This is okay, because you can remove PUBLIC rights from
everything, but even the connection and visible tables are security concerns
already.

2) Given this connection, it seems that any user can also CREATE a table in
any database, regardless of owner. They couldn't modify or delete objects,
but they can create them.

Have I merely missed an important feature, or are these real concerns? [ I'm
coming from the perspective of a web/database hosting provider, so anything
that opens up my customers to attack is Not Good. :) ]

- Jeff

--
    "Stay away from my house, you freak! Can't you see that everyone is
             buying station wagons?" - Neal Stephenson, ITBWTCL

Re: Permissions & Ownership (BUG?)

From
Martín Marqués
Date:
On Sáb 09 Jun 2001 09:50, you wrote:
> Hi all,
>
> Having had a play with GRANT, REVOKE and database ownership, a couple of
> things have come to my attention. I'm pretty sure I've covered everywhere
> these may be explained in the documentation, but please send me off in the
> right direction if I've missed something:
>
> 1) There doesn't seem to be a way to limit connections to a particular
> database. This is okay, because you can remove PUBLIC rights from
> everything, but even the connection and visible tables are security
> concerns already.

Check out pg_hba.conf file. You can limit connections on database and locaion
of the connection.

> 2) Given this connection, it seems that any user can also CREATE a table in
> any database, regardless of owner. They couldn't modify or delete objects,
> but they can create them.

Yes, I have pointed out this in the past. I hope it's in the tod list at
least.

Saludos... :-)

--
Cualquiera administra un NT.
Ese es el problema, que cualquiera administre.
-----------------------------------------------------------------
Martin Marques                  |        mmarques@unl.edu.ar
Programador, Administrador      |       Centro de Telematica
                       Universidad Nacional
                            del Litoral
-----------------------------------------------------------------

Re: Permissions & Ownership (BUG?)

From
Jeff Waugh
Date:
<quote who="Mart?n Marqu?s">

> Check out pg_hba.conf file. You can limit connections on database and locaion
> of the connection.

That's true for external connections, but... If I can authenticate, I can
'connect' to any of the databases hosted, which means that whilst I only own
'foo' database, I can look at 'bar', and see the tables, etc.

> > 2) Given this connection, it seems that any user can also CREATE a table in
> > any database, regardless of owner. They couldn't modify or delete objects,
> > but they can create them.
>
> Yes, I have pointed out this in the past. I hope it's in the tod list at
> least.

Ah, so it's not just me! :) Thanks for that.

- Jeff

--
  If Perl is gaffer, and Python is Magic Tape, then Ruby is self-adhesive
                                plate gold.