added first draft of structure Rep_SecureUML. There are however no functions for parsing Rep_SecureUML-types...
git-svn-id: https://projects.brucker.ch/su4sml/svn/infsec-import/trunk/src/su4sml@3237 3260e6d1-4efc-4170-b0a7-36055960796d
This commit is contained in:
parent
b447ec81d8
commit
7528ea1d9a
43
src/ROOT.ML
43
src/ROOT.ML
|
@ -38,26 +38,6 @@ use "ROOT.ML";
|
|||
OS.FileSys.chDir "../../../src";
|
||||
|
||||
|
||||
|
||||
(* ****************************************************** *)
|
||||
(* Abstract Representation ("The Repository") of a UML model.
|
||||
- References resolved
|
||||
- only supported parts were represented
|
||||
- structural simplifications whereever needed for
|
||||
our applications. *)
|
||||
use "rep_ocl.sig";
|
||||
use "rep_ocl.sml";
|
||||
use "rep_state_machines.sig";
|
||||
use "rep_state_machines.sml";
|
||||
use "rep_activity_graphs.sig";
|
||||
use "rep_activity_graphs.sml";
|
||||
use "rep_core.sig";
|
||||
use "rep_core.sml";
|
||||
use "rep.sig";
|
||||
use "rep.sml";
|
||||
|
||||
|
||||
|
||||
(* ****************************************************** *)
|
||||
(* Abstract Representation of an XMI File of a UML Model.
|
||||
- References kept
|
||||
|
@ -76,6 +56,29 @@ use "xmi.sml";
|
|||
|
||||
|
||||
|
||||
(* ****************************************************** *)
|
||||
(* Abstract Representation ("The Repository") of a UML model.
|
||||
- References resolved
|
||||
- only supported parts were represented
|
||||
- structural simplifications whereever needed for
|
||||
our applications. *)
|
||||
use "rep_ocl.sig";
|
||||
use "rep_ocl.sml";
|
||||
use "rep_state_machines.sig";
|
||||
use "rep_state_machines.sml";
|
||||
use "rep_activity_graphs.sig";
|
||||
use "rep_activity_graphs.sml";
|
||||
use "rep_core.sig";
|
||||
use "rep_core.sml";
|
||||
use "rep_secureuml.sig";
|
||||
use "rep_secureuml.sml";
|
||||
use "rep.sig";
|
||||
use "rep.sml";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
(* ****************************************************** *)
|
||||
(* Main Conversion Processes *)
|
||||
use "xmltree_parser.sml"; (* provides explicit xml-tree data structure,
|
||||
|
|
|
@ -27,6 +27,8 @@ sig
|
|||
|
||||
include REP_CORE
|
||||
include REP_ACTIVITY_GRAPH
|
||||
include REP_SECUREUML
|
||||
|
||||
type Model
|
||||
|
||||
end
|
||||
|
|
|
@ -25,7 +25,10 @@
|
|||
structure Rep : REP =
|
||||
struct
|
||||
|
||||
open Rep_Core Rep_StateMachine Rep_ActivityGraph
|
||||
|
||||
open Rep_Core Rep_StateMachine Rep_ActivityGraph Rep_SecureUML
|
||||
type Model = { classifiers: Classifier list,
|
||||
permissions: Permission list,
|
||||
role_inheritance: RoleHierarchy
|
||||
}
|
||||
|
||||
end
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
signature REP_SECUREUML =
|
||||
sig
|
||||
|
||||
type Subject
|
||||
|
||||
|
||||
type Role
|
||||
type RoleAssignment = (Subject * Role) list
|
||||
type RoleHierarchy = (Role * Role) list
|
||||
|
||||
type Resource
|
||||
type ActionName
|
||||
type ProtectedAction
|
||||
type Permission
|
||||
|
||||
|
||||
end
|
|
@ -0,0 +1,52 @@
|
|||
structure Rep_SecureUML : REP_SECUREUML =
|
||||
struct
|
||||
|
||||
datatype Subject = User of string
|
||||
| Group of Group
|
||||
withtype Group = string * Subject list
|
||||
|
||||
(* perhaps we find the need for a more elaborate type later *)
|
||||
type Role = string
|
||||
|
||||
type RoleAssignment = (Subject * Role) list
|
||||
|
||||
|
||||
type RoleHierarchy = (Role * Role) list
|
||||
|
||||
(* computes the reflexiv and transitive closure of rh starting from *)
|
||||
(* the given role *)
|
||||
(* fun inherited_roles rh role = ... *)
|
||||
|
||||
(* Resources according to ComponentUML. This will have to be adapted when we *)
|
||||
(* support something like ControllerUML. *)
|
||||
datatype Resource = Entity of Rep_OclType.Path
|
||||
| EntityMethod of Rep_OclType.Path
|
||||
| EntityAttribute of Rep_OclType.Path
|
||||
(* | EntityAssociationEnd of Rep.Path ??? *)
|
||||
|
||||
|
||||
(* fun contained_resources e = ... *)
|
||||
|
||||
datatype ActionName = Create | Read | Update | Delete | FullAccess | Execute
|
||||
|
||||
datatype ProtectedAction = SimpleAction of ActionName * Resource * string list
|
||||
| CompositeAction of ActionName * Resource * string list
|
||||
|
||||
fun subordinated_actions (SimpleAction _) = nil
|
||||
| subordinated_actions (CompositeAction (Read,Entity c,p)) = nil
|
||||
(* let val read_attributes = ...
|
||||
val read_methods = ...
|
||||
in
|
||||
List.concat [read_attributes,read_methods]
|
||||
end *)
|
||||
(* | subordinated_actions (CompositeAction (_,_)) = ...*)
|
||||
|
||||
|
||||
|
||||
type Permission = { name: string,
|
||||
roles: Role list,
|
||||
constraints: Rep_OclTerm.OclTerm list,
|
||||
actions: ProtectedAction list
|
||||
}
|
||||
|
||||
end
|
Loading…
Reference in New Issue