Function: createConditions()
createConditions(
config):object
Defined in: conditions.ts:212
The condition keys, variables and evaluation of one namespace.
Parameters
| Parameter | Type |
|---|---|
config | ConditionsConfig |
Returns
bindVariables
bindVariables: (
args) =>PolicyDocument
document with each ${variable} of values replaced; a null or
absent value leaves it unbound, so a Deny naming it applies and an Allow
grants nothing.
Parameters
| Parameter | Type |
|---|---|
args | { document: PolicyDocument; values: Record<string, string | null | undefined>; } |
args.document | PolicyDocument |
args.values | Record<string, string | null | undefined> |
Returns
evaluateCondition
evaluateCondition: (
args) =>boolean
Parameters
| Parameter | Type | Description |
|---|---|---|
args | { condition: Condition; context: Record<string, string>; effect: Effect; } | - |
args.condition | Condition | - |
args.context | Record<string, string> | - |
args.effect | Effect | The statement's effect, which decides a condition on an absent key. |
Returns
boolean
isActionConditionKey
isActionConditionKey: (
key) =>boolean
Whether key is an action key (tasks:Transition): one only the actions
declaring it supply, unlike the namespace's own family.
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
boolean
isPlatformConditionKey
isPlatformConditionKey: (
key) =>boolean
Whether key is one the namespace supplies to every check that has it.
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
boolean
namespace
namespace:
string
namesRequestTag
namesRequestTag: (
args) =>boolean
Whether a statement in sets conditions on a request tag for one of
keys: asked before authorizing a write whose value for such a key is
not known yet, which no evaluation can answer.
Parameters
| Parameter | Type |
|---|---|
args | { keys: readonly string[]; sets: PolicySets; } |
args.keys | readonly string[] |
args.sets | PolicySets |
Returns
boolean
requestTagKey
requestTagKey: (
tag) =>string
Parameters
| Parameter | Type |
|---|---|
tag | string |
Returns
string
requestTagKeyPrefix
requestTagKeyPrefix:
string
Followed by a tag name: the value the request writes for that tag.
resourceTagKey
resourceTagKey: (
tag) =>string
Parameters
| Parameter | Type |
|---|---|
tag | string |
Returns
string
resourceTagKeyPrefix
resourceTagKeyPrefix:
string
Followed by a tag name, verbatim.
resourceTypeKey
resourceTypeKey:
string
unknownVariables
unknownVariables: (
value) =>string[]
The variables value names that the namespace does not supply.
Parameters
| Parameter | Type |
|---|---|
value | string |
Returns
string[]
variables
variables:
string[]