<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://jimbodude.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jpolitz</id>
		<title>JimboWiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://jimbodude.net/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jpolitz"/>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/wiki/Special:Contributions/Jpolitz"/>
		<updated>2026-04-16T19:49:35Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Paper_Outline&amp;diff=2002</id>
		<title>MQP:Paper Outline</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Paper_Outline&amp;diff=2002"/>
				<updated>2008-10-30T18:21:18Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: New page: *Introduction  *Problem Description **Introduction to Java Security **Challenges in using Java Security **Other approaches to security?  *Methods **Static Analysis ***Goals ***Algorithm **...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*Introduction&lt;br /&gt;
&lt;br /&gt;
*Problem Description&lt;br /&gt;
**Introduction to Java Security&lt;br /&gt;
**Challenges in using Java Security&lt;br /&gt;
**Other approaches to security?&lt;br /&gt;
&lt;br /&gt;
*Methods&lt;br /&gt;
**Static Analysis&lt;br /&gt;
***Goals&lt;br /&gt;
***Algorithm&lt;br /&gt;
****Koved's algorithm for Java 1.2&lt;br /&gt;
****Extensions and refinements&lt;br /&gt;
*****Threads&lt;br /&gt;
*****doPrivileged&lt;br /&gt;
****Basic Data Flow Analysis&lt;br /&gt;
***Implementation&lt;br /&gt;
****Soot&lt;br /&gt;
*****Call graph generation&lt;br /&gt;
*****Type analysis&lt;br /&gt;
*****Data flow analysis&lt;br /&gt;
****Analysis Class Structure&lt;br /&gt;
***Limitations of static analysis data&lt;br /&gt;
**Action Centric Model&lt;br /&gt;
***Goals&lt;br /&gt;
***Design&lt;br /&gt;
****Resources&lt;br /&gt;
*****Groups of actions&lt;br /&gt;
****Actions&lt;br /&gt;
*****Action Definitions&lt;br /&gt;
*****Filled Actions&lt;br /&gt;
****Rules&lt;br /&gt;
*****Rule Definitions&lt;br /&gt;
*****Filled Rules&lt;br /&gt;
*****Rules and permissions&lt;br /&gt;
****Action to rule translation&lt;br /&gt;
***Implementation&lt;br /&gt;
****Action Model Class Structure&lt;br /&gt;
****XML Specification of Definitions&lt;br /&gt;
****NetBeans Tool&lt;br /&gt;
&lt;br /&gt;
*Results&lt;br /&gt;
**Static Analysis&lt;br /&gt;
***Successes&lt;br /&gt;
****Permission information&lt;br /&gt;
****Summary of permission requirements&lt;br /&gt;
***Limitations&lt;br /&gt;
****Call graph generation&lt;br /&gt;
****Runtime type identification&lt;br /&gt;
****Runtime parameter identification&lt;br /&gt;
**Action Centric Model&lt;br /&gt;
***Successes&lt;br /&gt;
****Representation of high-level model&lt;br /&gt;
****Independence from security implementation?&lt;br /&gt;
****Ease of development&lt;br /&gt;
***Extensions&lt;br /&gt;
****Model&lt;br /&gt;
*****Parameterized Resources&lt;br /&gt;
*****Actions Containing Actions&lt;br /&gt;
****Tool&lt;br /&gt;
*****Integration with Static Analysis&lt;br /&gt;
*****Use for application deployment&lt;br /&gt;
******Creation of real policy files&lt;br /&gt;
*****Storage of policies&lt;br /&gt;
*****User interface improvement&lt;br /&gt;
&lt;br /&gt;
*Conclusions&lt;br /&gt;
**Helpfulness of identifying permissions&lt;br /&gt;
***Low-level view of security&lt;br /&gt;
***Specificity of results&lt;br /&gt;
**Utility of Action Centric security model&lt;br /&gt;
***High-level model&lt;br /&gt;
***Separation of model and security implementation&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Main&amp;diff=2001</id>
		<title>MQP:Main</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Main&amp;diff=2001"/>
				<updated>2008-10-30T17:40:54Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project will attempt to devise a method for determining the appropriate permission set for an application written in Java and create a developer tool implementing the method.&lt;br /&gt;
&lt;br /&gt;
See the [[MQP:Project Overview|Project Overview]] for more.&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
&lt;br /&gt;
==Paper==&lt;br /&gt;
*[[MQP:Paper Outline|Paper Outline]]&lt;br /&gt;
&lt;br /&gt;
==Research Topics==&lt;br /&gt;
*[[MQP:Static Analysis Tools|Static Analysis Tools]]&lt;br /&gt;
**[[MQP:More on Soot|More on Soot]]&lt;br /&gt;
*[[MQP:Java Security|Java Security]]&lt;br /&gt;
&lt;br /&gt;
==Design Topics==&lt;br /&gt;
*[[MQP:Static Analysis Strategies|Static Analysis Strategies]]&lt;br /&gt;
**[[MQP: A Thread Example|A Thread Example]]&lt;br /&gt;
*[[MQP:Security Analysis Data Structure|Security Analysis Data Model]]&lt;br /&gt;
*[[MQP:Introduction to Netbeans Integration|Introduction to Netbeans Integration]]&lt;br /&gt;
*[[MQP:Rule to Resource Mapping|Rule to Resource Mapping]]&lt;br /&gt;
**[[MQP:Mapping Back From Permissions|Mapping Back From Permissions]]&lt;br /&gt;
*Tool Design&lt;br /&gt;
**[[MQP:Tool Use Cases|Use Cases]]&lt;br /&gt;
&lt;br /&gt;
==Proofs of Concept==&lt;br /&gt;
*[[MQP:Static Analysis Tool 0.1|Static Analysis Tool 0.1]]&lt;br /&gt;
*[[MQP:Resource Model Proof of Concept 0.1|Resource Model Proof of Concept 0.1]]&lt;br /&gt;
&lt;br /&gt;
==The Team==&lt;br /&gt;
*[[Special:Emailuser/J|James Cialdea]] - WPI Class of 2009&lt;br /&gt;
**Computer Science Major&lt;br /&gt;
**Computer Engineering Minor&lt;br /&gt;
*[[Special:Emailuser/jpolitz|Joe Politz]] - WPI Class of 2009&lt;br /&gt;
**Computer Science Major&lt;br /&gt;
**Mathematics Minor&lt;br /&gt;
*A few WPI Advisors&lt;br /&gt;
*A few Sun Microsystems Project Sponsors&lt;br /&gt;
&lt;br /&gt;
[[Category:MQP]]&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Mapping_Back_From_Permissions&amp;diff=1997</id>
		<title>MQP:Mapping Back From Permissions</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Mapping_Back_From_Permissions&amp;diff=1997"/>
				<updated>2008-09-30T21:03:15Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: /* Getting Action Parameters From Permission Rules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MQP:Navbar}}&lt;br /&gt;
[[Category:MQP-Design]]&lt;br /&gt;
&lt;br /&gt;
==The Goal==&lt;br /&gt;
&lt;br /&gt;
One goal of the Resource Model is to be able to easily translate between the model and security implementations.  In the context of Java, this primarily involves being able to translate between Permission type rules and actions.  This involves a few steps, which include determining which Permission rules are required by each type of action, and how the arguments in Permission rules relate to the parameters in the actions.&lt;br /&gt;
&lt;br /&gt;
==Getting Action Parameters From Permission Rules==&lt;br /&gt;
&lt;br /&gt;
To determine the action parameters found in a given permission rule, the process is slightly more complicated than the process of substituting the action parameters into the correct places in the rule parameter.  For example, the template for a SocketPermission rule application may look like this (with action parameter names found between matching {}):&lt;br /&gt;
&lt;br /&gt;
completehost = &amp;quot;{hostname}:[{portrange}]&amp;quot;&lt;br /&gt;
action = &amp;quot;connect&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And a given instance of a SocketPermission may look like this:&lt;br /&gt;
&lt;br /&gt;
completehost = &amp;quot;*.example.org:[8000-8080]&amp;quot;&lt;br /&gt;
action = &amp;quot;connect&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In this example, the case is fairly straightforward.  Regular expressions can be used on the template for completehost to find which parts are variables and which parts are not.  Then these in between strings can be used to find which parts of the rule parameter refer to which variables.  The result of doing a backwards mapping would result in a FilledActionDefinition referring to the ActionDefinition for &amp;quot;SocketConnect&amp;quot;, with ActionParameters hostname=&amp;quot;*.example.org&amp;quot; portrange=&amp;quot;8000-8080&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Sets of Permission Rules Defining One Action==&lt;br /&gt;
&lt;br /&gt;
In other cases, a given action, for example the &amp;quot;GetAndAlterClassLoader&amp;quot; action, requires several Permission rules to be represented in the Java security framework.  In this case, when an initial set of Permission rules is given, it needs to be found if any subset of those filled in rule definitions match all the rule applications for each given action.  The actions that have complete matches are fully represented by the permission rules, and the ones that have incomplete matches are suggested by the permission rules.&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Mapping_Back_From_Permissions&amp;diff=1996</id>
		<title>MQP:Mapping Back From Permissions</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Mapping_Back_From_Permissions&amp;diff=1996"/>
				<updated>2008-09-30T21:02:49Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: New page: {{MQP:Navbar}} Category:MQP-Design  ==The Goal==  One goal of the Resource Model is to be able to easily translate between the model and security implementations.  In the context of Ja...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MQP:Navbar}}&lt;br /&gt;
[[Category:MQP-Design]]&lt;br /&gt;
&lt;br /&gt;
==The Goal==&lt;br /&gt;
&lt;br /&gt;
One goal of the Resource Model is to be able to easily translate between the model and security implementations.  In the context of Java, this primarily involves being able to translate between Permission type rules and actions.  This involves a few steps, which include determining which Permission rules are required by each type of action, and how the arguments in Permission rules relate to the parameters in the actions.&lt;br /&gt;
&lt;br /&gt;
==Getting Action Parameters From Permission Rules==&lt;br /&gt;
&lt;br /&gt;
To determine the action parameters found in a given permission rule, the process is slightly more complicated than the process of substituting the action parameters into the correct places in the rule parameter.  For example, the template for a SocketPermission rule application may look like this (with action parameter names found between matching {}):&lt;br /&gt;
&lt;br /&gt;
completehost = &amp;quot;{hostname}:[{portrange}]&amp;quot;&lt;br /&gt;
action = &amp;quot;connect&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And a given instance of a SocketPermission may look like this:&lt;br /&gt;
&lt;br /&gt;
completehost = &amp;quot;*.example.org:[8000-8080]&amp;quot;&lt;br /&gt;
action = &amp;quot;connect&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In this example, the case is fairly straightforward.  Regular expressions can be used on the template for completehost to find which parts are variables and which parts are not.  Then these in between strings can be used to find which parts of the rule parameter refer to which variables.  The result of doing a backwards mapping would result in a FilledActionDefinition referring to the ActionDefinition for &amp;quot;SocketConnect&amp;quot;, with ActionParameters hostname=&amp;quot;*.example.org* portrange=&amp;quot;8000-8080&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Sets of Permission Rules Defining One Action==&lt;br /&gt;
&lt;br /&gt;
In other cases, a given action, for example the &amp;quot;GetAndAlterClassLoader&amp;quot; action, requires several Permission rules to be represented in the Java security framework.  In this case, when an initial set of Permission rules is given, it needs to be found if any subset of those filled in rule definitions match all the rule applications for each given action.  The actions that have complete matches are fully represented by the permission rules, and the ones that have incomplete matches are suggested by the permission rules.&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Main&amp;diff=1995</id>
		<title>MQP:Main</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Main&amp;diff=1995"/>
				<updated>2008-09-30T20:50:29Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: /* Design Topics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project will attempt to devise a method for determining the appropriate permission set for an application written in Java and create a developer tool implementing the method.&lt;br /&gt;
&lt;br /&gt;
See the [[MQP:Project Overview|Project Overview]] for more.&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
&lt;br /&gt;
==Research Topics==&lt;br /&gt;
*[[MQP:Static Analysis Tools|Static Analysis Tools]]&lt;br /&gt;
**[[MQP:More on Soot|More on Soot]]&lt;br /&gt;
*[[MQP:Java Security|Java Security]]&lt;br /&gt;
&lt;br /&gt;
==Design Topics==&lt;br /&gt;
*[[MQP:Static Analysis Strategies|Static Analysis Strategies]]&lt;br /&gt;
**[[MQP: A Thread Example|A Thread Example]]&lt;br /&gt;
*[[MQP:Security Analysis Data Structure|Security Analysis Data Model]]&lt;br /&gt;
*[[MQP:Introduction to Netbeans Integration|Introduction to Netbeans Integration]]&lt;br /&gt;
*[[MQP:Rule to Resource Mapping|Rule to Resource Mapping]]&lt;br /&gt;
**[[MQP:Mapping Back From Permissions|Mapping Back From Permissions]]&lt;br /&gt;
&lt;br /&gt;
==Proofs of Concept==&lt;br /&gt;
*[[MQP:Static Analysis Tool 0.1|Static Analysis Tool 0.1]]&lt;br /&gt;
*[[MQP:Resource Model Proof of Concept 0.1|Resource Model Proof of Concept 0.1]]&lt;br /&gt;
&lt;br /&gt;
==The Team==&lt;br /&gt;
*[[Special:Emailuser/J|James Cialdea]] - WPI Class of 2009&lt;br /&gt;
**Computer Science Major&lt;br /&gt;
**Computer Engineering Minor&lt;br /&gt;
*[[Special:Emailuser/jpolitz|Joe Politz]] - WPI Class of 2009&lt;br /&gt;
**Computer Science Major&lt;br /&gt;
**Mathematics Minor&lt;br /&gt;
*A few WPI Advisors&lt;br /&gt;
*A few Sun Microsystems Project Sponsors&lt;br /&gt;
&lt;br /&gt;
[[Category:MQP]]&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Main&amp;diff=1994</id>
		<title>MQP:Main</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Main&amp;diff=1994"/>
				<updated>2008-09-30T20:50:18Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project will attempt to devise a method for determining the appropriate permission set for an application written in Java and create a developer tool implementing the method.&lt;br /&gt;
&lt;br /&gt;
See the [[MQP:Project Overview|Project Overview]] for more.&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
&lt;br /&gt;
==Research Topics==&lt;br /&gt;
*[[MQP:Static Analysis Tools|Static Analysis Tools]]&lt;br /&gt;
**[[MQP:More on Soot|More on Soot]]&lt;br /&gt;
*[[MQP:Java Security|Java Security]]&lt;br /&gt;
&lt;br /&gt;
==Design Topics==&lt;br /&gt;
*[[MQP:Static Analysis Strategies|Static Analysis Strategies]]&lt;br /&gt;
**[[MQP: A Thread Example|A Thread Example]]&lt;br /&gt;
*[[MQP:Security Analysis Data Structure|Security Analysis Data Model]]&lt;br /&gt;
*[[MQP:Introduction to Netbeans Integration|Introduction to Netbeans Integration]]&lt;br /&gt;
*[[MQP:Rule to Resource Mapping|Rule to Resource Mapping]]&lt;br /&gt;
**[[MQP:Mapping Back From Permissions|Mapping Back From Permissions]&lt;br /&gt;
&lt;br /&gt;
==Proofs of Concept==&lt;br /&gt;
*[[MQP:Static Analysis Tool 0.1|Static Analysis Tool 0.1]]&lt;br /&gt;
*[[MQP:Resource Model Proof of Concept 0.1|Resource Model Proof of Concept 0.1]]&lt;br /&gt;
&lt;br /&gt;
==The Team==&lt;br /&gt;
*[[Special:Emailuser/J|James Cialdea]] - WPI Class of 2009&lt;br /&gt;
**Computer Science Major&lt;br /&gt;
**Computer Engineering Minor&lt;br /&gt;
*[[Special:Emailuser/jpolitz|Joe Politz]] - WPI Class of 2009&lt;br /&gt;
**Computer Science Major&lt;br /&gt;
**Mathematics Minor&lt;br /&gt;
*A few WPI Advisors&lt;br /&gt;
*A few Sun Microsystems Project Sponsors&lt;br /&gt;
&lt;br /&gt;
[[Category:MQP]]&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Rule_to_Resource_Mapping&amp;diff=1993</id>
		<title>MQP:Rule to Resource Mapping</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Rule_to_Resource_Mapping&amp;diff=1993"/>
				<updated>2008-09-26T18:08:23Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: /* Java Classes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP-Design]]&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
When developers are building their software, they have a fairly complete knowledge about what protected resources their application will require for certain actions, but may not have a full understanding about how to create a security policy from this data.  In order to simplify the creation of policy, the policy could be defined in the resource and action centric vocabulary that the developer is familiar with, rather than the permission centric vocabulary of Java policy.  The resource requirements the developer specifies could then be mapped into actual permission requirements.&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
There are a number of broadly-defined resource categories that programs could need to access and which need to be secure:&lt;br /&gt;
&lt;br /&gt;
*File system&lt;br /&gt;
*Connection resources (Socket connections, for example)&lt;br /&gt;
*Java security system&lt;br /&gt;
*MBean functionality&lt;br /&gt;
*Java class loaders&lt;br /&gt;
*Media output (AWT graphics and sound)&lt;br /&gt;
*Authentication services&lt;br /&gt;
*Java runtime system management (including properties, environment variables)&lt;br /&gt;
*Java reflection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For each resource, there are actions associated.  For instance:&lt;br /&gt;
*File-system&lt;br /&gt;
**Create, read, write, execute, and delete particular files&lt;br /&gt;
*Connections (socket and other)&lt;br /&gt;
**Listen, accept, and connect&lt;br /&gt;
**Handle cookies and other sensitive data&lt;br /&gt;
*Java system management&lt;br /&gt;
**Read specific properties&lt;br /&gt;
**Set properties&lt;br /&gt;
**Override default behaviors, like System.in/out, default exception handlers, shutdown hooks&lt;br /&gt;
*Media Output&lt;br /&gt;
**Control/monitor/produce AWT events&lt;br /&gt;
**Produce audio output&lt;br /&gt;
**Manipulate default applet behavior&lt;br /&gt;
*Class loaders&lt;br /&gt;
**Create new class loaders&lt;br /&gt;
**Load classes&lt;br /&gt;
**Get class loaders from certain security contexts&lt;br /&gt;
**Dynamically load libraries&lt;br /&gt;
*Java reflection system&lt;br /&gt;
**Access private methods&lt;br /&gt;
**Create reflected objects&lt;br /&gt;
*Java security system&lt;br /&gt;
**Get/set/alter SecurityManager&lt;br /&gt;
**Create AccessControlContexts&lt;br /&gt;
**Get/set/alter current Policies&lt;br /&gt;
**Get/set/alter authorization information from Principals&lt;br /&gt;
*MBean functionality&lt;br /&gt;
**Load classes in an MBean&lt;br /&gt;
**Perform trusted operations with an MBean&lt;br /&gt;
*Authentication Services&lt;br /&gt;
**Delegate authority to another subject&lt;br /&gt;
**Authorize grants to particular subjects&lt;br /&gt;
**Perform user authentication&lt;br /&gt;
&lt;br /&gt;
A security system needs to somehow be configured to allow or deny these kinds of actions.  In this model, the security system would apply some set of &amp;quot;rules&amp;quot; to subjects attempting to perform actions.  There could be a number of different types of rules and mechanisms for implementing them.  For most of the purposes of this project, the Java security system is considered, which uses Permission objects as its &amp;quot;rules.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In Java, to perform any of these actions, the application needs to be granted some set of permissions.  They may not be all the same type (for example, permissions to perform actions on the security system can be RuntimePermissions or SecurityPermissions), and may have different parameters depending on the context the action is performed in (the host and port of a socket connection, for instance).  This model allows the specification of high-level capabilities a program needs, to be followed by the mapping of the capable actions into actual Permission grants.&lt;br /&gt;
&lt;br /&gt;
Each resource will have a different model of the actions that can be performed on or with the resource.  This allows a more detailed specification of the capabilities a program needs.  For example, Java system management actions could be parameterized with some set of properties that the program will need, and the file system actions can be parameterized with the areas of the file system that are of importance to the program.&lt;br /&gt;
&lt;br /&gt;
It is an important point of this model that it is not dependent on the mechanism of Permissions in particular.  The resource-action model is designed to be flexible, with the ability to parameterize actions allowing the model to map to different kinds of security implementations.&lt;br /&gt;
&lt;br /&gt;
==Rules==&lt;br /&gt;
A rule represents a mechanism for enforcing security constraints on certain actions or resources.  A rule can have certain parameters associated with it, which would have relationships with the parameters of relevant actions.  For example, an action that has to do with reading the file system may have parameters describing what set of files is to be read by the currently running code.  An associated rule for Permissions in Java may use these parameters to describe a particular instantiation of a FilePermission object with parameters like &amp;quot;/directory/specified/*&amp;quot; and &amp;quot;read&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Permissions==&lt;br /&gt;
This project is concerned in particular with the Java security system, so understanding how the mechanism of Permissions work is important.  Permissions can be interpreted as a kind of rule that fits into the resource-action model, allowing the model to directly relate to Java security.&lt;br /&gt;
&lt;br /&gt;
Permissions have a low-level representation based on the classes they originate from, such as:&lt;br /&gt;
*java.io.FilePermission&lt;br /&gt;
*java.net.SocketPermission&lt;br /&gt;
*java.util.PropertyPermission&lt;br /&gt;
*java.lang.RuntimePermission&lt;br /&gt;
*java.awt.AWTPermission&lt;br /&gt;
*java.net.NetPermission&lt;br /&gt;
*java.lang.ReflectPermission&lt;br /&gt;
*and others&lt;br /&gt;
&lt;br /&gt;
Some permission classes cover multiple resources and many actions.  Some actions have multiple specific permission rules required.&lt;br /&gt;
&lt;br /&gt;
==Mapping from Resources to Rules and Back==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some sort of description of the relationship between a resource with its actions and rules would be developed.  Important things to explain in this model include:&lt;br /&gt;
*A description of the resource and all its actions&lt;br /&gt;
*What rules relate to the resource's actions, and what parameters will cause these actions to be allowed or denied&lt;br /&gt;
*What actions of this resource will be allowed implicitly as a result of other actions, which are not necessarily associated with this resource, to be allowed&lt;br /&gt;
&lt;br /&gt;
Given a set of resource requirements, we should be able to generate a rule set (and a permission set, in the case of using permission rules).  Given a rule set, we should be able to do reverse lookups to find the resource grant implications.&lt;br /&gt;
&lt;br /&gt;
===Resource to Rule Data Model===&lt;br /&gt;
The current resource model follows.  Goals of the model were to be easy to traverse, and simple to represent in a text file, such as XML, allowing us to extend the model to other permission classes, such as those that are application specific.&lt;br /&gt;
&lt;br /&gt;
*'''Resource''' - Top level container for a Resource (one for each resource present)&lt;br /&gt;
**'''Description''' - A human readable description of what the resource is (one for each resource present)&lt;br /&gt;
**'''Actions''' - A container for all the actions a resource has (one for each resource present)&lt;br /&gt;
***'''Action''' - Container for information about a specific action (many for each resource present)&lt;br /&gt;
****'''Description''' - A human readable description of what the action is (one for each action present)&lt;br /&gt;
****'''Action Parameters''' - A container for parameters to actions&lt;br /&gt;
*****'''Action Parameter''' - An Action can be parameterized in certain ways (for example, a read action in the file system may have an associated directory or filename)&lt;br /&gt;
****'''Rules to Apply''' - A container of rules to apply to allow this action (one for each action present)&lt;br /&gt;
*****'''Applied Rule''' - A description of a security rule requirement for this action and parameters (many for each rule container)&lt;br /&gt;
*'''Rule''' - Top level container for a Rule (one for each Rule present)&lt;br /&gt;
**'''Description''' - A human readable description of what the permission is (one for each permission present)&lt;br /&gt;
**'''Type''' - The type of the rule.  For instance, in the Java security standard, the type is Permission.&lt;br /&gt;
**'''Name''' - The name of the rule.  This is a unique identifier within each rule type.&lt;br /&gt;
**'''Field''' - A place to specify additional information about the rule.  For example, with Permissions, this is where the class name of the particular permission is stored&lt;br /&gt;
**'''Parameters''' - A container for parameters to specify the rule&lt;br /&gt;
***'''Parameter''' - A description of the parameter (many per parameters container)&lt;br /&gt;
****'''Description''' - A human readable description of what the parameter is (one for each parameter present)&lt;br /&gt;
****'''Type''' - The type of the parameter&lt;br /&gt;
&lt;br /&gt;
==Fitting Developer Specified Resources Together with Permission Requirement Analysis==&lt;br /&gt;
This resource requirement model fits in nicely with the idea of &amp;quot;Management Level Policy Requirements&amp;quot;, and can use the same classes for its representation.  Using this representation also allows us to compare the permission set caused by developer suggested resources to our own analysis of permission requirements.  We would be able to detect unused permissions and missing grants, as well as overly vague grants.&lt;br /&gt;
&lt;br /&gt;
==Model Implementation==&lt;br /&gt;
===XML Description===&lt;br /&gt;
The rule and resource mapping is persisted in an XML file.&lt;br /&gt;
&lt;br /&gt;
The xml schema document specifies a structure similar to the one described above.  It is available [http://www.jimbodude.net/xml/resourcetorules.xsd here] for now, though this may change.&lt;br /&gt;
&lt;br /&gt;
Instances documents of this schema describe particular cases of resources and actions mapping to rules.  A fragment of what a resource and action look like is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;resource name=&amp;quot;JVM Runtime Resources&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
		&amp;lt;action name=&amp;quot;GetEnvironmentVariables&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;description&amp;gt;&lt;br /&gt;
				Represents getting JVM environment variables.&lt;br /&gt;
			&amp;lt;/description&amp;gt;&lt;br /&gt;
			&amp;lt;actionParameters&amp;gt;&lt;br /&gt;
				&amp;lt;actionParameter name=&amp;quot;varName&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;description&amp;gt; The name of the environment variable &amp;lt;/description&amp;gt;&lt;br /&gt;
                              &amp;lt;/actionParameter&amp;gt;&lt;br /&gt;
			&amp;lt;/actionParameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
			&amp;lt;appliedRules&amp;gt;&lt;br /&gt;
				&amp;lt;appliedRule type=&amp;quot;Permission&amp;quot; name=&amp;quot;RuntimePermission&amp;quot;&amp;gt;&lt;br /&gt;
					&amp;lt;parameterApplications&amp;gt;&lt;br /&gt;
						&amp;lt;parameterApplication name=&amp;quot;name&amp;quot; value=&amp;quot;getenv.{varName}&amp;quot;&amp;gt;&lt;br /&gt;
						&amp;lt;/parameterApplication&amp;gt;&lt;br /&gt;
					&amp;lt;/parameterApplications&amp;gt;&lt;br /&gt;
				&amp;lt;/appliedRule&amp;gt;&lt;br /&gt;
			&amp;lt;/appliedRules&amp;gt;&lt;br /&gt;
		&amp;lt;/action&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And this is what the rule for RuntimePermissions looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	&amp;lt;rule type=&amp;quot;Permission&amp;quot; name=&amp;quot;RuntimePermission&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;field name=&amp;quot;classname&amp;quot;&amp;gt;java.lang.RuntimePermission&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;description&amp;gt;&lt;br /&gt;
			Permission used for many different actions at runtime. Parameter is the name of&lt;br /&gt;
			the named permission.&lt;br /&gt;
		&amp;lt;/description&amp;gt;&lt;br /&gt;
		&amp;lt;parameters&amp;gt;&lt;br /&gt;
			&amp;lt;parameter id=&amp;quot;1&amp;quot; name=&amp;quot;name&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;/parameters&amp;gt;&lt;br /&gt;
	&amp;lt;/rule&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this case, the resource in question is certain JVM runtime actions and resources, and the particular action is getting access to environment variables.  This action has a parameter, the name of the environment variable to access.  It also has one rule application, an instance of the &amp;quot;Permission&amp;quot; type rule named &amp;quot;RuntimePermission.&amp;quot;  This rule needs to have values applied to its one parameter, &amp;quot;name&amp;quot;.  In this case, the parameter &amp;quot;name&amp;quot; is set to the value &amp;quot;getenv.{varName}&amp;quot;.  The syntax &amp;quot;{varName}&amp;quot; is a reference to the varName action parameter.  Several instances of the GetEnvironmentVariable action could be specified, each with different parameterizations, that would lead to different instances of the RuntimePermission rule with different parameters.&lt;br /&gt;
&lt;br /&gt;
===Java Classes===&lt;br /&gt;
&lt;br /&gt;
This is slightly out of sync with the newer version of the model.&lt;br /&gt;
&lt;br /&gt;
[[Image:ResourceModel.png|frame|Resource Model]]&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Rule_to_Resource_Mapping&amp;diff=1992</id>
		<title>MQP:Rule to Resource Mapping</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Rule_to_Resource_Mapping&amp;diff=1992"/>
				<updated>2008-09-26T17:58:59Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: /* XML Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP-Design]]&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
When developers are building their software, they have a fairly complete knowledge about what protected resources their application will require for certain actions, but may not have a full understanding about how to create a security policy from this data.  In order to simplify the creation of policy, the policy could be defined in the resource and action centric vocabulary that the developer is familiar with, rather than the permission centric vocabulary of Java policy.  The resource requirements the developer specifies could then be mapped into actual permission requirements.&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
There are a number of broadly-defined resource categories that programs could need to access and which need to be secure:&lt;br /&gt;
&lt;br /&gt;
*File system&lt;br /&gt;
*Connection resources (Socket connections, for example)&lt;br /&gt;
*Java security system&lt;br /&gt;
*MBean functionality&lt;br /&gt;
*Java class loaders&lt;br /&gt;
*Media output (AWT graphics and sound)&lt;br /&gt;
*Authentication services&lt;br /&gt;
*Java runtime system management (including properties, environment variables)&lt;br /&gt;
*Java reflection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For each resource, there are actions associated.  For instance:&lt;br /&gt;
*File-system&lt;br /&gt;
**Create, read, write, execute, and delete particular files&lt;br /&gt;
*Connections (socket and other)&lt;br /&gt;
**Listen, accept, and connect&lt;br /&gt;
**Handle cookies and other sensitive data&lt;br /&gt;
*Java system management&lt;br /&gt;
**Read specific properties&lt;br /&gt;
**Set properties&lt;br /&gt;
**Override default behaviors, like System.in/out, default exception handlers, shutdown hooks&lt;br /&gt;
*Media Output&lt;br /&gt;
**Control/monitor/produce AWT events&lt;br /&gt;
**Produce audio output&lt;br /&gt;
**Manipulate default applet behavior&lt;br /&gt;
*Class loaders&lt;br /&gt;
**Create new class loaders&lt;br /&gt;
**Load classes&lt;br /&gt;
**Get class loaders from certain security contexts&lt;br /&gt;
**Dynamically load libraries&lt;br /&gt;
*Java reflection system&lt;br /&gt;
**Access private methods&lt;br /&gt;
**Create reflected objects&lt;br /&gt;
*Java security system&lt;br /&gt;
**Get/set/alter SecurityManager&lt;br /&gt;
**Create AccessControlContexts&lt;br /&gt;
**Get/set/alter current Policies&lt;br /&gt;
**Get/set/alter authorization information from Principals&lt;br /&gt;
*MBean functionality&lt;br /&gt;
**Load classes in an MBean&lt;br /&gt;
**Perform trusted operations with an MBean&lt;br /&gt;
*Authentication Services&lt;br /&gt;
**Delegate authority to another subject&lt;br /&gt;
**Authorize grants to particular subjects&lt;br /&gt;
**Perform user authentication&lt;br /&gt;
&lt;br /&gt;
A security system needs to somehow be configured to allow or deny these kinds of actions.  In this model, the security system would apply some set of &amp;quot;rules&amp;quot; to subjects attempting to perform actions.  There could be a number of different types of rules and mechanisms for implementing them.  For most of the purposes of this project, the Java security system is considered, which uses Permission objects as its &amp;quot;rules.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In Java, to perform any of these actions, the application needs to be granted some set of permissions.  They may not be all the same type (for example, permissions to perform actions on the security system can be RuntimePermissions or SecurityPermissions), and may have different parameters depending on the context the action is performed in (the host and port of a socket connection, for instance).  This model allows the specification of high-level capabilities a program needs, to be followed by the mapping of the capable actions into actual Permission grants.&lt;br /&gt;
&lt;br /&gt;
Each resource will have a different model of the actions that can be performed on or with the resource.  This allows a more detailed specification of the capabilities a program needs.  For example, Java system management actions could be parameterized with some set of properties that the program will need, and the file system actions can be parameterized with the areas of the file system that are of importance to the program.&lt;br /&gt;
&lt;br /&gt;
It is an important point of this model that it is not dependent on the mechanism of Permissions in particular.  The resource-action model is designed to be flexible, with the ability to parameterize actions allowing the model to map to different kinds of security implementations.&lt;br /&gt;
&lt;br /&gt;
==Rules==&lt;br /&gt;
A rule represents a mechanism for enforcing security constraints on certain actions or resources.  A rule can have certain parameters associated with it, which would have relationships with the parameters of relevant actions.  For example, an action that has to do with reading the file system may have parameters describing what set of files is to be read by the currently running code.  An associated rule for Permissions in Java may use these parameters to describe a particular instantiation of a FilePermission object with parameters like &amp;quot;/directory/specified/*&amp;quot; and &amp;quot;read&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Permissions==&lt;br /&gt;
This project is concerned in particular with the Java security system, so understanding how the mechanism of Permissions work is important.  Permissions can be interpreted as a kind of rule that fits into the resource-action model, allowing the model to directly relate to Java security.&lt;br /&gt;
&lt;br /&gt;
Permissions have a low-level representation based on the classes they originate from, such as:&lt;br /&gt;
*java.io.FilePermission&lt;br /&gt;
*java.net.SocketPermission&lt;br /&gt;
*java.util.PropertyPermission&lt;br /&gt;
*java.lang.RuntimePermission&lt;br /&gt;
*java.awt.AWTPermission&lt;br /&gt;
*java.net.NetPermission&lt;br /&gt;
*java.lang.ReflectPermission&lt;br /&gt;
*and others&lt;br /&gt;
&lt;br /&gt;
Some permission classes cover multiple resources and many actions.  Some actions have multiple specific permission rules required.&lt;br /&gt;
&lt;br /&gt;
==Mapping from Resources to Rules and Back==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some sort of description of the relationship between a resource with its actions and rules would be developed.  Important things to explain in this model include:&lt;br /&gt;
*A description of the resource and all its actions&lt;br /&gt;
*What rules relate to the resource's actions, and what parameters will cause these actions to be allowed or denied&lt;br /&gt;
*What actions of this resource will be allowed implicitly as a result of other actions, which are not necessarily associated with this resource, to be allowed&lt;br /&gt;
&lt;br /&gt;
Given a set of resource requirements, we should be able to generate a rule set (and a permission set, in the case of using permission rules).  Given a rule set, we should be able to do reverse lookups to find the resource grant implications.&lt;br /&gt;
&lt;br /&gt;
===Resource to Rule Data Model===&lt;br /&gt;
The current resource model follows.  Goals of the model were to be easy to traverse, and simple to represent in a text file, such as XML, allowing us to extend the model to other permission classes, such as those that are application specific.&lt;br /&gt;
&lt;br /&gt;
*'''Resource''' - Top level container for a Resource (one for each resource present)&lt;br /&gt;
**'''Description''' - A human readable description of what the resource is (one for each resource present)&lt;br /&gt;
**'''Actions''' - A container for all the actions a resource has (one for each resource present)&lt;br /&gt;
***'''Action''' - Container for information about a specific action (many for each resource present)&lt;br /&gt;
****'''Description''' - A human readable description of what the action is (one for each action present)&lt;br /&gt;
****'''Action Parameters''' - A container for parameters to actions&lt;br /&gt;
*****'''Action Parameter''' - An Action can be parameterized in certain ways (for example, a read action in the file system may have an associated directory or filename)&lt;br /&gt;
****'''Rules to Apply''' - A container of rules to apply to allow this action (one for each action present)&lt;br /&gt;
*****'''Applied Rule''' - A description of a security rule requirement for this action and parameters (many for each rule container)&lt;br /&gt;
*'''Rule''' - Top level container for a Rule (one for each Rule present)&lt;br /&gt;
**'''Description''' - A human readable description of what the permission is (one for each permission present)&lt;br /&gt;
**'''Type''' - The type of the rule.  For instance, in the Java security standard, the type is Permission.&lt;br /&gt;
**'''Name''' - The name of the rule.  This is a unique identifier within each rule type.&lt;br /&gt;
**'''Field''' - A place to specify additional information about the rule.  For example, with Permissions, this is where the class name of the particular permission is stored&lt;br /&gt;
**'''Parameters''' - A container for parameters to specify the rule&lt;br /&gt;
***'''Parameter''' - A description of the parameter (many per parameters container)&lt;br /&gt;
****'''Description''' - A human readable description of what the parameter is (one for each parameter present)&lt;br /&gt;
****'''Type''' - The type of the parameter&lt;br /&gt;
&lt;br /&gt;
==Fitting Developer Specified Resources Together with Permission Requirement Analysis==&lt;br /&gt;
This resource requirement model fits in nicely with the idea of &amp;quot;Management Level Policy Requirements&amp;quot;, and can use the same classes for its representation.  Using this representation also allows us to compare the permission set caused by developer suggested resources to our own analysis of permission requirements.  We would be able to detect unused permissions and missing grants, as well as overly vague grants.&lt;br /&gt;
&lt;br /&gt;
==Model Implementation==&lt;br /&gt;
===XML Description===&lt;br /&gt;
The rule and resource mapping is persisted in an XML file.&lt;br /&gt;
&lt;br /&gt;
The xml schema document specifies a structure similar to the one described above.  It is available [http://www.jimbodude.net/xml/resourcetorules.xsd here] for now, though this may change.&lt;br /&gt;
&lt;br /&gt;
Instances documents of this schema describe particular cases of resources and actions mapping to rules.  A fragment of what a resource and action look like is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;resource name=&amp;quot;JVM Runtime Resources&amp;quot;&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
		&amp;lt;action name=&amp;quot;GetEnvironmentVariables&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;description&amp;gt;&lt;br /&gt;
				Represents getting JVM environment variables.&lt;br /&gt;
			&amp;lt;/description&amp;gt;&lt;br /&gt;
			&amp;lt;actionParameters&amp;gt;&lt;br /&gt;
				&amp;lt;actionParameter name=&amp;quot;varName&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;description&amp;gt; The name of the environment variable &amp;lt;/description&amp;gt;&lt;br /&gt;
                              &amp;lt;/actionParameter&amp;gt;&lt;br /&gt;
			&amp;lt;/actionParameters&amp;gt;&lt;br /&gt;
&lt;br /&gt;
			&amp;lt;appliedRules&amp;gt;&lt;br /&gt;
				&amp;lt;appliedRule type=&amp;quot;Permission&amp;quot; name=&amp;quot;RuntimePermission&amp;quot;&amp;gt;&lt;br /&gt;
					&amp;lt;parameterApplications&amp;gt;&lt;br /&gt;
						&amp;lt;parameterApplication name=&amp;quot;name&amp;quot; value=&amp;quot;getenv.{varName}&amp;quot;&amp;gt;&lt;br /&gt;
						&amp;lt;/parameterApplication&amp;gt;&lt;br /&gt;
					&amp;lt;/parameterApplications&amp;gt;&lt;br /&gt;
				&amp;lt;/appliedRule&amp;gt;&lt;br /&gt;
			&amp;lt;/appliedRules&amp;gt;&lt;br /&gt;
		&amp;lt;/action&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And this is what the rule for RuntimePermissions looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
	&amp;lt;rule type=&amp;quot;Permission&amp;quot; name=&amp;quot;RuntimePermission&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;field name=&amp;quot;classname&amp;quot;&amp;gt;java.lang.RuntimePermission&amp;lt;/field&amp;gt;&lt;br /&gt;
		&amp;lt;description&amp;gt;&lt;br /&gt;
			Permission used for many different actions at runtime. Parameter is the name of&lt;br /&gt;
			the named permission.&lt;br /&gt;
		&amp;lt;/description&amp;gt;&lt;br /&gt;
		&amp;lt;parameters&amp;gt;&lt;br /&gt;
			&amp;lt;parameter id=&amp;quot;1&amp;quot; name=&amp;quot;name&amp;quot;/&amp;gt;&lt;br /&gt;
		&amp;lt;/parameters&amp;gt;&lt;br /&gt;
	&amp;lt;/rule&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this case, the resource in question is certain JVM runtime actions and resources, and the particular action is getting access to environment variables.  This action has a parameter, the name of the environment variable to access.  It also has one rule application, an instance of the &amp;quot;Permission&amp;quot; type rule named &amp;quot;RuntimePermission.&amp;quot;  This rule needs to have values applied to its one parameter, &amp;quot;name&amp;quot;.  In this case, the parameter &amp;quot;name&amp;quot; is set to the value &amp;quot;getenv.{varName}&amp;quot;.  The syntax &amp;quot;{varName}&amp;quot; is a reference to the varName action parameter.  Several instances of the GetEnvironmentVariable action could be specified, each with different parameterizations, that would lead to different instances of the RuntimePermission rule with different parameters.&lt;br /&gt;
&lt;br /&gt;
===Java Classes===&lt;br /&gt;
&lt;br /&gt;
[[Image:ResourceModel.png|frame|Resource Model]]&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Rule_to_Resource_Mapping&amp;diff=1991</id>
		<title>MQP:Rule to Resource Mapping</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Rule_to_Resource_Mapping&amp;diff=1991"/>
				<updated>2008-09-26T17:43:07Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP-Design]]&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
When developers are building their software, they have a fairly complete knowledge about what protected resources their application will require for certain actions, but may not have a full understanding about how to create a security policy from this data.  In order to simplify the creation of policy, the policy could be defined in the resource and action centric vocabulary that the developer is familiar with, rather than the permission centric vocabulary of Java policy.  The resource requirements the developer specifies could then be mapped into actual permission requirements.&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
There are a number of broadly-defined resource categories that programs could need to access and which need to be secure:&lt;br /&gt;
&lt;br /&gt;
*File system&lt;br /&gt;
*Connection resources (Socket connections, for example)&lt;br /&gt;
*Java security system&lt;br /&gt;
*MBean functionality&lt;br /&gt;
*Java class loaders&lt;br /&gt;
*Media output (AWT graphics and sound)&lt;br /&gt;
*Authentication services&lt;br /&gt;
*Java runtime system management (including properties, environment variables)&lt;br /&gt;
*Java reflection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For each resource, there are actions associated.  For instance:&lt;br /&gt;
*File-system&lt;br /&gt;
**Create, read, write, execute, and delete particular files&lt;br /&gt;
*Connections (socket and other)&lt;br /&gt;
**Listen, accept, and connect&lt;br /&gt;
**Handle cookies and other sensitive data&lt;br /&gt;
*Java system management&lt;br /&gt;
**Read specific properties&lt;br /&gt;
**Set properties&lt;br /&gt;
**Override default behaviors, like System.in/out, default exception handlers, shutdown hooks&lt;br /&gt;
*Media Output&lt;br /&gt;
**Control/monitor/produce AWT events&lt;br /&gt;
**Produce audio output&lt;br /&gt;
**Manipulate default applet behavior&lt;br /&gt;
*Class loaders&lt;br /&gt;
**Create new class loaders&lt;br /&gt;
**Load classes&lt;br /&gt;
**Get class loaders from certain security contexts&lt;br /&gt;
**Dynamically load libraries&lt;br /&gt;
*Java reflection system&lt;br /&gt;
**Access private methods&lt;br /&gt;
**Create reflected objects&lt;br /&gt;
*Java security system&lt;br /&gt;
**Get/set/alter SecurityManager&lt;br /&gt;
**Create AccessControlContexts&lt;br /&gt;
**Get/set/alter current Policies&lt;br /&gt;
**Get/set/alter authorization information from Principals&lt;br /&gt;
*MBean functionality&lt;br /&gt;
**Load classes in an MBean&lt;br /&gt;
**Perform trusted operations with an MBean&lt;br /&gt;
*Authentication Services&lt;br /&gt;
**Delegate authority to another subject&lt;br /&gt;
**Authorize grants to particular subjects&lt;br /&gt;
**Perform user authentication&lt;br /&gt;
&lt;br /&gt;
A security system needs to somehow be configured to allow or deny these kinds of actions.  In this model, the security system would apply some set of &amp;quot;rules&amp;quot; to subjects attempting to perform actions.  There could be a number of different types of rules and mechanisms for implementing them.  For most of the purposes of this project, the Java security system is considered, which uses Permission objects as its &amp;quot;rules.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In Java, to perform any of these actions, the application needs to be granted some set of permissions.  They may not be all the same type (for example, permissions to perform actions on the security system can be RuntimePermissions or SecurityPermissions), and may have different parameters depending on the context the action is performed in (the host and port of a socket connection, for instance).  This model allows the specification of high-level capabilities a program needs, to be followed by the mapping of the capable actions into actual Permission grants.&lt;br /&gt;
&lt;br /&gt;
Each resource will have a different model of the actions that can be performed on or with the resource.  This allows a more detailed specification of the capabilities a program needs.  For example, Java system management actions could be parameterized with some set of properties that the program will need, and the file system actions can be parameterized with the areas of the file system that are of importance to the program.&lt;br /&gt;
&lt;br /&gt;
It is an important point of this model that it is not dependent on the mechanism of Permissions in particular.  The resource-action model is designed to be flexible, with the ability to parameterize actions allowing the model to map to different kinds of security implementations.&lt;br /&gt;
&lt;br /&gt;
==Rules==&lt;br /&gt;
A rule represents a mechanism for enforcing security constraints on certain actions or resources.  A rule can have certain parameters associated with it, which would have relationships with the parameters of relevant actions.  For example, an action that has to do with reading the file system may have parameters describing what set of files is to be read by the currently running code.  An associated rule for Permissions in Java may use these parameters to describe a particular instantiation of a FilePermission object with parameters like &amp;quot;/directory/specified/*&amp;quot; and &amp;quot;read&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Permissions==&lt;br /&gt;
This project is concerned in particular with the Java security system, so understanding how the mechanism of Permissions work is important.  Permissions can be interpreted as a kind of rule that fits into the resource-action model, allowing the model to directly relate to Java security.&lt;br /&gt;
&lt;br /&gt;
Permissions have a low-level representation based on the classes they originate from, such as:&lt;br /&gt;
*java.io.FilePermission&lt;br /&gt;
*java.net.SocketPermission&lt;br /&gt;
*java.util.PropertyPermission&lt;br /&gt;
*java.lang.RuntimePermission&lt;br /&gt;
*java.awt.AWTPermission&lt;br /&gt;
*java.net.NetPermission&lt;br /&gt;
*java.lang.ReflectPermission&lt;br /&gt;
*and others&lt;br /&gt;
&lt;br /&gt;
Some permission classes cover multiple resources and many actions.  Some actions have multiple specific permission rules required.&lt;br /&gt;
&lt;br /&gt;
==Mapping from Resources to Rules and Back==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some sort of description of the relationship between a resource with its actions and rules would be developed.  Important things to explain in this model include:&lt;br /&gt;
*A description of the resource and all its actions&lt;br /&gt;
*What rules relate to the resource's actions, and what parameters will cause these actions to be allowed or denied&lt;br /&gt;
*What actions of this resource will be allowed implicitly as a result of other actions, which are not necessarily associated with this resource, to be allowed&lt;br /&gt;
&lt;br /&gt;
Given a set of resource requirements, we should be able to generate a rule set (and a permission set, in the case of using permission rules).  Given a rule set, we should be able to do reverse lookups to find the resource grant implications.&lt;br /&gt;
&lt;br /&gt;
===Resource to Rule Data Model===&lt;br /&gt;
The current resource model follows.  Goals of the model were to be easy to traverse, and simple to represent in a text file, such as XML, allowing us to extend the model to other permission classes, such as those that are application specific.&lt;br /&gt;
&lt;br /&gt;
*'''Resource''' - Top level container for a Resource (one for each resource present)&lt;br /&gt;
**'''Description''' - A human readable description of what the resource is (one for each resource present)&lt;br /&gt;
**'''Actions''' - A container for all the actions a resource has (one for each resource present)&lt;br /&gt;
***'''Action''' - Container for information about a specific action (many for each resource present)&lt;br /&gt;
****'''Description''' - A human readable description of what the action is (one for each action present)&lt;br /&gt;
****'''Action Parameters''' - A container for parameters to actions&lt;br /&gt;
*****'''Action Parameter''' - An Action can be parameterized in certain ways (for example, a read action in the file system may have an associated directory or filename)&lt;br /&gt;
****'''Rules to Apply''' - A container of rules to apply to allow this action (one for each action present)&lt;br /&gt;
*****'''Applied Rule''' - A description of a security rule requirement for this action and parameters (many for each rule container)&lt;br /&gt;
*'''Rule''' - Top level container for a Rule (one for each Rule present)&lt;br /&gt;
**'''Description''' - A human readable description of what the permission is (one for each permission present)&lt;br /&gt;
**'''Type''' - The type of the rule.  For instance, in the Java security standard, the type is Permission.&lt;br /&gt;
**'''Name''' - The name of the rule.  This is a unique identifier within each rule type.&lt;br /&gt;
**'''Field''' - A place to specify additional information about the rule.  For example, with Permissions, this is where the class name of the particular permission is stored&lt;br /&gt;
**'''Parameters''' - A container for parameters to specify the rule&lt;br /&gt;
***'''Parameter''' - A description of the parameter (many per parameters container)&lt;br /&gt;
****'''Description''' - A human readable description of what the parameter is (one for each parameter present)&lt;br /&gt;
****'''Type''' - The type of the parameter&lt;br /&gt;
&lt;br /&gt;
==Fitting Developer Specified Resources Together with Permission Requirement Analysis==&lt;br /&gt;
This resource requirement model fits in nicely with the idea of &amp;quot;Management Level Policy Requirements&amp;quot;, and can use the same classes for its representation.  Using this representation also allows us to compare the permission set caused by developer suggested resources to our own analysis of permission requirements.  We would be able to detect unused permissions and missing grants, as well as overly vague grants.&lt;br /&gt;
&lt;br /&gt;
==Model Implementation==&lt;br /&gt;
===XML Description===&lt;br /&gt;
The permission and resource mapping is persisted in an XML file. (more description to come)&lt;br /&gt;
&lt;br /&gt;
===Java Classes===&lt;br /&gt;
&lt;br /&gt;
[[Image:ResourceModel.png|frame|Resource Model]]&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Main&amp;diff=1990</id>
		<title>MQP:Main</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Main&amp;diff=1990"/>
				<updated>2008-09-26T17:26:21Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project will attempt to devise a method for determining the appropriate permission set for an application written in Java and create a developer tool implementing the method.&lt;br /&gt;
&lt;br /&gt;
See the [[MQP:Project Overview|Project Overview]] for more.&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
&lt;br /&gt;
==Research Topics==&lt;br /&gt;
*[[MQP:Static Analysis Tools|Static Analysis Tools]]&lt;br /&gt;
**[[MQP:More on Soot|More on Soot]]&lt;br /&gt;
*[[MQP:Java Security|Java Security]]&lt;br /&gt;
&lt;br /&gt;
==Design Topics==&lt;br /&gt;
*[[MQP:Static Analysis Strategies|Static Analysis Strategies]]&lt;br /&gt;
**[[MQP: A Thread Example|A Thread Example]]&lt;br /&gt;
*[[MQP:Security Analysis Data Structure|Security Analysis Data Model]]&lt;br /&gt;
*[[MQP:Introduction to Netbeans Integration|Introduction to Netbeans Integration]]&lt;br /&gt;
*[[MQP:Rule to Resource Mapping|Rule to Resource Mapping]]&lt;br /&gt;
&lt;br /&gt;
==Proofs of Concept==&lt;br /&gt;
*[[MQP:Static Analysis Tool 0.1|Static Analysis Tool 0.1]]&lt;br /&gt;
*[[MQP:Resource Model Proof of Concept 0.1|Resource Model Proof of Concept 0.1]]&lt;br /&gt;
&lt;br /&gt;
==The Team==&lt;br /&gt;
*[[Special:Emailuser/J|James Cialdea]] - WPI Class of 2009&lt;br /&gt;
**Computer Science Major&lt;br /&gt;
**Computer Engineering Minor&lt;br /&gt;
*[[Special:Emailuser/jpolitz|Joe Politz]] - WPI Class of 2009&lt;br /&gt;
**Computer Science Major&lt;br /&gt;
**Mathematics Minor&lt;br /&gt;
*A few WPI Advisors&lt;br /&gt;
*A few Sun Microsystems Project Sponsors&lt;br /&gt;
&lt;br /&gt;
[[Category:MQP]]&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Rule_to_Resource_Mapping&amp;diff=1988</id>
		<title>MQP:Rule to Resource Mapping</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Rule_to_Resource_Mapping&amp;diff=1988"/>
				<updated>2008-09-26T17:25:46Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: MQP:Permission to Resource Mapping moved to MQP:Rule to Resource Mapping: We map to rules now, not permissions.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP-Design]]&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
When developers are building their software, they have a fairly complete knowledge about what protected resources their application will require for certain actions, but may not have a full understanding about how to create a security policy from this data.  In order to simplify the creation of policy, the policy could be defined in the resource and action centric vocabulary that the developer is familiar with, rather than the permission centric vocabulary of Java policy.  The resource requirements the developer specifies could then be mapped into actual permission requirements.&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
There are a number of broadly-defined resource categories that programs could need to access and which need to be secure:&lt;br /&gt;
&lt;br /&gt;
*File system&lt;br /&gt;
*Connection resources (Socket connections, for example)&lt;br /&gt;
*Java security system&lt;br /&gt;
*MBean functionality&lt;br /&gt;
*Java class loaders&lt;br /&gt;
*Media output (AWT graphics and sound)&lt;br /&gt;
*Authentication services&lt;br /&gt;
*Java runtime system management (including properties, environment variables)&lt;br /&gt;
*Java reflection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For each resource, there are actions associated.  For instance:&lt;br /&gt;
*File-system&lt;br /&gt;
**Create, read, write, execute, and delete particular files&lt;br /&gt;
*Connections (socket and other)&lt;br /&gt;
**Listen, accept, and connect&lt;br /&gt;
**Handle cookies and other sensitive data&lt;br /&gt;
*Java system management&lt;br /&gt;
**Read specific properties&lt;br /&gt;
**Set properties&lt;br /&gt;
**Override default behaviors, like System.in/out, default exception handlers, shutdown hooks&lt;br /&gt;
*Media Output&lt;br /&gt;
**Control/monitor/produce AWT events&lt;br /&gt;
**Produce audio output&lt;br /&gt;
**Manipulate default applet behavior&lt;br /&gt;
*Class loaders&lt;br /&gt;
**Create new class loaders&lt;br /&gt;
**Load classes&lt;br /&gt;
**Get class loaders from certain security contexts&lt;br /&gt;
**Dynamically load libraries&lt;br /&gt;
*Java reflection system&lt;br /&gt;
**Access private methods&lt;br /&gt;
**Create reflected objects&lt;br /&gt;
*Java security system&lt;br /&gt;
**Get/set/alter SecurityManager&lt;br /&gt;
**Create AccessControlContexts&lt;br /&gt;
**Get/set/alter current Policies&lt;br /&gt;
**Get/set/alter authorization information from Principals&lt;br /&gt;
*MBean functionality&lt;br /&gt;
**Load classes in an MBean&lt;br /&gt;
**Perform trusted operations with an MBean&lt;br /&gt;
*Authentication Services&lt;br /&gt;
**Delegate authority to another subject&lt;br /&gt;
**Authorize grants to particular subjects&lt;br /&gt;
**Perform user authentication&lt;br /&gt;
&lt;br /&gt;
To perform any of these actions, the application needs to be granted some set of permissions.  They may not be all the same type (for example, permissions to perform actions on the security system can be RuntimePermissions or SecurityPermissions), and may have different parameters depending on the context the action is performed in (the host and port of a socket connection, for instance).  This model allows the specification of high-level capabilities a program needs, to be followed by the mapping of the capable actions into actual Permission grants.&lt;br /&gt;
&lt;br /&gt;
Each resource will have a different model of the actions that can be performed on or with the resource.  This allows a more detailed specification of the capabilities a program needs.  For example, java system management actions could be parameterized with some set of properties that the program will need, and the file system actions can be parameterized with the areas of the file system that are of importance to the program.&lt;br /&gt;
&lt;br /&gt;
==Permissions==&lt;br /&gt;
Permissions have a more low-level representation based on the classes they originate from, such as:&lt;br /&gt;
*java.io.FilePermission&lt;br /&gt;
*java.net.SocketPermission&lt;br /&gt;
*java.util.PropertyPermission&lt;br /&gt;
*java.lang.RuntimePermission&lt;br /&gt;
*java.awt.AWTPermission&lt;br /&gt;
*java.net.NetPermission&lt;br /&gt;
*java.lang.ReflectPermission&lt;br /&gt;
*and others&lt;br /&gt;
&lt;br /&gt;
Some permission classes cover multiple resources and many actions.  Certain combinations of permission grants can result in other permissions being implicitly granted based on logic in the permission check.&lt;br /&gt;
&lt;br /&gt;
==Mapping from Resources to Permissions and Back==&lt;br /&gt;
Some sort of description of the relationship between a resource with its actions and a permission class would be developed.  Important things to explain in this model include:&lt;br /&gt;
*A description of the resource and all its actions&lt;br /&gt;
*What permission class(es) relate to the resource's actions, and what parameters will cause these actions to be allowed or denied&lt;br /&gt;
*What actions of this resource will be allowed implicitly as a result of other actions, which are not necessarily associated with this resource, to be allowed&lt;br /&gt;
&lt;br /&gt;
Given a set of resource requirements, we should be able to generate a permission set.  Given a permission set, we should be able to do reverse lookups to find the resource grant implications, including implicit resource access grants.&lt;br /&gt;
&lt;br /&gt;
===Resource to Rule Data Model===&lt;br /&gt;
The current resource model follows.  Goals of the model were to be easy to traverse, and simple to represent in a text file, such as XML, allowing us to extend the model to other permission classes, such as those that are application specific.&lt;br /&gt;
&lt;br /&gt;
*'''Resource''' - Top level container for a Resource (one for each resource present)&lt;br /&gt;
**'''Description''' - A human readable description of what the resource is (one for each resource present)&lt;br /&gt;
**'''Actions''' - A container for all the actions a resource has (one for each resource present)&lt;br /&gt;
***'''Action''' - Container for information about a specific action (many for each resource present)&lt;br /&gt;
****'''Description''' - A human readable description of what the action is (one for each action present)&lt;br /&gt;
****'''Action Parameters''' - A container for parameters to actions&lt;br /&gt;
*****'''Action Parameter''' - An Action can be parameterized in certain ways (for example, a read action in the file system may have an associated directory or filename)&lt;br /&gt;
****'''Rules to Apply''' - A container of rules to apply to allow this action (one for each action present)&lt;br /&gt;
*****'''Applied Rule''' - A description of a security rule requirement for this action and parameters (many for each rule container)&lt;br /&gt;
*'''Rule''' - Top level container for a Rule (one for each Rule present)&lt;br /&gt;
**'''Description''' - A human readable description of what the permission is (one for each permission present)&lt;br /&gt;
**'''Type''' - The type of the rule.  For instance, in the Java security standard, the type is Permission.&lt;br /&gt;
**'''Name''' - The name of the rule.  This is a unique identifier within each rule type.&lt;br /&gt;
**'''Field''' - A place to specify additional information about the rule.  For example, with Permissions, this is where the class name of the particular permission is stored&lt;br /&gt;
**'''Parameters''' - A container for parameters to specify the rule&lt;br /&gt;
***'''Parameter''' - A description of the parameter (many per parameters container)&lt;br /&gt;
****'''Description''' - A human readable description of what the parameter is (one for each parameter present)&lt;br /&gt;
****'''Type''' - The type of the parameter&lt;br /&gt;
&lt;br /&gt;
==Fitting Developer Specified Resources Together with Permission Requirement Analysis==&lt;br /&gt;
This resource requirement model fits in nicely with the idea of &amp;quot;Management Level Policy Requirements&amp;quot;, and can use the same classes for its representation.  Using this representation also allows us to compare the permission set caused by developer suggested resources to our own analysis of permission requirements.  We would be able to detect unused permissions and missing grants, as well as overly vague grants.&lt;br /&gt;
&lt;br /&gt;
==Model Implementation==&lt;br /&gt;
===XML Description===&lt;br /&gt;
The permission and resource mapping is persisted in an XML file. (more description to come)&lt;br /&gt;
&lt;br /&gt;
===Java Classes===&lt;br /&gt;
&lt;br /&gt;
[[Image:ResourceModel.png|frame|Resource Model]]&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Permission_to_Resource_Mapping&amp;diff=1989</id>
		<title>MQP:Permission to Resource Mapping</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Permission_to_Resource_Mapping&amp;diff=1989"/>
				<updated>2008-09-26T17:25:46Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: MQP:Permission to Resource Mapping moved to MQP:Rule to Resource Mapping: We map to rules now, not permissions.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[MQP:Rule to Resource Mapping]]&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Rule_to_Resource_Mapping&amp;diff=1987</id>
		<title>MQP:Rule to Resource Mapping</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Rule_to_Resource_Mapping&amp;diff=1987"/>
				<updated>2008-09-26T17:21:48Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: /* Resource to Permission Data Model */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP-Design]]&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
