Skip to main content
. Author manuscript; available in PMC: 2019 Dec 27.
Published in final edited form as: ACM Trans Internet Technol. 2019 Nov;19(3):40. doi: 10.1145/3323233

Algorithm 5.

Generate rule-sets for each subject

  1: procedure GENERATE_SORO(i, Ov, RO, OR, OS)
  2:   STOS[i] ▹ obtain all the object-operation pairs entitled to ith subject
  3:   ST[]
  4:   for each (oa, opb ) in ST do ▹ iterating over all object-operation pairs in ST
  5:     STST{oa}
  6:   RS ← [ ] RS will finally contain the sets of rules for the ith subject
  7:   for each (oc, opd) in ST do ▹ iterate over all object-operation pairs in ST
  8:     TRO[c] ▹ obtain all the rules corresponding to an object in an object-operation pair
  9:     for each re in T do ▹ iterate over all rules obtained
10:       if re [op] Opd then ▹ check whether the operations in the object-operation pair and the rule match
11:         RO [c]← RO [c]-{re} ▹ discard the rule
12:     insert (RS, RO [c])
13   RSRS
14:   for j ← 1 to |RS|do ▹ iterating over all rule sets
15:     for each rf in RS[j]do ▹ iterating over rules in each rule set
16:       UTOR[f] ▹ obtain the objects corresponding to each rule
17:       if UTST Null then ▹ checking for unauthorized accesses
18:         RS [j] ← RS [j] - {rf} ▹ pruning a rule allowing unauthorized access
19:         if RS [j] = Null then
20:           exit
21:   return RS