(delegation-evidence->policy
{[{[{:keys [rules]} :as policies] :policies} :as policySets] :policySets
:as delegation-evidence})
Convert an iSHARE delegation-evidence into a policy.
Returns nil
if delegation-evidence has a 'Deny' effect or delegation-evidence is nil.
Convert an iSHARE delegation-evidence into a policy. Returns `nil` if delegation-evidence has a 'Deny' effect or delegation-evidence is nil.
(fetch-and-validate-delegation base-request policy-selector party-ids)
Fetch and validate delegation evidence for policy-selector
and party-ids
.
Given a policy-selector
describing the expected authorisations, and
a sequence of party-ids
, from original :policy/issuer
to final
:target/access-subject
, fetches the necessary delegation-evidence.
If the complete chain of delegations can be fetched and it matches
the expectations in policy-selector
, returns nil
.
Otherwise returns a description of the problems with the delegation
chain: a map of :policy-selector
(as given), :policy
(from the
offending delegation evidence), and :issues
(a seq of strings).
Fetch and validate delegation evidence for `policy-selector` and `party-ids`. Given a `policy-selector` describing the expected authorisations, and a sequence of `party-ids`, from original `:policy/issuer` to final `:target/access-subject`, fetches the necessary delegation-evidence. If the complete chain of delegations can be fetched and it matches the expectations in `policy-selector`, returns `nil`. Otherwise returns a description of the problems with the delegation chain: a map of `:policy-selector` (as given), `:policy` (from the offending delegation evidence), and `:issues` (a seq of strings).
(policy-chain-mismatch now policy-selector policy-chain)
Returns the issues found when validating policy-chain against a policy-selector.
policy-selector describes the required policies for allowing an action on a resource. policy-chain is sequence of actual policies, in order of delegation (target/access-subject of a policy is the policy/issuer of the next policy). The issuer of the first policy, and the access-subject of the last policy must match the issuer and access-subject of the policy-selector.
Missing keys in policy or policy-selector mean no restriction: if policy mask does not contain a particular key, any or no value in the chain is ok. If a policy does not contain a key, it satisfies any value for that key in policy-selector.
Returns nil if chain is valid according to mask.
Returns the issues found when validating policy-chain against a policy-selector. policy-selector describes the required policies for allowing an action on a resource. policy-chain is sequence of actual policies, in order of delegation (target/access-subject of a policy is the policy/issuer of the next policy). The issuer of the first policy, and the access-subject of the last policy must match the issuer and access-subject of the policy-selector. Missing keys in policy or policy-selector mean no restriction: if policy mask does not contain a particular key, any or no value in the chain is ok. If a policy does not contain a key, it satisfies any value for that key in policy-selector. Returns nil if chain is valid according to mask.
(policy-selector->delegation-mask {:resource/keys [type identifiers attributes]
:environment/keys [service-providers]
:target/keys [actions]
:as policy})
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close