When developers are building their software, they have a fairly complete knowledge about what protected resources their application will require for certain actions, but may not have a full understanding about how to create a security policy from this data.  In order to simplify the creation of policy, the policy could be defined in the resource and action centric vocabulary that the developer is familiar with, rather than the permission centric vocabulary of Java policy.  The resource requirements the developer specifies could then be mapped into actual permission requirements.&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
There are a number of broadly-defined resource categories that programs could need to access and which need to be secure:&lt;br /&gt;
&lt;br /&gt;
*File system&lt;br /&gt;
*Connection resources (Socket connections, for example)&lt;br /&gt;
*Java security system&lt;br /&gt;
*MBean functionality&lt;br /&gt;
*Java class loaders&lt;br /&gt;
*Media output (AWT graphics and sound)&lt;br /&gt;
*Authentication services&lt;br /&gt;
*Java runtime system management (including properties, environment variables)&lt;br /&gt;
*Java reflection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For each resource, there are actions associated.  For instance:&lt;br /&gt;
*File-system&lt;br /&gt;
**Create, read, write, execute, and delete particular files&lt;br /&gt;
*Connections (socket and other)&lt;br /&gt;
**Listen, accept, and connect&lt;br /&gt;
**Handle cookies and other sensitive data&lt;br /&gt;
*Java system management&lt;br /&gt;
**Read specific properties&lt;br /&gt;
**Set properties&lt;br /&gt;
**Override default behaviors, like System.in/out, default exception handlers, shutdown hooks&lt;br /&gt;
*Media Output&lt;br /&gt;
**Control/monitor/produce AWT events&lt;br /&gt;
**Produce audio output&lt;br /&gt;
**Manipulate default applet behavior&lt;br /&gt;
*Class loaders&lt;br /&gt;
**Create new class loaders&lt;br /&gt;
**Load classes&lt;br /&gt;
**Get class loaders from certain security contexts&lt;br /&gt;
**Dynamically load libraries&lt;br /&gt;
*Java reflection system&lt;br /&gt;
**Access private methods&lt;br /&gt;
**Create reflected objects&lt;br /&gt;
*Java security system&lt;br /&gt;
**Get/set/alter SecurityManager&lt;br /&gt;
**Create AccessControlContexts&lt;br /&gt;
**Get/set/alter current Policies&lt;br /&gt;
**Get/set/alter authorization information from Principals&lt;br /&gt;
*MBean functionality&lt;br /&gt;
**Load classes in an MBean&lt;br /&gt;
**Perform trusted operations with an MBean&lt;br /&gt;
*Authentication Services&lt;br /&gt;
**Delegate authority to another subject&lt;br /&gt;
**Authorize grants to particular subjects&lt;br /&gt;
**Perform user authentication&lt;br /&gt;
&lt;br /&gt;
To perform any of these actions, the application needs to be granted some set of permissions.  They may not be all the same type (for example, permissions to perform actions on the security system can be RuntimePermissions or SecurityPermissions), and may have different parameters depending on the context the action is performed in (the host and port of a socket connection, for instance).  This model allows the specification of high-level capabilities a program needs, to be followed by the mapping of the capable actions into actual Permission grants.&lt;br /&gt;
&lt;br /&gt;
Each resource will have a different model of the actions that can be performed on or with the resource.  This allows a more detailed specification of the capabilities a program needs.  For example, java system management actions could be parameterized with some set of properties that the program will need, and the file system actions can be parameterized with the areas of the file system that are of importance to the program.&lt;br /&gt;
&lt;br /&gt;
==Permissions==&lt;br /&gt;
Permissions have a more low-level representation based on the classes they originate from, such as:&lt;br /&gt;
*java.io.FilePermission&lt;br /&gt;
*java.net.SocketPermission&lt;br /&gt;
*java.util.PropertyPermission&lt;br /&gt;
*java.lang.RuntimePermission&lt;br /&gt;
*java.awt.AWTPermission&lt;br /&gt;
*java.net.NetPermission&lt;br /&gt;
*java.lang.ReflectPermission&lt;br /&gt;
*and others&lt;br /&gt;
&lt;br /&gt;
Some permission classes cover multiple resources and many actions.  Certain combinations of permission grants can result in other permissions being implicitly granted based on logic in the permission check.&lt;br /&gt;
&lt;br /&gt;
==Mapping from Resources to Permissions and Back==&lt;br /&gt;
Some sort of description of the relationship between a resource with its actions and a permission class would be developed.  Important things to explain in this model include:&lt;br /&gt;
*A description of the resource and all its actions&lt;br /&gt;
*What permission class(es) relate to the resource's actions, and what parameters will cause these actions to be allowed or denied&lt;br /&gt;
*What actions of this resource will be allowed implicitly as a result of other actions, which are not necessarily associated with this resource, to be allowed&lt;br /&gt;
&lt;br /&gt;
Given a set of resource requirements, we should be able to generate a permission set.  Given a permission set, we should be able to do reverse lookups to find the resource grant implications, including implicit resource access grants.&lt;br /&gt;
&lt;br /&gt;
===Resource to Rule Data Model===&lt;br /&gt;
The current resource model follows.  Goals of the model were to be easy to traverse, and simple to represent in a text file, such as XML, allowing us to extend the model to other permission classes, such as those that are application specific.&lt;br /&gt;
&lt;br /&gt;
*'''Resource''' - Top level container for a Resource (one for each resource present)&lt;br /&gt;
**'''Description''' - A human readable description of what the resource is (one for each resource present)&lt;br /&gt;
**'''Actions''' - A container for all the actions a resource has (one for each resource present)&lt;br /&gt;
***'''Action''' - Container for information about a specific action (many for each resource present)&lt;br /&gt;
****'''Description''' - A human readable description of what the action is (one for each action present)&lt;br /&gt;
****'''Action Parameters''' - A container for parameters to actions&lt;br /&gt;
*****'''Action Parameter''' - An Action can be parameterized in certain ways (for example, a read action in the file system may have an associated directory or filename)&lt;br /&gt;
****'''Rules to Apply''' - A container of rules to apply to allow this action (one for each action present)&lt;br /&gt;
*****'''Applied Rule''' - A description of a security rule requirement for this action and parameters (many for each rule container)&lt;br /&gt;
*'''Rule''' - Top level container for a Rule (one for each Rule present)&lt;br /&gt;
**'''Description''' - A human readable description of what the permission is (one for each permission present)&lt;br /&gt;
**'''Type''' - The type of the rule.  For instance, in the Java security standard, the type is Permission.&lt;br /&gt;
**'''Name''' - The name of the rule.  This is a unique identifier within each rule type.&lt;br /&gt;
**'''Field''' - A place to specify additional information about the rule.  For example, with Permissions, this is where the class name of the particular permission is stored&lt;br /&gt;
**'''Parameters''' - A container for parameters to specify the rule&lt;br /&gt;
***'''Parameter''' - A description of the parameter (many per parameters container)&lt;br /&gt;
****'''Description''' - A human readable description of what the parameter is (one for each parameter present)&lt;br /&gt;
****'''Type''' - The type of the parameter&lt;br /&gt;
&lt;br /&gt;
==Fitting Developer Specified Resources Together with Permission Requirement Analysis==&lt;br /&gt;
This resource requirement model fits in nicely with the idea of &amp;quot;Management Level Policy Requirements&amp;quot;, and can use the same classes for its representation.  Using this representation also allows us to compare the permission set caused by developer suggested resources to our own analysis of permission requirements.  We would be able to detect unused permissions and missing grants, as well as overly vague grants.&lt;br /&gt;
&lt;br /&gt;
==Model Implementation==&lt;br /&gt;
===XML Description===&lt;br /&gt;
The permission and resource mapping is persisted in an XML file. (more description to come)&lt;br /&gt;
&lt;br /&gt;
===Java Classes===&lt;br /&gt;
&lt;br /&gt;
[[Image:ResourceModel.png|frame|Resource Model]]&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Resource_Model_Proof_of_Concept_0.1&amp;diff=1986</id>
		<title>MQP:Resource Model Proof of Concept 0.1</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Resource_Model_Proof_of_Concept_0.1&amp;diff=1986"/>
				<updated>2008-09-26T04:18:45Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP-Prototypes]]&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
&lt;br /&gt;
==The Prototype==&lt;br /&gt;
This release demonstrates the structure of the Resource Model and the functionality of the mechanism that populates it.  The release consists of one XML file with the resource definitions and one executable JAR containing the program with source.  The release is available [https://sourceforge.wpi.edu/sf/frs/do/viewRelease/projects.java_security_analysis_tool/frs.resource_model_definition_protot.proof_of_concept_program?_message=1222385766451 here].&lt;br /&gt;
&lt;br /&gt;
==A Simple Walkthrough==&lt;br /&gt;
Save the JAR and XML file in the same directory for ease of execution.  To run the demonstration use the directory the JAR is in as the working directory and run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
java -jar ResourceModelProofOfConcept0-1.jar resourceDefinitionDraft1.xml&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will cause the resource definitions to be loaded, then the resource model structure will be output to standard out.&lt;br /&gt;
&lt;br /&gt;
==Some Explanation of Output==&lt;br /&gt;
The intent of this release is to show that the resource model exists and is functional, and we can show what information can be loaded into the model from an xml file (in this case, resourceDefinitionDraft1).&lt;br /&gt;
&lt;br /&gt;
A sample of the output of a ''Resource'' is shown here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
Socket Connections&lt;br /&gt;
  Actions:&lt;br /&gt;
    SocketAccept&lt;br /&gt;
      ActionParameters:&lt;br /&gt;
        hostname&lt;br /&gt;
        portrange&lt;br /&gt;
      RuleDefinitions:&lt;br /&gt;
        SocketPermission([host:{hostname}:{portrange}] [action:accept] )&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This says that the &amp;quot;resource&amp;quot; in question is Socket Connections, and the current &amp;quot;action&amp;quot; is accepting.  This action has two parameters - hostname and portrange.  This action has a rule defined for it (so far the only security rules we have are for permissions, but the model would allow this to be extended).  The permission rule shown here is for a SocketPermission, and it takes two parameters, called the host and the action.  The &amp;quot;host&amp;quot; element results from applying the two action parameters in the format shown.  The &amp;quot;action&amp;quot; element of the permission rule is directly related to the action in question - it is the string &amp;quot;accept&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The corresponding permission rule, containing the host and action parameters that the action parameters are applied to, looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
SocketPermission&lt;br /&gt;
  Parameters:&lt;br /&gt;
    1: host&lt;br /&gt;
    2: action&lt;br /&gt;
&lt;br /&gt;
			The permission used for Socket connect, accept, listen, and&lt;br /&gt;
			resolve actions. Parameters are host and action.&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Limitations==&lt;br /&gt;
*This version requires a connection to the Internet in order to look up the XML schema.&lt;br /&gt;
*The JAR is enormous.  In order to get it packaged quickly, we included way too much stuff.&lt;br /&gt;
*There are libraries within the JAR that should be stored separately.&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Rule_to_Resource_Mapping&amp;diff=1975</id>
		<title>MQP:Rule to Resource Mapping</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Rule_to_Resource_Mapping&amp;diff=1975"/>
				<updated>2008-09-16T21:01:46Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: /* Resources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP-Design]]&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
When developers are building their software, they have a fairly complete knowledge about what protected resources their application will require for certain actions, but may not have a full understanding about how to create a security policy from this data.  In order to simplify the creation of policy, the policy could be defined in the resource and action centric vocabulary that the developer is familiar with, rather than the permission centric vocabulary of Java policy.  The resource requirements the developer specifies could then be mapped into actual permission requirements.&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
There are a number of broadly-defined resource categories that programs could need to access and which need to be secure:&lt;br /&gt;
&lt;br /&gt;
*File system&lt;br /&gt;
*Connection resources (Socket connections, for example)&lt;br /&gt;
*Java security system&lt;br /&gt;
*MBean functionality&lt;br /&gt;
*Java class loaders&lt;br /&gt;
*Media output (AWT graphics and sound)&lt;br /&gt;
*Authentication services&lt;br /&gt;
*Java runtime system management (including properties, environment variables)&lt;br /&gt;
*Java reflection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For each resource, there are actions associated.  For instance:&lt;br /&gt;
*File-system&lt;br /&gt;
**Create, read, write, execute, and delete particular files&lt;br /&gt;
*Connections (socket and other)&lt;br /&gt;
**Listen, accept, and connect&lt;br /&gt;
**Handle cookies and other sensitive data&lt;br /&gt;
*Java system management&lt;br /&gt;
**Read specific properties&lt;br /&gt;
**Set properties&lt;br /&gt;
**Override default behaviors, like System.in/out, default exception handlers, shutdown hooks&lt;br /&gt;
*Media Output&lt;br /&gt;
**Control/monitor/produce AWT events&lt;br /&gt;
**Produce audio output&lt;br /&gt;
**Manipulate default applet behavior&lt;br /&gt;
*Class loaders&lt;br /&gt;
**Create new class loaders&lt;br /&gt;
**Load classes&lt;br /&gt;
**Get class loaders from certain security contexts&lt;br /&gt;
**Dynamically load libraries&lt;br /&gt;
*Java reflection system&lt;br /&gt;
**Access private methods&lt;br /&gt;
**Create reflected objects&lt;br /&gt;
*Java security system&lt;br /&gt;
**Get/set/alter SecurityManager&lt;br /&gt;
**Create AccessControlContexts&lt;br /&gt;
**Get/set/alter current Policies&lt;br /&gt;
**Get/set/alter authorization information from Principals&lt;br /&gt;
*MBean functionality&lt;br /&gt;
**Load classes in an MBean&lt;br /&gt;
**Perform trusted operations with an MBean&lt;br /&gt;
*Authentication Services&lt;br /&gt;
**Delegate authority to another subject&lt;br /&gt;
**Authorize grants to particular subjects&lt;br /&gt;
**Perform user authentication&lt;br /&gt;
&lt;br /&gt;
To perform any of these actions, the application needs to be granted some set of permissions.  They may not be all the same type (for example, permissions to perform actions on the security system can be RuntimePermissions or SecurityPermissions), and may have different parameters depending on the context the action is performed in (the host and port of a socket connection, for instance).  This model allows the specification of high-level capabilities a program needs, to be followed by the mapping of the capable actions into actual Permission grants.&lt;br /&gt;
&lt;br /&gt;
Each resource will have a different model of the actions that can be performed on or with the resource.  This allows a more detailed specification of the capabilities a program needs.  For example, java system management actions could be parameterized with some set of properties that the program will need, and the file system actions can be parameterized with the areas of the file system that are of importance to the program.&lt;br /&gt;
&lt;br /&gt;
==Permissions==&lt;br /&gt;
Permissions have a more low-level representation based on the classes they originate from, such as:&lt;br /&gt;
*java.io.FilePermission&lt;br /&gt;
*java.net.SocketPermission&lt;br /&gt;
*java.util.PropertyPermission&lt;br /&gt;
*java.lang.RuntimePermission&lt;br /&gt;
*java.awt.AWTPermission&lt;br /&gt;
*java.net.NetPermission&lt;br /&gt;
*java.lang.ReflectPermission&lt;br /&gt;
*and others&lt;br /&gt;
&lt;br /&gt;
Some permission classes cover multiple resources and many actions.  Certain combinations of permission grants can result in other permissions being implicitly granted based on logic in the permission check.&lt;br /&gt;
&lt;br /&gt;
==Mapping from Resources to Permissions and Back==&lt;br /&gt;
Some sort of description of the relationship between a resource with its actions and a permission class would be developed.  Important things to explain in this model include:&lt;br /&gt;
*A description of the resource and all its actions&lt;br /&gt;
*What permission class(es) relate to the resource's actions, and what parameters will cause these actions to be allowed or denied&lt;br /&gt;
*What actions of this resource will be allowed implicitly as a result of other actions, which are not necessarily associated with this resource, to be allowed&lt;br /&gt;
&lt;br /&gt;
Given a set of resource requirements, we should be able to generate a permission set.  Given a permission set, we should be able to do reverse lookups to find the resource grant implications, including implicit resource access grants.&lt;br /&gt;
&lt;br /&gt;
===Resource to Permission Data Model===&lt;br /&gt;
The current resource model follows.  Goals of the model were to be easy to traverse, and simple to represent in a text file, such as XML, allowing us to extend the model to other permission classes, such as those that are application specific.&lt;br /&gt;
&lt;br /&gt;
*'''Resource''' - Top level container for a Resource (one for each resource present)&lt;br /&gt;
**'''Description''' - A human readable description of what the resource is (one for each resource present)&lt;br /&gt;
**'''Actions''' - A container for all the actions a resource has (one for each resource present)&lt;br /&gt;
***'''Action''' - Container for information about a specific action (many for each resource present)&lt;br /&gt;
****'''Description''' - A human readable description of what the action is (one for each action present)&lt;br /&gt;
****'''Parameters''' - A container for parameters to actions&lt;br /&gt;
*****'''Parameter''' - An Action can be parameterized in certain ways (for example, a read action in the file system may have an associated directory or filename)&lt;br /&gt;
****'''Permissions to Grant''' - A container of permission classes and parameters to grant to allow this action (one for each action present)&lt;br /&gt;
*****'''Permission Reference''' - A description of a permission requirement and parameters (many for each permission grant container)&lt;br /&gt;
****'''Implied by''' - Container describing ways to imply this action (one for each action present)&lt;br /&gt;
*****'''Implied''' - A description about a set of actions that would result in this action being implied (many for each action present)&lt;br /&gt;
*'''Permission''' - Top level container for a Permission (one for each permission present)&lt;br /&gt;
**'''Description''' - A human readable description of what the permission is (one for each permission present)&lt;br /&gt;
**'''Fully Qualified Class Name''' - The FQN of the class associated with the permission&lt;br /&gt;
**'''Parameters''' - A container for parameters to create the permission object&lt;br /&gt;
***'''Parameter''' - A description of the parameter (many per parameters container)&lt;br /&gt;
****'''Description''' - A human readable description of what the parameter is (one for each parameter present)&lt;br /&gt;
****'''Type''' - The type of the parameter&lt;br /&gt;
&lt;br /&gt;
==Fitting Developer Specified Resources Together with Permission Requirement Analysis==&lt;br /&gt;
This resource requirement model fits in nicely with the idea of &amp;quot;Management Level Policy Requirements&amp;quot;, and can use the same classes for its representation.  Using this representation also allows us to compare the permission set caused by developer suggested resources to our own analysis of permission requirements.  We would be able to detect unused permissions and missing grants, as well as overly vague grants.&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Rule_to_Resource_Mapping&amp;diff=1974</id>
		<title>MQP:Rule to Resource Mapping</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Rule_to_Resource_Mapping&amp;diff=1974"/>
				<updated>2008-09-16T20:57:53Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: /* Resources */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP-Design]]&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
