Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 2C1721335B36 for ; Sun, 21 Nov 2010 14:07:41 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 16840-06 for ; Sun, 21 Nov 2010 18:07:33 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from nm28.bullet.mail.ac4.yahoo.com (nm28.bullet.mail.ac4.yahoo.com [98.139.52.225]) by mail.postgresql.org (Postfix) with SMTP id 2C7851337B58 for ; Sun, 21 Nov 2010 14:07:33 -0400 (AST) Received: from [98.139.52.196] by nm28.bullet.mail.ac4.yahoo.com with NNFMP; 21 Nov 2010 18:07:32 -0000 Received: from [98.139.52.168] by tm9.bullet.mail.ac4.yahoo.com with NNFMP; 21 Nov 2010 18:07:32 -0000 Received: from [127.0.0.1] by omp1051.mail.ac4.yahoo.com with NNFMP; 21 Nov 2010 18:07:32 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 530044.31867.bm@omp1051.mail.ac4.yahoo.com Received: (qmail 99675 invoked by uid 60001); 21 Nov 2010 18:07:32 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1290362852; bh=qkvzXNJn+jWnroBOnXTqn4MjzmOf5vmO5xlQcjfpj8Q=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=ydgimYkekkS/ho9fbSEurAnosyE/651pR8ZyokchTUPKsOeD77tatjuZsNmuOn6ASC8bXk+3G+mGhqb4LgXA9g+qCinBDDvjpXSEV2BeKlCqR/tdB2YroCAFsF4YJ2vJJT6yYc/+xRkUEaO4yCJdQIwl2sixjLF3tP0YRZ2lgI0= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=WPWRMW4ItGfH/DkYI7VX41C4pBJ+LIbRCu3D642A9AO6ZmUuRJZA5JUI/278qQ+0eypG5QPxRaszqqbIbqJhYjQt3m6w65Wk4Boo29FIY00BtDAaqc3hpb/9/VVKoOeBk5KrD6K8+b0jD8X97AoVGmGXRaKaZsBFJQw5KBQrsI4=; Message-ID: <360809.99388.qm@web56006.mail.re3.yahoo.com> X-YMail-OSG: pcynkOYVM1lmL6NrwlqwJwlsPD1kqHwNVG0D44L4DI77n_o B1emQ2Lt2UgqLY0fDM4f84BYPIE_BkFg.KaW_1YIEx53gGRcQDar3wT2OT1M guKfAiROWgRb6s66UIH01VikFuDNjPN3GUYkxKoIxqGFzheaQfFDdVapfT9s 0JxyDzTrzphuyWjrDgmX0YYDIpMp5N8eg.ZCzdRs23OgWyV83ssiaBLcQHSU .nhfS3BjXqcJiVX_6cR6cmrFlbUW1GSBB.RvfSCAOvHGdGvL.OPMq8YaOzXo q6hB9MmQd7Nawwief9_I2CqYQPs7DlXwleuxwbVuPiZ05juO5HVqMKtHx1tj acFmt4yE8gZu5H8otyA-- Received: from [78.39.190.253] by web56006.mail.re3.yahoo.com via HTTP; Sun, 21 Nov 2010 10:07:32 PST X-Mailer: YahooMailClassic/11.4.9 YahooMailWebService/0.8.107.285259 Date: Sun, 21 Nov 2010 10:07:32 -0800 (PST) From: "Pourghorban.S" Subject: Re: implement BLP model on Postgresql db To: Scott Ribe Cc: admin In-Reply-To: <418F58E7-A0B5-4F37-A5BB-8E2D0E3B4CBE@elevated-dev.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1436626114-1290362852=:99388" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.908 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RFC_ABUSE_POST=0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201011/163 X-Sequence-Number: 36129 --0-1436626114-1290362852=:99388 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Dear Scott,=20 Thank you very much for your answer. But my supervisor told me that I shoul= d add an extra column for all rows in my tables that show the level of acce= ss of each row, when a user gives a query.=20 Before I saw this link : http://www.centos.org/docs/5/html/Deployment_Guide-en-US/sec-mls-ov.html yes the important is, what considerations should I attention and which capa= bilities. And I know abstractly about BLP model, SQL, and Database.=20 Sara --- On Sun, 11/21/10, Scott Ribe wrote: From: Scott Ribe Subject: Re: [ADMIN] implement BLP model on Postgresql db To: "Pourghorban.S" Cc: "admin" Date: Sunday, November 21, 2010, 7:06 PM On Nov 21, 2010, at 1:41 AM, Pourghorban.S wrote: > yes I know the method for implement, but I do=A0 not know where I should = implement necessary changes .... > I know that I should add a additional column in my data base tables that = show the level of access of each row.=20 > these level types is finite.=20 > and by the way I should add to a sql command which user issues, the condi= tion that it checks whether he / she can access / gain the row he/ she want= or not.=20 > But I don't know these two steps how and where I should implement. Now at least you're giving us questions of "how do I do this in a database"= , rather than asking about how to write a thesis on a subject very few (if = any) of us know about. That's progress ;-) So you want to add a column to a table: You might want to create an enum type for the access level and use that as = the column type: How the command should work is rather vague, you might want to create a sto= red function to evaluate access: But that would depend on some enforcement in an application or middleware. = A function that just checks access is not enough, you have to enforce it. A= nd that is a more substantial project. You might be able to use rules. You = might want to use view whose statements use current_user(). If you have a lot of pre-existing tables to which the access info must be a= dded, you might want to use dynamic sql to automate adding that column. But, given that "I should add a additional column in my data base tables th= at show the level of access of each row" seemed to be giving you trouble, y= ou might want to first read an introductory book on SQL. --=20 Scott Ribe scott_ribe@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin =0A=0A=0A --0-1436626114-1290362852=:99388 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable

