Last modified: Mon Sep 28 12:05:31 CDT 2009, changed due date to Monday from Friday.
Due: Monday, October 5, by midnight
Deliverables: You will be submitting your code electronically to the TA. Submission instructions are on the class website. Make sure that you clearly identify the members of your team (one or two people). Include a README file so that the TA will understand clearly how to compile and run your code.
Make sure that all members of your team understand the code and contribute equally, as much as possible, to its development.
Information on how to submit your assignment is available at How to submit
For this assignment:
java Biba mode inputfilenameHere mode can be either "biba" or "library" and should not be case sensitive. Instructions should be read from the input file named on the command line. Filenames on the command line are case sensitive.
In your career, you could be asked to implement a policy on top of some existing security mechanisms. This assignment gives you the opportunity to practice doing this in a benign setting.
This is a two part assignment. In part I, you will be implementing a basic Biba Strict Integrity system, where the hierarchical levels and categories are arbitrary. In part II, you'll build upon part I to implement a secure lending library. Build your system such that you can run in either BIBA mode or LIBRARY mode according to a flag that can be entered at the command level.
LEVELS L1 L2 ... Lk CATEGORIES C1 C2 ... Cj OBJECT obj_name obj_level SUBJECT subj_name subj_level ADD-CAT obj_name cat_name REMOVE-CAT obj_name cat_name READ subj_name obj_name WRITE subj_name obj_name val(Here "..." just indicates an arbitrary list of items; it's not a construct that you have to implement.) A level, such as subj_level or obj_level in the examples above, is input as K + 1 separate fields, where the first is the hierarchical component and the others are the need-to-know categories, e.g., "(L1, {A, B, C})" should be entered as "L1 A B C" A level is always the last thing on a line to make it easier to parse.
The intended semantics of these commands is as follows:
As usual, commands, including names, are not case sensitive. Enforce reasonable rules. In particular, a subject or object's level should not refer to hierarchical levels or categories that have not been previously introduced. There is no problem with having the same name used in multiple ways. For example, you could have a subject named FRED, an object named FRED, and a category FRED.
The idea is that the LEVELS, CATEGORIES, SUBJECT, OBJECT, ADD-CAT, and REMOVE-CAT commands build up the basic infrastructure for your secure system. Then the system should check whether READ and WRITE operations are permitted using the Biba Strict Integity rules.
When run in BIBA mode, your system should be able to process an arbitrary list of commands, reject any that are illegal, and process all the legal ones. Print a nice audit log of the execution of successive commands. In particular, for each READ or WRITE, print out whether or not the operation is allowed.
The idea is as follows. The library contains various read-only documents (objects): D1, ..., Dm. There is also a pool of potential borrowers (subjects): B1, ..., Bn. Each document has an associated list of allowed borrowers, which is an arbitrary subset of the pool of subjects. For example, it might be that document D19 is only accessible by B3, B7 and B12, while D82 might be accessible only by B7 and B15. The idea of Part II is to implement a system that provides this functionality. Don't implement this from scratch, but use your existing Biba integrity system (Part I) as your implementation platform.
Your library system will have the following commands, read from your input file.
READER reader_name DOCUMENT doc_name reader_namei reader_namej reader_namek CHECKOUT doc_name reader_name RETURN doc_name reader_name REVOKE doc_name reader_nameThere can be any number of readers listed in the DOCUMENT command.
These commands have the following interpretation:
My intention for the way to implement this is as follows. Let's refer to our two systems as "Biba" and "Library". We'll implement the Library system by "compiling" commands into programs for the underlying Biba system. Emulate each Library mode command, by running series of commands at the Biba system level. You may have to run several Biba commands to initialize the system.
Each document/borrower at the Library level will be implemented as an object/subject in the Biba level. Each will have a label that will permit exactly the accesses required. Let's say that document GoneWithTheWind can only be checked out by Fred and Ethel. Then we give the document the label (low, {fred, ethel}). Fred has label (low, {fred}) and Ethel has label (low, {ethel}). Notice that the object level dominates the subject level for Fred and for Ethel, but for no other possible subjects. Following this scheme and the Biba rules, only Fred and Ethel could ever successfully execute a READ instruction on this document.
To get the Library system started, initialize by executing the following command on the underlying BIBA system:
LEVELS lowThis is the only hierarchical level required. The work is all done with need-to-know categories.
Then, each command in the Library system is "compiled" into commands for the underlying Biba system along with some additional recordkeeping. For example, the Library system command
READER fredis implemented by the Biba commands:
CATEGORIES fred SUBJECT fred low fredThis creates a subject named Fred at the Biba level and gives it the appropriate level (low, {fred}).
The library system commands:
DOCUMENT MobyDick fred ethel ricky DOCUMENT MobyDick lucyare implemented by the Biba commands:
OBJECT MobyDick low fred ethel ricky ADD-CAT MobyDick lucyThis creates an object named MobyDick at the Biba level and gives it the integrity label (low, {fred, ethel, ricky, lucy}).
The library system command:
CHECKOUT MobyDick ethelis implemented by invoking the Biba command
READ ethel MobyDickand recording that Ethel has this document checked-out (assuming that the current permissions allow this READ).
Your task is to devise implementations for the other commands and to implement this system. You will need to maintain a database of the subjects and objects of the system. For a subject, you'll store the name, level, and documents checked out. For an object you'll store the name and level. Note that the labels of objects change over time. The levels of subjects should not change, once established.
Design your Library system to be useful and fairly user-friendly. Print out a reasonable commentary on what's happening with each instruction executed. Don't worry about covert channels.
Construct your system such that it can be run in either BIBA mode or LIBRARY mode. In BIBA mode, it accepts only Biba commands; in LIBRARY mode it accepts only Library commands. In Library mode, the BIBA interaction is hidden from the user by the Library command interface. Note that no command in your LIBRARY implementation should ever invoke the BIBA WRITE command. That is the way that you enforce the read-only nature of all the documents.