Consider the following set of commands on an access control matrix A[s:subject,
ID: 3783164 • Letter: C
Question
Consider the following set of commands on an access control matrix
A[s:subject, o:object] : Actions={read, write, execute, append, list, modify, own}
Basic Commands <basic command>:
Create subject S, Create Object O,
Enter action R into A[S,O], Delete action R from A[S,O],
Destroy subject S, Destroy Object O
Conditional command of the following kind (<conditional command>):
Command name(parameters)
If <condition>
then <basic command>
end
Where <condition> can be of the form “if <element> in A[p,f]” or conjunctions thereof.
Write a command for delegate_all_rights_(p: subject, q: subject, o:object) that delegates all rights <p> has over subject <o> to subject <q>.
Write a command for revoke_all_rights_(p: subject, q: subject, o:object) that deletes all rights that subject <p> has over object <o> from subject <q>.
Write the preconditions and post conditions for the conditional command delegate_all_rights you wrote for 1(A).
Explanation / Answer
Assumption : overwriting of Actions if alreardy present i.e. if R already in A[S,O] then Enter action R into A[S,O] has no effect
preconditions : A[p,o] and A[q,o] exists
delegate_all_rights_(p: subject, q: subject, o:object)
if action R in A[p,o]
then Enter action R into A[q,o]
if action W in A[p,o]
then Enter action W into A[q,o]
if action E in A[p,o]
then Enter action E into A[q,o]
if action A in A[p,o]
then Enter action A into A[q,o]
if action L in A[p,o]
then Enter action L into A[q,o]
if action M in A[p,o]
then Enter action M into A[q,o]
if action O in A[p,o]
then Enter action O into A[q,o]
end
revoke_all_rights_(p: subject, q: subject, o:object)
if action R in A[p,o]
then Delete action R from A[q,o]
if action W in A[p,o]
then Delete action W from A[q,o]
if action E in A[p,o]
then Delete action E from A[q,o]
if action A in A[p,o]
then Delete action A from A[q,o]
if action L in A[p,o]
then Delete action L from A[q,o]
if action M in A[p,o]
then Delete action M from A[q,o]
if action O in A[p,o]
then Delete action O from A[q,o]
end