Dear Scott,
Thank you very much for y= our answer. But my supervisor told me that I should add an extra column for= all rows in my tables that show the level of access of each row, when a us= er gives a query.
Before I saw this link :
http://www.centos.org/doc= s/5/html/Deployment_Guide-en-US/sec-mls-ov.html

yes the important is= , what considerations should I attention and which capabilities.


And I know abstractly about BLP model, SQL, and Database.


=
Sara


--- On Sun, 11/21/10, Scott Ribe <scott_ribe@e= levated-dev.com> wrote:

From: Sc= ott Ribe <scott_ribe@elevated-dev.com>
Subject: Re: [ADMIN] implem= ent BLP model on Postgresql db
To: "Pourghorban.S" <aras_h1988@yahoo.com>
Cc: "admin" <pgsql-admin@postgresql.org= >
Date: Sunday, November 21, 2010, 7:06 PM

On Nov 21, 2010, at 1:41 AM, Pourghorban.S wrote:

> yes I k= now the method for implement, but I do  not know where I should implem= ent necessary changes ....
> I know that I should add a additional co= lumn in my data base tables that show the level of access of each row.
= > these level types is finite.
> and by the way I should add to a= sql command which user issues, the condition that it checks whether he / s= he can access / gain the row he/ she want or not.
> But I don't know= these two steps how and where I should implement.

Now at least you'= re giving us questions of "how do I do this in a database", rather than ask= ing about how to write a thesis on a subject very few (if any) of us know a= bout. That's progress ;-)

So you want to add a column to a table:

<http://www.postgresql.org/docs/9.0/stat= ic/sql-altertable.html>

You might want to create an enum type= for the access level and use that as the column type:

<http://www.postgresql.org/docs/9.0/static/sql-createtype.html>

How the command should work is rather vague, you might want t= o create a stored function to evaluate access:

<
http://www.postgresql.org/docs/9.0/static/sql-createfunction.html&g= t;
<http://www.postgresql.org/docs/9.0/static/plpgsql.html<= /a>>

But that would depend on some enforcement in an application = or middleware. A function that just checks access is not enough, you have to = enforce it. And that is a more substantial project. You might be able to us= e rules. You might want to use view whose statements use current_user().
<
http://www.postgresql.org/docs/9.0/static/sql-cre= aterule.html>
<http://www.postgresql.org/docs= /9.0/static/sql-createview.html>
<http://www.= postgresql.org/docs/9.0/static/functions-info.html>

If you ha= ve a lot of pre-existing tables to which the access info must be added, you= might want to use dynamic sql to automate adding that column.

But, = given that "I should add a additional column in my data base tables that sh= ow the level of access of each row" seemed to be giving you trouble, you migh= t want to first read an introductory book on SQL.

--
Scott Ribe<= br>scott_ribe@elevated-dev.com
http://www.elevated-dev= .com/
(303) 722-0567 voice





--
Sent via pg= sql-admin mailing list (pgsql-admin@postgresql.o= rg)
To make changes to your subscription:
http://www.postgresql= .org/mailpref/pgsql-admin

= =0A=0A --0-1436626114-1290362852=:99388--