@twin.org/rights-management-plugins 0.0.3-next.13 → 0.0.3-next.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/index.js +5 -0
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/IDefaultPolicyArbiterConfig.js +4 -0
- package/dist/es/models/IDefaultPolicyArbiterConfig.js.map +1 -0
- package/dist/es/models/IDefaultPolicyArbiterConstructorOptions.js +4 -0
- package/dist/es/models/IDefaultPolicyArbiterConstructorOptions.js.map +1 -0
- package/dist/es/models/IPassThroughPolicyObligationEnforcerConstructorOptions.js +4 -0
- package/dist/es/models/IPassThroughPolicyObligationEnforcerConstructorOptions.js.map +1 -0
- package/dist/es/policyArbiters/defaultPolicyArbiter.js +824 -0
- package/dist/es/policyArbiters/defaultPolicyArbiter.js.map +1 -0
- package/dist/es/policyArbiters/passThroughPolicyArbiter.js +5 -4
- package/dist/es/policyArbiters/passThroughPolicyArbiter.js.map +1 -1
- package/dist/es/policyEnforcementProcessor/defaultPolicyEnforcementProcessor.js +5 -4
- package/dist/es/policyEnforcementProcessor/defaultPolicyEnforcementProcessor.js.map +1 -1
- package/dist/es/policyEnforcementProcessor/passThroughPolicyEnforcementProcessor.js +5 -4
- package/dist/es/policyEnforcementProcessor/passThroughPolicyEnforcementProcessor.js.map +1 -1
- package/dist/es/policyExecutionActions/loggingPolicyExecutionAction.js +4 -1
- package/dist/es/policyExecutionActions/loggingPolicyExecutionAction.js.map +1 -1
- package/dist/es/policyInformationSources/identityPolicyInformationSource.js +2 -1
- package/dist/es/policyInformationSources/identityPolicyInformationSource.js.map +1 -1
- package/dist/es/policyInformationSources/staticPolicyInformationSource.js +2 -1
- package/dist/es/policyInformationSources/staticPolicyInformationSource.js.map +1 -1
- package/dist/es/policyObligationEnforcers/passThroughPolicyObligationEnforcer.js +55 -0
- package/dist/es/policyObligationEnforcers/passThroughPolicyObligationEnforcer.js.map +1 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/models/IDefaultPolicyArbiterConfig.d.ts +10 -0
- package/dist/types/models/IDefaultPolicyArbiterConstructorOptions.d.ts +20 -0
- package/dist/types/models/IPassThroughPolicyObligationEnforcerConstructorOptions.d.ts +10 -0
- package/dist/types/policyArbiters/defaultPolicyArbiter.d.ts +34 -0
- package/dist/types/policyArbiters/passThroughPolicyArbiter.d.ts +5 -4
- package/dist/types/policyEnforcementProcessor/defaultPolicyEnforcementProcessor.d.ts +4 -3
- package/dist/types/policyEnforcementProcessor/passThroughPolicyEnforcementProcessor.d.ts +4 -3
- package/dist/types/policyExecutionActions/loggingPolicyExecutionAction.d.ts +3 -2
- package/dist/types/policyInformationSources/identityPolicyInformationSource.d.ts +3 -2
- package/dist/types/policyInformationSources/staticPolicyInformationSource.d.ts +3 -2
- package/dist/types/policyObligationEnforcers/passThroughPolicyObligationEnforcer.d.ts +35 -0
- package/docs/changelog.md +23 -0
- package/docs/reference/classes/DefaultPolicyArbiter.md +101 -0
- package/docs/reference/classes/DefaultPolicyEnforcementProcessor.md +10 -4
- package/docs/reference/classes/IdentityPolicyInformationSource.md +7 -1
- package/docs/reference/classes/LoggingPolicyExecutionAction.md +7 -1
- package/docs/reference/classes/PassThroughPolicyArbiter.md +10 -4
- package/docs/reference/classes/PassThroughPolicyEnforcementProcessor.md +10 -4
- package/docs/reference/classes/PassThroughPolicyObligationEnforcer.md +107 -0
- package/docs/reference/classes/StaticPolicyInformationSource.md +7 -1
- package/docs/reference/index.md +5 -0
- package/docs/reference/interfaces/IDefaultPolicyArbiterConfig.md +17 -0
- package/docs/reference/interfaces/IDefaultPolicyArbiterConstructorOptions.md +39 -0
- package/docs/reference/interfaces/IPassThroughPolicyObligationEnforcerConstructorOptions.md +17 -0
- package/locales/en.json +16 -0
- package/package.json +2 -2
package/docs/reference/index.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Classes
|
|
4
4
|
|
|
5
|
+
- [DefaultPolicyArbiter](classes/DefaultPolicyArbiter.md)
|
|
5
6
|
- [PassThroughPolicyArbiter](classes/PassThroughPolicyArbiter.md)
|
|
6
7
|
- [DefaultPolicyEnforcementProcessor](classes/DefaultPolicyEnforcementProcessor.md)
|
|
7
8
|
- [PassThroughPolicyEnforcementProcessor](classes/PassThroughPolicyEnforcementProcessor.md)
|
|
@@ -9,10 +10,13 @@
|
|
|
9
10
|
- [IdentityPolicyInformationSource](classes/IdentityPolicyInformationSource.md)
|
|
10
11
|
- [StaticPolicyInformationSource](classes/StaticPolicyInformationSource.md)
|
|
11
12
|
- [PassThroughPolicyNegotiator](classes/PassThroughPolicyNegotiator.md)
|
|
13
|
+
- [PassThroughPolicyObligationEnforcer](classes/PassThroughPolicyObligationEnforcer.md)
|
|
12
14
|
- [PassThroughPolicyRequester](classes/PassThroughPolicyRequester.md)
|
|
13
15
|
|
|
14
16
|
## Interfaces
|
|
15
17
|
|
|
18
|
+
- [IDefaultPolicyArbiterConfig](interfaces/IDefaultPolicyArbiterConfig.md)
|
|
19
|
+
- [IDefaultPolicyArbiterConstructorOptions](interfaces/IDefaultPolicyArbiterConstructorOptions.md)
|
|
16
20
|
- [IDefaultPolicyEnforcementProcessorConstructorOptions](interfaces/IDefaultPolicyEnforcementProcessorConstructorOptions.md)
|
|
17
21
|
- [IIdentityPolicyInformationSourceConstructorOptions](interfaces/IIdentityPolicyInformationSourceConstructorOptions.md)
|
|
18
22
|
- [ILoggingPolicyExecutionActionConfig](interfaces/ILoggingPolicyExecutionActionConfig.md)
|
|
@@ -20,6 +24,7 @@
|
|
|
20
24
|
- [IPassThroughPolicyArbiterConstructorOptions](interfaces/IPassThroughPolicyArbiterConstructorOptions.md)
|
|
21
25
|
- [IPassThroughPolicyEnforcementProcessorConstructorOptions](interfaces/IPassThroughPolicyEnforcementProcessorConstructorOptions.md)
|
|
22
26
|
- [IPassThroughPolicyNegotiatorConstructorOptions](interfaces/IPassThroughPolicyNegotiatorConstructorOptions.md)
|
|
27
|
+
- [IPassThroughPolicyObligationEnforcerConstructorOptions](interfaces/IPassThroughPolicyObligationEnforcerConstructorOptions.md)
|
|
23
28
|
- [IPassThroughPolicyRequesterConstructorOptions](interfaces/IPassThroughPolicyRequesterConstructorOptions.md)
|
|
24
29
|
- [IStaticPolicyInformationSource](interfaces/IStaticPolicyInformationSource.md)
|
|
25
30
|
- [IStaticPolicyInformationSourceConfig](interfaces/IStaticPolicyInformationSourceConfig.md)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Interface: IDefaultPolicyArbiterConfig
|
|
2
|
+
|
|
3
|
+
Configuration for the Default Policy Arbiter.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### maxInheritanceDepth?
|
|
8
|
+
|
|
9
|
+
> `optional` **maxInheritanceDepth**: `number`
|
|
10
|
+
|
|
11
|
+
The maximum depth to traverse when resolving inherited policies.
|
|
12
|
+
|
|
13
|
+
#### Default
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
10
|
|
17
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Interface: IDefaultPolicyArbiterConstructorOptions
|
|
2
|
+
|
|
3
|
+
Options for the Default Policy Arbiter.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### loggingComponentType?
|
|
8
|
+
|
|
9
|
+
> `optional` **loggingComponentType**: `string`
|
|
10
|
+
|
|
11
|
+
The logging component for policy arbiter.
|
|
12
|
+
|
|
13
|
+
#### Default
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
logging
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### policyAdministrationPointComponentType?
|
|
22
|
+
|
|
23
|
+
> `optional` **policyAdministrationPointComponentType**: `string`
|
|
24
|
+
|
|
25
|
+
The policy administration point component for retrieving inherited policies.
|
|
26
|
+
|
|
27
|
+
#### Default
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
policy-administration-point
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
***
|
|
34
|
+
|
|
35
|
+
### config?
|
|
36
|
+
|
|
37
|
+
> `optional` **config**: [`IDefaultPolicyArbiterConfig`](IDefaultPolicyArbiterConfig.md)
|
|
38
|
+
|
|
39
|
+
The configuration options for the default policy arbiter.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Interface: IPassThroughPolicyObligationEnforcerConstructorOptions
|
|
2
|
+
|
|
3
|
+
Options for the Pass Through Policy Obligation Enforcer.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### loggingComponentType?
|
|
8
|
+
|
|
9
|
+
> `optional` **loggingComponentType**: `string`
|
|
10
|
+
|
|
11
|
+
The logging component for the policy obligation enforcer.
|
|
12
|
+
|
|
13
|
+
#### Default
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
logging
|
|
17
|
+
```
|
package/locales/en.json
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
"identityPolicyInformationSource": {
|
|
4
4
|
"identityRetrievalFailed": "Failed to retrieve identity \"{id}\" information for policy id: \"{policyId}\""
|
|
5
5
|
},
|
|
6
|
+
"defaultPolicyArbiter": {
|
|
7
|
+
"jsonPathOperandMissingTarget": "The operand \"{operand}\" is missing a JSONPath target after the twin:jsonpath: prefix.",
|
|
8
|
+
"informationTargetMissing": "The permission target references information key \"{key}\" but it does not exist.",
|
|
9
|
+
"multipleTargetsNotSupported": "Multiple targets in a single permission are not supported.",
|
|
10
|
+
"circularInheritanceDetected": "Circular inheritance detected: policy \"{policyId}\" inherits from \"{inheritFromId}\" which creates a cycle.",
|
|
11
|
+
"logicalConstraintOperandNotUnique": "Logical constraint operand is not unique within the policy, each operand must be unique.",
|
|
12
|
+
"inheritedPolicyNotFound": "The inherited policy with id \"{inheritFromId}\" could not be found in the Policy Administration Point.",
|
|
13
|
+
"noObligationEnforcersRegistered": "No Policy Obligation Enforcers are registered and they are required to enforce duties.",
|
|
14
|
+
"maxInheritanceDepthExceeded": "The maximum inheritance depth of {maxInheritanceDepth} has been exceeded when processing policy \"{policyId}\"."
|
|
15
|
+
},
|
|
6
16
|
"defaultPolicyEnforcementProcessor": {
|
|
7
17
|
"targetNotJsonPath": "The policy decision target \"{target}\" is not a valid JSON-path string, it should be a minimum of $.",
|
|
8
18
|
"replaceValueMissing": "The policy decision replaceValue was not provided for target \"{target}\"."
|
|
@@ -29,6 +39,9 @@
|
|
|
29
39
|
"passThroughPolicyArbiter": {
|
|
30
40
|
"decidingPolicy": "Deciding policy for policy id: \"{policyId}\""
|
|
31
41
|
},
|
|
42
|
+
"defaultPolicyArbiter": {
|
|
43
|
+
"decidingPolicy": "Deciding policy for policy id: \"{policyId}\""
|
|
44
|
+
},
|
|
32
45
|
"passThroughPolicyNegotiator": {
|
|
33
46
|
"handlingOffer": "Handling offer negotiation for offer id: \"{offerId}\"",
|
|
34
47
|
"createAgreement": "Creating agreement for policy id: \"{offerId}\""
|
|
@@ -38,6 +51,9 @@
|
|
|
38
51
|
"agreement": "Logging agreement request for agreement id: \"{agreementId}\", negotiation id: \"{negotiationId}\"",
|
|
39
52
|
"finalised": "Logging finalised request for negotiation id: \"{negotiationId}\"",
|
|
40
53
|
"terminated": "Logging terminated request for negotiation id: \"{negotiationId}\""
|
|
54
|
+
},
|
|
55
|
+
"passThroughPolicyObligationEnforcer": {
|
|
56
|
+
"enforcingDuty": "Enforcing duty for policy id: \"{policyId}\""
|
|
41
57
|
}
|
|
42
58
|
}
|
|
43
59
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/rights-management-plugins",
|
|
3
|
-
"version": "0.0.3-next.
|
|
3
|
+
"version": "0.0.3-next.14",
|
|
4
4
|
"description": "Rights management plugin implementations",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@twin.org/data-json-path": "next",
|
|
25
25
|
"@twin.org/logging-models": "next",
|
|
26
26
|
"@twin.org/nameof": "next",
|
|
27
|
-
"@twin.org/rights-management-models": "0.0.3-next.
|
|
27
|
+
"@twin.org/rights-management-models": "0.0.3-next.14",
|
|
28
28
|
"@twin.org/standards-w3c-odrl": "next"
|
|
29
29
|
},
|
|
30
30
|
"main": "./dist/es/index.js",
|