From: | Joseph Adams <joeyadams3(dot)14159(at)gmail(dot)com> |
---|---|
To: | Hector Beyers <hqbeyers(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Fwd: Hiding data in postgresql |
Date: | 2010-05-25 20:11:08 |
Message-ID: | AANLkTikCXKk_r8NeJh3Zr1y1Ri5p-OkeDnPbldgTlndg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
On Tue, May 25, 2010 at 3:39 PM, Hector Beyers <hqbeyers(at)gmail(dot)com> wrote:
>
> Hi guys,
> (I tried the question in another forum first)
> Does someone have any ideas how I can hide data without the meta data
> noticing? To explain further, I would like to save some collection of data
> where the meta-data does not see it. I am trying to do some security through
> obscurity. It is for research purposes.
> For example, populate a table with 1000 rows, but the meta-data only knows
> of about 500 of them? Only on an export of a dump can you find all the data
> again. Or maybe to make a hidden duplicate schema that can point to the
> hidden data?
> Does someone have any good ideas on how to achieve this or something
> similar?
> Kind regards
> Hector
>
>
> On Mon, May 24, 2010 at 9:16 PM, Hector Beyers <hqbeyers(at)gmail(dot)com> wrote:
>>
>> Hi guys,
>> does ANYONE have any tips on hiding data on a database server? This means
>> that data is stored in places that is not necessarily picked up in the
>> schema of the database. I am doing some research on databases and need some
>> direction.
>> Any help or direction will be highly appreciated.
>> Kind regards
>> Hector
Not sure if this helpful, but be sure to know about views, which can
be used to filter out rows of a table. Example:
CREATE TABLE foo (name TEXT, visible BOOL);
INSERT INTO foo VALUES ('two', true);
INSERT INTO foo VALUES ('three', true);
INSERT INTO foo VALUES ('four', false);
INSERT INTO foo VALUES ('five', true);
INSERT INTO foo VALUES ('six', false);
INSERT INTO foo VALUES ('seven', true);
INSERT INTO foo VALUES ('eight', false);
INSERT INTO foo VALUES ('nine', false);
INSERT INTO foo VALUES ('ten', false);
INSERT INTO foo VALUES ('eleven', true);
CREATE VIEW foo_view AS SELECT foo.name FROM foo WHERE visible=true;
=> SELECT * FROM foo;
name | visible
--------+---------
two | t
three | t
four | f
five | t
six | f
seven | t
eight | f
nine | f
ten | f
eleven | t
(10 rows)
=> SELECT * FROM foo_view;
name
--------
two
three
five
seven
eleven
(5 rows)
Note that views are SELECT-only, but you can use CREATE RULE to
simulate an updatable view.
You may also want to read about Veil:
http://veil.projects.postgresql.org/curdocs/main.html
From | Date | Subject | |
---|---|---|---|
Next Message | Justin Graf | 2010-05-25 20:40:27 | Re: Hiding data in postgresql |
Previous Message | Dave Coventry | 2010-05-25 19:55:11 | Re: export data to excel |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2010-05-25 20:16:08 | Re: Exposing the Xact commit order to the user |
Previous Message | Tom Lane | 2010-05-25 20:06:49 | mergejoin null handling (was Re: [PERFORM] merge join killing performance) |