﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-wadise-随笔分类-权限授权验证</title><link>http://www.blogjava.net/wadise/category/6189.html</link><description /><language>zh-cn</language><lastBuildDate>Wed, 28 Feb 2007 08:18:21 GMT</lastBuildDate><pubDate>Wed, 28 Feb 2007 08:18:21 GMT</pubDate><ttl>60</ttl><item><title>RBAC</title><link>http://www.blogjava.net/wadise/archive/2005/12/20/24739.html</link><dc:creator>wadise</dc:creator><author>wadise</author><pubDate>Tue, 20 Dec 2005 03:46:00 GMT</pubDate><guid>http://www.blogjava.net/wadise/archive/2005/12/20/24739.html</guid><wfw:comment>http://www.blogjava.net/wadise/comments/24739.html</wfw:comment><comments>http://www.blogjava.net/wadise/archive/2005/12/20/24739.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/wadise/comments/commentRss/24739.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/wadise/services/trackbacks/24739.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=1><SPAN lang=EN-US>1.</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在</SPAN><SPAN lang=EN-US>RBAC</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">引入</SPAN><SPAN lang=EN-US>Role</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的概念是为了隔离</SPAN><SPAN lang=EN-US>User</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">与</SPAN><SPAN lang=EN-US>Privilege(Operation+Resource)</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，因为业务中的</SPAN><SPAN lang=EN-US>User</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是经常变化的，例如当某公司的普通员工都具有查看，删除，编辑公司部门内部的资料时，那么有一天我想使普通员工不具备删除部门内部资料的权限，那么我们就要对每一个普通员工进行删除这个权限，使得管理起来非常不便，引入</SPAN><SPAN lang=EN-US>Role</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">把员工</SPAN><SPAN lang=EN-US>Role</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">指派给普通员工，那么只要在员工</SPAN><SPAN lang=EN-US>Role</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中删除“删除部门资料”的权限，就可以对所有普通员工生效。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p><FONT size=1>&nbsp;</FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=1><SPAN lang=EN-US>2.</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">角色继承用于解决复杂组织结构之间的权限关系。例如：</SPAN></FONT><SPAN lang=EN-US><?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" /><v:shapetype id=_x0000_t75 stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><FONT size=1> <BR><IMG height=72 alt=rbac.JPG src="http://www.blogjava.net/images/blogjava_net/wadise/6080/rbac.JPG" width=523 border=0><BR><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></v:path><o:lock aspectratio="t" v:ext="edit"></o:lock></FONT></v:shapetype></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=1><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">那么部门主管就具有了</SPAN><SPAN lang=EN-US>A,B</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">权限，部门经理就具有了</SPAN><SPAN lang=EN-US>ABC</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">权限，总经理有</SPAN><SPAN lang=EN-US>ABCD</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">权限。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p><FONT size=1>&nbsp;</FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=1><SPAN lang=EN-US>3.</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">职责关系分离：避免两个角色间的冲突。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=1><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>A. SSD</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">静态职责分离：当角色授给用户时判断是否将冲突的角色给了同一个用户。冲突的角色被定义为一个二元关系，即任何一个用户只能拥有其中的一个。</SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT size=1><SPAN lang=EN-US><SPAN style="mso-spacerun: yes">&nbsp; </SPAN>B. DSD</SPAN><SPAN style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">动态职责分离：角色授给用户时可以把冲突角色授于同一个人，但在一次行为中不能同时扮演两个冲突的角色。</SPAN></FONT></P><img src ="http://www.blogjava.net/wadise/aggbug/24739.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/wadise/" target="_blank">wadise</a> 2005-12-20 11:46 <a href="http://www.blogjava.net/wadise/archive/2005/12/20/24739.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>