To use the Flow security model, you need to create an object or objects of this model.
One Flow security model object associates a set of resources with a set of finite-state machines that have the same configuration. A resource can be associated with only one finite-state machine of each Flow security model object.
A Flow security model object has the following parameters:
type State
– type that determines the set of states of the finite-state machine (variant type that combines text literals).config
– configuration of the finite-state machine:states
– set of states of the finite-state machine (must match the set of states defined by the State
type).initial
– initial state of the finite-state machine.transitions
– description of the permissible transitions between states of the finite-state machine.All parameters of a Flow security model object are required.
Example:
policy object service_flow : Flow {
type State = "sleep" | "started" | "stopped" | "finished"
config = { states : ["sleep", "started", "stopped", "finished"]
, initial : "sleep"
, transitions : { "sleep" : ["started"]
, "started" : ["stopped", "finished"]
, "stopped" : ["started", "finished"]
}
}
}
Diagram of finite-state machine states in the example
A Flow security model object can be covered by a security audit. You can also define the audit conditions specific to the Flow security model. To do so, use the following construct in the audit configuration description:
omit : [
<"state 1"
>[, ...
]]
– the audit is not performed if the finite-state machine is in one of the listed states.
It is necessary to create multiple objects of the Flow security model in the following cases: