<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ThotSpots &#187; role-based security</title>
	<atom:link href="http://www.thotspots.com/tag/role-based-security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thotspots.com</link>
	<description>Agile Software Development</description>
	<lastBuildDate>Wed, 09 Sep 2009 18:13:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Interview with a Sarbanes-Oxley Auditor</title>
		<link>http://www.thotspots.com/interview-with-a-sarbanes-oxley-auditor/</link>
		<comments>http://www.thotspots.com/interview-with-a-sarbanes-oxley-auditor/#comments</comments>
		<pubDate>Wed, 01 Aug 2007 23:14:35 +0000</pubDate>
		<dc:creator>Craig Jones</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[role-based security]]></category>
		<category><![CDATA[Sarbanes-Oxley]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[segregation of duties]]></category>

		<guid isPermaLink="false">http://www.maximsc.com/interview-with-a-sarbanes-oxley-auditor/</guid>
		<description><![CDATA[On Role-Based Security and Segregation of Duties
Jim Fleischmann is a security consultant who audits companies for Sarbanes-Oxley compliance [defined].  He and I recently compared notes.  As a software developer who has often worked on role-based security systems, it was wonderful for me to get his perspective on where the rubber meets the road. [...]]]></description>
			<content:encoded><![CDATA[<h2>On Role-Based Security and Segregation of Duties</h2>
<p>Jim Fleischmann is a security consultant who audits companies for Sarbanes-Oxley compliance [<a href="http://en.wikipedia.org/wiki/Sarbanes-Oxley">defined</a>].  He and I recently compared notes.  As a software developer who has often worked on role-based security systems, it was wonderful for me to get his perspective on where the rubber meets the road.  As you might imagine, his feedback was quite different from the usual feedback I&#8217;d get through channels (QA bug reports, customer service support tickets, etc.) The following is my recollection of what we covered.  I&#8217;ll start with Jim&#8217;s observations, and then follow up with my own.<br />
<span id="more-33"></span><br />
I opened the conversation by lamenting on how difficult it is to find information on best practices for role-based security.  Jim agreed that there is a dearth of information for this.  He suggested that if anything new does surface, I might find it by searching on the phrase &#8220;<strong>segregation of duties</strong>,&#8221; that being the overarching concept for which role-based security is just one manifestation.</p>
<p>I next asked Jim what are the most important aspects of any of role-based security system, to him as an auditor.  He named four:</p>
<ul>
<li><strong>Reporting Capability</strong> &#8212; The audit stops dead if Jim cannot be provided with hard-copy reports that list: (a) all of the available permissions and their definitions, (b) all of the defined roles with the permissions assigned to them, and (c) all of the active users and their roles.</li>
<li><strong>Usage Auditing</strong> &#8212; Next, Jim looks for anything that can tell him whether or not permissions and roles are actually being used.  Jim says one of the most common recommendations that come out of his audits is to clamp down on roles and permissions that are not being used.  Say, for example, that a user is assigned to a role that is allowed 20 different permissions, but that particular user only ever takes advantage of three of those permissions.  Jim&#8217;s recommendation would be to define a second role with just those three permissions (or at least a much smaller subset of the 20), and then reassign the user to that new role.  Therefore, anything the software can do from an auditing perspective to support the discovery of this kind of information is a boon.</li>
<li><strong>100% Role-Based</strong> &#8212; It&#8217;s a red flag to Jim if the software allows a user to be assigned a permission directly (without having to go through a role).  That defeats the whole purpose of having roles, he says, and having the roles be meaningful.</li>
<li><strong>Segregation of Duties Enforced by Mutually Exclusive Permissions</strong> &#8212; The whole point of role-based security is to give workers access to only the functionality they need to perform their jobs.  So, a main focus of any audit is to look for certain tasks that should always be mutually exclusive (e.g. the person processing an order should never be the same person who handles the cash), and then to see that the roles and permissions, as defined, enforce this.  All the better if the software actively supports the concept of mutually exclusive permissions, preventing in the first place any one role from being granted both permissions.  Furthermore, if the system allows one user to be assigned multiple roles, then the software should also prevent any role combinations that would grant a single user conflicting permissions.</li>
</ul>
<p>I also wanted to know if Jim had any thoughts on whether or not users should be allowed to be assigned more than one role.  Similarly, did he like the idea of having super-roles that are made up of sub-roles, or if that muddled things.  Jim did not have an opinion on either.  Whichever of these approaches works best for the application, would be fine by him.  He did point out that it should be absolutely clear that assigning a user to multiple roles means they are being granted the union of all those permissions, lest someone in administration think they are only granting that user the intersection of them.</p>
<p>Finally, here are a few of my own observations on the practical implementation of role-based security:</p>
<ul>
<li><strong>Us Programmers are Lazy</strong> &#8212; We tend to write code that is wide-open and worry about clamping down on security last, if at all.  So, the more we can do as software architects to make security awareness part of the development process, the better.  This could mean utilizing code generation and code templates at development time, adding static or dynamic code validation at build time, or taking advantage of aspect oriented programming such as described by Rick Hightower here: <a href="http://www.thearcmind.com/confluence/display/SpribernateSF/%20Using+Spring+AOP+to+add+row+level+security%20+to+Hibernate+or+any+ORM+really"> www.thearcmind.com/confluence/display/SpribernateSF/ Using+Spring+AOP+to+add+row+level+security +to+Hibernate+or+any+ORM+really</a>.</li>
<li><strong>Always Code to Permissions, Never to Roles</strong> &#8212; Application programmers should only code their security checks against permissions, not directly against roles.  Roles should be treated only as a mechanism for bundling permissions.  For one thing, it simplifies the application code if security checks are always only against permissions.  But more importantly, coding directly against a role in effect creates a phantom permission, and it would be all too easy for that aspect of the role, that phantom permission, to go undocumented.</li>
<li><strong>Hyper Specific Permissions</strong> &#8212; New permissions should be created at the drop of a hat.  Reusing an existing permission for a second purpose is usually wrong.  In any event, it&#8217;s far easier to merge two permissions that are later determined to be redundant, than it is to split one that is determined to be overreaching.</li>
<li><strong>Careful Permission Naming</strong> &#8212; The naming of permissions is hard, but worth every minute spent agonizing over getting them right.  It is especially important to ensure that permission names are unique with all other entities throughout the code base.  Since permission names are often cited within quoted strings, in XML files, and in database load scripts, most of these occurrences are therefore out of the reach of any of the &#8220;safe&#8221; refactoring tools that are programmed into modern IDE&#8217;s. So, having absolutely unique permission names makes it easier to rely on an ordinary search-and-replace tool.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.thotspots.com/interview-with-a-sarbanes-oxley-auditor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