When developers are building their software, they have a fairly complete knowledge about what protected resources their application will require for certain actions, but may not have a full understanding about how to create a security policy from this data.  In order to simplify the creation of policy, the policy could be defined in the resource and action centric vocabulary that the developer is familiar with, rather than the permission centric vocabulary of Java policy.  The resource requirements the developer specifies could then be mapped into actual permission requirements.&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
There are a number of broadly-defined resource categories that programs could need to access and which need to be secure:&lt;br /&gt;
&lt;br /&gt;
*File system&lt;br /&gt;
*Connection resources (Socket connections, for example)&lt;br /&gt;
*Java security system&lt;br /&gt;
*MBean functionality&lt;br /&gt;
*Java class loaders&lt;br /&gt;
*Media output (AWT graphics and sound)&lt;br /&gt;
*Authentication services&lt;br /&gt;
*Java runtime system management (including properties, environment variables)&lt;br /&gt;
*Java reflection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For each resource, there are actions associated.  For instance:&lt;br /&gt;
*File-system&lt;br /&gt;
**Create, read, write, execute, and delete particular files&lt;br /&gt;
*Connections (socket and other)&lt;br /&gt;
**Listen, accept, and connect&lt;br /&gt;
**Handle cookies and other sensitive data&lt;br /&gt;
*Java system management&lt;br /&gt;
**Read specific properties&lt;br /&gt;
**Set properties&lt;br /&gt;
**Override default behaviors, like System.in/out, default exception handlers, shutdown hooks&lt;br /&gt;
*Media Output&lt;br /&gt;
**Control/monitor/produce AWT events&lt;br /&gt;
**Produce audio output&lt;br /&gt;
**Manipulate default applet behavior&lt;br /&gt;
*Class loaders&lt;br /&gt;
**Create new class loaders&lt;br /&gt;
**Load classes&lt;br /&gt;
**Get class loaders from certain security contexts&lt;br /&gt;
**Dynamically load libraries&lt;br /&gt;
*Java reflection system&lt;br /&gt;
**Access private methods&lt;br /&gt;
**Create reflected objects&lt;br /&gt;
*Java security system&lt;br /&gt;
**Get/set/alter SecurityManager&lt;br /&gt;
**Create AccessControlContexts&lt;br /&gt;
**Get/set/alter current Policies&lt;br /&gt;
**Get/set/alter authorization information from Principals&lt;br /&gt;
*MBean functionality&lt;br /&gt;
**Load classes in an MBean&lt;br /&gt;
**Perform trusted operations with an MBean&lt;br /&gt;
*Authentication Services&lt;br /&gt;
**Delegate authority to another subject&lt;br /&gt;
**Authorize grants to particular subjects&lt;br /&gt;
**Perform user authentication&lt;br /&gt;
&lt;br /&gt;
To perform any of these actions, the application needs to be granted some set of permissions.  They may not be all the same type (for example, permissions to perform actions on the security system can be RuntimePermissions or SecurityPermissions), and may have different parameters depending on the context the action is performed in (the host and port of a socket connection, for instance).  This model allows the specification of high-level capabilities a program needs, to be followed by the mapping of the capable actions into actual Permission grants.&lt;br /&gt;
&lt;br /&gt;
==Permissions==&lt;br /&gt;
Permissions have a more low-level representation based on the classes they originate from, such as:&lt;br /&gt;
*java.io.FilePermission&lt;br /&gt;
*java.net.SocketPermission&lt;br /&gt;
*java.util.PropertyPermission&lt;br /&gt;
*java.lang.RuntimePermission&lt;br /&gt;
*java.awt.AWTPermission&lt;br /&gt;
*java.net.NetPermission&lt;br /&gt;
*java.lang.ReflectPermission&lt;br /&gt;
*and others&lt;br /&gt;
&lt;br /&gt;
Some permission classes cover multiple resources and many actions.  Certain combinations of permission grants can result in other permissions being implicitly granted based on logic in the permission check.&lt;br /&gt;
&lt;br /&gt;
==Mapping from Resources to Permissions and Back==&lt;br /&gt;
Some sort of description of the relationship between a resource with its actions and a permission class would be developed.  Important things to explain in this model include:&lt;br /&gt;
*A description of the resource and all its actions&lt;br /&gt;
*What permission class(es) relate to the resource's actions, and what parameters will cause these actions to be allowed or denied&lt;br /&gt;
*What actions of this resource will be allowed implicitly as a result of other actions, which are not necessarily associated with this resource, to be allowed&lt;br /&gt;
&lt;br /&gt;
Given a set of resource requirements, we should be able to generate a permission set.  Given a permission set, we should be able to do reverse lookups to find the resource grant implications, including implicit resource access grants.&lt;br /&gt;
&lt;br /&gt;
===Resource to Permission Data Model===&lt;br /&gt;
The current resource model follows.  Goals of the model were to be easy to traverse, and simple to represent in a text file, such as XML, allowing us to extend the model to other permission classes, such as those that are application specific.&lt;br /&gt;
&lt;br /&gt;
*'''Resource''' - Top level container for a Resource (one for each resource present)&lt;br /&gt;
**'''Description''' - A human readable description of what the resource is (one for each resource present)&lt;br /&gt;
**'''Actions''' - A container for all the actions a resource has (one for each resource present)&lt;br /&gt;
***'''Action''' - Container for information about a specific action (many for each resource present)&lt;br /&gt;
****'''Description''' - A human readable description of what the action is (one for each action present)&lt;br /&gt;
****'''Parameters''' - A container for parameters to actions&lt;br /&gt;
*****'''Parameter''' - An Action can be parameterized in certain ways (for example, a read action in the file system may have an associated directory or filename)&lt;br /&gt;
****'''Permissions to Grant''' - A container of permission classes and parameters to grant to allow this action (one for each action present)&lt;br /&gt;
*****'''Permission Reference''' - A description of a permission requirement and parameters (many for each permission grant container)&lt;br /&gt;
****'''Implied by''' - Container describing ways to imply this action (one for each action present)&lt;br /&gt;
*****'''Implied''' - A description about a set of actions that would result in this action being implied (many for each action present)&lt;br /&gt;
*'''Permission''' - Top level container for a Permission (one for each permission present)&lt;br /&gt;
**'''Description''' - A human readable description of what the permission is (one for each permission present)&lt;br /&gt;
**'''Fully Qualified Class Name''' - The FQN of the class associated with the permission&lt;br /&gt;
**'''Parameters''' - A container for parameters to create the permission object&lt;br /&gt;
***'''Parameter''' - A description of the parameter (many per parameters container)&lt;br /&gt;
****'''Description''' - A human readable description of what the parameter is (one for each parameter present)&lt;br /&gt;
****'''Type''' - The type of the parameter&lt;br /&gt;
&lt;br /&gt;
==Fitting Developer Specified Resources Together with Permission Requirement Analysis==&lt;br /&gt;
This resource requirement model fits in nicely with the idea of &amp;quot;Management Level Policy Requirements&amp;quot;, and can use the same classes for its representation.  Using this representation also allows us to compare the permission set caused by developer suggested resources to our own analysis of permission requirements.  We would be able to detect unused permissions and missing grants, as well as overly vague grants.&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Rule_to_Resource_Mapping&amp;diff=1973</id>
		<title>MQP:Rule to Resource Mapping</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Rule_to_Resource_Mapping&amp;diff=1973"/>
				<updated>2008-09-16T19:25:11Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: /* Resource to Permission Data Model */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP-Design]]&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
When developers are building their software, they have a fairly complete knowledge about what protected resources their application will require for certain actions, but may not have a full understanding about how to create a security policy from this data.  In order to simplify the creation of policy, the policy could be defined in the resource and action centric vocabulary that the developer is familiar with, rather than the permission centric vocabulary of Java policy.  The resource requirements the developer specifies could then be mapped into actual permission requirements.&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
In Java, there are many resources that can be protected including:&lt;br /&gt;
*The file-system&lt;br /&gt;
*Socket connections&lt;br /&gt;
*Java system properties&lt;br /&gt;
*Graphics output&lt;br /&gt;
*Class loaders&lt;br /&gt;
*Java reflection system&lt;br /&gt;
*Java security system&lt;br /&gt;
&lt;br /&gt;
For each resource, there are actions associated.  For instance:&lt;br /&gt;
*The file-system&lt;br /&gt;
**Read&lt;br /&gt;
**Write&lt;br /&gt;
**Create new&lt;br /&gt;
*Socket connections&lt;br /&gt;
**Listen&lt;br /&gt;
**Accept connection&lt;br /&gt;
**Create connection&lt;br /&gt;
*Java system properties&lt;br /&gt;
**Read specific properties&lt;br /&gt;
*Graphics output&lt;br /&gt;
**?&lt;br /&gt;
*Class loaders&lt;br /&gt;
**Create new class loaders&lt;br /&gt;
**Load classes&lt;br /&gt;
*Java reflection system&lt;br /&gt;
**Access private methods&lt;br /&gt;
**Create reflected objects&lt;br /&gt;
*Java security system&lt;br /&gt;
**Access SecurityManager&lt;br /&gt;
**Replace SecurityManager&lt;br /&gt;
&lt;br /&gt;
==Permissions==&lt;br /&gt;
Permissions have a more low-level representation based on the classes they originate from, such as:&lt;br /&gt;
*java.io.FilePermission&lt;br /&gt;
*java.net.SocketPermission&lt;br /&gt;
*java.util.PropertyPermission&lt;br /&gt;
*java.lang.RuntimePermission&lt;br /&gt;
*java.awt.AWTPermission&lt;br /&gt;
*java.net.NetPermission&lt;br /&gt;
*java.lang.ReflectPermission&lt;br /&gt;
*and others&lt;br /&gt;
&lt;br /&gt;
Some permission classes cover multiple resources and many actions.  Certain combinations of permission grants can result in other permissions being implicitly granted based on logic in the permission check.&lt;br /&gt;
&lt;br /&gt;
==Mapping from Resources to Permissions and Back==&lt;br /&gt;
Some sort of description of the relationship between a resource with its actions and a permission class would be developed.  Important things to explain in this model include:&lt;br /&gt;
*A description of the resource and all its actions&lt;br /&gt;
*What permission class(es) relate to the resource's actions, and what parameters will cause these actions to be allowed or denied&lt;br /&gt;
*What actions of this resource will be allowed implicitly as a result of other actions, which are not necessarily associated with this resource, to be allowed&lt;br /&gt;
&lt;br /&gt;
Given a set of resource requirements, we should be able to generate a permission set.  Given a permission set, we should be able to do reverse lookups to find the resource grant implications, including implicit resource access grants.&lt;br /&gt;
&lt;br /&gt;
===Resource to Permission Data Model===&lt;br /&gt;
The current resource model follows.  Goals of the model were to be easy to traverse, and simple to represent in a text file, such as XML, allowing us to extend the model to other permission classes, such as those that are application specific.&lt;br /&gt;
&lt;br /&gt;
*'''Resource''' - Top level container for a Resource (one for each resource present)&lt;br /&gt;
**'''Description''' - A human readable description of what the resource is (one for each resource present)&lt;br /&gt;
**'''Actions''' - A container for all the actions a resource has (one for each resource present)&lt;br /&gt;
***'''Action''' - Container for information about a specific action (many for each resource present)&lt;br /&gt;
****'''Description''' - A human readable description of what the action is (one for each action present)&lt;br /&gt;
****'''Parameters''' - A container for parameters to actions&lt;br /&gt;
*****'''Parameter''' - An Action can be parameterized in certain ways (for example, a read action in the file system may have an associated directory or filename)&lt;br /&gt;
****'''Permissions to Grant''' - A container of permission classes and parameters to grant to allow this action (one for each action present)&lt;br /&gt;
*****'''Permission Reference''' - A description of a permission requirement and parameters (many for each permission grant container)&lt;br /&gt;
****'''Implied by''' - Container describing ways to imply this action (one for each action present)&lt;br /&gt;
*****'''Implied''' - A description about a set of actions that would result in this action being implied (many for each action present)&lt;br /&gt;
*'''Permission''' - Top level container for a Permission (one for each permission present)&lt;br /&gt;
**'''Description''' - A human readable description of what the permission is (one for each permission present)&lt;br /&gt;
**'''Fully Qualified Class Name''' - The FQN of the class associated with the permission&lt;br /&gt;
**'''Parameters''' - A container for parameters to create the permission object&lt;br /&gt;
***'''Parameter''' - A description of the parameter (many per parameters container)&lt;br /&gt;
****'''Description''' - A human readable description of what the parameter is (one for each parameter present)&lt;br /&gt;
****'''Type''' - The type of the parameter&lt;br /&gt;
&lt;br /&gt;
==Fitting Developer Specified Resources Together with Permission Requirement Analysis==&lt;br /&gt;
This resource requirement model fits in nicely with the idea of &amp;quot;Management Level Policy Requirements&amp;quot;, and can use the same classes for its representation.  Using this representation also allows us to compare the permission set caused by developer suggested resources to our own analysis of permission requirements.  We would be able to detect unused permissions and missing grants, as well as overly vague grants.&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Rule_to_Resource_Mapping&amp;diff=1972</id>
		<title>MQP:Rule to Resource Mapping</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Rule_to_Resource_Mapping&amp;diff=1972"/>
				<updated>2008-09-16T19:24:05Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: /* Resource to Permission Data Model */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP-Design]]&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
When developers are building their software, they have a fairly complete knowledge about what protected resources their application will require for certain actions, but may not have a full understanding about how to create a security policy from this data.  In order to simplify the creation of policy, the policy could be defined in the resource and action centric vocabulary that the developer is familiar with, rather than the permission centric vocabulary of Java policy.  The resource requirements the developer specifies could then be mapped into actual permission requirements.&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
In Java, there are many resources that can be protected including:&lt;br /&gt;
*The file-system&lt;br /&gt;
*Socket connections&lt;br /&gt;
*Java system properties&lt;br /&gt;
*Graphics output&lt;br /&gt;
*Class loaders&lt;br /&gt;
*Java reflection system&lt;br /&gt;
*Java security system&lt;br /&gt;
&lt;br /&gt;
For each resource, there are actions associated.  For instance:&lt;br /&gt;
*The file-system&lt;br /&gt;
**Read&lt;br /&gt;
**Write&lt;br /&gt;
**Create new&lt;br /&gt;
*Socket connections&lt;br /&gt;
**Listen&lt;br /&gt;
**Accept connection&lt;br /&gt;
**Create connection&lt;br /&gt;
*Java system properties&lt;br /&gt;
**Read specific properties&lt;br /&gt;
*Graphics output&lt;br /&gt;
**?&lt;br /&gt;
*Class loaders&lt;br /&gt;
**Create new class loaders&lt;br /&gt;
**Load classes&lt;br /&gt;
*Java reflection system&lt;br /&gt;
**Access private methods&lt;br /&gt;
**Create reflected objects&lt;br /&gt;
*Java security system&lt;br /&gt;
**Access SecurityManager&lt;br /&gt;
**Replace SecurityManager&lt;br /&gt;
&lt;br /&gt;
==Permissions==&lt;br /&gt;
Permissions have a more low-level representation based on the classes they originate from, such as:&lt;br /&gt;
*java.io.FilePermission&lt;br /&gt;
*java.net.SocketPermission&lt;br /&gt;
*java.util.PropertyPermission&lt;br /&gt;
*java.lang.RuntimePermission&lt;br /&gt;
*java.awt.AWTPermission&lt;br /&gt;
*java.net.NetPermission&lt;br /&gt;
*java.lang.ReflectPermission&lt;br /&gt;
*and others&lt;br /&gt;
&lt;br /&gt;
Some permission classes cover multiple resources and many actions.  Certain combinations of permission grants can result in other permissions being implicitly granted based on logic in the permission check.&lt;br /&gt;
&lt;br /&gt;
==Mapping from Resources to Permissions and Back==&lt;br /&gt;
Some sort of description of the relationship between a resource with its actions and a permission class would be developed.  Important things to explain in this model include:&lt;br /&gt;
*A description of the resource and all its actions&lt;br /&gt;
*What permission class(es) relate to the resource's actions, and what parameters will cause these actions to be allowed or denied&lt;br /&gt;
*What actions of this resource will be allowed implicitly as a result of other actions, which are not necessarily associated with this resource, to be allowed&lt;br /&gt;
&lt;br /&gt;
Given a set of resource requirements, we should be able to generate a permission set.  Given a permission set, we should be able to do reverse lookups to find the resource grant implications, including implicit resource access grants.&lt;br /&gt;
&lt;br /&gt;
===Resource to Permission Data Model===&lt;br /&gt;
A very hierarchical structure will be best.  It will be easy to traverse, and simple to represent in a text file, such as XML, allowing us to extend the model to other permission classes, such as those that are application specific.&lt;br /&gt;
&lt;br /&gt;
*'''Resource''' - Top level container for a Resource (one for each resource present)&lt;br /&gt;
**'''Description''' - A human readable description of what the resource is (one for each resource present)&lt;br /&gt;
**'''Actions''' - A container for all the actions a resource has (one for each resource present)&lt;br /&gt;
***'''Action''' - Container for information about a specific action (many for each resource present)&lt;br /&gt;
****'''Description''' - A human readable description of what the action is (one for each action present)&lt;br /&gt;
****'''Parameters''' - A container for parameters to actions&lt;br /&gt;
*****'''Parameter''' - An Action can be parameterized in certain ways (for example, a read action in the file system may have an associated directory or filename)&lt;br /&gt;
****'''Permissions to Grant''' - A container of permission classes and parameters to grant to allow this action (one for each action present)&lt;br /&gt;
*****'''Permission Reference''' - A description of a permission requirement and parameters (many for each permission grant container)&lt;br /&gt;
****'''Implied by''' - Container describing ways to imply this action (one for each action present)&lt;br /&gt;
*****'''Implied''' - A description about a set of actions that would result in this action being implied (many for each action present)&lt;br /&gt;
*'''Permission''' - Top level container for a Permission (one for each permission present)&lt;br /&gt;
**'''Description''' - A human readable description of what the permission is (one for each permission present)&lt;br /&gt;
**'''Fully Qualified Class Name''' - The FQN of the class associated with the permission&lt;br /&gt;
**'''Parameters''' - A container for parameters to create the permission object&lt;br /&gt;
***'''Parameter''' - A description of the parameter (many per parameters container)&lt;br /&gt;
****'''Description''' - A human readable description of what the parameter is (one for each parameter present)&lt;br /&gt;
****'''Type''' - The type of the parameter&lt;br /&gt;
&lt;br /&gt;
==Fitting Developer Specified Resources Together with Permission Requirement Analysis==&lt;br /&gt;
This resource requirement model fits in nicely with the idea of &amp;quot;Management Level Policy Requirements&amp;quot;, and can use the same classes for its representation.  Using this representation also allows us to compare the permission set caused by developer suggested resources to our own analysis of permission requirements.  We would be able to detect unused permissions and missing grants, as well as overly vague grants.&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:A_Thread_Example&amp;diff=1971</id>
		<title>MQP:A Thread Example</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:A_Thread_Example&amp;diff=1971"/>
				<updated>2008-09-15T20:45:11Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MQP:Navbar}}&lt;br /&gt;
