The policy version of RBAC in code. Its identifier is the version: the
policy module gave, or the content hash. The content hash is a digest of
the policy module and every module a predicate or a hop filter lives in.
So a change to a rule is a new version whether or not anyone said so. The
content is the role table and the module list as text when under the
configured cap, and a pointer to the modules otherwise.
the events document under
"Policy version" has the event and the cap.
Mediate.Rbac.publish/0 builds the version and emits telemetry_event/0
with it, one event per call. It stores nothing, so the consumer that
keeps a record of deployments handles that event.
Summary
Functions
The role table and the module list as text.
The digest of the policy module and every predicate and hop filter module.
The version of adapter as an event carries it, with the content by value when under the cap.
The version identifier a decision names.
The telemetry event Mediate.Rbac.publish/0 emits.
Functions
@spec content(Mediate.Rbac.Policy.t()) :: String.t()
The role table and the module list as text.
@spec content_hash(Mediate.Rbac.Policy.t()) :: String.t()
The digest of the policy module and every predicate and hop filter module.
@spec of(module(), Mediate.Rbac.Policy.t(), Mediate.Config.t(), DateTime.t()) :: Mediate.PolicyVersion.t()
The version of adapter as an event carries it, with the content by value when under the cap.
@spec ref(Mediate.Rbac.Policy.t()) :: Mediate.PolicyVersion.ref()
The version identifier a decision names.
@spec telemetry_event() :: [atom()]
The telemetry event Mediate.Rbac.publish/0 emits.