@datalayer/agent-runtimes 1.6.22 → 1.6.25
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-embed/datalayer-app-main.js +14 -6
- package/lib/apps/__tests__/fixtures/recommendationCard.json +165 -0
- package/lib/specs/actions.js +7 -0
- package/lib/specs/agents/agents.d.ts +1 -0
- package/lib/specs/agents/agents.js +147 -1
- package/lib/specs/apps.d.ts +1 -0
- package/lib/specs/apps.js +375 -0
- package/lib/specs/backendTools.d.ts +6 -0
- package/lib/specs/backendTools.js +114 -0
- package/lib/specs/policies.d.ts +1 -0
- package/lib/specs/policies.js +17 -0
- package/package.json +1 -1
package/lib/specs/policies.js
CHANGED
|
@@ -139,6 +139,22 @@ export const DEFAULT_POLICY_0_0_1 = {
|
|
|
139
139
|
},
|
|
140
140
|
},
|
|
141
141
|
};
|
|
142
|
+
export const DOGWOOD_APPROVAL_BEFORE_ACCOUNT_CHANGE_POLICY_0_0_1 = {
|
|
143
|
+
id: 'dogwood-approval-before-account-change',
|
|
144
|
+
version: '0.0.1',
|
|
145
|
+
name: 'Approval before an AWS account change',
|
|
146
|
+
description: 'An example of a Dogwood set an administrator writes for an AWS account agent: a change to the account (a fix applied with the change role) is permitted only when a person approved the same recommendation in the session within the hour before it; every other action is left to the rules. Deny by default: without the approval, the change is refused, by the Shield in the runtime and, when the change tool is reached through an AgentCore Gateway, by AgentCore Policy there.',
|
|
147
|
+
enabled: false,
|
|
148
|
+
tags: ['policy', 'organization', 'dogwood', 'example', 'aws'],
|
|
149
|
+
policy: {
|
|
150
|
+
scope: 'organization',
|
|
151
|
+
version: 1,
|
|
152
|
+
dogwood: {
|
|
153
|
+
mode: 'enforce',
|
|
154
|
+
policies: '@id("everything but an account change")\npermit (principal, action, resource)\nunless { action == Datalayer::Action::"aws_account___apply_fix" };\n\n@id("an account change needs its recommendation approved within the hour")\npermit (principal, action == Datalayer::Action::"aws_account___apply_fix", resource)\nwhen temporal {\n formerly within 1h Datalayer::Action::"aws_account___approve_recommendation"::response{\n eventResource: resource,\n input.recommendation: context.input.recommendation\n }\n};\n',
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
};
|
|
142
158
|
export const DOGWOOD_APPROVAL_BEFORE_PAYMENT_POLICY_0_0_1 = {
|
|
143
159
|
id: 'dogwood-approval-before-payment',
|
|
144
160
|
version: '0.0.1',
|
|
@@ -297,6 +313,7 @@ export const ORGANIZATION_BASELINE_POLICY_0_0_1 = {
|
|
|
297
313
|
};
|
|
298
314
|
export const POLICY_CATALOGUE = {
|
|
299
315
|
default: DEFAULT_POLICY_0_0_1,
|
|
316
|
+
'dogwood-approval-before-account-change': DOGWOOD_APPROVAL_BEFORE_ACCOUNT_CHANGE_POLICY_0_0_1,
|
|
300
317
|
'dogwood-approval-before-payment': DOGWOOD_APPROVAL_BEFORE_PAYMENT_POLICY_0_0_1,
|
|
301
318
|
'dogwood-distinct-payees': DOGWOOD_DISTINCT_PAYEES_POLICY_0_0_1,
|
|
302
319
|
'dogwood-running-total': DOGWOOD_RUNNING_TOTAL_POLICY_0_0_1,
|