diff --git a/source/permission/list-Permission-examples.xml b/source/permission/list-Permission-examples.xml index d1f4513d61..cf213133f7 100644 --- a/source/permission/list-Permission-examples.xml +++ b/source/permission/list-Permission-examples.xml @@ -40,4 +40,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source/permission/permission-example-base.xml b/source/permission/permission-example-base.xml new file mode 100644 index 0000000000..6a8b165644 --- /dev/null +++ b/source/permission/permission-example-base.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source/permission/permission-example-composite.xml b/source/permission/permission-example-composite.xml new file mode 100644 index 0000000000..0eda4bd0b2 --- /dev/null +++ b/source/permission/permission-example-composite.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/source/permission/permission-notes.xml b/source/permission/permission-notes.xml index 583a597178..f14e5e8dfd 100644 --- a/source/permission/permission-notes.xml +++ b/source/permission/permission-notes.xml @@ -2,6 +2,33 @@ +

Composite Permissions

+

+In some cases, there are common components across different Permission rules and repeating those common rules could lead +to redundancy which in turn could lead to the risk on inconsistency, if the common components are not formulated precisely in the same manner. +Therefore, it is desirable to have a mechanism to define a common set of rules and refer to them in a single Permission resources. +The import attribute enables pointing to such common rules by referencing the Permission resource. +

+

+If the import attribute is used in rule, the rule element shall not contain any other elements. +The result of evluating a rule with an import is defined to be the result of evaluating the referenced Permission resource. +The decision from that evaluation will then be combined with the decision from the other rues based on the combining algorithm +specified in the combining element. +

+

+If the referenced Permission is not active or expired, this should be interpreted as returning a not-applicable decision +because the referenced permission is silent about whether access should be permitted or denied in the given context. +

+

+A circular reference in processing linked Permissions should be treated as an error, leading to a not-applicable +decision bubbling up from the Permission resource in which the circular reference was encountered. +

+ +

+Implementers shoud rely on pragmatic limits on the length of the chain of linked Permission and put in place +reasonable guardrails against (maliciously or erroneously) large chains that could lead to draining of resources at the time of processing. +

+

Rules Processing Logic

diff --git a/source/permission/structuredefinition-Permission.xml b/source/permission/structuredefinition-Permission.xml index 5b1d57b352..e884bdbe29 100644 --- a/source/permission/structuredefinition-Permission.xml +++ b/source/permission/structuredefinition-Permission.xml @@ -70,6 +70,13 @@ + + + + + + + @@ -256,18 +263,34 @@ + + + + + + + + + + + + + + + + @@ -299,6 +322,7 @@ Within the `.data` element, all elements and all repetitions of elements, are in an AND relationship. Thus to select data that has both `STD` and `HIV` one puts both into one `.rule`. To have different rules for `STD` from `HIV`, one would need to have two `.rule` elements. To have a rule that applies to both, those that have just `STD` and just `HIV`, this repitition may also be done at the data level as described above."/> + @@ -411,6 +435,7 @@ Within the `.activity` element, all elements and all repetitions of elements, are in an AND relationship. Thus to control an actity that is covering purpose of both `TREAT` and `HOPERAT`, one rule with an `.activity` `.purpose` holding both `TREAT` and `HOPERAT` can define that rule. However this will not cover activities covering only `TREAT`, for that repeat at the `.activity` with just a `.purpose` of `TREAT`."/> + @@ -493,6 +518,7 @@ +