Last modified: Wed Oct 1 15:57:12 CDT 2008
Due: Monday, October 13, 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.
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 valA level can be 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})" can be entered as "L1 A B C"
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 and an object named 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 legal commands and reject any that are illegal. Print a nice 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 a platform.
Your library system will have the following commands, read from standard input:
READER reader_name DOCUMENT doc_name reader_name1 ... reader_namek CHECKOUT doc_name reader_name RETURN doc_name reader_name REVOKE doc_name reader_nameThese 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.
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 started, we execute 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 MobyDick etheland 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.