How to hide database structure

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michael Gill

    How to hide database structure

    How can I hide all details from users regarding data and structure,
    limiting access to data through functions I create?

    I don't want a user to be able to see the structure of a table with \d
    {tablename} in psql.

    TIA
  • Bruno Wolff III

    #2
    Re: How to hide database structure

    On Mon, Dec 22, 2003 at 09:10:43 -0800,
    Michael Gill <mydba@usa.co m> wrote:[color=blue]
    > How can I hide all details from users regarding data and structure,
    > limiting access to data through functions I create?
    >
    > I don't want a user to be able to see the structure of a table with \d
    > {tablename} in psql.[/color]

    Don't give them any direct access to the tables and use a security definer
    function to give them indirect access.

    ---------------------------(end of broadcast)---------------------------
    TIP 4: Don't 'kill -9' the postmaster

    Comment

    • Bruno Wolff III

      #3
      Re: How to hide database structure

      On Tue, Dec 23, 2003 at 22:04:56 -0600,
      Bruno Wolff III <bruno@wolff.to > wrote:[color=blue]
      > On Mon, Dec 22, 2003 at 09:10:43 -0800,
      > Michael Gill <mydba@usa.co m> wrote:[color=green]
      > > How can I hide all details from users regarding data and structure,
      > > limiting access to data through functions I create?
      > >
      > > I don't want a user to be able to see the structure of a table with \d
      > > {tablename} in psql.[/color]
      >
      > Don't give them any direct access to the tables and use a security definer
      > function to give them indirect access.[/color]

      I made a mistake. The above only limits access to the data. You can't
      limit access to the structure while allowing direct access to the database.
      You will need to create a proxy application/server if you want to do this.

      ---------------------------(end of broadcast)---------------------------
      TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

      Comment

      • Michael Gill

        #4
        Re: How to hide database structure

        If we can limit select privilege, can't we do so on the system tables
        that hold metadata? Isn't that what's accessed when a user enters \d
        {tablename} ?


        bruno@wolff.to (Bruno Wolff III) wrote in message news:<200312240 40832.GC626@wol ff.to>...[color=blue]
        > On Tue, Dec 23, 2003 at 22:04:56 -0600,
        > Bruno Wolff III <bruno@wolff.to > wrote:[color=green]
        > > On Mon, Dec 22, 2003 at 09:10:43 -0800,
        > > Michael Gill <mydba@usa.co m> wrote:[color=darkred]
        > > > How can I hide all details from users regarding data and structure,
        > > > limiting access to data through functions I create?
        > > >
        > > > I don't want a user to be able to see the structure of a table with \d
        > > > {tablename} in psql.[/color]
        > >
        > > Don't give them any direct access to the tables and use a security definer
        > > function to give them indirect access.[/color]
        >
        > I made a mistake. The above only limits access to the data. You can't
        > limit access to the structure while allowing direct access to the database.
        > You will need to create a proxy application/server if you want to do this.
        >
        > ---------------------------(end of broadcast)---------------------------
        > TIP 9: the planner will ignore your desire to choose an index scan if your
        > joining column's datatypes do not match[/color]

        Comment

        Working...