&lt;br /&gt;
==Analyzing Calls to Thread.start()==&lt;br /&gt;
&lt;br /&gt;
This section describes how Koved's method for handling Thread.run() invocations in security call graphs can apply to different subclasses of Thread.&lt;br /&gt;
&lt;br /&gt;
Analyzing security information about permissions required when Thread.start() is called is a bit different from a normal method invocation.  The start() method is being invoked on some Thread object, or an object that is a subclass of Thread, and this object may not have been created in the current security context.  The run() method specified by the object (whether the run() method is actually overridden or through use of a Runnable passed to the Thread constructor) represents code that should be executed in the context of that created the Thread, not the context that calls Thread.start().&lt;br /&gt;
&lt;br /&gt;
For this reason, it is not appropriate to traverse normally back through Thread.run() to the method that invoked Thread.start().  Instead, the correct behavior is to traverse back to the constructor of the type of Thread in question, which will in turn lead to each method that instantiated a Thread of that type.&lt;br /&gt;
&lt;br /&gt;
In the following diagram, we model the behavior of a program that is creating two different types of Threads, a MyThread and a WorkerThread.  The dotted lines represent implicit calls to Thread.run() through Thread.start(), which is not shown (this is the way that Soot models this type of call in its call graph, and is convenient for our purposes).  The nodes that are red require the permission from MyThread.run(), the nodes that are blue require the permission from WorkerThread.run().  The purple node requires both types of permissions, since it instantiated both types of Thread.  The red and blue edges represent the new edges that would be traversed in the call graph as a result of using this method.  The black nodes require no additional permissions from the calls to the run() methods.&lt;br /&gt;
&lt;br /&gt;
[[Image:ThreadExampleNoStart.png|frame|center|Thread Example]]&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Strategies&amp;diff=1970</id>
		<title>MQP:Static Analysis Strategies</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Strategies&amp;diff=1970"/>
				<updated>2008-09-15T20:43:48Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: /* Current Work */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP-Design]]&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
This page summarizes some of our discussions on strategies for performing static analysis to infer permissions.&lt;br /&gt;
&lt;br /&gt;
==Goals==&lt;br /&gt;
&lt;br /&gt;
The best tool that we envision would be able to infer the permissions required at each program point.  Showing this level of detail would give a developer the best chance to understand the security requirements of code.  With this analysis, it would be simple to accomplish our more baseline objective, that of inferring the permissions required by an application at each method and class.  This would be the minimum required to create a policy file that granted the needed permissions to the code.  From either analysis, we would need to store the security data in an intermediate format to easily inform a dynamic or run time analysis at a later time.  This format could also aid in the construction of policy files for the application.&lt;br /&gt;
&lt;br /&gt;
==Baseline Analysis==&lt;br /&gt;
&lt;br /&gt;
The methods we are considering for the baseline analysis are based on using graph searching algorithms on a call graph of the application.  The general strategy is to find the points where checkPermission is called in the program, and traverse the graph against the direction of method invocation.  That is, each method that could call the method containing the checkPermission call would be traversed.  At each of these points, the method would be marked as requiring that permission and then all methods that invoke it would be recursively traverse in the same fashion.&lt;br /&gt;
&lt;br /&gt;
There are a few special cases and stopping conditions for this algorithm.  First, if a node (method) is reached in the graph and it is already marked with the set of permissions that need to be added, the current branch of the graph traversal can stop.  Second, the doPrivileged() operator is a stopping condition as well, as it indicates that the code it annotates is responsible for encapsulating the current security context.  Third, when a Thread object is passed to a different context, it needs to reflect that the context constructing the Thread requires the current set of permissions.  These are general descriptions of the strategies and need to be formalized more.  They are also based on some observations from Larry Koved's [http://www.research.ibm.com/javasec/OOPSLA2002preprint.pdf paper].&lt;br /&gt;
&lt;br /&gt;
==Deep Analysis==&lt;br /&gt;
&lt;br /&gt;
The deep analysis would provide a more detailed view of the permissions required by inferring the permissions at each program point.  For example, it may be possible to show that a certain permission will be required only if a certain branch of an if statement is taken.  This would normally not affect the policy file or permissions required by the application, as it is assumed that both branches of the if statement would execute at some point.  However, this could be quite a useful tool for developers, who would be able to see what parts of their code they could move or edit to better encapsulate or understand the security requirements of a program.&lt;br /&gt;
&lt;br /&gt;
To do this, the analysis would follow a similar pattern as the baseline analysis, with the exception of looking at special code blocks or groups of statements, like if-else blocks.  Where there is a branching operation, the different blocks could be marked as needing different sets of permissions.  While the method containing these blocks would still require all of the permissions contained within, it would be possible to see which parts of the method use the required permissions.&lt;br /&gt;
&lt;br /&gt;
==Special Cases==&lt;br /&gt;
&lt;br /&gt;
# A full example handling of the Thread.start() case is available [[MQP:A Thread Example|here]]&lt;br /&gt;
# For calls to doPrivileged, the graph traversal simply terminates at nodes that have a edge from the doPrivileged method entering into them.&lt;br /&gt;
# Some applications have methods that anticipate SecurityExceptions being thrown, and so may not actually require the grant for the Permission object that is passed to a checkPermission call.  This case is similar to the doPrivileged case, since the graph traversal does not need to continue past the method that caught the SecurityException, except in the case where there are transitive calls to checkPermission in the catch block, which need to be handled separately.&lt;br /&gt;
&lt;br /&gt;
==Locating Arguments Passed to Permission Constructors==&lt;br /&gt;
&lt;br /&gt;
Once the program point that calls SecurityManager.checkPermission is found, it is simple to extract the expression that is passed as the Permission argument to the method.  From this program point, the list of statements in the body of the method is traversed backwards to find an instance of the constructor call to the relevant Permission type, or assignment statements to the variable passed to checkPermission.  This analysis only considers the method that called checkPermission, which is a simplifying assumption.  If the constructor is found, then the expressions passed to the constructor can be extracted, and a similar traversal can be performed on these expressions to find their initialization.  The difference in this case is that these expressions (almost always String objects), are often declared as static fields, so the static initializers of the relevant methods are also inspected to find definitions of static fields.  This analysis is sufficient for many simple cases, but misses many others, most commonly when the expressions passed to the Permission constructor come into the method as parameters and their runtime values are more difficult (or impossible) to determine.&lt;br /&gt;
&lt;br /&gt;
Much of the simplicity of this traversal is due to the intermediate format Jimple from Soot, which simplifies compound expressions in Java statements.  This creates a number of extra, temporary local variables, which makes the each relevant program point into either an assignment statement or a method invocation.  At the moment, this analysis does not take into account branching in the control flow of the method, which could lead to finding multiple possible values for each argument.  In this case, it would be necessary to report all possible values that could be found, leading to a more complicated result set.&lt;br /&gt;
&lt;br /&gt;
==Current Work==&lt;br /&gt;
&lt;br /&gt;
At the moment, we have completed the basic structure of the baseline analysis algorithm.  Using the CallGraph created in the Soot analysis, we can find which methods call checkPermissions.  Then we can traverse the call graph and accumulate the Permissions in the methods that can reach the permission-requiring methods.  The result is a collection of Permissions needed by each method annotated by which method the Permission was originally checked in.  This information has been integrated with the data structures for the analysis model to provide an organized way to represent the results in the eventual application.&lt;br /&gt;
&lt;br /&gt;
Some issues that exist currently and may be worked out as the project progresses are:&lt;br /&gt;
# The call graph is large for several reasons, the most prominent of which is the difficulty of resolving virtual method calls.  This leads to a overly conservative analysis.&lt;br /&gt;
# The analysis to find the fields of Permission objects is limited, which makes the results less valuable in some cases.&lt;br /&gt;
# The fields of Permission objects need to be further analyzed in many cases to resolve into grants in a policy file, for example parsing the String objects in a SocketPermission to find the actual socket or range of sockets in question.&lt;br /&gt;
&lt;br /&gt;
==More?==&lt;br /&gt;
&lt;br /&gt;
As the project continues, we may continue to consider different types of analysis with further goals in mind.&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Strategies&amp;diff=1969</id>
		<title>MQP:Static Analysis Strategies</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Strategies&amp;diff=1969"/>
				<updated>2008-09-15T20:39:20Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: /* Location Arguments Passed to Permission Constructors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP-Design]]&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
This page summarizes some of our discussions on strategies for performing static analysis to infer permissions.&lt;br /&gt;
&lt;br /&gt;
==Goals==&lt;br /&gt;
&lt;br /&gt;
The best tool that we envision would be able to infer the permissions required at each program point.  Showing this level of detail would give a developer the best chance to understand the security requirements of code.  With this analysis, it would be simple to accomplish our more baseline objective, that of inferring the permissions required by an application at each method and class.  This would be the minimum required to create a policy file that granted the needed permissions to the code.  From either analysis, we would need to store the security data in an intermediate format to easily inform a dynamic or run time analysis at a later time.  This format could also aid in the construction of policy files for the application.&lt;br /&gt;
&lt;br /&gt;
==Baseline Analysis==&lt;br /&gt;
&lt;br /&gt;
The methods we are considering for the baseline analysis are based on using graph searching algorithms on a call graph of the application.  The general strategy is to find the points where checkPermission is called in the program, and traverse the graph against the direction of method invocation.  That is, each method that could call the method containing the checkPermission call would be traversed.  At each of these points, the method would be marked as requiring that permission and then all methods that invoke it would be recursively traverse in the same fashion.&lt;br /&gt;
&lt;br /&gt;
There are a few special cases and stopping conditions for this algorithm.  First, if a node (method) is reached in the graph and it is already marked with the set of permissions that need to be added, the current branch of the graph traversal can stop.  Second, the doPrivileged() operator is a stopping condition as well, as it indicates that the code it annotates is responsible for encapsulating the current security context.  Third, when a Thread object is passed to a different context, it needs to reflect that the context constructing the Thread requires the current set of permissions.  These are general descriptions of the strategies and need to be formalized more.  They are also based on some observations from Larry Koved's [http://www.research.ibm.com/javasec/OOPSLA2002preprint.pdf paper].&lt;br /&gt;
&lt;br /&gt;
==Deep Analysis==&lt;br /&gt;
&lt;br /&gt;
The deep analysis would provide a more detailed view of the permissions required by inferring the permissions at each program point.  For example, it may be possible to show that a certain permission will be required only if a certain branch of an if statement is taken.  This would normally not affect the policy file or permissions required by the application, as it is assumed that both branches of the if statement would execute at some point.  However, this could be quite a useful tool for developers, who would be able to see what parts of their code they could move or edit to better encapsulate or understand the security requirements of a program.&lt;br /&gt;
&lt;br /&gt;
To do this, the analysis would follow a similar pattern as the baseline analysis, with the exception of looking at special code blocks or groups of statements, like if-else blocks.  Where there is a branching operation, the different blocks could be marked as needing different sets of permissions.  While the method containing these blocks would still require all of the permissions contained within, it would be possible to see which parts of the method use the required permissions.&lt;br /&gt;
&lt;br /&gt;
==Special Cases==&lt;br /&gt;
&lt;br /&gt;
# A full example handling of the Thread.start() case is available [[MQP:A Thread Example|here]]&lt;br /&gt;
# For calls to doPrivileged, the graph traversal simply terminates at nodes that have a edge from the doPrivileged method entering into them.&lt;br /&gt;
# Some applications have methods that anticipate SecurityExceptions being thrown, and so may not actually require the grant for the Permission object that is passed to a checkPermission call.  This case is similar to the doPrivileged case, since the graph traversal does not need to continue past the method that caught the SecurityException, except in the case where there are transitive calls to checkPermission in the catch block, which need to be handled separately.&lt;br /&gt;
&lt;br /&gt;
==Locating Arguments Passed to Permission Constructors==&lt;br /&gt;
&lt;br /&gt;
Once the program point that calls SecurityManager.checkPermission is found, it is simple to extract the expression that is passed as the Permission argument to the method.  From this program point, the list of statements in the body of the method is traversed backwards to find an instance of the constructor call to the relevant Permission type, or assignment statements to the variable passed to checkPermission.  This analysis only considers the method that called checkPermission, which is a simplifying assumption.  If the constructor is found, then the expressions passed to the constructor can be extracted, and a similar traversal can be performed on these expressions to find their initialization.  The difference in this case is that these expressions (almost always String objects), are often declared as static fields, so the static initializers of the relevant methods are also inspected to find definitions of static fields.  This analysis is sufficient for many simple cases, but misses many others, most commonly when the expressions passed to the Permission constructor come into the method as parameters and their runtime values are more difficult (or impossible) to determine.&lt;br /&gt;
&lt;br /&gt;
Much of the simplicity of this traversal is due to the intermediate format Jimple from Soot, which simplifies compound expressions in Java statements.  This creates a number of extra, temporary local variables, which makes the each relevant program point into either an assignment statement or a method invocation.  At the moment, this analysis does not take into account branching in the control flow of the method, which could lead to finding multiple possible values for each argument.  In this case, it would be necessary to report all possible values that could be found, leading to a more complicated result set.&lt;br /&gt;
&lt;br /&gt;
==Current Work==&lt;br /&gt;
&lt;br /&gt;
At the moment, we have completed the basic structure of the baseline analysis algorithm.  Using the CallGraph created in the Soot analysis, we can find which methods call checkPermissions.  Then we can traverse the call graph and accumulate the Permissions in the methods that can reach the permission-requiring methods.  The result is a collection of Permissions needed by each method annotated by which method the Permission was originally checked in.  This information has been integrated with the data structures for the analysis model to provide an organized way to represent the results in the eventual application.&lt;br /&gt;
&lt;br /&gt;
Next, we will try to find ways to identify the arguments passed to the Permission objects themselves, to better describe the Permissions needed at the top level.  After that we will need to take into consideration the special cases mentioned in the baseline analysis, including doPrivileged, Threads, and Exceptions.&lt;br /&gt;
&lt;br /&gt;
==More?==&lt;br /&gt;
&lt;br /&gt;
As the project continues, we may continue to consider different types of analysis with further goals in mind.&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Strategies&amp;diff=1968</id>
		<title>MQP:Static Analysis Strategies</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Strategies&amp;diff=1968"/>
				<updated>2008-09-15T20:34:00Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP-Design]]&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
This page summarizes some of our discussions on strategies for performing static analysis to infer permissions.&lt;br /&gt;
&lt;br /&gt;
==Goals==&lt;br /&gt;
&lt;br /&gt;
The best tool that we envision would be able to infer the permissions required at each program point.  Showing this level of detail would give a developer the best chance to understand the security requirements of code.  With this analysis, it would be simple to accomplish our more baseline objective, that of inferring the permissions required by an application at each method and class.  This would be the minimum required to create a policy file that granted the needed permissions to the code.  From either analysis, we would need to store the security data in an intermediate format to easily inform a dynamic or run time analysis at a later time.  This format could also aid in the construction of policy files for the application.&lt;br /&gt;
&lt;br /&gt;
==Baseline Analysis==&lt;br /&gt;
&lt;br /&gt;
The methods we are considering for the baseline analysis are based on using graph searching algorithms on a call graph of the application.  The general strategy is to find the points where checkPermission is called in the program, and traverse the graph against the direction of method invocation.  That is, each method that could call the method containing the checkPermission call would be traversed.  At each of these points, the method would be marked as requiring that permission and then all methods that invoke it would be recursively traverse in the same fashion.&lt;br /&gt;
&lt;br /&gt;
There are a few special cases and stopping conditions for this algorithm.  First, if a node (method) is reached in the graph and it is already marked with the set of permissions that need to be added, the current branch of the graph traversal can stop.  Second, the doPrivileged() operator is a stopping condition as well, as it indicates that the code it annotates is responsible for encapsulating the current security context.  Third, when a Thread object is passed to a different context, it needs to reflect that the context constructing the Thread requires the current set of permissions.  These are general descriptions of the strategies and need to be formalized more.  They are also based on some observations from Larry Koved's [http://www.research.ibm.com/javasec/OOPSLA2002preprint.pdf paper].&lt;br /&gt;
&lt;br /&gt;
==Deep Analysis==&lt;br /&gt;
&lt;br /&gt;
The deep analysis would provide a more detailed view of the permissions required by inferring the permissions at each program point.  For example, it may be possible to show that a certain permission will be required only if a certain branch of an if statement is taken.  This would normally not affect the policy file or permissions required by the application, as it is assumed that both branches of the if statement would execute at some point.  However, this could be quite a useful tool for developers, who would be able to see what parts of their code they could move or edit to better encapsulate or understand the security requirements of a program.&lt;br /&gt;
&lt;br /&gt;
To do this, the analysis would follow a similar pattern as the baseline analysis, with the exception of looking at special code blocks or groups of statements, like if-else blocks.  Where there is a branching operation, the different blocks could be marked as needing different sets of permissions.  While the method containing these blocks would still require all of the permissions contained within, it would be possible to see which parts of the method use the required permissions.&lt;br /&gt;
&lt;br /&gt;
==Special Cases==&lt;br /&gt;
&lt;br /&gt;
# A full example handling of the Thread.start() case is available [[MQP:A Thread Example|here]]&lt;br /&gt;
# For calls to doPrivileged, the graph traversal simply terminates at nodes that have a edge from the doPrivileged method entering into them.&lt;br /&gt;
# Some applications have methods that anticipate SecurityExceptions being thrown, and so may not actually require the grant for the Permission object that is passed to a checkPermission call.  This case is similar to the doPrivileged case, since the graph traversal does not need to continue past the method that caught the SecurityException, except in the case where there are transitive calls to checkPermission in the catch block, which need to be handled separately.&lt;br /&gt;
&lt;br /&gt;
==Location Arguments Passed to Permission Constructors==&lt;br /&gt;
&lt;br /&gt;
Once the program point that calls SecurityManager.checkPermission is found, it is simple to extract the expression that is passed as the Permission argument to the method.  From this program point, the list of statements in the body of the method is traversed backwards to find an instance of this expression having &amp;lt;init&amp;gt; called on it, or being assigned to another variable or field.  This analysis only considers the method that called checkPermission, which is a simplifying assumption.  If the constructor is found, then the expressions passed to the constructor can be extracted, and a similar traversal can be performed on these expressions to find their initialization.  The difference in this case is that these expressions (almost always String objects), are often declared as static fields, so the static initializers of the relevant methods are also inspected to find definitions of static fields.  This analysis is sufficient for many simple cases, but misses many others, most commonly when the expressions passed to the Permission constructor come into the method as parameters and their runtime values are more difficult (or impossible) to determine.&lt;br /&gt;
&lt;br /&gt;
==Current Work==&lt;br /&gt;
&lt;br /&gt;
At the moment, we have completed the basic structure of the baseline analysis algorithm.  Using the CallGraph created in the Soot analysis, we can find which methods call checkPermissions.  Then we can traverse the call graph and accumulate the Permissions in the methods that can reach the permission-requiring methods.  The result is a collection of Permissions needed by each method annotated by which method the Permission was originally checked in.  This information has been integrated with the data structures for the analysis model to provide an organized way to represent the results in the eventual application.&lt;br /&gt;
&lt;br /&gt;
Next, we will try to find ways to identify the arguments passed to the Permission objects themselves, to better describe the Permissions needed at the top level.  After that we will need to take into consideration the special cases mentioned in the baseline analysis, including doPrivileged, Threads, and Exceptions.&lt;br /&gt;
&lt;br /&gt;
==More?==&lt;br /&gt;
&lt;br /&gt;
As the project continues, we may continue to consider different types of analysis with further goals in mind.&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Project_Overview&amp;diff=1967</id>
		<title>MQP:Project Overview</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Project_Overview&amp;diff=1967"/>
				<updated>2008-09-15T20:14:42Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP]]&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
The goal of this project is to encourage developers to create applications that use the security manager and to create models of security that make the Java security standard more understandable and usable. This project will attempt to develop methods to analyze and describe the policy requirements of a Java application and methods of presenting the results to developers.  These methods will be used to design and build a tool to help developers create applications that properly utilize Java security policy.  Analysis may use a combination of static analysis, runtime analysis, and developer input to create a complete representation.  Outside sources, such as policies that are already in place, developer specified policy requirements, and other policy sources, may be used to enhance the analysis.  High-level models of security will allow for a logical understanding of the security requirements of a program independent of specific security mechanisms.  Results of the analysis may be presented through an IDE, a generated policy file, or some standalone representation.  Results include effects of policy, policy misuse, descriptions of policy abstracted from the Java security model, and instances where a developer's security goals may conflict with code permission specifications. &lt;br /&gt;
&lt;br /&gt;
==Security Resource Model==&lt;br /&gt;
The Java security model uses run-time checking of Permissions against developer or environment defined policy files to perform access control.  These Permission objects represent a checkpoint for the code to perform certain low-level actions like read a file or get access to runtime properties of the system.  While developers do need to implement checks of permissions in code sometimes, oftentimes the actual permission checks are contained within library code and the developer only needs to know what permissions need to be granted to the application.  In most cases, security concerns can be addressed in terms at a higher-level than Permission objects represent.  In this project, we will design and implement a high-level model that is more usable for developers in defining relevant areas or security, including resources and the actions performed on them.  This high-level model will relate to permissions that need to be granted to the application, without the developer necessarily needing to understand the mechanism that implements the policy.  See the description of the Resource Model [[MQP:Permission to Resource Mapping|here]].&lt;br /&gt;
==Program Analysis==&lt;br /&gt;
The tool produced should be able to take input from multiple sources to perform a detailed analysis of the permission requirements of each part of the code.&lt;br /&gt;
===Static Analysis===&lt;br /&gt;
Static Analysis can be used to provide a significant amount of information about the permission requirements of an application.&lt;br /&gt;
More information is available [[MQP:Static_Analysis_Strategies|here]]&lt;br /&gt;
===Runtime Analysis===&lt;br /&gt;
In order to demonstrate, test, and further refine the policy proposed by static analysis, runtime analysis is required.  There are several strategies for runtime analysis such as:&lt;br /&gt;
*An interactive policy development centered approach, where the developer (or some administrator) is prompted to allow or deny permission calls as they come up&lt;br /&gt;
*A monitoring centered approach, where all permissions are simply granted and recorded&lt;br /&gt;
*A testing centered approach, where only failures or special watch cases are presented for action&lt;br /&gt;
===Developer Input===&lt;br /&gt;
The developer should be able to give their own view of the expected policy requirements of the system.  This should be done in a vocabulary that is familiar to the developer.  A &amp;quot;resource centric&amp;quot; approach is probably the most appropriate for this.&lt;br /&gt;
===Combining Results===&lt;br /&gt;
Combining results from multiple sources allows us to present a more complete representation of the actual requirements and implications of an application's security design.  With the combined data source, analyses are able to build on what others have already learned.  The combined result can show new insights into the the application's security requirements.&lt;br /&gt;
&lt;br /&gt;
==Result Presentation==&lt;br /&gt;
In order to communicate the results of the analysis to the developer, it is important to have a clear, concise representation of the application's permission requirements.&lt;br /&gt;
===IDE===&lt;br /&gt;
The most usable representation within an IDE would cause analysis to run automatically as the developer writes code - similar to a live syntax checker.  This may not provide enough time to perform the static analysis that would take place.  Another concern is keeping the permission requirement set up to date as the coder continues to write code without regenerating the entire data set.&lt;br /&gt;
&lt;br /&gt;
It would also be possible to have analysis data presented after a user requests a full analysis - similar to a code coverage tool.  This would require user intervention to perform.&lt;br /&gt;
&lt;br /&gt;
The sort of information to be presented in an IDE includes:&lt;br /&gt;
*All permissions required for some block of code (class, method, etc) and the source path of each permission requirement&lt;br /&gt;
*Occurrences of doPrivileged blocks&lt;br /&gt;
*Occurrences of Thread objects being passed outside their own context&lt;br /&gt;
*Exceptions handled in different contexts&lt;br /&gt;
===Policy Export===&lt;br /&gt;
With all the policy information in the tool, it would be possible to generate some sort of external policy representation, such as a text file list of permissions.&lt;br /&gt;
===Standalone Tool===&lt;br /&gt;
A standalone tool could provide some customized representation to show analysis results in any format.  This could be some sort of query engine, possibly tied to a GUI or report generator.&lt;br /&gt;
&lt;br /&gt;
==Usability Concerns==&lt;br /&gt;
&lt;br /&gt;
===Ease of Use===&lt;br /&gt;
Ideally, the tool should not require any user intervention at all.  Static analysis could be run in the background while code is being written, assuming the analysis algorithm doesn't require too much computing resources.&lt;br /&gt;
===Intrusiveness===&lt;br /&gt;
It is important that the tool does not infringe on the developer's current workflow.  The tool should not get in the developer's way, or prevent the developer from doing anything.  There should always be a way to override what the tool would do automatically - for instance, the developer should be able to override any policy the tool suggests.  The tool should also avoid doing complex tasks without user intervention.&lt;br /&gt;
===Speed of Analysis===&lt;br /&gt;
The analysis should be fast, so that developers are encouraged to use the tool.&lt;br /&gt;
===Presentation of Data===&lt;br /&gt;
Data presentation should be complete, but not overwhelming.  Providing too much data would waste the developer's time sorting through useless stuff.  Providing too little would make the tool useless.  It will be important to determine exactly what data is useful and how to present it in a compact and efficient form.&lt;br /&gt;
==Project Schedule and Goals==&lt;br /&gt;
;Priority 1&lt;br /&gt;
:Finish this week&lt;br /&gt;
;Priority 2&lt;br /&gt;
:Finish next week&lt;br /&gt;
;Priority 3&lt;br /&gt;
:Finish in 2 or more weeks&lt;br /&gt;
;No priority&lt;br /&gt;
:Low priority, possibly won't be finished&lt;br /&gt;
&amp;lt;tasks&amp;gt;&lt;br /&gt;
[1] T13: Finish initial definition of Resource model&lt;br /&gt;
[1] T14: Implement classes to support Resource model&lt;br /&gt;
[1] T15: Connect Resource model to Permission Requirements model&lt;br /&gt;
[1] T8: Find a way to represent analysis results to the developer - also choose IDE integration or standalone output or some combination&lt;br /&gt;
[1] T10: Do research into runtime analysis, especially using the Java instrumentation package and determine if this is easy enough to become a priority task&lt;br /&gt;
[2] T17: Define interfaces for interacting with the resource model&lt;br /&gt;
[2] T18: Create a mapping between a resource/action model and Java Permissions&lt;br /&gt;
[2] T19: Be able to translate between the resource model and the Permission model and policy grants and back&lt;br /&gt;
[2] T7: Populate our model with outside policy sources&lt;br /&gt;
[2] T9: Develop a way for the user to interact with the tool - either IDE or command line or custom GUI&lt;br /&gt;
[3] T20: Design a user interface for working with the resource model&lt;br /&gt;
[ ] T21: If time and other restrictions allow, implement runtime analysis and combine the results with static analysis&lt;br /&gt;
[ ] T4: Determine if memory constraints will affect the static analysis tool significantly&lt;br /&gt;
[ ] T5: Determine if it is possible to store the analysis of library code temporarily or permanently to reduce compute time and memory usage&lt;br /&gt;
[ ] T12: Prune the call graph created by Soot to avoid excessive permission requirements produced by conservative calculation of virtual calls&lt;br /&gt;
[ ] T6: Find other methods to optimize call graph creation - See T12&lt;br /&gt;
[ ] T16: Create a runtime analysis tool - See T10&lt;br /&gt;
[ ] T11: Determine if Static Analysis Algorithm is suitable for dynamic updates.  As code changes, a minimal amount of data would be regenerated&lt;br /&gt;
[ ] T17: Do performance optimizations on the static analysis tool to make it run significantly faster, and without wasting memory&lt;br /&gt;
[x] T1: Finalize Static Analysis Algorithm - See Prototype 1&lt;br /&gt;
[x] T2: Finish designing and implementing the model to store permissions data - See Prototype 1&lt;br /&gt;
[x] T3: Use static analysis algorithm to populate model - See Prototype 1&lt;br /&gt;
&amp;lt;/tasks&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Project_Overview&amp;diff=1966</id>
		<title>MQP:Project Overview</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Project_Overview&amp;diff=1966"/>
				<updated>2008-09-15T19:59:46Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP]]&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
The goal of this project is to encourage developers to create applications that use the security manager and to create models of security that make the Java security standard more understandable and usable. This project will attempt to develop methods to analyze and describe the policy requirements of a Java application and methods of presenting the results to developers.  These methods will be used to design and build a tool to help developers create applications that properly utilize Java security policy.  Analysis may use a combination of static analysis, runtime analysis, and developer input to create a complete representation.  Outside sources, such as policies that are already in place, developer specified policy requirements, and other policy sources, may be used to enhance the analysis.  High-level models of security will allow for a logical understanding of the security requirements of a program independent of specific security mechanisms.  Results of the analysis may be presented through an IDE, a generated policy file, or some standalone representation.  Results include effects of policy, policy misuse, descriptions of policy abstracted from the Java security model, and instances where a developer's security goals may conflict with code permission specifications. &lt;br /&gt;
&lt;br /&gt;
==Program Analysis==&lt;br /&gt;
The tool produced should be able to take input from multiple sources to perform a detailed analysis of the permission requirements of each part of the code.&lt;br /&gt;
===Static Analysis===&lt;br /&gt;
Static Analysis can be used to provide a significant amount of information about the permission requirements of an application.&lt;br /&gt;
More information is available [[MQP:Static_Analysis_Strategies|here]]&lt;br /&gt;
===Runtime Analysis===&lt;br /&gt;
In order to demonstrate, test, and further refine the policy proposed by static analysis, runtime analysis is required.  There are several strategies for runtime analysis such as:&lt;br /&gt;
*An interactive policy development centered approach, where the developer (or some administrator) is prompted to allow or deny permission calls as they come up&lt;br /&gt;
*A monitoring centered approach, where all permissions are simply granted and recorded&lt;br /&gt;
*A testing centered approach, where only failures or special watch cases are presented for action&lt;br /&gt;
===Developer Input===&lt;br /&gt;
The developer should be able to give their own view of the expected policy requirements of the system.  This should be done in a vocabulary that is familiar to the developer.  A &amp;quot;resource centric&amp;quot; approach is probably the most appropriate for this.&lt;br /&gt;
===Combining Results===&lt;br /&gt;
Combining results from multiple sources allows us to present a more complete representation of the actual requirements and implications of an application's security design.  With the combined data source, analyses are able to build on what others have already learned.  The combined result can show new insights into the the application's security requirements.&lt;br /&gt;
&lt;br /&gt;
==Result Presentation==&lt;br /&gt;
In order to communicate the results of the analysis to the developer, it is important to have a clear, concise representation of the application's permission requirements.&lt;br /&gt;
===IDE===&lt;br /&gt;
The most usable representation within an IDE would cause analysis to run automatically as the developer writes code - similar to a live syntax checker.  This may not provide enough time to perform the static analysis that would take place.  Another concern is keeping the permission requirement set up to date as the coder continues to write code without regenerating the entire data set.&lt;br /&gt;
&lt;br /&gt;
It would also be possible to have analysis data presented after a user requests a full analysis - similar to a code coverage tool.  This would require user intervention to perform.&lt;br /&gt;
&lt;br /&gt;
The sort of information to be presented in an IDE includes:&lt;br /&gt;
*All permissions required for some block of code (class, method, etc) and the source path of each permission requirement&lt;br /&gt;
*Occurrences of doPrivileged blocks&lt;br /&gt;
*Occurrences of Thread objects being passed outside their own context&lt;br /&gt;
*Exceptions handled in different contexts&lt;br /&gt;
===Policy Export===&lt;br /&gt;
With all the policy information in the tool, it would be possible to generate some sort of external policy representation, such as a text file list of permissions.&lt;br /&gt;
===Standalone Tool===&lt;br /&gt;
A standalone tool could provide some customized representation to show analysis results in any format.  This could be some sort of query engine, possibly tied to a GUI or report generator.&lt;br /&gt;
&lt;br /&gt;
==Usability Concerns==&lt;br /&gt;
&lt;br /&gt;
===Ease of Use===&lt;br /&gt;
Ideally, the tool should not require any user intervention at all.  Static analysis could be run in the background while code is being written, assuming the analysis algorithm doesn't require too much computing resources.&lt;br /&gt;
===Intrusiveness===&lt;br /&gt;
It is important that the tool does not infringe on the developer's current workflow.  The tool should not get in the developer's way, or prevent the developer from doing anything.  There should always be a way to override what the tool would do automatically - for instance, the developer should be able to override any policy the tool suggests.  The tool should also avoid doing complex tasks without user intervention.&lt;br /&gt;
===Speed of Analysis===&lt;br /&gt;
The analysis should be fast, so that developers are encouraged to use the tool.&lt;br /&gt;
===Presentation of Data===&lt;br /&gt;
Data presentation should be complete, but not overwhelming.  Providing too much data would waste the developer's time sorting through useless stuff.  Providing too little would make the tool useless.  It will be important to determine exactly what data is useful and how to present it in a compact and efficient form.&lt;br /&gt;
==Project Schedule and Goals==&lt;br /&gt;
;Priority 1&lt;br /&gt;
:Finish this week&lt;br /&gt;
;Priority 2&lt;br /&gt;
:Finish next week&lt;br /&gt;
;Priority 3&lt;br /&gt;
:Finish in 2 or more weeks&lt;br /&gt;
;No priority&lt;br /&gt;
:Low priority, possibly won't be finished&lt;br /&gt;
&amp;lt;tasks&amp;gt;&lt;br /&gt;
[1] T13: Finish initial definition of Resource model&lt;br /&gt;
[1] T14: Implement classes to support Resource model&lt;br /&gt;
[1] T15: Connect Resource model to Permission Requirements model&lt;br /&gt;
[1] T8: Find a way to represent analysis results to the developer - also choose IDE integration or standalone output or some combination&lt;br /&gt;
[1] T10: Do research into runtime analysis, especially using the Java instrumentation package and determine if this is easy enough to become a priority task&lt;br /&gt;
[2] T17: Define interfaces for interacting with the resource model&lt;br /&gt;
[2] T18: Create a mapping between a resource/action model and Java Permissions&lt;br /&gt;
[2] T19: Be able to translate between the resource model and the Permission model and policy grants and back&lt;br /&gt;
[2] T7: Populate our model with outside policy sources&lt;br /&gt;
[2] T9: Develop a way for the user to interact with the tool - either IDE or command line or custom GUI&lt;br /&gt;
[3] T20: Design a user interface for working with the resource model&lt;br /&gt;
[ ] T21: If time and other restrictions allow, implement runtime analysis and combine the results with static analysis&lt;br /&gt;
[ ] T4: Determine if memory constraints will affect the static analysis tool significantly&lt;br /&gt;
[ ] T5: Determine if it is possible to store the analysis of library code temporarily or permanently to reduce compute time and memory usage&lt;br /&gt;
[ ] T12: Prune the call graph created by Soot to avoid excessive permission requirements produced by conservative calculation of virtual calls&lt;br /&gt;
[ ] T6: Find other methods to optimize call graph creation - See T12&lt;br /&gt;
[ ] T16: Create a runtime analysis tool - See T10&lt;br /&gt;
[ ] T11: Determine if Static Analysis Algorithm is suitable for dynamic updates.  As code changes, a minimal amount of data would be regenerated&lt;br /&gt;
[ ] T17: Do performance optimizations on the static analysis tool to make it run significantly faster, and without wasting memory&lt;br /&gt;
[x] T1: Finalize Static Analysis Algorithm - See Prototype 1&lt;br /&gt;
[x] T2: Finish designing and implementing the model to store permissions data - See Prototype 1&lt;br /&gt;
[x] T3: Use static analysis algorithm to populate model - See Prototype 1&lt;br /&gt;
&amp;lt;/tasks&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Project_Overview&amp;diff=1965</id>
		<title>MQP:Project Overview</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Project_Overview&amp;diff=1965"/>
				<updated>2008-09-15T18:46:17Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: /* Project Schedule and Goals */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP]]&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
