MQP:Resource Model Proof of Concept 0.1

From JimboWiki
Jump to: navigation, search


MQP Navigation

The Prototype

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 here.

A Simple Walkthrough

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:

java -jar ResourceModelProofOfConcept0-1.jar resourceDefinitionDraft1.xml

This will cause the resource definitions to be loaded, then the resource model structure will be output to standard out.

Some Explanation of Output

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).

A sample of the output of a Resource is shown here:

...
Socket Connections
  Actions:
    SocketAccept
      ActionParameters:
        hostname
        portrange
      RuleDefinitions:
        SocketPermission([host:{hostname}:{portrange}] [action:accept] )
...

This says that the "resource" in question is Socket Connections, and the current "action" 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 "host" element results from applying the two action parameters in the format shown. The "action" element of the permission rule is directly related to the action in question - it is the string "accept".

The corresponding permission rule, containing the host and action parameters that the action parameters are applied to, looks like this:

...
SocketPermission
  Parameters:
    1: host
    2: action

			The permission used for Socket connect, accept, listen, and
			resolve actions. Parameters are host and action.

...

Limitations

  • This version requires a connection to the Internet in order to look up the XML schema.
  • The JAR is enormous. In order to get it packaged quickly, we included way too much stuff.
  • There are libraries within the JAR that should be stored separately.