@stigmer/server 3.23.0 → 3.23.1-dev.20260923075205
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/authorization/authorizer.d.ts +4 -8
- package/dist/authorization/authorizer.d.ts.map +1 -1
- package/dist/authorization/authorizer.js +5 -9
- package/dist/authorization/authorizer.js.map +1 -1
- package/dist/authorization/derived-tuples.d.ts.map +1 -1
- package/dist/authorization/derived-tuples.js +10 -25
- package/dist/authorization/derived-tuples.js.map +1 -1
- package/dist/authorization/evaluator.d.ts +7 -8
- package/dist/authorization/evaluator.d.ts.map +1 -1
- package/dist/authorization/evaluator.js +4 -20
- package/dist/authorization/evaluator.js.map +1 -1
- package/dist/authorization/list-read-scope.d.ts.map +1 -1
- package/dist/authorization/list-read-scope.js +5 -9
- package/dist/authorization/list-read-scope.js.map +1 -1
- package/dist/authorization/model/agent.d.ts.map +1 -1
- package/dist/authorization/model/agent.js +4 -5
- package/dist/authorization/model/agent.js.map +1 -1
- package/dist/authorization/model/agent_instance.d.ts.map +1 -1
- package/dist/authorization/model/agent_instance.js +2 -2
- package/dist/authorization/model/agent_instance.js.map +1 -1
- package/dist/authorization/model/mcp_server.d.ts.map +1 -1
- package/dist/authorization/model/mcp_server.js +2 -2
- package/dist/authorization/model/mcp_server.js.map +1 -1
- package/dist/authorization/model/plugin.d.ts.map +1 -1
- package/dist/authorization/model/plugin.js +3 -4
- package/dist/authorization/model/plugin.js.map +1 -1
- package/dist/authorization/model/rewrite.d.ts +8 -10
- package/dist/authorization/model/rewrite.d.ts.map +1 -1
- package/dist/authorization/model/rewrite.js +0 -3
- package/dist/authorization/model/rewrite.js.map +1 -1
- package/dist/authorization/model/skill.d.ts.map +1 -1
- package/dist/authorization/model/skill.js +2 -2
- package/dist/authorization/model/skill.js.map +1 -1
- package/dist/authorization/model/workflow.d.ts.map +1 -1
- package/dist/authorization/model/workflow.js +2 -2
- package/dist/authorization/model/workflow.js.map +1 -1
- package/dist/authorization/model/workflow_instance.d.ts.map +1 -1
- package/dist/authorization/model/workflow_instance.js +2 -2
- package/dist/authorization/model/workflow_instance.js.map +1 -1
- package/dist/authorization/organization-directory.d.ts.map +1 -1
- package/dist/authorization/organization-directory.js +2 -3
- package/dist/authorization/organization-directory.js.map +1 -1
- package/dist/authorization/store-test-kit.d.ts +0 -6
- package/dist/authorization/store-test-kit.d.ts.map +1 -1
- package/dist/authorization/store-test-kit.js +16 -62
- package/dist/authorization/store-test-kit.js.map +1 -1
- package/dist/authorization/tuples.d.ts +13 -32
- package/dist/authorization/tuples.d.ts.map +1 -1
- package/dist/authorization/tuples.js +3 -11
- package/dist/authorization/tuples.js.map +1 -1
- package/dist/domain/agent/controller.d.ts.map +1 -1
- package/dist/domain/agent/controller.js +4 -4
- package/dist/domain/agent/controller.js.map +1 -1
- package/dist/domain/agentchannel/controller.d.ts.map +1 -1
- package/dist/domain/agentchannel/controller.js +3 -1
- package/dist/domain/agentchannel/controller.js.map +1 -1
- package/dist/domain/agentexecution/controller.d.ts.map +1 -1
- package/dist/domain/agentexecution/controller.js +3 -1
- package/dist/domain/agentexecution/controller.js.map +1 -1
- package/dist/domain/agentinstance/controller.d.ts.map +1 -1
- package/dist/domain/agentinstance/controller.js +3 -4
- package/dist/domain/agentinstance/controller.js.map +1 -1
- package/dist/domain/agentshare/constants.d.ts +6 -11
- package/dist/domain/agentshare/constants.d.ts.map +1 -1
- package/dist/domain/agentshare/constants.js +8 -16
- package/dist/domain/agentshare/constants.js.map +1 -1
- package/dist/domain/agentshare/controller.d.ts.map +1 -1
- package/dist/domain/agentshare/controller.js +3 -1
- package/dist/domain/agentshare/controller.js.map +1 -1
- package/dist/domain/agentshare/steps.d.ts +18 -25
- package/dist/domain/agentshare/steps.d.ts.map +1 -1
- package/dist/domain/agentshare/steps.js +41 -142
- package/dist/domain/agentshare/steps.js.map +1 -1
- package/dist/domain/environment/controller.d.ts.map +1 -1
- package/dist/domain/environment/controller.js +2 -3
- package/dist/domain/environment/controller.js.map +1 -1
- package/dist/domain/executioncontext/controller.d.ts.map +1 -1
- package/dist/domain/executioncontext/controller.js +2 -1
- package/dist/domain/executioncontext/controller.js.map +1 -1
- package/dist/domain/mcpserver/controller.d.ts.map +1 -1
- package/dist/domain/mcpserver/controller.js +3 -4
- package/dist/domain/mcpserver/controller.js.map +1 -1
- package/dist/domain/plugin/controller.d.ts.map +1 -1
- package/dist/domain/plugin/controller.js +1 -3
- package/dist/domain/plugin/controller.js.map +1 -1
- package/dist/domain/plugin/push.d.ts +7 -5
- package/dist/domain/plugin/push.d.ts.map +1 -1
- package/dist/domain/plugin/push.js +8 -14
- package/dist/domain/plugin/push.js.map +1 -1
- package/dist/domain/schedule/controller.d.ts.map +1 -1
- package/dist/domain/schedule/controller.js +3 -1
- package/dist/domain/schedule/controller.js.map +1 -1
- package/dist/domain/session/controller.d.ts.map +1 -1
- package/dist/domain/session/controller.js +3 -2
- package/dist/domain/session/controller.js.map +1 -1
- package/dist/domain/skill/controller.d.ts.map +1 -1
- package/dist/domain/skill/controller.js +0 -2
- package/dist/domain/skill/controller.js.map +1 -1
- package/dist/domain/workflow/agent-call-references.d.ts +54 -0
- package/dist/domain/workflow/agent-call-references.d.ts.map +1 -0
- package/dist/domain/workflow/agent-call-references.js +97 -0
- package/dist/domain/workflow/agent-call-references.js.map +1 -0
- package/dist/domain/workflow/controller.d.ts.map +1 -1
- package/dist/domain/workflow/controller.js +14 -6
- package/dist/domain/workflow/controller.js.map +1 -1
- package/dist/domain/workflow/registry/data/task-kind-registry.json +1 -1
- package/dist/domain/workflow/validation/task-config-constraints.d.ts +10 -1
- package/dist/domain/workflow/validation/task-config-constraints.d.ts.map +1 -1
- package/dist/domain/workflow/validation/task-config-constraints.js +3 -2
- package/dist/domain/workflow/validation/task-config-constraints.js.map +1 -1
- package/dist/domain/workflowexecution/controller.d.ts.map +1 -1
- package/dist/domain/workflowexecution/controller.js +4 -2
- package/dist/domain/workflowexecution/controller.js.map +1 -1
- package/dist/domain/workflowinstance/controller.d.ts.map +1 -1
- package/dist/domain/workflowinstance/controller.js +3 -4
- package/dist/domain/workflowinstance/controller.js.map +1 -1
- package/dist/extensions/authorization-queries.d.ts +6 -5
- package/dist/extensions/authorization-queries.d.ts.map +1 -1
- package/dist/extensions/list-read-scope.d.ts +1 -1
- package/dist/extensions/resource-authorization.d.ts +3 -2
- package/dist/extensions/resource-authorization.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/pipeline/apiresource-meta.d.ts +12 -3
- package/dist/pipeline/apiresource-meta.d.ts.map +1 -1
- package/dist/pipeline/apiresource-meta.js +21 -10
- package/dist/pipeline/apiresource-meta.js.map +1 -1
- package/dist/pipeline/steps/authorization-tuples.d.ts +9 -3
- package/dist/pipeline/steps/authorization-tuples.d.ts.map +1 -1
- package/dist/pipeline/steps/authorization-tuples.js +9 -11
- package/dist/pipeline/steps/authorization-tuples.js.map +1 -1
- package/dist/pipeline/steps/references.d.ts +178 -20
- package/dist/pipeline/steps/references.d.ts.map +1 -1
- package/dist/pipeline/steps/references.js +344 -43
- package/dist/pipeline/steps/references.js.map +1 -1
- package/dist/query/search/controller.js +0 -1
- package/dist/query/search/controller.js.map +1 -1
- package/dist/query/search/criteria.d.ts +1 -5
- package/dist/query/search/criteria.d.ts.map +1 -1
- package/dist/query/search/criteria.js +3 -13
- package/dist/query/search/criteria.js.map +1 -1
- package/dist/query/search/handler.d.ts +5 -4
- package/dist/query/search/handler.d.ts.map +1 -1
- package/dist/query/search/handler.js +7 -6
- package/dist/query/search/handler.js.map +1 -1
- package/dist/query/search/query-store.d.ts.map +1 -1
- package/dist/query/search/query-store.js +0 -2
- package/dist/query/search/query-store.js.map +1 -1
- package/dist/store/interface.d.ts +3 -6
- package/dist/store/interface.d.ts.map +1 -1
- package/dist/store/interface.js.map +1 -1
- package/dist/store/postgres/migrations.d.ts +3 -1
- package/dist/store/postgres/migrations.d.ts.map +1 -1
- package/dist/store/postgres/migrations.js +35 -1
- package/dist/store/postgres/migrations.js.map +1 -1
- package/dist/store/postgres/store.d.ts.map +1 -1
- package/dist/store/postgres/store.js +4 -9
- package/dist/store/postgres/store.js.map +1 -1
- package/dist/store/public-visibility-retired.d.ts +67 -0
- package/dist/store/public-visibility-retired.d.ts.map +1 -0
- package/dist/store/public-visibility-retired.js +55 -0
- package/dist/store/public-visibility-retired.js.map +1 -0
- package/dist/store/sqlite/migrations.d.ts +3 -1
- package/dist/store/sqlite/migrations.d.ts.map +1 -1
- package/dist/store/sqlite/migrations.js +36 -1
- package/dist/store/sqlite/migrations.js.map +1 -1
- package/dist/store/sqlite/store.d.ts.map +1 -1
- package/dist/store/sqlite/store.js +4 -8
- package/dist/store/sqlite/store.js.map +1 -1
- package/package.json +6 -6
- package/src/authorization/README.md +24 -26
- package/src/authorization/__tests__/authorizer.test.ts +10 -9
- package/src/authorization/__tests__/derived-tuples.test.ts +4 -11
- package/src/authorization/__tests__/evaluator.test.ts +14 -73
- package/src/authorization/__tests__/facts.test.ts +2 -2
- package/src/authorization/__tests__/fixtures/fga/agent-instance-creation.fga.yaml +19 -27
- package/src/authorization/__tests__/fixtures/fga/blueprint-private-visibility.fga.yaml +6 -98
- package/src/authorization/__tests__/fixtures/fga/default-instance-inheritance.fga.yaml +4 -61
- package/src/authorization/__tests__/fixtures/fga/mcp-server-authoring.fga.yaml +1 -15
- package/src/authorization/__tests__/fixtures/fga/org-admin-owner-inheritance.fga.yaml +1 -21
- package/src/authorization/__tests__/fixtures/fga/platform-visibility.fga.yaml +1 -25
- package/src/authorization/__tests__/fixtures/fga/workflow-execution-sharing.fga.yaml +1 -3
- package/src/authorization/__tests__/list-read-scope.test.ts +18 -17
- package/src/authorization/__tests__/store-tests.test.ts +2 -6
- package/src/authorization/__tests__/tuples.test.ts +12 -11
- package/src/authorization/authorizer.ts +4 -9
- package/src/authorization/derived-tuples.ts +14 -31
- package/src/authorization/evaluator.ts +8 -44
- package/src/authorization/list-read-scope.ts +5 -11
- package/src/authorization/model/agent.ts +2 -5
- package/src/authorization/model/agent_instance.ts +0 -2
- package/src/authorization/model/mcp_server.ts +0 -2
- package/src/authorization/model/plugin.ts +1 -4
- package/src/authorization/model/rewrite.ts +8 -13
- package/src/authorization/model/skill.ts +0 -2
- package/src/authorization/model/workflow.ts +0 -2
- package/src/authorization/model/workflow_instance.ts +0 -2
- package/src/authorization/organization-directory.ts +1 -3
- package/src/authorization/store-test-kit.ts +16 -75
- package/src/authorization/tuples.ts +16 -39
- package/src/domain/agent/__tests__/agent.test.ts +11 -4
- package/src/domain/agent/controller.ts +7 -7
- package/src/domain/agentchannel/__tests__/agentchannel.test.ts +223 -48
- package/src/domain/agentchannel/controller.ts +6 -1
- package/src/domain/agentexecution/controller.ts +6 -1
- package/src/domain/agentinstance/controller.ts +6 -12
- package/src/domain/agentshare/__tests__/agentshare.test.ts +196 -172
- package/src/domain/agentshare/__tests__/create-authorization.test.ts +16 -31
- package/src/domain/agentshare/constants.ts +14 -26
- package/src/domain/agentshare/controller.ts +6 -1
- package/src/domain/agentshare/steps.ts +41 -194
- package/src/domain/environment/controller.ts +5 -8
- package/src/domain/executioncontext/controller.ts +5 -1
- package/src/domain/mcpserver/__tests__/mcpserver.test.ts +115 -28
- package/src/domain/mcpserver/__tests__/oauth-handshake.test.ts +53 -18
- package/src/domain/mcpserver/controller.ts +6 -12
- package/src/domain/plugin/controller.ts +1 -8
- package/src/domain/plugin/push.ts +8 -16
- package/src/domain/schedule/controller.ts +6 -1
- package/src/domain/session/controller.ts +12 -4
- package/src/domain/skill/controller.ts +0 -7
- package/src/domain/workflow/__tests__/agent-call-references.test.ts +222 -0
- package/src/domain/workflow/agent-call-references.ts +157 -0
- package/src/domain/workflow/controller.ts +28 -10
- package/src/domain/workflow/registry/data/task-kind-registry.json +1 -1
- package/src/domain/workflow/validation/task-config-constraints.ts +7 -3
- package/src/domain/workflowexecution/controller.ts +7 -2
- package/src/domain/workflowinstance/controller.ts +6 -12
- package/src/extensions/__tests__/built-in-authorization-composed.test.ts +32 -19
- package/src/extensions/__tests__/extension-composition.test.ts +4 -4
- package/src/extensions/__tests__/list-read-scope-composed.test.ts +9 -6
- package/src/extensions/authorization-queries.ts +6 -5
- package/src/extensions/list-read-scope.ts +1 -1
- package/src/extensions/resource-authorization.ts +3 -5
- package/src/index.ts +0 -1
- package/src/pipeline/__tests__/supports-visibility.test.ts +112 -0
- package/src/pipeline/apiresource-meta.ts +21 -10
- package/src/pipeline/steps/__tests__/authorization-tuples.test.ts +18 -31
- package/src/pipeline/steps/__tests__/references.test.ts +703 -0
- package/src/pipeline/steps/authorization-tuples.ts +9 -11
- package/src/pipeline/steps/references.ts +578 -70
- package/src/query/search/__tests__/criteria.test.ts +0 -4
- package/src/query/search/__tests__/query-store.test.ts +11 -40
- package/src/query/search/controller.ts +0 -1
- package/src/query/search/criteria.ts +0 -14
- package/src/query/search/handler.ts +6 -7
- package/src/query/search/query-store.ts +0 -2
- package/src/store/__tests__/public-visibility-retired.test.ts +127 -0
- package/src/store/__tests__/store-contract.ts +6 -51
- package/src/store/interface.ts +3 -6
- package/src/store/postgres/__tests__/migrations.test.ts +187 -6
- package/src/store/postgres/__tests__/store-contract.test.ts +0 -2
- package/src/store/postgres/migrations.ts +48 -1
- package/src/store/postgres/store.ts +4 -11
- package/src/store/public-visibility-retired.ts +119 -0
- package/src/store/sqlite/__tests__/migrations.test.ts +191 -5
- package/src/store/sqlite/migrations.ts +45 -1
- package/src/store/sqlite/store.ts +4 -10
- package/dist/pipeline/steps/visibility-gates.d.ts +0 -27
- package/dist/pipeline/steps/visibility-gates.d.ts.map +0 -1
- package/dist/pipeline/steps/visibility-gates.js +0 -139
- package/dist/pipeline/steps/visibility-gates.js.map +0 -1
- package/src/authorization/__tests__/fixtures/fga/cross-org-share-creation.fga.yaml +0 -98
- package/src/authorization/__tests__/fixtures/fga/public-visibility-setter.fga.yaml +0 -52
- package/src/pipeline/steps/__tests__/visibility-gates.test.ts +0 -187
- package/src/pipeline/steps/visibility-gates.ts +0 -174
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Pinned copy of stigmer-cloud backend/services/stigmer-server/fga/tests/default-instance-inheritance.fga.yaml
|
|
2
|
-
#
|
|
2
|
+
# as changed by stigmer-cloud#765 (the OpenFGA store test the cloud runs against its live model).
|
|
3
3
|
# The body below is byte-identical to the source; the cloud re-runs the LIVE
|
|
4
4
|
# file against this evaluator at the re-pin, so a stale copy is caught there.
|
|
5
5
|
# Store tests for default-instance structural inheritance (default_of).
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
# A blueprint's system-managed default instance carries a single
|
|
8
8
|
# instance#default_of@<blueprint>:<id>
|
|
9
9
|
# tuple and inherits the blueprint's ENTIRE viewer set through
|
|
10
|
-
# `viewer from default_of` — org members
|
|
11
|
-
#
|
|
10
|
+
# `viewer from default_of` — org members and platform users
|
|
11
|
+
# (identity_provider#platform_user). No enum-derived
|
|
12
12
|
# visibility tuples are ever written on default instances, so their access
|
|
13
13
|
# can never drift from the template's.
|
|
14
14
|
#
|
|
@@ -20,8 +20,7 @@
|
|
|
20
20
|
# visibility level; each has a default instance linked via default_of.
|
|
21
21
|
# Alice (acme member) reaches default instances of platform-shared
|
|
22
22
|
# blueprints; planton members reach default instances of org-visible ones;
|
|
23
|
-
#
|
|
24
|
-
# never leak.
|
|
23
|
+
# personal instances never leak.
|
|
25
24
|
name: default-instance-inheritance
|
|
26
25
|
model_file: ../model/fga.mod
|
|
27
26
|
|
|
@@ -115,35 +114,6 @@ tuples:
|
|
|
115
114
|
relation: default_of
|
|
116
115
|
object: agent_instance:internal-default
|
|
117
116
|
|
|
118
|
-
# --- Public agent + its default instance ---
|
|
119
|
-
# PUBLIC carries the org floor tuple too (viewer@org#viewer).
|
|
120
|
-
- user: organization:planton
|
|
121
|
-
relation: organization
|
|
122
|
-
object: agent:public-bot
|
|
123
|
-
- user: identity_account:swarup
|
|
124
|
-
relation: owner
|
|
125
|
-
object: agent:public-bot
|
|
126
|
-
- user: identity_account:*
|
|
127
|
-
relation: viewer
|
|
128
|
-
object: agent:public-bot
|
|
129
|
-
condition:
|
|
130
|
-
name: allow_public
|
|
131
|
-
- user: organization:planton#viewer
|
|
132
|
-
relation: viewer
|
|
133
|
-
object: agent:public-bot
|
|
134
|
-
- user: organization:planton
|
|
135
|
-
relation: organization
|
|
136
|
-
object: agent_instance:public-bot-default
|
|
137
|
-
- user: agent:public-bot
|
|
138
|
-
relation: agent
|
|
139
|
-
object: agent_instance:public-bot-default
|
|
140
|
-
- user: identity_account:swarup
|
|
141
|
-
relation: owner
|
|
142
|
-
object: agent_instance:public-bot-default
|
|
143
|
-
- user: agent:public-bot
|
|
144
|
-
relation: default_of
|
|
145
|
-
object: agent_instance:public-bot-default
|
|
146
|
-
|
|
147
117
|
# --- Platform-shared workflow + its default instance ---
|
|
148
118
|
- user: organization:planton
|
|
149
119
|
relation: organization
|
|
@@ -175,8 +145,6 @@ tests:
|
|
|
175
145
|
check:
|
|
176
146
|
- user: identity_account:alice
|
|
177
147
|
object: agent_instance:sara-default
|
|
178
|
-
context:
|
|
179
|
-
allow: false
|
|
180
148
|
assertions:
|
|
181
149
|
can_view: true
|
|
182
150
|
can_execute: true
|
|
@@ -187,8 +155,6 @@ tests:
|
|
|
187
155
|
check:
|
|
188
156
|
- user: identity_account:mallory
|
|
189
157
|
object: agent_instance:sara-default
|
|
190
|
-
context:
|
|
191
|
-
allow: false
|
|
192
158
|
assertions:
|
|
193
159
|
can_view: false
|
|
194
160
|
can_execute: false
|
|
@@ -199,14 +165,10 @@ tests:
|
|
|
199
165
|
# default_of tuple — only she (its owner) can reach it.
|
|
200
166
|
- user: identity_account:swarup
|
|
201
167
|
object: agent_instance:alice-personal
|
|
202
|
-
context:
|
|
203
|
-
allow: false
|
|
204
168
|
assertions:
|
|
205
169
|
can_view: false
|
|
206
170
|
- user: identity_account:alice
|
|
207
171
|
object: agent_instance:alice-personal
|
|
208
|
-
context:
|
|
209
|
-
allow: false
|
|
210
172
|
assertions:
|
|
211
173
|
can_view: true
|
|
212
174
|
can_edit: true
|
|
@@ -215,8 +177,6 @@ tests:
|
|
|
215
177
|
check:
|
|
216
178
|
- user: identity_account:priya
|
|
217
179
|
object: agent_instance:internal-default
|
|
218
|
-
context:
|
|
219
|
-
allow: false
|
|
220
180
|
assertions:
|
|
221
181
|
can_view: true
|
|
222
182
|
can_execute: true
|
|
@@ -226,34 +186,19 @@ tests:
|
|
|
226
186
|
# read audience, and the default instance inherits it structurally.
|
|
227
187
|
- user: identity_account:veda
|
|
228
188
|
object: agent_instance:internal-default
|
|
229
|
-
context:
|
|
230
|
-
allow: false
|
|
231
189
|
assertions:
|
|
232
190
|
can_view: true
|
|
233
191
|
can_edit: false
|
|
234
192
|
# Managed-org membership grants nothing on non-platform-shared agents.
|
|
235
193
|
- user: identity_account:alice
|
|
236
194
|
object: agent_instance:internal-default
|
|
237
|
-
context:
|
|
238
|
-
allow: false
|
|
239
195
|
assertions:
|
|
240
196
|
can_view: false
|
|
241
197
|
|
|
242
|
-
- name: everyone reaches the default instance of a public agent
|
|
243
|
-
check:
|
|
244
|
-
- user: identity_account:mallory
|
|
245
|
-
object: agent_instance:public-bot-default
|
|
246
|
-
context:
|
|
247
|
-
allow: true
|
|
248
|
-
assertions:
|
|
249
|
-
can_view: true
|
|
250
|
-
|
|
251
198
|
- name: managed-org member reaches the default instance of a platform-shared workflow
|
|
252
199
|
check:
|
|
253
200
|
- user: identity_account:alice
|
|
254
201
|
object: workflow_instance:onboarding-default
|
|
255
|
-
context:
|
|
256
|
-
allow: false
|
|
257
202
|
assertions:
|
|
258
203
|
can_view: true
|
|
259
204
|
can_execute: true
|
|
@@ -263,8 +208,6 @@ tests:
|
|
|
263
208
|
list_objects:
|
|
264
209
|
- user: identity_account:alice
|
|
265
210
|
type: agent_instance
|
|
266
|
-
context:
|
|
267
|
-
allow: false
|
|
268
211
|
assertions:
|
|
269
212
|
can_view:
|
|
270
213
|
- agent_instance:sara-default
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Pinned copy of stigmer-cloud backend/services/stigmer-server/fga/tests/mcp-server-authoring.fga.yaml
|
|
2
|
-
#
|
|
2
|
+
# as changed by stigmer-cloud#765 (the OpenFGA store test the cloud runs against its live model).
|
|
3
3
|
# The body below is byte-identical to the source; the cloud re-runs the LIVE
|
|
4
4
|
# file against this evaluator at the re-pin, so a stale copy is caught there.
|
|
5
5
|
# Store tests for MCP-server authoring: an MCP server is an organization's
|
|
@@ -88,24 +88,18 @@ tests:
|
|
|
88
88
|
check:
|
|
89
89
|
- user: identity_account:dave
|
|
90
90
|
object: mcp_server:github
|
|
91
|
-
context:
|
|
92
|
-
allow: false
|
|
93
91
|
assertions:
|
|
94
92
|
can_view: true
|
|
95
93
|
can_connect: true
|
|
96
94
|
can_edit: false
|
|
97
95
|
- user: identity_account:vera
|
|
98
96
|
object: mcp_server:github
|
|
99
|
-
context:
|
|
100
|
-
allow: false
|
|
101
97
|
assertions:
|
|
102
98
|
can_view: true
|
|
103
99
|
can_connect: true
|
|
104
100
|
can_edit: false
|
|
105
101
|
- user: identity_account:mallory
|
|
106
102
|
object: mcp_server:github
|
|
107
|
-
context:
|
|
108
|
-
allow: false
|
|
109
103
|
assertions:
|
|
110
104
|
can_view: false
|
|
111
105
|
can_connect: false
|
|
@@ -114,30 +108,22 @@ tests:
|
|
|
114
108
|
check:
|
|
115
109
|
- user: identity_account:oscar
|
|
116
110
|
object: mcp_server:vault
|
|
117
|
-
context:
|
|
118
|
-
allow: false
|
|
119
111
|
assertions:
|
|
120
112
|
can_view: true
|
|
121
113
|
can_connect: true
|
|
122
114
|
can_edit: true
|
|
123
115
|
- user: identity_account:olivia
|
|
124
116
|
object: mcp_server:vault
|
|
125
|
-
context:
|
|
126
|
-
allow: false
|
|
127
117
|
assertions:
|
|
128
118
|
can_view: true
|
|
129
119
|
can_edit: true
|
|
130
120
|
- user: identity_account:dave
|
|
131
121
|
object: mcp_server:vault
|
|
132
|
-
context:
|
|
133
|
-
allow: false
|
|
134
122
|
assertions:
|
|
135
123
|
can_view: false
|
|
136
124
|
can_connect: false
|
|
137
125
|
- user: identity_account:vera
|
|
138
126
|
object: mcp_server:vault
|
|
139
|
-
context:
|
|
140
|
-
allow: false
|
|
141
127
|
assertions:
|
|
142
128
|
can_view: false
|
|
143
129
|
can_connect: false
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Pinned copy of stigmer-cloud backend/services/stigmer-server/fga/tests/org-admin-owner-inheritance.fga.yaml
|
|
2
|
-
# as changed by stigmer-cloud#
|
|
2
|
+
# as changed by stigmer-cloud#765 (the OpenFGA store test the cloud runs against its live model).
|
|
3
3
|
# The body below is byte-identical to the source; the cloud re-runs the LIVE
|
|
4
4
|
# file against this evaluator at the re-pin, so a stale copy is caught there.
|
|
5
5
|
# Store tests for org-admin owner inheritance (T08).
|
|
@@ -131,8 +131,6 @@ tests:
|
|
|
131
131
|
check:
|
|
132
132
|
- user: identity_account:ana
|
|
133
133
|
object: agent:carols-bot
|
|
134
|
-
context:
|
|
135
|
-
allow: false
|
|
136
134
|
assertions:
|
|
137
135
|
can_view: true
|
|
138
136
|
can_edit: true
|
|
@@ -169,8 +167,6 @@ tests:
|
|
|
169
167
|
can_grant_access: true
|
|
170
168
|
- user: identity_account:ana
|
|
171
169
|
object: skill:carols-notes
|
|
172
|
-
context:
|
|
173
|
-
allow: false
|
|
174
170
|
assertions:
|
|
175
171
|
can_view: true
|
|
176
172
|
can_edit: true
|
|
@@ -178,8 +174,6 @@ tests:
|
|
|
178
174
|
can_grant_access: true
|
|
179
175
|
- user: identity_account:ana
|
|
180
176
|
object: workflow:carols-flow
|
|
181
|
-
context:
|
|
182
|
-
allow: false
|
|
183
177
|
assertions:
|
|
184
178
|
can_view: true
|
|
185
179
|
can_edit: true
|
|
@@ -197,8 +191,6 @@ tests:
|
|
|
197
191
|
check:
|
|
198
192
|
- user: identity_account:root
|
|
199
193
|
object: agent:carols-bot
|
|
200
|
-
context:
|
|
201
|
-
allow: false
|
|
202
194
|
assertions:
|
|
203
195
|
can_edit: true
|
|
204
196
|
can_delete: true
|
|
@@ -218,8 +210,6 @@ tests:
|
|
|
218
210
|
check:
|
|
219
211
|
- user: identity_account:dave
|
|
220
212
|
object: agent:carols-bot
|
|
221
|
-
context:
|
|
222
|
-
allow: false
|
|
223
213
|
assertions:
|
|
224
214
|
can_view: false
|
|
225
215
|
can_edit: false
|
|
@@ -250,8 +240,6 @@ tests:
|
|
|
250
240
|
check:
|
|
251
241
|
- user: identity_account:zara
|
|
252
242
|
object: agent:carols-bot
|
|
253
|
-
context:
|
|
254
|
-
allow: false
|
|
255
243
|
assertions:
|
|
256
244
|
can_view: false
|
|
257
245
|
can_edit: false
|
|
@@ -266,8 +254,6 @@ tests:
|
|
|
266
254
|
check:
|
|
267
255
|
- user: identity_account:ana
|
|
268
256
|
object: agent_instance:carols-instance
|
|
269
|
-
context:
|
|
270
|
-
allow: false
|
|
271
257
|
assertions:
|
|
272
258
|
can_view: false
|
|
273
259
|
can_edit: false
|
|
@@ -297,8 +283,6 @@ tests:
|
|
|
297
283
|
check:
|
|
298
284
|
- user: identity_account:carol
|
|
299
285
|
object: agent:carols-bot
|
|
300
|
-
context:
|
|
301
|
-
allow: false
|
|
302
286
|
assertions:
|
|
303
287
|
can_view: true
|
|
304
288
|
can_edit: true
|
|
@@ -309,8 +293,6 @@ tests:
|
|
|
309
293
|
list_objects:
|
|
310
294
|
- user: identity_account:ana
|
|
311
295
|
type: agent
|
|
312
|
-
context:
|
|
313
|
-
allow: false
|
|
314
296
|
assertions:
|
|
315
297
|
can_view:
|
|
316
298
|
- agent:carols-bot
|
|
@@ -318,8 +300,6 @@ tests:
|
|
|
318
300
|
- agent:carols-bot
|
|
319
301
|
- user: identity_account:ana
|
|
320
302
|
type: agent_instance
|
|
321
|
-
context:
|
|
322
|
-
allow: false
|
|
323
303
|
assertions:
|
|
324
304
|
can_view: []
|
|
325
305
|
- user: identity_account:ana
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Pinned copy of stigmer-cloud backend/services/stigmer-server/fga/tests/platform-visibility.fga.yaml
|
|
2
|
-
#
|
|
2
|
+
# as changed by stigmer-cloud#765 (the OpenFGA store test the cloud runs against its live model).
|
|
3
3
|
# The body below is byte-identical to the source; the cloud re-runs the LIVE
|
|
4
4
|
# file against this evaluator at the re-pin, so a stale copy is caught there.
|
|
5
5
|
# Store tests for platform visibility (visibility_platform).
|
|
@@ -102,8 +102,6 @@ tests:
|
|
|
102
102
|
check:
|
|
103
103
|
- user: identity_account:alice
|
|
104
104
|
object: agent:sara
|
|
105
|
-
context:
|
|
106
|
-
allow: false
|
|
107
105
|
assertions:
|
|
108
106
|
can_view: true
|
|
109
107
|
can_execute: true
|
|
@@ -112,8 +110,6 @@ tests:
|
|
|
112
110
|
can_delete: false
|
|
113
111
|
- user: identity_account:bob
|
|
114
112
|
object: agent:sara
|
|
115
|
-
context:
|
|
116
|
-
allow: false
|
|
117
113
|
assertions:
|
|
118
114
|
can_view: true
|
|
119
115
|
can_execute: true
|
|
@@ -122,8 +118,6 @@ tests:
|
|
|
122
118
|
check:
|
|
123
119
|
- user: identity_account:mallory
|
|
124
120
|
object: agent:sara
|
|
125
|
-
context:
|
|
126
|
-
allow: false
|
|
127
121
|
assertions:
|
|
128
122
|
can_view: false
|
|
129
123
|
can_execute: false
|
|
@@ -133,8 +127,6 @@ tests:
|
|
|
133
127
|
check:
|
|
134
128
|
- user: identity_account:priya
|
|
135
129
|
object: agent:sara
|
|
136
|
-
context:
|
|
137
|
-
allow: false
|
|
138
130
|
assertions:
|
|
139
131
|
can_view: true
|
|
140
132
|
can_execute: true
|
|
@@ -144,8 +136,6 @@ tests:
|
|
|
144
136
|
# narrower: platform_user resolves member-from-managed_org.)
|
|
145
137
|
- user: identity_account:veda
|
|
146
138
|
object: agent:sara
|
|
147
|
-
context:
|
|
148
|
-
allow: false
|
|
149
139
|
assertions:
|
|
150
140
|
can_view: true
|
|
151
141
|
can_edit: false
|
|
@@ -154,8 +144,6 @@ tests:
|
|
|
154
144
|
check:
|
|
155
145
|
- user: identity_account:alice
|
|
156
146
|
object: agent:internal-bot
|
|
157
|
-
context:
|
|
158
|
-
allow: false
|
|
159
147
|
assertions:
|
|
160
148
|
can_view: false
|
|
161
149
|
can_execute: false
|
|
@@ -163,8 +151,6 @@ tests:
|
|
|
163
151
|
# without an explicit visibility tuple.
|
|
164
152
|
- user: identity_account:priya
|
|
165
153
|
object: agent:internal-bot
|
|
166
|
-
context:
|
|
167
|
-
allow: false
|
|
168
154
|
assertions:
|
|
169
155
|
can_view: false
|
|
170
156
|
can_execute: false
|
|
@@ -173,8 +159,6 @@ tests:
|
|
|
173
159
|
check:
|
|
174
160
|
- user: identity_account:alice
|
|
175
161
|
object: skill:research
|
|
176
|
-
context:
|
|
177
|
-
allow: false
|
|
178
162
|
assertions:
|
|
179
163
|
can_view: true
|
|
180
164
|
can_use: true
|
|
@@ -184,8 +168,6 @@ tests:
|
|
|
184
168
|
check:
|
|
185
169
|
- user: identity_account:alice
|
|
186
170
|
object: workflow:onboarding
|
|
187
|
-
context:
|
|
188
|
-
allow: false
|
|
189
171
|
assertions:
|
|
190
172
|
can_view: true
|
|
191
173
|
can_execute: true
|
|
@@ -194,8 +176,6 @@ tests:
|
|
|
194
176
|
check:
|
|
195
177
|
- user: identity_account:alice
|
|
196
178
|
object: mcp_server:github
|
|
197
|
-
context:
|
|
198
|
-
allow: false
|
|
199
179
|
assertions:
|
|
200
180
|
can_view: true
|
|
201
181
|
can_use: true
|
|
@@ -205,8 +185,6 @@ tests:
|
|
|
205
185
|
check:
|
|
206
186
|
- user: identity_account:swarup
|
|
207
187
|
object: agent:sara
|
|
208
|
-
context:
|
|
209
|
-
allow: false
|
|
210
188
|
assertions:
|
|
211
189
|
can_view: true
|
|
212
190
|
can_edit: true
|
|
@@ -216,8 +194,6 @@ tests:
|
|
|
216
194
|
list_objects:
|
|
217
195
|
- user: identity_account:alice
|
|
218
196
|
type: agent
|
|
219
|
-
context:
|
|
220
|
-
allow: false
|
|
221
197
|
assertions:
|
|
222
198
|
can_view:
|
|
223
199
|
- agent:sara
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Pinned copy of stigmer-cloud backend/services/stigmer-server/fga/tests/workflow-execution-sharing.fga.yaml
|
|
2
|
-
#
|
|
2
|
+
# as changed by stigmer-cloud#765 (the OpenFGA store test the cloud runs against its live model).
|
|
3
3
|
# The body below is byte-identical to the source; the cloud re-runs the LIVE
|
|
4
4
|
# file against this evaluator at the re-pin, so a stale copy is caught there.
|
|
5
5
|
# Store tests for workflow_execution sharing and run observability.
|
|
@@ -173,8 +173,6 @@ tests:
|
|
|
173
173
|
# never alice's run history.
|
|
174
174
|
- user: identity_account:vera
|
|
175
175
|
object: workflow_instance:inst1
|
|
176
|
-
context:
|
|
177
|
-
allow: false
|
|
178
176
|
assertions:
|
|
179
177
|
can_view: true
|
|
180
178
|
- user: identity_account:vera
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Pins the built-in list read scope on both store drivers as the twin of
|
|
3
3
|
* the cloud's driver (stigmer-cloud iam/list-read-scope.ts): every
|
|
4
|
-
* candidate a list lane offers is answered by `can_view`
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* facts the candidate carries — no candidate row is read twice.
|
|
4
|
+
* candidate a list lane offers is answered by `can_view` through the same
|
|
5
|
+
* evaluator the Authorizer uses, over tuples derived from the facts the
|
|
6
|
+
* candidate carries — no candidate row is read twice.
|
|
8
7
|
*
|
|
9
8
|
* The adversarial cells come first, because until slice 5's sibling
|
|
10
9
|
* cells this file and the composed proof are the only proof that a
|
|
11
|
-
* member's list is a member's list: the outsider sees nothing (a
|
|
12
|
-
*
|
|
10
|
+
* member's list is a member's list: the outsider sees nothing (a row
|
|
11
|
+
* still carrying the retired public level included); the viewer rung sees
|
|
12
|
+
* the org-visible blueprints
|
|
13
13
|
* and nothing personal; the founder — an admin — sees the organization's
|
|
14
14
|
* blueprints and NOT its members' sessions, keys, environments or
|
|
15
15
|
* memories (the model's own line, now list-visible); an execution is its session's and
|
|
@@ -280,9 +280,10 @@ describe.each(driverFixtures(SEEDED_KINDS))(
|
|
|
280
280
|
await grant(orgRole(VIEWER, "viewer", ORG));
|
|
281
281
|
|
|
282
282
|
// Blueprints: the founder's private and org-visible agents, a
|
|
283
|
-
// member's private one,
|
|
284
|
-
//
|
|
285
|
-
// and
|
|
283
|
+
// member's private one, one still carrying the retired public
|
|
284
|
+
// level (a row the store migration has not met, which derives no
|
|
285
|
+
// viewer grant and so reads as its owner's alone), and one
|
|
286
|
+
// stamped by the 3.14 verifiers' raw subject.
|
|
286
287
|
await save("agent", {
|
|
287
288
|
id: "agt_private",
|
|
288
289
|
org: ORG,
|
|
@@ -427,7 +428,7 @@ describe.each(driverFixtures(SEEDED_KINDS))(
|
|
|
427
428
|
});
|
|
428
429
|
|
|
429
430
|
describe("the adversarial cells", () => {
|
|
430
|
-
it("an OUTSIDER lists nothing of the organization's —
|
|
431
|
+
it("an OUTSIDER lists nothing of the organization's — a row still carrying the retired public level included", async () => {
|
|
431
432
|
for (const kind of SEEDED_KINDS.filter(
|
|
432
433
|
(k) =>
|
|
433
434
|
k !== ApiResourceKind.iam_policy &&
|
|
@@ -441,13 +442,13 @@ describe.each(driverFixtures(SEEDED_KINDS))(
|
|
|
441
442
|
}
|
|
442
443
|
});
|
|
443
444
|
|
|
444
|
-
it("a VIEWER lists the org-visible
|
|
445
|
+
it("a VIEWER lists the org-visible blueprint and nothing private; a MEMBER adds their own private one; the retired level grants neither anything", async () => {
|
|
445
446
|
expect(
|
|
446
447
|
await listAs(resolved(VIEWER), ApiResourceKind.agent),
|
|
447
|
-
).toEqual(["agt_org"
|
|
448
|
+
).toEqual(["agt_org"]);
|
|
448
449
|
expect(
|
|
449
450
|
await listAs(resolved(MEMBER), ApiResourceKind.agent),
|
|
450
|
-
).toEqual(["agt_org", "agt_member_private"
|
|
451
|
+
).toEqual(["agt_org", "agt_member_private"]);
|
|
451
452
|
});
|
|
452
453
|
|
|
453
454
|
it("the FOUNDER and the ADMIN list every blueprint (`owner: … or admin from organization`), including a member's private one", async () => {
|
|
@@ -542,7 +543,7 @@ describe.each(driverFixtures(SEEDED_KINDS))(
|
|
|
542
543
|
const offered = [
|
|
543
544
|
entryOf(
|
|
544
545
|
ApiResourceKind.agent,
|
|
545
|
-
rows.get(ApiResourceKind.agent)!.get("
|
|
546
|
+
rows.get(ApiResourceKind.agent)!.get("agt_member_private")!,
|
|
546
547
|
),
|
|
547
548
|
entryOf(
|
|
548
549
|
ApiResourceKind.agent,
|
|
@@ -562,15 +563,15 @@ describe.each(driverFixtures(SEEDED_KINDS))(
|
|
|
562
563
|
ApiResourceKind.agent,
|
|
563
564
|
offered,
|
|
564
565
|
);
|
|
565
|
-
expect([...kept]).toEqual(["
|
|
566
|
+
expect([...kept]).toEqual(["agt_member_private", "agt_org"]);
|
|
566
567
|
// The lane's order is the lane's: the helper filters its own
|
|
567
568
|
// array by the kept set.
|
|
568
569
|
expect(
|
|
569
570
|
await listAs(resolved(MEMBER), ApiResourceKind.agent, [
|
|
570
|
-
rows.get(ApiResourceKind.agent)!.get("
|
|
571
|
+
rows.get(ApiResourceKind.agent)!.get("agt_member_private")!,
|
|
571
572
|
rows.get(ApiResourceKind.agent)!.get("agt_org")!,
|
|
572
573
|
]),
|
|
573
|
-
).toEqual(["
|
|
574
|
+
).toEqual(["agt_member_private", "agt_org"]);
|
|
574
575
|
});
|
|
575
576
|
|
|
576
577
|
it("no candidates: the empty set, with no read of any kind", async () => {
|
|
@@ -57,7 +57,6 @@ const DOCUMENTS = [
|
|
|
57
57
|
"channel-app-owner.fga.yaml",
|
|
58
58
|
"channel-participation.fga.yaml",
|
|
59
59
|
"channel-session-visibility.fga.yaml",
|
|
60
|
-
"cross-org-share-creation.fga.yaml",
|
|
61
60
|
"default-instance-inheritance.fga.yaml",
|
|
62
61
|
"mcp-server-authoring.fga.yaml",
|
|
63
62
|
"memory-subject-only.fga.yaml",
|
|
@@ -65,7 +64,6 @@ const DOCUMENTS = [
|
|
|
65
64
|
"org-shared-environment.fga.yaml",
|
|
66
65
|
"platform-visibility.fga.yaml",
|
|
67
66
|
"provider-standing-viewer.fga.yaml",
|
|
68
|
-
"public-visibility-setter.fga.yaml",
|
|
69
67
|
"reserved-label-writer.fga.yaml",
|
|
70
68
|
"schedule-owner.fga.yaml",
|
|
71
69
|
"schedule-session-visibility.fga.yaml",
|
|
@@ -102,7 +100,7 @@ const SKIPPED_PINNED: ReadonlyArray<string> = [
|
|
|
102
100
|
"artifact-org-and-owner :: listing reflects org inheritance plus creator ownership :: identity_account:eve <artifact> :: list-objects",
|
|
103
101
|
"artifact-org-and-owner :: listing reflects org inheritance plus creator ownership :: identity_account:victor <artifact> :: list-objects",
|
|
104
102
|
"blueprint-private-visibility :: org admin's listable agents include private ones (T08) :: identity_account:oscar <agent> :: list-objects",
|
|
105
|
-
"blueprint-private-visibility :: org member's listable agents exclude private ones
|
|
103
|
+
"blueprint-private-visibility :: org member's listable agents exclude private ones :: identity_account:dave <agent> :: list-objects",
|
|
106
104
|
"blueprint-private-visibility :: org viewer's listable agents are exactly the viewer-shaped org-visible ones :: identity_account:vera <agent> :: list-objects",
|
|
107
105
|
"blueprint-private-visibility :: owner's listable agents include everything they authored :: identity_account:carol <agent> :: list-objects",
|
|
108
106
|
"channel-app-owner :: listing channel apps reflects ownership and grants, not membership :: identity_account:alice <channel_app> :: list-objects",
|
|
@@ -132,12 +130,10 @@ const SKIPPED_PINNED: ReadonlyArray<string> = [
|
|
|
132
130
|
// undeclared-kind: platform
|
|
133
131
|
"provider-standing-viewer :: operator may view provider standing, tenants may not :: identity_account:mallory platform:stigmer :: undeclared-kind",
|
|
134
132
|
"provider-standing-viewer :: operator may view provider standing, tenants may not :: identity_account:opal platform:stigmer :: undeclared-kind",
|
|
135
|
-
"public-visibility-setter :: operators may set public visibility, tenants may not :: identity_account:machine platform:stigmer :: undeclared-kind",
|
|
136
|
-
"public-visibility-setter :: operators may set public visibility, tenants may not :: identity_account:mallory platform:stigmer :: undeclared-kind",
|
|
137
|
-
"public-visibility-setter :: operators may set public visibility, tenants may not :: identity_account:opal platform:stigmer :: undeclared-kind",
|
|
138
133
|
"reserved-label-writer :: operator may write reserved labels, tenants may not :: identity_account:machine platform:stigmer :: undeclared-kind",
|
|
139
134
|
"reserved-label-writer :: operator may write reserved labels, tenants may not :: identity_account:mallory platform:stigmer :: undeclared-kind",
|
|
140
135
|
// undeclared-subject-type: identity_provider#platform_user
|
|
136
|
+
"agent-instance-creation :: the tenant-family case, the agent half from platform_viewer and the organization half at home :: identity_account:mia can_create_instance agent:open-bot :: undeclared-subject-type (identity_provider)",
|
|
141
137
|
"default-instance-inheritance :: managed-org member reaches the default instance of a platform-shared agent :: identity_account:alice can_execute agent_instance:sara-default :: undeclared-subject-type (identity_provider)",
|
|
142
138
|
"default-instance-inheritance :: managed-org member reaches the default instance of a platform-shared agent :: identity_account:alice can_view agent_instance:sara-default :: undeclared-subject-type (identity_provider)",
|
|
143
139
|
"default-instance-inheritance :: managed-org member reaches the default instance of a platform-shared workflow :: identity_account:alice can_execute workflow_instance:onboarding-default :: undeclared-subject-type (identity_provider)",
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "../tuples.js";
|
|
14
14
|
|
|
15
15
|
describe("the string notation", () => {
|
|
16
|
-
it("parses an object
|
|
16
|
+
it("parses an object and a userset, and an id may carry a colon (issuer subjects do)", () => {
|
|
17
17
|
expect(parseObjectRef("agent:agt_1")).toEqual({
|
|
18
18
|
type: "agent",
|
|
19
19
|
id: "agt_1",
|
|
@@ -27,11 +27,6 @@ describe("the string notation", () => {
|
|
|
27
27
|
object: { type: "organization", id: "acme" },
|
|
28
28
|
relation: "viewer",
|
|
29
29
|
});
|
|
30
|
-
expect(parseSubject("identity_account:*")).toEqual({
|
|
31
|
-
form: "wildcard",
|
|
32
|
-
type: "identity_account",
|
|
33
|
-
condition: undefined,
|
|
34
|
-
});
|
|
35
30
|
expect(parseSubject("identity_account:ida_x")).toEqual({
|
|
36
31
|
form: "object",
|
|
37
32
|
object: { type: "identity_account", id: "ida_x" },
|
|
@@ -43,18 +38,24 @@ describe("the string notation", () => {
|
|
|
43
38
|
expect(() => parseObjectRef(":id")).toThrow("not an object reference");
|
|
44
39
|
});
|
|
45
40
|
|
|
46
|
-
it("
|
|
41
|
+
it("refuses the wildcard notation — no line of the model admits one", () => {
|
|
42
|
+
expect(() => parseSubject("identity_account:*")).toThrow(
|
|
43
|
+
"wildcard subject 'identity_account:*' is not admitted",
|
|
44
|
+
);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
it("formats a tuple in the proto's notation", () => {
|
|
47
48
|
expect(
|
|
48
49
|
formatTuple({
|
|
49
50
|
object: parseObjectRef("agent:a"),
|
|
50
51
|
relation: "viewer",
|
|
51
52
|
subject: {
|
|
52
|
-
form: "
|
|
53
|
-
type: "
|
|
54
|
-
|
|
53
|
+
form: "userset",
|
|
54
|
+
object: { type: "organization", id: "acme" },
|
|
55
|
+
relation: "viewer",
|
|
55
56
|
},
|
|
56
57
|
}),
|
|
57
|
-
).toBe("agent:a#viewer@
|
|
58
|
+
).toBe("agent:a#viewer@organization:acme#viewer");
|
|
58
59
|
expect(formatSubject(parseSubject("organization:acme#member"))).toBe(
|
|
59
60
|
"organization:acme#member",
|
|
60
61
|
);
|
|
@@ -17,9 +17,7 @@
|
|
|
17
17
|
* 2. A kind this edition does not serve is `deny` (`kindServedByEdition`,
|
|
18
18
|
* the predicate 2b's `checkMyPermission` arm 1 uses, so the console
|
|
19
19
|
* and the server agree by construction). `platform` is the one that
|
|
20
|
-
*
|
|
21
|
-
* posture nobody sets public visibility, the model's own reason for
|
|
22
|
-
* making it a platform operator's act.
|
|
20
|
+
* can arrive, through an operator capability no self-host holds.
|
|
23
21
|
* 3. The caller as a person (person.ts) and one derived tuple source for
|
|
24
22
|
* them; the target loaded ONCE through the source's memoised loader,
|
|
25
23
|
* so the read that decides not-found is the read the derivation
|
|
@@ -31,11 +29,9 @@
|
|
|
31
29
|
* member cannot learn which account ids exist. Present or exempt, the
|
|
32
30
|
* row is then evaluated: the cloud asks OpenFGA whether or not the row
|
|
33
31
|
* exists, and so does this driver.
|
|
34
|
-
* 5. `checkRelation
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* the method annotation's byte-pinned `error_msg` wins on the wire,
|
|
38
|
-
* exactly the cloud's genuine-denial path.
|
|
32
|
+
* 5. `checkRelation`. True is `allow`; false is `deny` with an EMPTY
|
|
33
|
+
* reason, so the method annotation's byte-pinned `error_msg` wins on
|
|
34
|
+
* the wire, exactly the cloud's genuine-denial path.
|
|
39
35
|
*
|
|
40
36
|
* Faults. Everything past the pre-checks runs under one guard: a store
|
|
41
37
|
* fault, a person that names nobody (`personFor`), an evaluation fault
|
|
@@ -179,7 +175,6 @@ export function newBuiltInAuthorizer(deps: BuiltInAuthorizerDeps): Authorizer {
|
|
|
179
175
|
object,
|
|
180
176
|
relation,
|
|
181
177
|
person,
|
|
182
|
-
{ allow: true },
|
|
183
178
|
);
|
|
184
179
|
if (allowed) {
|
|
185
180
|
return { kind: "allow" };
|