The goal of this project is to encourage developers to create applications that use the security manager and to make creating such an application significantly easier by providing a tool to assist the developer create and test Java policy.  This project will attempt to develop methods to analyze and describe the policy requirements of a Java application and methods of presenting the results to developers.  These methods will be used to design and build a tool to help developers create applications that properly utilize Java security policy.  Analysis may use a combination of static analysis, runtime analysis, and developer input to create a complete representation.  Outside sources, such as policies that are already in place, developer specified policy requirements, and other policy sources, may be used to enhance the analysis.  Results of the analysis may be presented through an IDE, a generated policy file, or some standalone representation.  Results include effects of policy, policy misuse, and places where the program is likely to fail due to improperly specified permissions.&lt;br /&gt;
&lt;br /&gt;
==Program Analysis==&lt;br /&gt;
The tool produced should be able to take input from multiple sources to perform a detailed analysis of the permission requirements of each part of the code.&lt;br /&gt;
===Static Analysis===&lt;br /&gt;
Static Analysis can be used to provide a significant amount of information about the permission requirements of an application.&lt;br /&gt;
More information is available [[MQP:Static_Analysis_Strategies|here]]&lt;br /&gt;
===Runtime Analysis===&lt;br /&gt;
In order to demonstrate, test, and further refine the policy proposed by static analysis, runtime analysis is required.  There are several strategies for runtime analysis such as:&lt;br /&gt;
*An interactive policy development centered approach, where the developer (or some administrator) is prompted to allow or deny permission calls as they come up&lt;br /&gt;
*A monitoring centered approach, where all permissions are simply granted and recorded&lt;br /&gt;
*A testing centered approach, where only failures or special watch cases are presented for action&lt;br /&gt;
===Developer Input===&lt;br /&gt;
The developer should be able to give their own view of the expected policy requirements of the system.  This should be done in a vocabulary that is familiar to the developer.  A &amp;quot;resource centric&amp;quot; approach is probably the most appropriate for this.&lt;br /&gt;
===Combining Results===&lt;br /&gt;
Combining results from multiple sources allows us to present a more complete representation of the actual requirements and implications of an application's security design.  With the combined data source, analyses are able to build on what others have already learned.  The combined result can show new insights into the the application's security requirements.&lt;br /&gt;
&lt;br /&gt;
==Result Presentation==&lt;br /&gt;
In order to communicate the results of the analysis to the developer, it is important to have a clear, concise representation of the application's permission requirements.&lt;br /&gt;
===IDE===&lt;br /&gt;
The most usable representation within an IDE would cause analysis to run automatically as the developer writes code - similar to a live syntax checker.  This may not provide enough time to perform the static analysis that would take place.  Another concern is keeping the permission requirement set up to date as the coder continues to write code without regenerating the entire data set.&lt;br /&gt;
&lt;br /&gt;
It would also be possible to have analysis data presented after a user requests a full analysis - similar to a code coverage tool.  This would require user intervention to perform.&lt;br /&gt;
&lt;br /&gt;
The sort of information to be presented in an IDE includes:&lt;br /&gt;
*All permissions required for some block of code (class, method, etc) and the source path of each permission requirement&lt;br /&gt;
*Occurrences of doPrivileged blocks&lt;br /&gt;
*Occurrences of Thread objects being passed outside their own context&lt;br /&gt;
*Exceptions handled in different contexts&lt;br /&gt;
===Policy Export===&lt;br /&gt;
With all the policy information in the tool, it would be possible to generate some sort of external policy representation, such as a text file list of permissions.&lt;br /&gt;
===Standalone Tool===&lt;br /&gt;
A standalone tool could provide some customized representation to show analysis results in any format.  This could be some sort of query engine, possibly tied to a GUI or report generator.&lt;br /&gt;
&lt;br /&gt;
==Usability Concerns==&lt;br /&gt;
&lt;br /&gt;
===Ease of Use===&lt;br /&gt;
Ideally, the tool should not require any user intervention at all.  Static analysis could be run in the background while code is being written, assuming the analysis algorithm doesn't require too much computing resources.&lt;br /&gt;
===Intrusiveness===&lt;br /&gt;
It is important that the tool does not infringe on the developer's current workflow.  The tool should not get in the developer's way, or prevent the developer from doing anything.  There should always be a way to override what the tool would do automatically - for instance, the developer should be able to override any policy the tool suggests.  The tool should also avoid doing complex tasks without user intervention.&lt;br /&gt;
===Speed of Analysis===&lt;br /&gt;
The analysis should be fast, so that developers are encouraged to use the tool.&lt;br /&gt;
===Presentation of Data===&lt;br /&gt;
Data presentation should be complete, but not overwhelming.  Providing too much data would waste the developer's time sorting through useless stuff.  Providing too little would make the tool useless.  It will be important to determine exactly what data is useful and how to present it in a compact and efficient form.&lt;br /&gt;
==Project Schedule and Goals==&lt;br /&gt;
;Priority 1&lt;br /&gt;
:Finish this week&lt;br /&gt;
;Priority 2&lt;br /&gt;
:Finish next week&lt;br /&gt;
;Priority 3&lt;br /&gt;
:Finish in 2 or more weeks&lt;br /&gt;
;No priority&lt;br /&gt;
:Low priority, possibly won't be finished&lt;br /&gt;
&amp;lt;tasks&amp;gt;&lt;br /&gt;
[1] T13: Finish initial definition of Resource model&lt;br /&gt;
[1] T14: Implement classes to support Resource model&lt;br /&gt;
[1] T15: Connect Resource model to Permission Requirements model&lt;br /&gt;
[1] T8: Find a way to represent analysis results to the developer - also choose IDE integration or standalone output or some combination&lt;br /&gt;
[1] T10: Do research into runtime analysis, especially using the Java instrumentation package and determine if this is easy enough to become a priority task&lt;br /&gt;
[2] T17: Define interfaces for interacting with the resource model&lt;br /&gt;
[2] T18: Create a mapping between a resource/action model and Java Permissions&lt;br /&gt;
[2] T19: Be able to translate between the resource model and the Permission model and policy grants and back&lt;br /&gt;
[2] T7: Populate our model with outside policy sources&lt;br /&gt;
[2] T9: Develop a way for the user to interact with the tool - either IDE or command line or custom GUI&lt;br /&gt;
[3] T20: Design a user interface for working with the resource model&lt;br /&gt;
[ ] T21: If time and other restrictions allow, implement runtime analysis and combine the results with static analysis&lt;br /&gt;
[ ] T4: Determine if memory constraints will affect the static analysis tool significantly&lt;br /&gt;
[ ] T5: Determine if it is possible to store the analysis of library code temporarily or permanently to reduce compute time and memory usage&lt;br /&gt;
[ ] T12: Prune the call graph created by Soot to avoid excessive permission requirements produced by conservative calculation of virtual calls&lt;br /&gt;
[ ] T6: Find other methods to optimize call graph creation - See T12&lt;br /&gt;
[ ] T16: Create a runtime analysis tool - See T10&lt;br /&gt;
[ ] T11: Determine if Static Analysis Algorithm is suitable for dynamic updates.  As code changes, a minimal amount of data would be regenerated&lt;br /&gt;
[ ] T17: Do performance optimizations on the static analysis tool to make it run significantly faster, and without wasting memory&lt;br /&gt;
[x] T1: Finalize Static Analysis Algorithm - See Prototype 1&lt;br /&gt;
[x] T2: Finish designing and implementing the model to store permissions data - See Prototype 1&lt;br /&gt;
[x] T3: Use static analysis algorithm to populate model - See Prototype 1&lt;br /&gt;
&amp;lt;/tasks&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Main&amp;diff=1959</id>
		<title>MQP:Main</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Main&amp;diff=1959"/>
				<updated>2008-09-12T19:12:29Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project will attempt to devise a method for determining the appropriate permission set for an application written in Java and create a developer tool implementing the method.&lt;br /&gt;
&lt;br /&gt;
See the [[MQP:Project Overview|Project Overview]] for more.&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
&lt;br /&gt;
==Research Topics==&lt;br /&gt;
*[[MQP:Static Analysis Tools|Static Analysis Tools]]&lt;br /&gt;
**[[MQP:More on Soot|More on Soot]]&lt;br /&gt;
*[[MQP:Java Security|Java Security]]&lt;br /&gt;
&lt;br /&gt;
==Design Topics==&lt;br /&gt;
*[[MQP:Static Analysis Strategies|Static Analysis Strategies]]&lt;br /&gt;
**[[MQP: A Thread Example|A Thread Example]]&lt;br /&gt;
*[[MQP:Security Analysis Data Structure|Security Analysis Data Model]]&lt;br /&gt;
*[[MQP:Introduction to Netbeans Integration|Introduction to Netbeans Integration]]&lt;br /&gt;
*[[MQP:Permission to Resource Mapping|Permission to Resource Mapping]]&lt;br /&gt;
&lt;br /&gt;
==Proofs of Concept==&lt;br /&gt;
*[[MQP:Static Analysis Tool 0.1|Static Analysis Tool 0.1]]&lt;br /&gt;
&lt;br /&gt;
==The Team==&lt;br /&gt;
*[[Special:Emailuser/J|James Cialdea]] - WPI Class of 2009&lt;br /&gt;
**Computer Science Major&lt;br /&gt;
**Computer Engineering Minor&lt;br /&gt;
*[[Special:Emailuser/jpolitz|Joe Politz]] - WPI Class of 2009&lt;br /&gt;
**Computer Science Major&lt;br /&gt;
**Mathematics Minor&lt;br /&gt;
*A few WPI Advisors&lt;br /&gt;
*A few Sun Microsystems Project Sponsors&lt;br /&gt;
&lt;br /&gt;
[[Category:MQP]]&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Main&amp;diff=1958</id>
		<title>MQP:Main</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Main&amp;diff=1958"/>
				<updated>2008-09-12T19:09:31Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project will attempt to devise a method for determining the appropriate permission set for an application written in Java and create a developer tool implementing the method.&lt;br /&gt;
&lt;br /&gt;
See the [[MQP:Project Overview|Project Overview]] for more.&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
&lt;br /&gt;
==Research Topics==&lt;br /&gt;
*[[MQP:Static Analysis Tools|Static Analysis Tools]]&lt;br /&gt;
**[[MQP:More on Soot|More on Soot]]&lt;br /&gt;
*[[MQP:Java Security|Java Security]]&lt;br /&gt;
&lt;br /&gt;
==Design Topics==&lt;br /&gt;
*[[MQP:Static Analysis Strategies|Static Analysis Strategies]]&lt;br /&gt;
**[[MQP: A Thread Example|A Thread Example]]&lt;br /&gt;
*[[MQP:Security Analysis Data Structure|Security Analysis Data Model]]&lt;br /&gt;
*[[MQP:Introduction to Netbeans Integration|Introduction to Netbeans Integration]]&lt;br /&gt;
*[[MQP:Permission to Resource Mapping|Permission to Resource Mapping]]&lt;br /&gt;
&lt;br /&gt;
==Proofs of Concept==&lt;br /&gt;
*[[MQP:Static Analysis Tool 0.1|Static Analysis Tool 0.1]]&lt;br /&gt;
&lt;br /&gt;
==The Team==&lt;br /&gt;
*[[Special:Emailuser/J|James Cialdea]] - WPI Class of 2009&lt;br /&gt;
**Computer Science Major&lt;br /&gt;
**Computer Engineering Minor&lt;br /&gt;
*Joe Politz - WPI Class of 2009&lt;br /&gt;
**Computer Science Major&lt;br /&gt;
**Mathematics Minor&lt;br /&gt;
*A few WPI Advisors&lt;br /&gt;
*A few Sun Microsystems Project Sponsors&lt;br /&gt;
&lt;br /&gt;
[[Category:MQP]]&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=Category:MQP-Prototypes&amp;diff=1957</id>
		<title>Category:MQP-Prototypes</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=Category:MQP-Prototypes&amp;diff=1957"/>
				<updated>2008-09-12T19:08:42Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: New page: Category:MQP&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP]]&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Tool_0.1&amp;diff=1956</id>
		<title>MQP:Static Analysis Tool 0.1</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Tool_0.1&amp;diff=1956"/>
				<updated>2008-09-12T19:08:03Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP-Prototypes]]&lt;br /&gt;
&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
&lt;br /&gt;
==The Prototype==&lt;br /&gt;
&lt;br /&gt;
The initial prototype of the static analysis tool is available [https://sourceforge.wpi.edu/sf/frs/do/viewRelease/projects.java_security_analysis_tool/frs.proofofconcept0_1.proofofconcept0_1?_message=1221246979560 here].  The tool at the moment has a simple command line interface, and only has the static analysis tool using Soot available.  The current version approximates the security requirements of a program ''very'' conservatively.&lt;br /&gt;
&lt;br /&gt;
==A Simple Walkthrough==&lt;br /&gt;
&lt;br /&gt;
To run the tool, invoke the following command (this ensures the JVM will have enough memory to handle the large call graph that will be created).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
java -Xmx600m -jar proofOfConcept0-1.jar&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When this runs, a shell prompt should appear like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SecurityAnalyzer:&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;run&amp;quot; command runs analyses on tools.  Currently the only tool available is the &amp;quot;SootAnalysisTool,&amp;quot; which has tool number 1.  The run command takes in a tool number, a directory in which to the source to be analyzed is located, and the fully qualified java classname of the main class of the application.  In the future, it will be easier to specify different entry points other than a main class.  To run the included test, invoke the run command as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SecurityAnalyzer:&amp;gt; run 1 Tests/ test.Test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will take a while to run (a very large call graph is being generated).  The results of the analysis should appear in the directory in which the jar is located in a file called 'results.txt'.  Specify other code sources to analyze by changing the directory to be analyzed, which must be the root of the package structure of the java code to be analyzed.&lt;br /&gt;
&lt;br /&gt;
==Limitations==&lt;br /&gt;
&lt;br /&gt;
Viewing the result file should make it apparent how conservative the tool is right now.  Further work on narrowing down the runtime types of virtual method calls could help this somewhat, along with other improvements to the call graph construction.  However, this prototype represents a proof of concept of this basic part of the analysis.&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Tool_0.1&amp;diff=1955</id>
		<title>MQP:Static Analysis Tool 0.1</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Tool_0.1&amp;diff=1955"/>
				<updated>2008-09-12T18:56:06Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP-Prototypes]]&lt;br /&gt;
&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
&lt;br /&gt;
==The Prototype==&lt;br /&gt;
&lt;br /&gt;
The initial prototype of the static analysis tool is available in this release.  The tool at the moment has a simple command line interface, and only has the static analysis tool using Soot available.  The current version approximates the security requirements of a program ''very'' conservatively.&lt;br /&gt;
&lt;br /&gt;
==A Simple Walkthrough==&lt;br /&gt;
&lt;br /&gt;
To run the tool, invoke the following command (this ensures the JVM will have enough memory to handle the large call graph that will be created).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
java -Xmx600m -jar proofOfConcept0-1.jar&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When this runs, a shell prompt should appear like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SecurityAnalyzer:&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;run&amp;quot; command runs analyses on tools.  Currently the only tool available is the &amp;quot;SootAnalysisTool,&amp;quot; which has tool number 1.  The run command takes in a tool number, a directory in which to the source to be analyzed is located, and the fully qualified java classname of the main class of the application.  In the future, it will be easier to specify different entry points other than a main class.  To run the included test, invoke the run command as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SecurityAnalyzer:&amp;gt; run 1 Tests/ test.Test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will take a while to run (a very large call graph is being generated).  The results of the analysis should appear in the directory in which the jar is located in a file called 'results.txt'.  Specify other code sources to analyze by changing the directory to be analyzed, which must be the root of the package structure of the java code to be analyzed.&lt;br /&gt;
&lt;br /&gt;
==Limitations==&lt;br /&gt;
&lt;br /&gt;
Viewing the result file should make it apparent how conservative the tool is right now.  Further work on narrowing down the runtime types of virtual method calls could help this somewhat, along with other improvements to the call graph construction.  However, this prototype represents a proof of concept of this basic part of the analysis.&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Tool_0.1&amp;diff=1954</id>
		<title>MQP:Static Analysis Tool 0.1</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Tool_0.1&amp;diff=1954"/>
				<updated>2008-09-12T18:42:31Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: /* A Simple Walkthrough */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP-Prototypes]]&lt;br /&gt;
&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
&lt;br /&gt;
==The Prototype==&lt;br /&gt;
&lt;br /&gt;
The initial prototype of the static analysis tool is available in this release.  The tool at the moment has a simple command line interface, and only has the static analysis tool using Soot available.  The current version approximates the security requirements of a program ''very'' conservatively.&lt;br /&gt;
&lt;br /&gt;
==A Simple Walkthrough==&lt;br /&gt;
&lt;br /&gt;
To run the tool, invoke the following command (this ensures the JVM will have enough memory to handle the large call graph that will be created).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
java -Xmx600m -jar proofOfConcept0-1.jar&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When this runs, a shell prompt should appear like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SecurityAnalyzer:&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;run&amp;quot; command runs analyses on tools.  Currently the only tool available is the &amp;quot;SootAnalysisTool,&amp;quot; which has tool number 1.  The run command takes in a tool number, a directory in which to the source to be analyzed is located, and the fully qualified java classname of the main class of the application.  In the future, it will be easier to specify different entry points other than a main class.  To run the included test, invoke the run command as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SecurityAnalyzer:&amp;gt; run 1 test/ test.Test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will take a while to run (a very large call graph is being generated).  The results of the analysis should appear in the directory in which the jar is located in a file called 'results.txt'.  Specify other code sources to analyze by changing the directory to be analyzed, which must be the root of the package structure of the java code to be analyzed.&lt;br /&gt;
&lt;br /&gt;
==Limitations==&lt;br /&gt;
&lt;br /&gt;
Viewing the result file should make it apparent how conservative the tool is right now.  Further work on narrowing down the runtime types of virtual method calls could help this somewhat, along with other improvements to the call graph construction.  However, this prototype represents a proof of concept of this basic part of the analysis.&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Tool_0.1&amp;diff=1953</id>
		<title>MQP:Static Analysis Tool 0.1</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Tool_0.1&amp;diff=1953"/>
				<updated>2008-09-12T18:42:09Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: /* A Simple Walkthrough */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP-Prototypes]]&lt;br /&gt;
&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
&lt;br /&gt;
==The Prototype==&lt;br /&gt;
&lt;br /&gt;
The initial prototype of the static analysis tool is available in this release.  The tool at the moment has a simple command line interface, and only has the static analysis tool using Soot available.  The current version approximates the security requirements of a program ''very'' conservatively.&lt;br /&gt;
&lt;br /&gt;
==A Simple Walkthrough==&lt;br /&gt;
&lt;br /&gt;
To run the tool, invoke the following command (this ensures the JVM will have enough memory to handle such a large call graph).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
java -Xmx600m -jar proofOfConcept0-1.jar&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When this runs, a shell prompt should appear like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SecurityAnalyzer:&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;run&amp;quot; command runs analyses on tools.  Currently the only tool available is the &amp;quot;SootAnalysisTool,&amp;quot; which has tool number 1.  The run command takes in a tool number, a directory in which to the source to be analyzed is located, and the fully qualified java classname of the main class of the application.  In the future, it will be easier to specify different entry points other than a main class.  To run the included test, invoke the run command as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SecurityAnalyzer:&amp;gt; run 1 test/ test.Test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will take a while to run (a very large call graph is being generated).  The results of the analysis should appear in the directory in which the jar is located in a file called 'results.txt'.  Specify other code sources to analyze by changing the directory to be analyzed, which must be the root of the package structure of the java code to be analyzed.&lt;br /&gt;
&lt;br /&gt;
==Limitations==&lt;br /&gt;
&lt;br /&gt;
Viewing the result file should make it apparent how conservative the tool is right now.  Further work on narrowing down the runtime types of virtual method calls could help this somewhat, along with other improvements to the call graph construction.  However, this prototype represents a proof of concept of this basic part of the analysis.&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Tool_0.1&amp;diff=1952</id>
		<title>MQP:Static Analysis Tool 0.1</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Tool_0.1&amp;diff=1952"/>
				<updated>2008-09-12T18:41:07Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: New page: Category:MQP-Prototypes  {{MQP:Navbar}}  ==The Prototype==  The initial prototype of the static analysis tool is available in this release.  The tool at the moment has a simple command...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP-Prototypes]]&lt;br /&gt;
&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
&lt;br /&gt;
==The Prototype==&lt;br /&gt;
&lt;br /&gt;
The initial prototype of the static analysis tool is available in this release.  The tool at the moment has a simple command line interface, and only has the static analysis tool using Soot available.  The current version approximates the security requirements of a program ''very'' conservatively.&lt;br /&gt;
&lt;br /&gt;
==A Simple Walkthrough==&lt;br /&gt;
&lt;br /&gt;
To run the tool, invoke the &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
java -Xmx600m -jar proofOfConcept0-1.jar&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the tool is run, a shell prompt should appear like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SecurityAnalyzer:&amp;gt; &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;run&amp;quot; command runs analyses on tools.  Currently the only tool available is the &amp;quot;SootAnalysisTool,&amp;quot; which has tool number 1.  The run command takes in a tool number, a directory in which to the source to be analyzed is located, and the fully qualified java classname of the main class of the application.  In the future, it will be easier to specify different entry points other than a main class.  To run the included test, invoke the run command as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
SecurityAnalyzer:&amp;gt; run 1 test/ test.Test&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will take a while to run (a very large call graph is being generated).  The results of the analysis should appear in the directory in which the jar is located in a file called 'results.txt'.  Specify other code sources to analyze by changing the directory to be analyzed, which must be the root of the package structure of the java code to be analyzed.&lt;br /&gt;
&lt;br /&gt;
==Limitations==&lt;br /&gt;
&lt;br /&gt;
Viewing the result file should make it apparent how conservative the tool is right now.  Further work on narrowing down the runtime types of virtual method calls could help this somewhat, along with other improvements to the call graph construction.  However, this prototype represents a proof of concept of this basic part of the analysis.&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Main&amp;diff=1951</id>
		<title>MQP:Main</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Main&amp;diff=1951"/>
				<updated>2008-09-12T18:12:25Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project will attempt to devise a method for determining the appropriate permission set for an application written in Java and create a developer tool implementing the method.&lt;br /&gt;
&lt;br /&gt;
See the [[MQP:Project Overview|Project Overview]] for more.&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
&lt;br /&gt;
==Research Topics==&lt;br /&gt;
*[[MQP:Static Analysis Tools|Static Analysis Tools]]&lt;br /&gt;
**[[MQP:More on Soot|More on Soot]]&lt;br /&gt;
*[[MQP:Java Security|Java Security]]&lt;br /&gt;
&lt;br /&gt;
==Design Topics==&lt;br /&gt;
*[[MQP:Static Analysis Strategies|Static Analysis Strategies]]&lt;br /&gt;
**[[MQP: A Thread Example|A Thread Example]]&lt;br /&gt;
*[[MQP:Security Analysis Data Structure|Security Analysis Data Model]]&lt;br /&gt;
*[[MQP:Introduction to Netbeans Integration|Introduction to Netbeans Integration]]&lt;br /&gt;
*[[MQP:Permission to Resource Mapping|Permission to Resource Mapping]]&lt;br /&gt;
&lt;br /&gt;
==File Releases==&lt;br /&gt;
*[[MQP:Static Analysis Tool 0.1|Static Analysis Tool 0.1]]&lt;br /&gt;
&lt;br /&gt;
==The Team==&lt;br /&gt;
*[[Special:Emailuser/J|James Cialdea]] - WPI Class of 2009&lt;br /&gt;
**Computer Science Major&lt;br /&gt;
**Computer Engineering Minor&lt;br /&gt;
*Joe Politz - WPI Class of 2009&lt;br /&gt;
**Computer Science Major&lt;br /&gt;
**Mathematics Minor&lt;br /&gt;
*A few WPI Advisors&lt;br /&gt;
*A few Sun Microsystems Project Sponsors&lt;br /&gt;
&lt;br /&gt;
[[Category:MQP]]&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:A_Thread_Example&amp;diff=1929</id>
		<title>MQP:A Thread Example</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:A_Thread_Example&amp;diff=1929"/>
				<updated>2008-09-05T15:00:02Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: New page: ==Analyzing Calls to Thread.start()==  This section describes how Koved's method for handling Thread.run() invocations in security call graphs can apply to different subclasses of Thread. ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Analyzing Calls to Thread.start()==&lt;br /&gt;
&lt;br /&gt;
This section describes how Koved's method for handling Thread.run() invocations in security call graphs can apply to different subclasses of Thread.&lt;br /&gt;
&lt;br /&gt;
Analyzing security information about permissions required when Thread.start() is called is a bit different from a normal method invocation.  The start() method is being invoked on some Thread object, or an object that is a subclass of Thread, and this object may not have been created in the current security context.  The run() method specified by the object (whether the run() method is actually overridden or through use of a Runnable passed to the Thread constructor) represents code that should be executed in the context of that created the Thread, not the context that calls Thread.start().&lt;br /&gt;
&lt;br /&gt;
For this reason, it is not appropriate to traverse normally back through Thread.run() to the method that invoked Thread.start().  Instead, the correct behavior is to traverse back to the constructor of the type of Thread in question, which will in turn lead to each method that instantiated a Thread of that type.&lt;br /&gt;
&lt;br /&gt;
In the following diagram, we model the behavior of a program that is creating two different types of Threads, a MyThread and a WorkerThread.  The dotted lines represent implicit calls to Thread.run() through Thread.start(), which is not shown (this is the way that Soot models this type of call in its call graph, and is convenient for our purposes).  The nodes that are red require the permission from MyThread.run(), the nodes that are blue require the permission from WorkerThread.run().  The purple node requires both types of permissions, since it instantiated both types of Thread.  The red and blue edges represent the new edges that would be traversed in the call graph as a result of using this method.  The black nodes require no additional permissions from the calls to the run() methods.&lt;br /&gt;
&lt;br /&gt;
[[Image:ThreadExampleNoStart.png|frame|center|Thread Example]]&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=File:ThreadExampleNoStart.png&amp;diff=1928</id>
		<title>File:ThreadExampleNoStart.png</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=File:ThreadExampleNoStart.png&amp;diff=1928"/>
				<updated>2008-09-05T14:44:07Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: image for thread example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;image for thread example&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Main&amp;diff=1927</id>
		<title>MQP:Main</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Main&amp;diff=1927"/>
				<updated>2008-09-05T14:42:27Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project will attempt to devise a method for determining the appropriate permission set for an application written in Java and create a developer tool implementing the method.&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
&lt;br /&gt;
==Research Topics==&lt;br /&gt;
*[[MQP:Static Analysis Tools|Static Analysis Tools]]&lt;br /&gt;
**[[MQP:More on Soot|More on Soot]]&lt;br /&gt;
*[[MQP:Java Security|Java Security]]&lt;br /&gt;
&lt;br /&gt;
==Design Topics==&lt;br /&gt;
*[[MQP:Static Analysis Strategies|Static Analysis Strategies]]&lt;br /&gt;
**[[MQP: A Thread Example|A Thread Example]]&lt;br /&gt;
*[[MQP:Security Analysis Data Structure|Security Analysis Data Structure]]&lt;br /&gt;
*[[MQP:Introduction to Netbeans Integration|Introduction to Netbeans Integration]]&lt;br /&gt;
&lt;br /&gt;
==The Team==&lt;br /&gt;
*[[Special:Emailuser/J|James Cialdea]] - WPI Class of 2009&lt;br /&gt;
**Computer Science Major&lt;br /&gt;
**Computer Engineering Minor&lt;br /&gt;
*Joe Politz - WPI Class of 2009&lt;br /&gt;
**Computer Science Major&lt;br /&gt;
**Mathematics Minor&lt;br /&gt;
*A few WPI Advisors&lt;br /&gt;
*A few Sun Microsystems Project Sponsors&lt;br /&gt;
&lt;br /&gt;
[[Category:MQP]]&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Introduction_to_Netbeans_Integration&amp;diff=1926</id>
		<title>MQP:Introduction to Netbeans Integration</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Introduction_to_Netbeans_Integration&amp;diff=1926"/>
				<updated>2008-09-05T14:39:43Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: New page: Category:MQP-Research {{MQP:Navbar}}  ==Why Netbeans?==  There are a few reasons why taking the security analysis tool and integrating it with Netbeans would be effective.  Netbeans al...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP-Research]]&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
&lt;br /&gt;
==Why Netbeans?==&lt;br /&gt;
&lt;br /&gt;
There are a few reasons why taking the security analysis tool and integrating it with Netbeans would be effective.  Netbeans already supports plugins for developing Glassfish applications, so development help could be available in the IDE for writing secure applications for Glassfish specifically.  Netbeans uses a version of the javac representation of the parse tree and source model, which could be leveraged in static analysis.  This representation can also be easily used to display information back to developers that could come from the security tool.&lt;br /&gt;
&lt;br /&gt;
====Existing Features====&lt;br /&gt;
&lt;br /&gt;
A few existing features of Netbeans seem they could be relevant for this project.  The idea of doing a reverse lookup (like finding usages of a variable or method) is similar to the way our tool traverses call graphs (by looking for methods that call a given method).  Netbeans also does several steps in the parsing of source code that could be useful in static analysis, in addition to compiling source files to bytecode.  The classpath of library classes that are in jar files are also easily available through Netbeans' project structure.&lt;br /&gt;
&lt;br /&gt;
====Netbeans Source Model====&lt;br /&gt;
&lt;br /&gt;
Netbeans uses the structural model of Java bytecode found in the package javax.lang.model.  This includes information about classes, their method signatures, and fields of the methods, and is specified by JSR 269.  There is also a more fine-grain model of source that Netbeans uses in the package com.sun.source.tree.  This package models more detailed information about the bodies of methods and the statements enclosed within.  Were we to use this source model entirely (instead of another option like Soot's), this would be the model we would start with to represent a call graph.&lt;br /&gt;
&lt;br /&gt;
While Netbeans is running, a plugin can request access to these source models at different levels of completeness in the parsing and compiling process.  If a tool or plugin is running in the background of Netbeans, it should only request access to the level of information that it needs to perform its computation.  If a user updates code while our tool is running, we would almost always need full information to update our analysis, since any method calls that are added or removed could affect the call graph.&lt;br /&gt;
&lt;br /&gt;
====Communicating Results====&lt;br /&gt;
&lt;br /&gt;
An important reason for doing IDE integration in the first place is to allow the tool to communicate with developers in a simple way and without having to switch environments.  Netbeans would allow the tool to markup code or show information to developers in the editor window or with dialog boxes (say during a simulation mode).  Things like the syntax highlighting that Netbeans already does, as well as graphical output of code coverage or other profiling tools, are good examples of ways that information can be quickly shown to a developer without leaving the IDE or being overly intrusive.&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Main&amp;diff=1925</id>
		<title>MQP:Main</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Main&amp;diff=1925"/>
				<updated>2008-09-05T14:39:04Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project will attempt to devise a method for determining the appropriate permission set for an application written in Java and create a developer tool implementing the method.&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
&lt;br /&gt;
==Research Topics==&lt;br /&gt;
*[[MQP:Static Analysis Tools|Static Analysis Tools]]&lt;br /&gt;
**[[MQP:More on Soot|More on Soot]]&lt;br /&gt;
*[[MQP:Java Security|Java Security]]&lt;br /&gt;
&lt;br /&gt;
==Design Topics==&lt;br /&gt;
*[[MQP:Static Analysis Strategies|Static Analysis Strategies]]&lt;br /&gt;
*[[MQP:Security Analysis Data Structure|Security Analysis Data Structure]]&lt;br /&gt;
*[[MQP:Introduction to Netbeans Integration|Introduction to Netbeans Integration]]&lt;br /&gt;
&lt;br /&gt;
==The Team==&lt;br /&gt;
*[[Special:Emailuser/J|James Cialdea]] - WPI Class of 2009&lt;br /&gt;
**Computer Science Major&lt;br /&gt;
**Computer Engineering Minor&lt;br /&gt;
*Joe Politz - WPI Class of 2009&lt;br /&gt;
**Computer Science Major&lt;br /&gt;
**Mathematics Minor&lt;br /&gt;
*A few WPI Advisors&lt;br /&gt;
*A few Sun Microsystems Project Sponsors&lt;br /&gt;
&lt;br /&gt;
[[Category:MQP]]&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Netbeans_API_Overview&amp;diff=1924</id>
		<title>MQP:Netbeans API Overview</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Netbeans_API_Overview&amp;diff=1924"/>
				<updated>2008-09-05T14:37:55Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: New page: Category:MQP-Research {{MQP:Navbar}}  ==Why Netbeans?==  There are a few reasons why taking the security analysis tool and integrating it with Netbeans would be effective.  Netbeans al...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP-Research]]&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
&lt;br /&gt;
==Why Netbeans?==&lt;br /&gt;
&lt;br /&gt;
There are a few reasons why taking the security analysis tool and integrating it with Netbeans would be effective.  Netbeans already supports plugins for developing Glassfish applications, so development help could be available in the IDE for writing secure applications for Glassfish specifically.  Netbeans uses a version of the javac representation of the parse tree and source model, which could be leveraged in static analysis.  This representation can also be easily used to display information back to developers that could come from the security tool.&lt;br /&gt;
&lt;br /&gt;
====Existing Features====&lt;br /&gt;
&lt;br /&gt;
A few existing features of Netbeans seem they could be relevant for this project.  The idea of doing a reverse lookup (like finding usages of a variable or method) is similar to the way our tool traverses call graphs (by looking for methods that call a given method).  Netbeans also does several steps in the parsing of source code that could be useful in static analysis, in addition to compiling source files to bytecode.  The classpath of library classes that are in jar files are also easily available through Netbeans' project structure.&lt;br /&gt;
&lt;br /&gt;
====Netbeans Source Model====&lt;br /&gt;
&lt;br /&gt;
Netbeans uses the structural model of Java bytecode found in the package javax.lang.model.  This includes information about classes, their method signatures, and fields of the methods, and is specified by JSR 269.  There is also a more fine-grain model of source that Netbeans uses in the package com.sun.source.tree.  This package models more detailed information about the bodies of methods and the statements enclosed within.  Were we to use this source model entirely (instead of another option like Soot's), this would be the model we would start with to represent a call graph.&lt;br /&gt;
&lt;br /&gt;
While Netbeans is running, a plugin can request access to these source models at different levels of completeness in the parsing and compiling process.  If a tool or plugin is running in the background of Netbeans, it should only request access to the level of information that it needs to perform its computation.  If a user updates code while our tool is running, we would almost always need full information to update our analysis, since any method calls that are added or removed could affect the call graph.&lt;br /&gt;
&lt;br /&gt;
====Communicating Results====&lt;br /&gt;
&lt;br /&gt;
An important reason for doing IDE integration in the first place is to allow the tool to communicate with developers in a simple way and without having to switch environments.  Netbeans would allow the tool to markup code or show information to developers in the editor window or with dialog boxes (say during a simulation mode).  Things like the syntax highlighting that Netbeans already does, as well as graphical output of code coverage or other profiling tools, are good examples of ways that information can be quickly shown to a developer without leaving the IDE or being overly intrusive.&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Main&amp;diff=1923</id>
		<title>MQP:Main</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Main&amp;diff=1923"/>
				<updated>2008-09-04T19:08:32Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This project will attempt to devise a method for determining the appropriate permission set for an application written in Java and create a developer tool implementing the method.&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
&lt;br /&gt;
==Research Topics==&lt;br /&gt;
*[[MQP:Static Analysis Tools|Static Analysis Tools]]&lt;br /&gt;
**[[MQP:More on Soot|More on Soot]]&lt;br /&gt;
*[[MQP:Java Security|Java Security]]&lt;br /&gt;
&lt;br /&gt;
==Design Topics==&lt;br /&gt;
*[[MQP:Static Analysis Strategies|Static Analysis Strategies]]&lt;br /&gt;
*[[MQP:Security Analysis Data Structure|Security Analysis Data Structure]]&lt;br /&gt;
*[[MQP:Netbeans API Overview|Netbeans API Overview]]&lt;br /&gt;
&lt;br /&gt;
==The Team==&lt;br /&gt;
*[[Special:Emailuser/J|James Cialdea]] - WPI Class of 2009&lt;br /&gt;
**Computer Science Major&lt;br /&gt;
**Computer Engineering Minor&lt;br /&gt;
*Joe Politz - WPI Class of 2009&lt;br /&gt;
**Computer Science Major&lt;br /&gt;
**Mathematics Minor&lt;br /&gt;
*A few WPI Advisors&lt;br /&gt;
*A few Sun Microsystems Project Sponsors&lt;br /&gt;
&lt;br /&gt;
[[Category:MQP]]&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Strategies&amp;diff=1919</id>
		<title>MQP:Static Analysis Strategies</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Strategies&amp;diff=1919"/>
				<updated>2008-09-02T20:17:11Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP-Design]]&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
This page summarizes some of our discussions on strategies for performing static analysis to infer permissions.&lt;br /&gt;
&lt;br /&gt;
==Goals==&lt;br /&gt;
&lt;br /&gt;
The best tool that we envision would be able to infer the permissions required at each program point.  Showing this level of detail would give a developer the best chance to understand the security requirements of code.  With this analysis, it would be simple to accomplish our more baseline objective, that of inferring the permissions required by an application at each method and class.  This would be the minimum required to create a policy file that granted the needed permissions to the code.  From either analysis, we would need to store the security data in an intermediate format to easily inform a dynamic or run time analysis at a later time.  This format could also aid in the construction of policy files for the application.&lt;br /&gt;
&lt;br /&gt;
==Baseline Analysis==&lt;br /&gt;
&lt;br /&gt;
The methods we are considering for the baseline analysis are based on using graph searching algorithms on a call graph of the application.  The general strategy is to find the points where checkPermission is called in the program, and traverse the graph against the direction of method invocation.  That is, each method that could call the method containing the checkPermission call would be traversed.  At each of these points, the method would be marked as requiring that permission and then all methods that invoke it would be recursively traverse in the same fashion.&lt;br /&gt;
&lt;br /&gt;
There are a few special cases and stopping conditions for this algorithm.  First, if a node (method) is reached in the graph and it is already marked with the set of permissions that need to be added, the current branch of the graph traversal can stop.  Second, the doPrivileged() operator is a stopping condition as well, as it indicates that the code it annotates is responsible for encapsulating the current security context.  Third, when a Thread object is passed to a different context, it needs to reflect that the context constructing the Thread requires the current set of permissions.  These are general descriptions of the strategies and need to be formalized more.  They are also based on some observations from Larry Koved's [http://www.research.ibm.com/javasec/OOPSLA2002preprint.pdf paper].&lt;br /&gt;
&lt;br /&gt;
==Deep Analysis==&lt;br /&gt;
&lt;br /&gt;
The deep analysis would provide a more detailed view of the permissions required by inferring the permissions at each program point.  For example, it may be possible to show that a certain permission will be required only if a certain branch of an if statement is taken.  This would normally not affect the policy file or permissions required by the application, as it is assumed that both branches of the if statement would execute at some point.  However, this could be quite a useful tool for developers, who would be able to see what parts of their code they could move or edit to better encapsulate or understand the security requirements of a program.&lt;br /&gt;
&lt;br /&gt;
To do this, the analysis would follow a similar pattern as the baseline analysis, with the exception of looking at special code blocks or groups of statements, like if-else blocks.  Where there is a branching operation, the different blocks could be marked as needing different sets of permissions.  While the method containing these blocks would still require all of the permissions contained within, it would be possible to see which parts of the method use the required permissions.&lt;br /&gt;
&lt;br /&gt;
==Current Work==&lt;br /&gt;
&lt;br /&gt;
At the moment, we have completed the basic structure of the baseline analysis algorithm.  Using the CallGraph created in the Soot analysis, we can find which methods call checkPermissions.  Then we can traverse the call graph and accumulate the Permissions in the methods that can reach the permission-requiring methods.  The result is a collection of Permissions needed by each method annotated by which method the Permission was originally checked in.  This information has been integrated with the data structures for the analysis model to provide an organized way to represent the results in the eventual application.&lt;br /&gt;
&lt;br /&gt;
Next, we will try to find ways to identify the arguments passed to the Permission objects themselves, to better describe the Permissions needed at the top level.  After that we will need to take into consideration the special cases mentioned in the baseline analysis, including doPrivileged, Threads, and Exceptions.&lt;br /&gt;
&lt;br /&gt;
==More?==&lt;br /&gt;
&lt;br /&gt;
As the project continues, we may continue to consider different types of analysis with further goals in mind.&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Strategies&amp;diff=1909</id>
		<title>MQP:Static Analysis Strategies</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Strategies&amp;diff=1909"/>
				<updated>2008-08-27T20:12:33Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: /* Deep Analysis */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:MQP-Design]]&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
This page summarizes some of our discussions on strategies for performing static analysis to infer permissions.&lt;br /&gt;
&lt;br /&gt;
==Goals==&lt;br /&gt;
&lt;br /&gt;
The best tool that we envision would be able to infer the permissions required at each program point.  Showing this level of detail would give a developer the best chance to understand the security requirements of code.  With this analysis, it would be simple to accomplish our more baseline objective, that of inferring the permissions required by an application at each method and class.  This would be the minimum required to create a policy file that granted the needed permissions to the code.  From either analysis, we would need to store the security data in an intermediate format to easily inform a dynamic or run time analysis at a later time.  This format could also aid in the construction of policy files for the application.&lt;br /&gt;
&lt;br /&gt;
==Baseline Analysis==&lt;br /&gt;
&lt;br /&gt;
The methods we are considering for the baseline analysis are based on using graph searching algorithms on a call graph of the application.  The general strategy is to find the points where checkPermission is called in the program, and traverse the graph against the direction of method invocation.  That is, each method that could call the method containing the checkPermission call would be traversed.  At each of these points, the method would be marked as requiring that permission and then all methods that invoke it would be recursively traverse in the same fashion.&lt;br /&gt;
&lt;br /&gt;
There are a few special cases and stopping conditions for this algorithm.  First, if a node (method) is reached in the graph and it is already marked with the set of permissions that need to be added, the current branch of the graph traversal can stop.  Second, the doPrivileged() operator is a stopping condition as well, as it indicates that the code it annotates is responsible for encapsulating the current security context.  Third, when a Thread object is passed to a different context, it needs to reflect that the context constructing the Thread requires the current set of permissions.  These are general descriptions of the strategies and need to be formalized more.  They are also based on some observations from Larry Koved's [http://www.research.ibm.com/javasec/OOPSLA2002preprint.pdf paper].&lt;br /&gt;
&lt;br /&gt;
==Deep Analysis==&lt;br /&gt;
&lt;br /&gt;
The deep analysis would provide a more detailed view of the permissions required by inferring the permissions at each program point.  For example, it may be possible to show that a certain permission will be required only if a certain branch of an if statement is taken.  This would normally not affect the policy file or permissions required by the application, as it is assumed that both branches of the if statement would execute at some point.  However, this could be quite a useful tool for developers, who would be able to see what parts of their code they could move or edit to better encapsulate or understand the security requirements of a program.&lt;br /&gt;
&lt;br /&gt;
To do this, the analysis would follow a similar pattern as the baseline analysis, with the exception of looking at special code blocks or groups of statements, like if-else blocks.  Where there is a branching operation, the different blocks could be marked as needing different sets of permissions.  While the method containing these blocks would still require all of the permissions contained within, it would be possible to see which parts of the method use the required permissions.&lt;br /&gt;
&lt;br /&gt;
==More?==&lt;br /&gt;
&lt;br /&gt;
As the project continues, we may continue to consider different types of analysis with further goals in mind.&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Strategies&amp;diff=1898</id>
		<title>MQP:Static Analysis Strategies</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Strategies&amp;diff=1898"/>
				<updated>2008-08-26T20:18:39Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: New page: {{#categorytree:MQP|hideroot|mode=pages}}  ==Overview==  This page summarizes some of our discussions on strategies for performing static analysis to infer permissions.  ==Goals==  The bes...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#categorytree:MQP|hideroot|mode=pages}}&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
This page summarizes some of our discussions on strategies for performing static analysis to infer permissions.&lt;br /&gt;
&lt;br /&gt;
==Goals==&lt;br /&gt;
&lt;br /&gt;
The best tool that we envision would be able to infer the permissions required at each program point.  Showing this level of detail would give a developer the best chance to understand the security requirements of code.  With this analysis, it would be simple to accomplish our more baseline objective, that of inferring the permissions required by an application at each method and class.  This would be the minimum required to create a policy file that granted the needed permissions to the code.  From either analysis, we would need to store the security data in an intermediate format to easily inform a dynamic or run time analysis at a later time.  This format could also aid in the construction of policy files for the application.&lt;br /&gt;
&lt;br /&gt;
==Baseline Analysis==&lt;br /&gt;
&lt;br /&gt;
The methods we are considering for the baseline analysis are based on using graph searching algorithms on a call graph of the application.  The general strategy is to find the points where checkPermission is called in the program, and traverse the graph against the direction of method invocation.  That is, each method that could call the method containing the checkPermission call would be traversed.  At each of these points, the method would be marked as requiring that permission and then all methods that invoke it would be recursively traverse in the same fashion.&lt;br /&gt;
&lt;br /&gt;
There are a few special cases and stopping conditions for this algorithm.  First, if a node (method) is reached in the graph and it is already marked with the set of permissions that need to be added, the current branch of the graph traversal can stop.  Second, the doPrivileged() operator is a stopping condition as well, as it indicates that the code it annotates is responsible for encapsulating the current security context.  Third, when a Thread object is passed to a different context, it needs to reflect that the context constructing the Thread requires the current set of permissions.  These are general descriptions of the strategies and need to be formalized more.  They are also based on some observations from Larry Koved's [http://www.research.ibm.com/javasec/OOPSLA2002preprint.pdf paper].&lt;br /&gt;
&lt;br /&gt;
==Deep Analysis==&lt;br /&gt;
&lt;br /&gt;
The deep analysis would provide a more detailed view of the permissions required by inferring the permissions at each program point.  For example, it may be possible to show that a certain permission will be required only if a certain branch of an if statement is taken.  This would normally not affect the policy file or permissions required by the application, as it is assumed that both branches of the if statement would execute at some point.  However, this could be quite a useful tool for developers, who would be able to see what parts of their code they could move or edit to better encapsulate or understand the security requirements of a program.&lt;br /&gt;
&lt;br /&gt;
To do this, the analysis would follow a similar pattern as the baseline analysis, with the exception of looking at special code blocks or groups of statements, like if-else blocks.  Where there is a branching operations, the different blocks could be marked as needing different sets of permissions.  While the method containing these blocks would still require all of the permissions contained within, it would be possible to see which parts of the method use the required permissions.&lt;br /&gt;
&lt;br /&gt;
==More?==&lt;br /&gt;
&lt;br /&gt;
As the project continues, we may continue to consider different types of analysis with further goals in mind.&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Main&amp;diff=1897</id>
		<title>MQP:Main</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Main&amp;diff=1897"/>
				<updated>2008-08-26T19:57:50Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: /* Research Topics */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is where the MQP stuff goes.&lt;br /&gt;
{{MQP:Navbar}}&lt;br /&gt;
&lt;br /&gt;
==Research Topics==&lt;br /&gt;
*[[MQP:Static Analysis Tools|Static Analysis Tools]]&lt;br /&gt;
**[[MQP:More on Soot|More on Soot]]&lt;br /&gt;
*[[MQP:Java Security|Java Security]]&lt;br /&gt;
*[[MQP:Static Analysis Strategies|Static Analysis Strategies]]&lt;br /&gt;
&lt;br /&gt;
[[Category:MQP]]&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:More_on_Soot&amp;diff=1896</id>
		<title>MQP:More on Soot</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:More_on_Soot&amp;diff=1896"/>
				<updated>2008-08-26T19:55:39Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: /* More to Come */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#categorytree:MQP|hideroot|mode=pages}}&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
Soot is a useful tool for static analysis mentioned in the static analysis tools section.  Some of its features are covered in more detail here.&lt;br /&gt;
&lt;br /&gt;
==What Soot Does==&lt;br /&gt;
&lt;br /&gt;
Soot takes Java source code, bytecode, or classfiles as input and converts them into different representations or models of the code.  These representations simplify the process of performing many tasks, including several types of static analysis.  For this project in particular, we will be especially interested in Soot's ability to make call graphs and operate on them.  Some of the other types of static analysis that Soot facilitates may also factor in to this project.&lt;br /&gt;
&lt;br /&gt;
====Intermediate Representations====&lt;br /&gt;
&lt;br /&gt;
There are four different models that Soot uses for representing Java Code, each with different uses.  We're still learning what each of these does exactly (working from http://www.brics.dk/SootGuide/).&lt;br /&gt;
&lt;br /&gt;
#Baf - This representation allows for inspection of Java bytecode as &amp;quot;stack code.&amp;quot;  Still learning about this and what it means.&lt;br /&gt;
#Jimple - This representation is the most commonly used intermediate model.  It breaks complicated statements down into more basic ones (for example, i = x + y + z could become i0 = x + y; i = i0 + z), to simplify statement by statement analysis.&lt;br /&gt;
#Shimple - This model is similar to Jimple, but has the ability to remember different values for variables dependent on branching in the program (if two branches set a variable x in different ways, then at the end Shimple may have two variables, x0 and x1, that represent two possible values of x).  This can lead to simplifications if it is found that the branches yield identical results for some identifiers.&lt;br /&gt;
#Grimp - This model looks the most like &amp;quot;normal&amp;quot; Java code, and has the least simplifications of the four models.&lt;br /&gt;
&lt;br /&gt;
====Analyses and Data Models====&lt;br /&gt;
&lt;br /&gt;
From these intermediate representations, Soot creates several different abstract models of the code, and can perform a few types of analyses on these models.&lt;br /&gt;
&lt;br /&gt;
#Call Graph - Creating a call graph is necessary for any type of interprocedural analysis (one that handles control flow that changes via method invocations).  The call graph in Soot is based on a class hierarchy model, so the Method objects represented by Soot have information about what class they belong to and what fields they have access to.  Soot also provides different methods for traversing the call graph and finding methods reachable from others.&lt;br /&gt;
#Data Flow Analyses - Soot also has tools that allow the user to specify specific data flow analyses to perform on the model.  The user can specify if it is a forward or backward analysis, a may or must analysis, and several other options.&lt;br /&gt;
#Points-to Analysis - Soot has specific tools for performing a points-to analysis, which can be used to determine what values pointers (Java references) could be referring to at a given program point.  This could be useful in this project in determining the arguments to Permission objects to refine the knowledge of which permissions are needed.&lt;br /&gt;
&lt;br /&gt;
====More to Come====&lt;br /&gt;
&lt;br /&gt;
There will likely be more information available on Soot the more it and its uses are investigated.  UPDATE:  Got Soot up and running on the command line, and can build and run it from eclipse.  Next is to work on our own tools to utilize the API and classes that are already there.&lt;br /&gt;
&lt;br /&gt;
====References====&lt;br /&gt;
Soot Survival Guide - http://www.brics.dk/SootGuide/&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Tools&amp;diff=1895</id>
		<title>MQP:Static Analysis Tools</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Tools&amp;diff=1895"/>
				<updated>2008-08-26T14:58:10Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#categorytree:MQP|hideroot|mode=pages}}&lt;br /&gt;
&lt;br /&gt;
==What We're Looking For==&lt;br /&gt;
&lt;br /&gt;
For the kind of static analysis we're doing, some sort of a call graph is needed to model the flow of the program and where calls to checkPermissions are going to be found.  To that end, we investigated some static analysis tools that provide models of Java code and ways to inspect it.&lt;br /&gt;
&lt;br /&gt;
More tools may be added as the project continues.&lt;br /&gt;
{{Incomplete}}&lt;br /&gt;
&lt;br /&gt;
==Some Tools==&lt;br /&gt;
&lt;br /&gt;
====Java Compiler API====&lt;br /&gt;
&lt;br /&gt;
The Java Compiler API provides access to the functionality of the Java Compiler, most notably the ability to create an Abstract Syntax Tree of some set of Java code.  This is a straightforward tool, but does not seem to have any simple provision for creating a customizable call graph, which would be ideal for our application.&lt;br /&gt;
&lt;br /&gt;
====NetBeans API for Call Hierarchy====&lt;br /&gt;
&lt;br /&gt;
NetBeans has an API for accessing the code model used internally in the program.  NetBeans itself does have a sort of call graph functionality in the &amp;quot;Call Hierarchy&amp;quot; tool.  This could prove useful, but at this point in time we would rather focus on tools that aren't dependent on an IDE, and let us create a standalone application.&lt;br /&gt;
&lt;br /&gt;
====Soot====&lt;br /&gt;
&lt;br /&gt;
Soot is a &amp;quot;Java optimization framework,&amp;quot; and provides a large number of tools that can (and have been) used to perform static analysis of Java programs.  Soot has a number of features that we are looking for:&lt;br /&gt;
# Analyzes Java source, bytecode, and class files&lt;br /&gt;
# Creates a call graph based on class hierarchy&lt;br /&gt;
# Is free and open source (LGPL License)&lt;br /&gt;
# Can be used outside any IDE&lt;br /&gt;
# Is tested by use in a number of research applications&lt;br /&gt;
# Has a other static analysis applications (data flow analysis, points-to analysis) which could be applicable to security&lt;br /&gt;
&lt;br /&gt;
Soot is a likely candidate for use in the security static analysis.  [[MQP:More on Soot|More on Soot]]&lt;br /&gt;
&lt;br /&gt;
====Other Tools====&lt;br /&gt;
&lt;br /&gt;
Other tools that were looked at and may be considered for reference are TACLE (Type Analysis and Call Graph Construction for Eclipse), and a program verification tool called Bandera that used Soot and has an implementation of their own CallGraph class.  Other tools may be considered or added as the project continues.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
#Soot - http://www.sable.mcgill.ca/soot/&lt;br /&gt;
#NetBeans API for Call Hierarchy (in Java Source package) - http://bits.netbeans.org/dev/javadoc/index.html&lt;br /&gt;
#javac API - http://java.sun.com/javase/6/docs/technotes/guides/javac/index.html&lt;br /&gt;
#Larry Koved's excellent paper on access rights analysis for java - [http://www.research.ibm.com/javasec/OOPSLA2002preprint.pdf Access Rights Analysis for Java]&lt;br /&gt;
&lt;br /&gt;
[[Category:MQP]]&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Tools&amp;diff=1894</id>
		<title>MQP:Static Analysis Tools</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Tools&amp;diff=1894"/>
				<updated>2008-08-26T14:55:53Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: /* Soot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#categorytree:MQP|hideroot|mode=pages}}&lt;br /&gt;
&lt;br /&gt;
==What We're Looking For==&lt;br /&gt;
&lt;br /&gt;
For the kind of static analysis we're doing, some sort of a call graph is needed to model the flow of the program and where calls to checkPermissions are going to be found.  To that end, we investigated some static analysis tools that provide models of Java code and ways to inspect it.&lt;br /&gt;
&lt;br /&gt;
More tools may be added as the project continues.&lt;br /&gt;
{{Incomplete}}&lt;br /&gt;
&lt;br /&gt;
==Some Tools==&lt;br /&gt;
&lt;br /&gt;
====Java Compiler API====&lt;br /&gt;
&lt;br /&gt;
The Java Compiler API provides access to the functionality of the Java Compiler, most notably the ability to create an Abstract Syntax Tree of some set of Java code.  This is a straightforward tool, but does not seem to have any simple provision for creating a customizable call graph, which would be ideal for our application.&lt;br /&gt;
&lt;br /&gt;
====NetBeans API for Call Hierarchy====&lt;br /&gt;
&lt;br /&gt;
NetBeans has an API for accessing the code model used internally in the program.  NetBeans itself does have a sort of call graph functionality in the &amp;quot;Call Hierarchy&amp;quot; tool.  This could prove useful, but at this point in time we would rather focus on tools that aren't dependent on an IDE, and let us create a standalone application.&lt;br /&gt;
&lt;br /&gt;
====Soot====&lt;br /&gt;
&lt;br /&gt;
Soot is a &amp;quot;Java optimization framework,&amp;quot; and provides a large number of tools that can (and have been) used to perform static analysis of Java programs.  Soot has a number of features that we are looking for:&lt;br /&gt;
# Analyzes Java source, bytecode, and class files&lt;br /&gt;
# Creates a call graph based on class hierarchy&lt;br /&gt;
# Is free and open source (LGPL License)&lt;br /&gt;
# Can be used outside any IDE&lt;br /&gt;
# Is tested by use in a number of research applications&lt;br /&gt;
# Has a other static analysis applications (data flow analysis, points-to analysis) which could be applicable to security&lt;br /&gt;
&lt;br /&gt;
Soot is a likely candidate for use in the security static analysis.  [[MQP:More on Soot|More on Soot]]&lt;br /&gt;
&lt;br /&gt;
====Other Tools====&lt;br /&gt;
&lt;br /&gt;
Other tools that were looked at and may be considered for reference are TACLE (Type Analysis and Call Graph Construction for Eclipse), and a program verification tool called Bandera that used Soot and has an implementation of their own CallGraph class.  Other tools may be considered or added as the project continues.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
#Soot - http://www.sable.mcgill.ca/soot/&lt;br /&gt;
#NetBeans API for Call Hierarchy (in Java Source package) - http://bits.netbeans.org/dev/javadoc/index.html&lt;br /&gt;
#javac API - http://java.sun.com/javase/6/docs/technotes/guides/javac/index.html&lt;br /&gt;
#Larry Koved's excellent paper on access rights analysis for java - [http://portal.acm.org/ft_gateway.cfm?id=582452&amp;amp;type=pdf&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=634220&amp;amp;CFTOKEN=95929885 Access Rights Analysis for Java]&lt;br /&gt;
&lt;br /&gt;
[[Category:MQP]]&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Tools&amp;diff=1893</id>
		<title>MQP:Static Analysis Tools</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Tools&amp;diff=1893"/>
				<updated>2008-08-26T14:55:29Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: /* Soot */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#categorytree:MQP|hideroot|mode=pages}}&lt;br /&gt;
&lt;br /&gt;
==What We're Looking For==&lt;br /&gt;
&lt;br /&gt;
For the kind of static analysis we're doing, some sort of a call graph is needed to model the flow of the program and where calls to checkPermissions are going to be found.  To that end, we investigated some static analysis tools that provide models of Java code and ways to inspect it.&lt;br /&gt;
&lt;br /&gt;
More tools may be added as the project continues.&lt;br /&gt;
{{Incomplete}}&lt;br /&gt;
&lt;br /&gt;
==Some Tools==&lt;br /&gt;
&lt;br /&gt;
====Java Compiler API====&lt;br /&gt;
&lt;br /&gt;
The Java Compiler API provides access to the functionality of the Java Compiler, most notably the ability to create an Abstract Syntax Tree of some set of Java code.  This is a straightforward tool, but does not seem to have any simple provision for creating a customizable call graph, which would be ideal for our application.&lt;br /&gt;
&lt;br /&gt;
====NetBeans API for Call Hierarchy====&lt;br /&gt;
&lt;br /&gt;
NetBeans has an API for accessing the code model used internally in the program.  NetBeans itself does have a sort of call graph functionality in the &amp;quot;Call Hierarchy&amp;quot; tool.  This could prove useful, but at this point in time we would rather focus on tools that aren't dependent on an IDE, and let us create a standalone application.&lt;br /&gt;
&lt;br /&gt;
====Soot====&lt;br /&gt;
&lt;br /&gt;
Soot is a &amp;quot;Java optimization framework,&amp;quot; and provides a large number of tools that can (and have been) used to perform static analysis of Java programs.  Soot has a number of features that we are looking for:&lt;br /&gt;
# Analyzes Java source, bytecode, and class files&lt;br /&gt;
# Creates a call graph based on class hierarchy&lt;br /&gt;
# Is free and open source (LGPL License)&lt;br /&gt;
# Can be used outside any IDE&lt;br /&gt;
# Is tested by use in a number of research applications&lt;br /&gt;
# Has a other static analysis applications (data flow analysis, points-to analysis) which could be applicable to security&lt;br /&gt;
&lt;br /&gt;
Soot is a likely candidate for use in the security static analysis.  [MQP:More on Soot|More on Soot]&lt;br /&gt;
&lt;br /&gt;
====Other Tools====&lt;br /&gt;
&lt;br /&gt;
Other tools that were looked at and may be considered for reference are TACLE (Type Analysis and Call Graph Construction for Eclipse), and a program verification tool called Bandera that used Soot and has an implementation of their own CallGraph class.  Other tools may be considered or added as the project continues.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
#Soot - http://www.sable.mcgill.ca/soot/&lt;br /&gt;
#NetBeans API for Call Hierarchy (in Java Source package) - http://bits.netbeans.org/dev/javadoc/index.html&lt;br /&gt;
#javac API - http://java.sun.com/javase/6/docs/technotes/guides/javac/index.html&lt;br /&gt;
#Larry Koved's excellent paper on access rights analysis for java - [http://portal.acm.org/ft_gateway.cfm?id=582452&amp;amp;type=pdf&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=634220&amp;amp;CFTOKEN=95929885 Access Rights Analysis for Java]&lt;br /&gt;
&lt;br /&gt;
[[Category:MQP]]&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	<entry>
		<id>https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Tools&amp;diff=1892</id>
		<title>MQP:Static Analysis Tools</title>
		<link rel="alternate" type="text/html" href="https://jimbodude.net/w/index.php?title=MQP:Static_Analysis_Tools&amp;diff=1892"/>
				<updated>2008-08-26T14:54:32Z</updated>
		
		<summary type="html">&lt;p&gt;Jpolitz: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{#categorytree:MQP|hideroot|mode=pages}}&lt;br /&gt;
&lt;br /&gt;
==What We're Looking For==&lt;br /&gt;
&lt;br /&gt;
For the kind of static analysis we're doing, some sort of a call graph is needed to model the flow of the program and where calls to checkPermissions are going to be found.  To that end, we investigated some static analysis tools that provide models of Java code and ways to inspect it.&lt;br /&gt;
&lt;br /&gt;
More tools may be added as the project continues.&lt;br /&gt;
{{Incomplete}}&lt;br /&gt;
&lt;br /&gt;
==Some Tools==&lt;br /&gt;
&lt;br /&gt;
====Java Compiler API====&lt;br /&gt;
&lt;br /&gt;
The Java Compiler API provides access to the functionality of the Java Compiler, most notably the ability to create an Abstract Syntax Tree of some set of Java code.  This is a straightforward tool, but does not seem to have any simple provision for creating a customizable call graph, which would be ideal for our application.&lt;br /&gt;
&lt;br /&gt;
====NetBeans API for Call Hierarchy====&lt;br /&gt;
&lt;br /&gt;
NetBeans has an API for accessing the code model used internally in the program.  NetBeans itself does have a sort of call graph functionality in the &amp;quot;Call Hierarchy&amp;quot; tool.  This could prove useful, but at this point in time we would rather focus on tools that aren't dependent on an IDE, and let us create a standalone application.&lt;br /&gt;
&lt;br /&gt;
====Soot====&lt;br /&gt;
&lt;br /&gt;
Soot is a &amp;quot;Java optimization framework,&amp;quot; and provides a large number of tools that can (and have been) used to perform static analysis of Java programs.  Soot has a number of features that we are looking for:&lt;br /&gt;
# Analyzes Java source, bytecode, and class files&lt;br /&gt;
# Creates a call graph based on class hierarchy&lt;br /&gt;
# Is free and open source (LGPL License)&lt;br /&gt;
# Can be used outside any IDE&lt;br /&gt;
# Is tested by use in a number of research applications&lt;br /&gt;
# Has a other static analysis applications (data flow analysis, points-to analysis) which could be applicable to security&lt;br /&gt;
&lt;br /&gt;
Soot is a likely candidate for use in the security static analysis.&lt;br /&gt;
&lt;br /&gt;
====Other Tools====&lt;br /&gt;
&lt;br /&gt;
Other tools that were looked at and may be considered for reference are TACLE (Type Analysis and Call Graph Construction for Eclipse), and a program verification tool called Bandera that used Soot and has an implementation of their own CallGraph class.  Other tools may be considered or added as the project continues.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
#Soot - http://www.sable.mcgill.ca/soot/&lt;br /&gt;
#NetBeans API for Call Hierarchy (in Java Source package) - http://bits.netbeans.org/dev/javadoc/index.html&lt;br /&gt;
#javac API - http://java.sun.com/javase/6/docs/technotes/guides/javac/index.html&lt;br /&gt;
#Larry Koved's excellent paper on access rights analysis for java - [http://portal.acm.org/ft_gateway.cfm?id=582452&amp;amp;type=pdf&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=634220&amp;amp;CFTOKEN=95929885 Access Rights Analysis for Java]&lt;br /&gt;
&lt;br /&gt;
[[Category:MQP]]&lt;/div&gt;</summary>
		<author><name>Jpolitz</name></author>	</entry>

	</feed>