@sixb/core 0.1.12 → 0.1.13
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/actions/index.d.ts +2 -2
- package/dist/actions/index.d.ts.map +1 -1
- package/dist/actions/index.js +28 -26
- package/dist/actions/index.js.map +1 -1
- package/dist/actions/read-facade.d.ts +14 -16
- package/dist/actions/read-facade.d.ts.map +1 -1
- package/dist/actions/request.d.ts.map +1 -1
- package/dist/actions/run-dispatch.d.ts +2 -0
- package/dist/actions/run-dispatch.d.ts.map +1 -1
- package/dist/actions/types/context.d.ts +18 -31
- package/dist/actions/types/context.d.ts.map +1 -1
- package/dist/actions/types/params.d.ts +2 -1
- package/dist/actions/types/params.d.ts.map +1 -1
- package/dist/actions/worker.js +1 -1
- package/dist/agents/index.js +41 -39
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/streams/index.js +2 -2
- package/dist/agents/streams/internal.js +2 -2
- package/dist/assert-never.d.ts +6 -0
- package/dist/assert-never.d.ts.map +1 -0
- package/dist/auth/client-address.d.ts +3 -0
- package/dist/auth/client-address.d.ts.map +1 -0
- package/dist/auth/csrf.d.ts +5 -1
- package/dist/auth/csrf.d.ts.map +1 -1
- package/dist/auth/index.d.ts +3 -2
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +14 -8
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/runtime.d.ts +58 -41
- package/dist/auth/runtime.d.ts.map +1 -1
- package/dist/auth/session-cache.d.ts +10 -3
- package/dist/auth/session-cache.d.ts.map +1 -1
- package/dist/auth/sessions.d.ts +12 -0
- package/dist/auth/sessions.d.ts.map +1 -1
- package/dist/auth/strategy.js +1 -1
- package/dist/auth/types.d.ts +8 -15
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/authorization/index.js +3 -3
- package/dist/bootstrap/index.d.ts +1 -1
- package/dist/bootstrap/index.d.ts.map +1 -1
- package/dist/bootstrap/index.js +45 -43
- package/dist/bootstrap/index.js.map +1 -1
- package/dist/bootstrap/ontology-type-manifest.d.ts +8 -0
- package/dist/bootstrap/ontology-type-manifest.d.ts.map +1 -1
- package/dist/{chunk-q5gz3g2j.js → chunk-0321g649.js} +2 -16
- package/dist/{chunk-q5gz3g2j.js.map → chunk-0321g649.js.map} +2 -2
- package/dist/{chunk-e1f1sqba.js → chunk-04h4t2b5.js} +3 -3
- package/dist/{chunk-y3ev53cq.js → chunk-2fv8sajb.js} +2 -2
- package/dist/{chunk-3bnt2wna.js → chunk-2hbhn1ff.js} +1 -1
- package/dist/{chunk-eyjzgav0.js → chunk-3nx8vj5a.js} +6 -4
- package/dist/chunk-3nx8vj5a.js.map +12 -0
- package/dist/{chunk-5tetw4hn.js → chunk-4tnrzqqh.js} +1 -1
- package/dist/{chunk-g50nxqs5.js → chunk-63fp9x3q.js} +63 -20
- package/dist/chunk-63fp9x3q.js.map +20 -0
- package/dist/{chunk-qm535afa.js → chunk-693f3zn8.js} +66 -24
- package/dist/chunk-693f3zn8.js.map +15 -0
- package/dist/{chunk-7zgecwy1.js → chunk-6x0pqh32.js} +12 -1
- package/dist/{chunk-7zgecwy1.js.map → chunk-6x0pqh32.js.map} +3 -3
- package/dist/{chunk-6ma8dvzc.js → chunk-898y24dd.js} +49 -42
- package/dist/chunk-898y24dd.js.map +15 -0
- package/dist/{chunk-7qnvhtcd.js → chunk-91wthfwe.js} +17 -17
- package/dist/{chunk-7qnvhtcd.js.map → chunk-91wthfwe.js.map} +5 -5
- package/dist/chunk-96yw3pwd.js.map +2 -2
- package/dist/{chunk-2cxv584m.js → chunk-9pfw47qx.js} +309 -204
- package/dist/chunk-9pfw47qx.js.map +44 -0
- package/dist/{chunk-4k53sm9e.js → chunk-a0073121.js} +59 -59
- package/dist/{chunk-4k53sm9e.js.map → chunk-a0073121.js.map} +5 -5
- package/dist/{chunk-jjwhy3rs.js → chunk-a69fkrtr.js} +5 -5
- package/dist/{chunk-y1ahv8b7.js → chunk-bdhfn0ww.js} +1 -1
- package/dist/{chunk-4ph94nhd.js → chunk-bep5rrdq.js} +2 -2
- package/dist/{chunk-kept9cdd.js → chunk-bxx3ms5t.js} +1 -1
- package/dist/{chunk-xtfryrfb.js → chunk-cbn96bve.js} +2 -2
- package/dist/{chunk-nzsy3xrp.js → chunk-cvrbhvtr.js} +69 -44
- package/dist/{chunk-nzsy3xrp.js.map → chunk-cvrbhvtr.js.map} +7 -7
- package/dist/{chunk-vsg0g7h9.js → chunk-d8yes9yx.js} +304 -45
- package/dist/chunk-d8yes9yx.js.map +20 -0
- package/dist/{chunk-tg4g4zh0.js → chunk-darm7eeg.js} +9 -9
- package/dist/{chunk-tg4g4zh0.js.map → chunk-darm7eeg.js.map} +3 -3
- package/dist/{chunk-vpxss818.js → chunk-drz59ve0.js} +9 -8
- package/dist/chunk-drz59ve0.js.map +10 -0
- package/dist/{chunk-7c2g3sz9.js → chunk-dsfw1bdr.js} +5 -5
- package/dist/{chunk-7c2g3sz9.js.map → chunk-dsfw1bdr.js.map} +1 -1
- package/dist/{chunk-p6r1ex7t.js → chunk-ffwvdgk1.js} +5 -13
- package/dist/chunk-ffwvdgk1.js.map +10 -0
- package/dist/{chunk-r5zythxp.js → chunk-gbcrz0gr.js} +7 -7
- package/dist/{chunk-ybhz3j9g.js → chunk-gc226ten.js} +104 -148
- package/dist/{chunk-ybhz3j9g.js.map → chunk-gc226ten.js.map} +7 -8
- package/dist/{chunk-3ghw2t5q.js → chunk-gmt22nxx.js} +10 -16
- package/dist/chunk-gmt22nxx.js.map +10 -0
- package/dist/chunk-h89wz928.js +42 -0
- package/dist/chunk-h89wz928.js.map +10 -0
- package/dist/{chunk-hkw8rykk.js → chunk-ht4a7mjg.js} +74 -4
- package/dist/chunk-ht4a7mjg.js.map +15 -0
- package/dist/{chunk-t7dzd1tm.js → chunk-jhyc777j.js} +2 -2
- package/dist/{chunk-xn686q2e.js → chunk-jmwy25mf.js} +75 -57
- package/dist/{chunk-xn686q2e.js.map → chunk-jmwy25mf.js.map} +3 -3
- package/dist/{chunk-f06sf7rr.js → chunk-k4kkp58d.js} +18 -5
- package/dist/chunk-k4kkp58d.js.map +11 -0
- package/dist/{chunk-2h63nrde.js → chunk-ky7zpbtt.js} +5 -7
- package/dist/{chunk-2h63nrde.js.map → chunk-ky7zpbtt.js.map} +3 -4
- package/dist/chunk-m4ehq95f.js +9 -0
- package/dist/chunk-m4ehq95f.js.map +10 -0
- package/dist/{chunk-0mza4xb2.js → chunk-m8zkvep1.js} +2 -2
- package/dist/{chunk-b768c93y.js → chunk-mf6hwpzh.js} +83 -28
- package/dist/{chunk-b768c93y.js.map → chunk-mf6hwpzh.js.map} +5 -5
- package/dist/{chunk-yxb4c62x.js → chunk-mr60an99.js} +3 -2
- package/dist/{chunk-yxb4c62x.js.map → chunk-mr60an99.js.map} +3 -3
- package/dist/chunk-n33e8dz8.js +191 -0
- package/dist/chunk-n33e8dz8.js.map +11 -0
- package/dist/chunk-rdghfsss.js.map +2 -2
- package/dist/{chunk-m7cx05vp.js → chunk-rqtdtm43.js} +126 -59
- package/dist/{chunk-m7cx05vp.js.map → chunk-rqtdtm43.js.map} +13 -12
- package/dist/{chunk-bbaa1fet.js → chunk-rzcjp5m2.js} +7 -3
- package/dist/chunk-rzcjp5m2.js.map +25 -0
- package/dist/{chunk-hzw7yv5g.js → chunk-rzkr70gr.js} +5 -1
- package/dist/{chunk-hzw7yv5g.js.map → chunk-rzkr70gr.js.map} +3 -3
- package/dist/{chunk-sfypc7mk.js → chunk-s24qbp32.js} +4 -4
- package/dist/{chunk-axndsymr.js → chunk-tw03bsmb.js} +2 -2
- package/dist/{chunk-axndsymr.js.map → chunk-tw03bsmb.js.map} +3 -3
- package/dist/{chunk-y0v18c2j.js → chunk-vef6qa14.js} +2 -2
- package/dist/{chunk-gzt6v1ja.js → chunk-vn3yh259.js} +1 -1
- package/dist/{chunk-bg2bs62d.js → chunk-w9bp61e7.js} +5 -5
- package/dist/{chunk-3h7ctayx.js → chunk-xgptywp0.js} +4 -3
- package/dist/chunk-xgptywp0.js.map +11 -0
- package/dist/{chunk-gswwr35f.js → chunk-y487ywrv.js} +4 -4
- package/dist/{chunk-bet1rb9h.js → chunk-y6vnvayj.js} +1 -1
- package/dist/{chunk-x9tmx3fc.js → chunk-ypj2wqtj.js} +3 -6
- package/dist/{chunk-x9tmx3fc.js.map → chunk-ypj2wqtj.js.map} +4 -4
- package/dist/{chunk-g2gezsg5.js → chunk-z9h698s8.js} +1 -1
- package/dist/{chunk-wjffn5m4.js → chunk-zdkcdshk.js} +3 -36
- package/dist/{chunk-wjffn5m4.js.map → chunk-zdkcdshk.js.map} +3 -4
- package/dist/{chunk-bfjv1adk.js → chunk-znw0zvy4.js} +1 -1
- package/dist/edits/types.d.ts +19 -19
- package/dist/edits/types.d.ts.map +1 -1
- package/dist/error-reporting/internal.js +3 -3
- package/dist/errors/catalog.d.ts +4 -0
- package/dist/errors/catalog.d.ts.map +1 -1
- package/dist/errors/internal.js +1 -1
- package/dist/events/envelope.d.ts +0 -12
- package/dist/events/envelope.d.ts.map +1 -1
- package/dist/events/index.d.ts +1 -1
- package/dist/events/index.d.ts.map +1 -1
- package/dist/events/index.js +3 -3
- package/dist/events/service.d.ts +1 -2
- package/dist/events/service.d.ts.map +1 -1
- package/dist/events/toStoredEvent.d.ts +1 -2
- package/dist/events/toStoredEvent.d.ts.map +1 -1
- package/dist/events/types/index.d.ts +2 -1
- package/dist/events/types/index.d.ts.map +1 -1
- package/dist/execution/agent.d.ts +1 -2
- package/dist/execution/agent.d.ts.map +1 -1
- package/dist/execution/agent.js +39 -37
- package/dist/execution/agent.js.map +1 -1
- package/dist/execution/authorized-object-reader.d.ts.map +1 -1
- package/dist/execution/primitive.d.ts +1 -2
- package/dist/execution/primitive.d.ts.map +1 -1
- package/dist/execution/primitive.js +38 -36
- package/dist/execution/primitive.js.map +3 -3
- package/dist/execution/request.d.ts +1 -2
- package/dist/execution/request.d.ts.map +1 -1
- package/dist/execution/request.js +39 -37
- package/dist/execution/request.js.map +3 -3
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +56 -50
- package/dist/index.js.map +1 -1
- package/dist/maintenance/ontology-maintenance.d.ts +11 -1
- package/dist/maintenance/ontology-maintenance.d.ts.map +1 -1
- package/dist/materialization/errors.d.ts +3 -1
- package/dist/materialization/errors.d.ts.map +1 -1
- package/dist/materialization/events.d.ts +27 -2
- package/dist/materialization/events.d.ts.map +1 -1
- package/dist/materializer/edits/commit.d.ts.map +1 -1
- package/dist/materializer/edits/operations.d.ts +2 -1
- package/dist/materializer/edits/operations.d.ts.map +1 -1
- package/dist/materializer/edits/plan.d.ts +2 -2
- package/dist/materializer/edits/plan.d.ts.map +1 -1
- package/dist/materializer/edits/user-refs.d.ts +30 -0
- package/dist/materializer/edits/user-refs.d.ts.map +1 -0
- package/dist/materializer/effective/build-events.d.ts +2 -2
- package/dist/materializer/effective/build-events.d.ts.map +1 -1
- package/dist/materializer/execution/scope.d.ts +11 -3
- package/dist/materializer/execution/scope.d.ts.map +1 -1
- package/dist/materializer/index.js +23 -21
- package/dist/materializer/index.js.map +1 -1
- package/dist/materializer/projections/replacement-plan.d.ts +2 -0
- package/dist/materializer/projections/replacement-plan.d.ts.map +1 -1
- package/dist/materializer/telemetry/plan.d.ts +2 -2
- package/dist/materializer/telemetry/plan.d.ts.map +1 -1
- package/dist/models/execution/index.js +23 -21
- package/dist/models/execution/index.js.map +1 -1
- package/dist/models/index.js +1 -1
- package/dist/objects/execution.d.ts +21 -27
- package/dist/objects/execution.d.ts.map +1 -1
- package/dist/objects/index.js +28 -26
- package/dist/objects/index.js.map +1 -1
- package/dist/objects/query/executor.d.ts.map +1 -1
- package/dist/objects/query/index.js +27 -25
- package/dist/objects/query/index.js.map +1 -1
- package/dist/objects/query/ir.d.ts +8 -1
- package/dist/objects/query/ir.d.ts.map +1 -1
- package/dist/objects/query/scalar-values.d.ts.map +1 -1
- package/dist/objects/query/validate.d.ts.map +1 -1
- package/dist/objects/sdk/object-handle.d.ts +1 -2
- package/dist/objects/sdk/object-handle.d.ts.map +1 -1
- package/dist/objects/sdk/object-set.d.ts +2 -3
- package/dist/objects/sdk/object-set.d.ts.map +1 -1
- package/dist/objects/sdk/query-builder.d.ts +8 -10
- package/dist/objects/sdk/query-builder.d.ts.map +1 -1
- package/dist/objects/sdk/telemetry-channel.d.ts +1 -2
- package/dist/objects/sdk/telemetry-channel.d.ts.map +1 -1
- package/dist/objects/sdk/where.d.ts +2 -3
- package/dist/objects/sdk/where.d.ts.map +1 -1
- package/dist/ontology/builders.d.ts +11 -10
- package/dist/ontology/builders.d.ts.map +1 -1
- package/dist/ontology/index.d.ts +4 -2
- package/dist/ontology/index.d.ts.map +1 -1
- package/dist/ontology/index.js +6 -4
- package/dist/ontology/index.js.map +1 -1
- package/dist/ontology/inference/index.d.ts +34 -22
- package/dist/ontology/inference/index.d.ts.map +1 -1
- package/dist/ontology/internal.d.ts +1 -0
- package/dist/ontology/internal.d.ts.map +1 -1
- package/dist/ontology/internal.js +9 -7
- package/dist/ontology/internal.js.map +1 -1
- package/dist/ontology/primitives.d.ts +38 -0
- package/dist/ontology/primitives.d.ts.map +1 -0
- package/dist/ontology/query-capabilities.d.ts +38 -0
- package/dist/ontology/query-capabilities.d.ts.map +1 -0
- package/dist/ontology/refs.d.ts +23 -2
- package/dist/ontology/refs.d.ts.map +1 -1
- package/dist/ontology/registered.d.ts +16 -0
- package/dist/ontology/registered.d.ts.map +1 -0
- package/dist/ontology/registry.d.ts.map +1 -1
- package/dist/ontology/tokens.d.ts +35 -1
- package/dist/ontology/tokens.d.ts.map +1 -1
- package/dist/ontology/types.d.ts +18 -4
- package/dist/ontology/types.d.ts.map +1 -1
- package/dist/ontology/user-ref.d.ts +35 -0
- package/dist/ontology/user-ref.d.ts.map +1 -0
- package/dist/ontology/validation/definition.d.ts.map +1 -1
- package/dist/ontology/validation/index.d.ts +1 -1
- package/dist/ontology/validation/index.d.ts.map +1 -1
- package/dist/ontology/validation/normalize.d.ts.map +1 -1
- package/dist/ontology/validation/properties.d.ts +6 -1
- package/dist/ontology/validation/properties.d.ts.map +1 -1
- package/dist/ontology/validation/query.d.ts.map +1 -1
- package/dist/ontology/validation/schema.d.ts.map +1 -1
- package/dist/pipelines/index.js +26 -24
- package/dist/pipelines/index.js.map +1 -1
- package/dist/predicates/types.d.ts +53 -3
- package/dist/predicates/types.d.ts.map +1 -1
- package/dist/projections/builders.d.ts +19 -1
- package/dist/projections/builders.d.ts.map +1 -1
- package/dist/projections/internal.js +23 -21
- package/dist/projections/internal.js.map +1 -1
- package/dist/projections/validation.d.ts.map +1 -1
- package/dist/query.js +2 -2
- package/dist/queues/in-memory.d.ts +1 -1
- package/dist/queues/in-memory.d.ts.map +1 -1
- package/dist/runtime/create.d.ts +1 -1
- package/dist/runtime/create.d.ts.map +1 -1
- package/dist/runtime/host.d.ts +5 -5
- package/dist/runtime/host.d.ts.map +1 -1
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/internal.js +27 -25
- package/dist/runtime/internal.js.map +1 -1
- package/dist/runtime/sixb.d.ts +5 -5
- package/dist/runtime/sixb.d.ts.map +1 -1
- package/dist/runtime/types.d.ts +171 -188
- package/dist/runtime/types.d.ts.map +1 -1
- package/dist/sandboxes/index.js +5 -5
- package/dist/sandboxes/sandbox.d.ts +4 -1
- package/dist/sandboxes/sandbox.d.ts.map +1 -1
- package/dist/shared/params/types.d.ts +4 -3
- package/dist/shared/params/types.d.ts.map +1 -1
- package/dist/shared/params/user-refs.d.ts +19 -0
- package/dist/shared/params/user-refs.d.ts.map +1 -0
- package/dist/shares/compiler.d.ts.map +1 -1
- package/dist/shares/internal.js +24 -22
- package/dist/shares/internal.js.map +2 -2
- package/dist/storage/action-runs/failure.js +2 -2
- package/dist/storage/action-runs/types.d.ts +1 -1
- package/dist/storage/action-runs/types.d.ts.map +1 -1
- package/dist/storage/agents/provider.js +1 -1
- package/dist/storage/ai-limits/enforcement.js +2 -2
- package/dist/storage/auth/in-memory/access-tokens.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/auth-storage.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/device-authorizations.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/sessions.d.ts +8 -1
- package/dist/storage/auth/in-memory/sessions.d.ts.map +1 -1
- package/dist/storage/auth/in-memory/shared.d.ts.map +1 -1
- package/dist/storage/auth/index.d.ts +1 -1
- package/dist/storage/auth/index.d.ts.map +1 -1
- package/dist/storage/auth/types.d.ts +62 -13
- package/dist/storage/auth/types.d.ts.map +1 -1
- package/dist/storage/connector-connections/provider.js +1 -1
- package/dist/storage/executions/provider.js +1 -1
- package/dist/storage/file-upload-sessions/in-memory.d.ts +9 -18
- package/dist/storage/file-upload-sessions/in-memory.d.ts.map +1 -1
- package/dist/storage/file-upload-sessions/index.d.ts +1 -1
- package/dist/storage/file-upload-sessions/index.d.ts.map +1 -1
- package/dist/storage/file-upload-sessions/provider.d.ts +52 -0
- package/dist/storage/file-upload-sessions/provider.d.ts.map +1 -0
- package/dist/storage/file-upload-sessions/provider.js +24 -0
- package/dist/storage/file-upload-sessions/provider.js.map +9 -0
- package/dist/storage/file-upload-sessions/types.d.ts +19 -1
- package/dist/storage/file-upload-sessions/types.d.ts.map +1 -1
- package/dist/storage/file-upload-sessions/utils.d.ts +8 -2
- package/dist/storage/file-upload-sessions/utils.d.ts.map +1 -1
- package/dist/storage/index.d.ts +3 -3
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +29 -25
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/internal.js +11 -9
- package/dist/storage/internal.js.map +1 -1
- package/dist/storage/objects/in-memory/query.d.ts.map +1 -1
- package/dist/storage/ontology/commits.d.ts +6 -2
- package/dist/storage/ontology/commits.d.ts.map +1 -1
- package/dist/storage/ontology/in-memory/materializations.d.ts.map +1 -1
- package/dist/storage/ontology/provider-work.d.ts.map +1 -1
- package/dist/storage/ontology/provider.d.ts +14 -1
- package/dist/storage/ontology/provider.d.ts.map +1 -1
- package/dist/storage/ontology/provider.js +8 -2
- package/dist/storage/ontology/provider.js.map +1 -1
- package/dist/storage/operation-scope.d.ts.map +1 -1
- package/dist/storage/operation-scope.js +1 -1
- package/dist/storage/projection-runs/provider.js +2 -2
- package/dist/storage/types.d.ts +1 -1
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/storage/workflow-interventions/index.d.ts +1 -1
- package/dist/storage/workflow-interventions/index.d.ts.map +1 -1
- package/dist/storage/workflow-interventions/types.d.ts +5 -8
- package/dist/storage/workflow-interventions/types.d.ts.map +1 -1
- package/dist/storage/workflow-runs/provider.js +8 -8
- package/dist/syncs/index.js +27 -25
- package/dist/syncs/index.js.map +1 -1
- package/dist/testing/action-execution.d.ts +4 -0
- package/dist/testing/action-execution.d.ts.map +1 -1
- package/dist/testing/auth-storage-contract.d.ts.map +1 -1
- package/dist/testing/execution.d.ts +1 -2
- package/dist/testing/execution.d.ts.map +1 -1
- package/dist/testing/file-upload-session-storage-contract.d.ts +12 -0
- package/dist/testing/file-upload-session-storage-contract.d.ts.map +1 -0
- package/dist/testing/index.d.ts +2 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +1951 -1242
- package/dist/testing/index.js.map +15 -13
- package/dist/testing/materializer-storage-contract.d.ts.map +1 -1
- package/dist/testing/object-query-contract.d.ts.map +1 -1
- package/dist/testing/ontology-contract-fixture.d.ts +8 -0
- package/dist/testing/ontology-contract-fixture.d.ts.map +1 -1
- package/dist/testing/ontology-storage-contract.d.ts.map +1 -1
- package/dist/testing/sandboxes-contract.d.ts.map +1 -1
- package/dist/testing/workflow-intervention-storage-contract.d.ts +8 -0
- package/dist/testing/workflow-intervention-storage-contract.d.ts.map +1 -0
- package/dist/webhooks/internal.js +24 -22
- package/dist/webhooks/internal.js.map +2 -2
- package/dist/webhooks/types.d.ts +2 -2
- package/dist/webhooks/types.d.ts.map +1 -1
- package/dist/workers/index.js +1 -1
- package/dist/workflows/index.js +42 -40
- package/dist/workflows/index.js.map +1 -1
- package/dist/workflows/run-dispatch.d.ts.map +1 -1
- package/dist/workflows/types.d.ts +2 -2
- package/dist/workflows/types.d.ts.map +1 -1
- package/package.json +7 -1
- package/src/actions/index.ts +0 -3
- package/src/actions/read-facade.ts +102 -62
- package/src/actions/request.ts +13 -0
- package/src/actions/run-dispatch.ts +3 -0
- package/src/actions/types/context.ts +17 -65
- package/src/actions/types/params.ts +2 -1
- package/src/agents/authority.ts +1 -1
- package/src/assert-never.ts +7 -0
- package/src/auth/client-address.ts +12 -0
- package/src/auth/csrf.ts +14 -5
- package/src/auth/index.ts +3 -2
- package/src/auth/runtime.ts +299 -277
- package/src/auth/session-cache.ts +18 -6
- package/src/auth/sessions.ts +30 -0
- package/src/auth/types.ts +7 -17
- package/src/bootstrap/index.ts +1 -0
- package/src/bootstrap/ontology-type-manifest.ts +112 -60
- package/src/edits/types.ts +47 -63
- package/src/errors/catalog.ts +4 -0
- package/src/events/envelope.ts +0 -13
- package/src/events/index.ts +1 -1
- package/src/events/service.ts +1 -11
- package/src/events/toStoredEvent.ts +1 -3
- package/src/events/types/index.ts +1 -1
- package/src/execution/agent.ts +1 -2
- package/src/execution/authorized-object-reader.ts +5 -7
- package/src/execution/primitive.ts +1 -2
- package/src/execution/request.ts +1 -2
- package/src/index.ts +8 -7
- package/src/maintenance/ontology-maintenance.ts +77 -1
- package/src/materialization/errors.ts +2 -0
- package/src/materialization/events.ts +27 -2
- package/src/materializer/README.md +2 -0
- package/src/materializer/edits/commit.ts +21 -12
- package/src/materializer/edits/operations.ts +32 -4
- package/src/materializer/edits/plan.ts +4 -5
- package/src/materializer/edits/user-refs.ts +115 -0
- package/src/materializer/effective/build-events.ts +4 -5
- package/src/materializer/execution/scope.ts +40 -7
- package/src/materializer/projections/replace.ts +2 -0
- package/src/materializer/projections/replacement-plan.ts +4 -0
- package/src/materializer/telemetry/append.ts +4 -12
- package/src/materializer/telemetry/plan.ts +4 -5
- package/src/objects/execution.ts +33 -62
- package/src/objects/query/executor.ts +12 -3
- package/src/objects/query/ir.ts +7 -0
- package/src/objects/query/planner.ts +1 -0
- package/src/objects/query/scalar-values.ts +19 -0
- package/src/objects/query/validate.ts +55 -44
- package/src/objects/sdk/object-handle.ts +8 -8
- package/src/objects/sdk/object-set.ts +8 -15
- package/src/objects/sdk/query-builder.ts +59 -71
- package/src/objects/sdk/telemetry-channel.ts +6 -7
- package/src/objects/sdk/where.ts +6 -13
- package/src/ontology/builders.ts +15 -11
- package/src/ontology/index.ts +4 -0
- package/src/ontology/inference/index.ts +56 -36
- package/src/ontology/internal.ts +1 -0
- package/src/ontology/json-schema.ts +12 -0
- package/src/ontology/primitives.ts +91 -0
- package/src/ontology/query-capabilities.ts +136 -0
- package/src/ontology/refs.ts +33 -6
- package/src/ontology/registered.ts +22 -0
- package/src/ontology/registry.ts +6 -3
- package/src/ontology/tokens.ts +41 -2
- package/src/ontology/types.ts +19 -3
- package/src/ontology/user-ref.ts +120 -0
- package/src/ontology/validation/definition.ts +2 -13
- package/src/ontology/validation/index.ts +1 -0
- package/src/ontology/validation/normalize.ts +39 -3
- package/src/ontology/validation/properties.ts +95 -19
- package/src/ontology/validation/query.ts +11 -42
- package/src/ontology/validation/schema.ts +16 -0
- package/src/predicates/types.ts +43 -33
- package/src/projections/builders.ts +24 -3
- package/src/projections/validation.ts +15 -1
- package/src/runtime/create.ts +2 -2
- package/src/runtime/host.ts +10 -12
- package/src/runtime/index.ts +3 -2
- package/src/runtime/sixb.ts +13 -23
- package/src/runtime/types.ts +277 -479
- package/src/sandboxes/sandbox.ts +4 -1
- package/src/shared/params/types.ts +4 -3
- package/src/shared/params/user-refs.ts +48 -0
- package/src/shares/compiler.ts +6 -16
- package/src/storage/action-runs/types.ts +1 -0
- package/src/storage/auth/in-memory/access-tokens.ts +5 -2
- package/src/storage/auth/in-memory/auth-storage.ts +5 -8
- package/src/storage/auth/in-memory/device-authorizations.ts +0 -2
- package/src/storage/auth/in-memory/sessions.ts +69 -1
- package/src/storage/auth/in-memory/shared.ts +13 -7
- package/src/storage/auth/index.ts +2 -1
- package/src/storage/auth/types.ts +57 -13
- package/src/storage/executions/validation.ts +1 -1
- package/src/storage/file-upload-sessions/in-memory.ts +64 -113
- package/src/storage/file-upload-sessions/index.ts +1 -0
- package/src/storage/file-upload-sessions/provider.ts +258 -0
- package/src/storage/file-upload-sessions/types.ts +20 -1
- package/src/storage/file-upload-sessions/utils.ts +25 -9
- package/src/storage/index.ts +3 -2
- package/src/storage/objects/in-memory/query.ts +13 -3
- package/src/storage/ontology/commits.ts +6 -2
- package/src/storage/ontology/in-memory/materializations.ts +6 -34
- package/src/storage/ontology/provider-header-validation.ts +57 -0
- package/src/storage/ontology/provider-work.ts +15 -3
- package/src/storage/ontology/provider.ts +59 -1
- package/src/storage/operation-scope.ts +1 -0
- package/src/storage/types.ts +0 -1
- package/src/storage/workflow-interventions/index.ts +0 -1
- package/src/storage/workflow-interventions/types.ts +5 -9
- package/src/testing/action-execution.ts +13 -3
- package/src/testing/auth-storage-contract.ts +149 -62
- package/src/testing/execution-storage-contract.ts +1 -2
- package/src/testing/execution.ts +4 -7
- package/src/testing/file-upload-session-storage-contract.ts +335 -0
- package/src/testing/index.ts +8 -0
- package/src/testing/materializer-storage-contract.ts +86 -4
- package/src/testing/object-query-contract.ts +121 -2
- package/src/testing/ontology-contract-fixture.ts +23 -3
- package/src/testing/ontology-storage-contract.ts +58 -0
- package/src/testing/sandboxes-contract.ts +27 -0
- package/src/testing/workflow-intervention-storage-contract.ts +203 -0
- package/src/webhooks/types.ts +2 -2
- package/src/workflows/run-dispatch.ts +12 -1
- package/src/workflows/snapshot.ts +16 -7
- package/src/workflows/types.ts +2 -2
- package/dist/chunk-2cxv584m.js.map +0 -43
- package/dist/chunk-3ghw2t5q.js.map +0 -10
- package/dist/chunk-3h7ctayx.js.map +0 -11
- package/dist/chunk-6ma8dvzc.js.map +0 -15
- package/dist/chunk-bbaa1fet.js.map +0 -25
- package/dist/chunk-eyjzgav0.js.map +0 -12
- package/dist/chunk-f06sf7rr.js.map +0 -11
- package/dist/chunk-g50nxqs5.js.map +0 -18
- package/dist/chunk-hkw8rykk.js.map +0 -15
- package/dist/chunk-p6r1ex7t.js.map +0 -10
- package/dist/chunk-qm535afa.js.map +0 -15
- package/dist/chunk-vpxss818.js.map +0 -10
- package/dist/chunk-vsg0g7h9.js.map +0 -17
- /package/dist/{chunk-e1f1sqba.js.map → chunk-04h4t2b5.js.map} +0 -0
- /package/dist/{chunk-y3ev53cq.js.map → chunk-2fv8sajb.js.map} +0 -0
- /package/dist/{chunk-3bnt2wna.js.map → chunk-2hbhn1ff.js.map} +0 -0
- /package/dist/{chunk-5tetw4hn.js.map → chunk-4tnrzqqh.js.map} +0 -0
- /package/dist/{chunk-jjwhy3rs.js.map → chunk-a69fkrtr.js.map} +0 -0
- /package/dist/{chunk-y1ahv8b7.js.map → chunk-bdhfn0ww.js.map} +0 -0
- /package/dist/{chunk-4ph94nhd.js.map → chunk-bep5rrdq.js.map} +0 -0
- /package/dist/{chunk-kept9cdd.js.map → chunk-bxx3ms5t.js.map} +0 -0
- /package/dist/{chunk-xtfryrfb.js.map → chunk-cbn96bve.js.map} +0 -0
- /package/dist/{chunk-r5zythxp.js.map → chunk-gbcrz0gr.js.map} +0 -0
- /package/dist/{chunk-t7dzd1tm.js.map → chunk-jhyc777j.js.map} +0 -0
- /package/dist/{chunk-0mza4xb2.js.map → chunk-m8zkvep1.js.map} +0 -0
- /package/dist/{chunk-sfypc7mk.js.map → chunk-s24qbp32.js.map} +0 -0
- /package/dist/{chunk-y0v18c2j.js.map → chunk-vef6qa14.js.map} +0 -0
- /package/dist/{chunk-gzt6v1ja.js.map → chunk-vn3yh259.js.map} +0 -0
- /package/dist/{chunk-bg2bs62d.js.map → chunk-w9bp61e7.js.map} +0 -0
- /package/dist/{chunk-gswwr35f.js.map → chunk-y487ywrv.js.map} +0 -0
- /package/dist/{chunk-bet1rb9h.js.map → chunk-y6vnvayj.js.map} +0 -0
- /package/dist/{chunk-g2gezsg5.js.map → chunk-z9h698s8.js.map} +0 -0
- /package/dist/{chunk-bfjv1adk.js.map → chunk-znw0zvy4.js.map} +0 -0
|
@@ -5,23 +5,23 @@ import {
|
|
|
5
5
|
canAccessApplication2,
|
|
6
6
|
resolveRoleGrants2,
|
|
7
7
|
resolveAuthorizationContext2
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-rzcjp5m2.js";
|
|
9
9
|
import {
|
|
10
10
|
AuthRuntimeError2,
|
|
11
|
+
DEFAULT_AUTH_SESSION_AUDIENCE2,
|
|
11
12
|
resolveAuthSessionAudience2,
|
|
12
13
|
resolveAuthCookieOptionsForAudience,
|
|
13
14
|
getCookie2,
|
|
14
15
|
resolveAuthConfig2,
|
|
15
16
|
resolveInvitationExpiresAt,
|
|
16
|
-
sanitizeReturnTo,
|
|
17
17
|
assertNonEmpty3,
|
|
18
18
|
normalizePagination,
|
|
19
19
|
isInvitationDeliveryAuthStrategy2
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-0321g649.js";
|
|
21
21
|
import {
|
|
22
22
|
normalizeParams,
|
|
23
23
|
coerceParamsToTyped
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-2fv8sajb.js";
|
|
25
25
|
import {
|
|
26
26
|
snapshotLinkPathSelection
|
|
27
27
|
} from "./chunk-t6f3tdnr.js";
|
|
@@ -109,6 +109,14 @@ function accessTokenKindFromLabel(label) {
|
|
|
109
109
|
}
|
|
110
110
|
return null;
|
|
111
111
|
}
|
|
112
|
+
// src/auth/client-address.ts
|
|
113
|
+
var clientAddresses = new WeakMap;
|
|
114
|
+
function setRequestClientAddress2(request, address) {
|
|
115
|
+
clientAddresses.set(request, address);
|
|
116
|
+
}
|
|
117
|
+
function getRequestClientAddress2(request) {
|
|
118
|
+
return clientAddresses.get(request);
|
|
119
|
+
}
|
|
112
120
|
// src/auth/csrf.ts
|
|
113
121
|
import { randomBytes as randomBytes2, timingSafeEqual } from "crypto";
|
|
114
122
|
var CSRF_HEADER_NAME2 = "x-sixb-csrf";
|
|
@@ -123,12 +131,17 @@ function verifyDoubleSubmitCsrf2(request, options) {
|
|
|
123
131
|
if (isCsrfExemptMethod2(request.method)) {
|
|
124
132
|
return true;
|
|
125
133
|
}
|
|
134
|
+
return verifyCsrfToken2(request, {
|
|
135
|
+
cookieName: options.cookieName,
|
|
136
|
+
token: request.headers.get(CSRF_HEADER_NAME2)
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
function verifyCsrfToken2(request, options) {
|
|
126
140
|
const cookieValue = getCookie2(request, options.cookieName);
|
|
127
|
-
|
|
128
|
-
if (!cookieValue || !headerValue) {
|
|
141
|
+
if (!cookieValue || !options.token) {
|
|
129
142
|
return false;
|
|
130
143
|
}
|
|
131
|
-
return safeEqual(cookieValue,
|
|
144
|
+
return safeEqual(cookieValue, options.token);
|
|
132
145
|
}
|
|
133
146
|
function safeEqual(left, right) {
|
|
134
147
|
const leftBytes = Buffer.from(left);
|
|
@@ -1366,7 +1379,12 @@ function createSessionRecord(state, input) {
|
|
|
1366
1379
|
expiresAt: cloneDate(input.expiresAt),
|
|
1367
1380
|
absoluteExpiresAt: input.absoluteExpiresAt ? cloneDate(input.absoluteExpiresAt) : undefined,
|
|
1368
1381
|
userAgent: input.userAgent,
|
|
1369
|
-
ipAddress: input.ipAddress
|
|
1382
|
+
ipAddress: input.ipAddress,
|
|
1383
|
+
bearer: input.bearer ? {
|
|
1384
|
+
clientName: assertNonEmpty4(input.bearer.clientName, "Session client name"),
|
|
1385
|
+
accessExpiresAt: cloneDate(input.bearer.accessExpiresAt),
|
|
1386
|
+
refreshTokenHash: assertNonEmpty4(input.bearer.refreshTokenHash, "Refresh token hash")
|
|
1387
|
+
} : undefined
|
|
1370
1388
|
};
|
|
1371
1389
|
state.sessions.set(sessionKey(projectId, id), cloneRecord(session));
|
|
1372
1390
|
return session;
|
|
@@ -1420,10 +1438,10 @@ function createAccessTokenRecord(state, input) {
|
|
|
1420
1438
|
const id = assertNonEmpty4(input.id, "Access token id");
|
|
1421
1439
|
const projectId = assertNonEmpty4(input.projectId, "Project id");
|
|
1422
1440
|
const name = assertNonEmpty4(input.name, "Access token name");
|
|
1423
|
-
const subjectId = assertNonEmpty4(input.
|
|
1441
|
+
const subjectId = assertNonEmpty4(input.subject.id, "Access token subject id");
|
|
1424
1442
|
const tokenHash = assertNonEmpty4(input.tokenHash, "Access token hash");
|
|
1425
|
-
assertAccessTokenSubject(input.kind, input.
|
|
1426
|
-
assertAccessTokenSubjectExists(state, projectId, input.
|
|
1443
|
+
assertAccessTokenSubject(input.kind, input.subject.type);
|
|
1444
|
+
assertAccessTokenSubjectExists(state, projectId, input.subject.type, subjectId);
|
|
1427
1445
|
const key = accessTokenKey(projectId, id);
|
|
1428
1446
|
if (state.accessTokens.has(key)) {
|
|
1429
1447
|
throw new AuthStorageError2("duplicate_access_token", `[Sixb] Access token '${id}' already exists for project '${projectId}'.`);
|
|
@@ -1433,8 +1451,7 @@ function createAccessTokenRecord(state, input) {
|
|
|
1433
1451
|
projectId,
|
|
1434
1452
|
name,
|
|
1435
1453
|
kind: input.kind,
|
|
1436
|
-
|
|
1437
|
-
subjectId,
|
|
1454
|
+
subject: { type: input.subject.type, id: subjectId },
|
|
1438
1455
|
tokenHash,
|
|
1439
1456
|
groupIds: normalizeOptionalGroupIds(input.groupIds),
|
|
1440
1457
|
createdByPrincipal: input.createdByPrincipal,
|
|
@@ -1556,7 +1573,7 @@ class InMemoryAuthAccessTokenStore {
|
|
|
1556
1573
|
async list(input) {
|
|
1557
1574
|
const order = input.order ?? "asc";
|
|
1558
1575
|
const offset = input.offset ?? 0;
|
|
1559
|
-
const rows = [...this.state.accessTokens.values()].filter((token) => token.projectId === input.projectId).filter((token) => input.kind === undefined || token.kind === input.kind).filter((token) => input.
|
|
1576
|
+
const rows = [...this.state.accessTokens.values()].filter((token) => token.projectId === input.projectId).filter((token) => input.kind === undefined || token.kind === input.kind).filter((token) => input.subject === undefined || token.subject.type === input.subject.type && token.subject.id === input.subject.id).filter((token) => input.includeRevoked || !token.revokedAt).sort((a, b) => compareByCreatedAt(a, b, order));
|
|
1560
1577
|
const page = rows.slice(offset, input.limit === undefined ? undefined : offset + input.limit);
|
|
1561
1578
|
return {
|
|
1562
1579
|
accessTokens: page.map(cloneRecord),
|
|
@@ -1632,8 +1649,6 @@ class InMemoryAuthDeviceAuthorizationStore {
|
|
|
1632
1649
|
deviceCodeHash: assertNonEmpty4(input.deviceCodeHash, "Device code hash"),
|
|
1633
1650
|
userCode: assertNonEmpty4(input.userCode, "User code"),
|
|
1634
1651
|
clientName: assertNonEmpty4(input.clientName, "Client name"),
|
|
1635
|
-
tokenName: assertNonEmpty4(input.tokenName, "Token name"),
|
|
1636
|
-
tokenExpiresAt: new Date(input.tokenExpiresAt),
|
|
1637
1652
|
status: "pending",
|
|
1638
1653
|
createdAt: new Date(input.createdAt),
|
|
1639
1654
|
expiresAt: new Date(input.expiresAt)
|
|
@@ -2080,15 +2095,54 @@ class InMemoryAuthSessionStore {
|
|
|
2080
2095
|
}
|
|
2081
2096
|
async findValidByTokenHash(params) {
|
|
2082
2097
|
const session = this.state.sessions.get(sessionKey(params.projectId, params.id));
|
|
2083
|
-
if (!session || session.audience !== params.audience || session.tokenHash !== params.tokenHash || !isActiveSession(session, params.now)) {
|
|
2098
|
+
if (!session || session.bearer || session.audience !== params.audience || session.tokenHash !== params.tokenHash || !isActiveSession(session, params.now)) {
|
|
2099
|
+
return null;
|
|
2100
|
+
}
|
|
2101
|
+
return cloneRecord(session);
|
|
2102
|
+
}
|
|
2103
|
+
async findValidByAccessTokenHash(params) {
|
|
2104
|
+
const session = this.state.sessions.get(sessionKey(params.projectId, params.id));
|
|
2105
|
+
if (!session?.bearer || session.tokenHash !== params.tokenHash || session.bearer.accessExpiresAt <= params.now || !isActiveSession(session, params.now)) {
|
|
2084
2106
|
return null;
|
|
2085
2107
|
}
|
|
2086
2108
|
return cloneRecord(session);
|
|
2087
2109
|
}
|
|
2110
|
+
async rotateRefreshToken(params) {
|
|
2111
|
+
const key = sessionKey(params.projectId, params.id);
|
|
2112
|
+
const session = this.state.sessions.get(key);
|
|
2113
|
+
if (!session?.bearer || !isActiveSession(session, params.now)) {
|
|
2114
|
+
return { status: "invalid" };
|
|
2115
|
+
}
|
|
2116
|
+
const { bearer } = session;
|
|
2117
|
+
const replacedRecently = bearer.previousRefreshTokenHash === params.refreshTokenHash && bearer.refreshedAt !== undefined && params.now.getTime() - bearer.refreshedAt.getTime() <= params.reuseGraceMs;
|
|
2118
|
+
if (bearer.refreshTokenHash !== params.refreshTokenHash && !replacedRecently) {
|
|
2119
|
+
if (bearer.previousRefreshTokenHash !== params.refreshTokenHash) {
|
|
2120
|
+
return { status: "invalid" };
|
|
2121
|
+
}
|
|
2122
|
+
this.state.sessions.set(key, cloneRecord({ ...session, revokedAt: cloneDate(params.now) }));
|
|
2123
|
+
return { status: "reused" };
|
|
2124
|
+
}
|
|
2125
|
+
const requestedExpiresAt = session.absoluteExpiresAt ? new Date(Math.min(params.next.expiresAt.getTime(), session.absoluteExpiresAt.getTime())) : params.next.expiresAt;
|
|
2126
|
+
const next = {
|
|
2127
|
+
...session,
|
|
2128
|
+
tokenHash: params.next.tokenHash,
|
|
2129
|
+
expiresAt: new Date(Math.max(session.expiresAt.getTime(), requestedExpiresAt.getTime())),
|
|
2130
|
+
lastSeenAt: cloneDate(params.now),
|
|
2131
|
+
bearer: {
|
|
2132
|
+
clientName: bearer.clientName,
|
|
2133
|
+
accessExpiresAt: cloneDate(params.next.accessExpiresAt),
|
|
2134
|
+
refreshTokenHash: params.next.refreshTokenHash,
|
|
2135
|
+
previousRefreshTokenHash: bearer.refreshTokenHash,
|
|
2136
|
+
refreshedAt: cloneDate(params.now)
|
|
2137
|
+
}
|
|
2138
|
+
};
|
|
2139
|
+
this.state.sessions.set(key, cloneRecord(next));
|
|
2140
|
+
return { status: "rotated", session: cloneRecord(next) };
|
|
2141
|
+
}
|
|
2088
2142
|
async renewIfValid(params) {
|
|
2089
2143
|
const key = sessionKey(params.projectId, params.id);
|
|
2090
2144
|
const session = this.state.sessions.get(key);
|
|
2091
|
-
if (!session || session.audience !== params.audience || session.tokenHash !== params.tokenHash || !isActiveSession(session, params.now)) {
|
|
2145
|
+
if (!session || session.bearer || session.audience !== params.audience || session.tokenHash !== params.tokenHash || !isActiveSession(session, params.now)) {
|
|
2092
2146
|
return null;
|
|
2093
2147
|
}
|
|
2094
2148
|
const requestedExpiresAt = session.absoluteExpiresAt ? new Date(Math.min(params.expiresAt.getTime(), session.absoluteExpiresAt.getTime())) : params.expiresAt;
|
|
@@ -2274,17 +2328,17 @@ class InMemoryAuthStorage2 {
|
|
|
2274
2328
|
if (authorization.status !== "approved" || !authorization.approvedUserId || !authorization.approvedSessionId || authorization.expiresAt <= input.completedAt) {
|
|
2275
2329
|
throw new AuthStorageError2("invalid_device_authorization", "[Sixb] Device authorization is invalid.");
|
|
2276
2330
|
}
|
|
2277
|
-
if (input.
|
|
2278
|
-
throw new AuthStorageError2("invalid_device_authorization", "[Sixb] Device
|
|
2331
|
+
if (input.session.projectId !== input.projectId || input.session.userId !== authorization.approvedUserId) {
|
|
2332
|
+
throw new AuthStorageError2("invalid_device_authorization", "[Sixb] Device session is invalid.");
|
|
2279
2333
|
}
|
|
2280
|
-
const
|
|
2334
|
+
const session = createSessionRecord(this.state, input.session);
|
|
2281
2335
|
const consumed = {
|
|
2282
2336
|
...authorization,
|
|
2283
2337
|
status: "consumed",
|
|
2284
2338
|
consumedAt: new Date(input.completedAt)
|
|
2285
2339
|
};
|
|
2286
2340
|
this.state.deviceAuthorizations.set(key, cloneRecord(consumed));
|
|
2287
|
-
return { authorization: cloneRecord(consumed),
|
|
2341
|
+
return { authorization: cloneRecord(consumed), session: cloneRecord(session) };
|
|
2288
2342
|
}
|
|
2289
2343
|
async completeMagicLinkSignIn(input) {
|
|
2290
2344
|
const projectId = assertNonEmpty4(input.projectId, "Project id");
|
|
@@ -2596,20 +2650,22 @@ class SessionCache {
|
|
|
2596
2650
|
if (!entry) {
|
|
2597
2651
|
return;
|
|
2598
2652
|
}
|
|
2599
|
-
if (entry.expiresAtMs <= input.nowMs || entry.tokenHash !== input.tokenHash || entry.audience !== input.audience) {
|
|
2653
|
+
if (entry.expiresAtMs <= input.nowMs || entry.tokenHash !== input.tokenHash || entry.transport !== input.transport || input.audience !== undefined && entry.audience !== input.audience) {
|
|
2600
2654
|
this.entries.delete(input.sessionId);
|
|
2601
2655
|
return;
|
|
2602
2656
|
}
|
|
2603
2657
|
return entry.session;
|
|
2604
2658
|
}
|
|
2605
2659
|
set(input) {
|
|
2606
|
-
const
|
|
2660
|
+
const bearer = input.session.session.bearer;
|
|
2661
|
+
const expiresAtMs = Math.min(input.nowMs + this.ttlMs, input.sessionExpiresAtMs, input.sessionAbsoluteExpiresAtMs ?? Number.POSITIVE_INFINITY, bearer?.accessExpiresAt.getTime() ?? Number.POSITIVE_INFINITY);
|
|
2607
2662
|
if (expiresAtMs <= input.nowMs) {
|
|
2608
2663
|
return;
|
|
2609
2664
|
}
|
|
2610
2665
|
this.entries.delete(input.sessionId);
|
|
2611
2666
|
this.entries.set(input.sessionId, {
|
|
2612
2667
|
tokenHash: input.tokenHash,
|
|
2668
|
+
transport: bearer ? "bearer" : "cookie",
|
|
2613
2669
|
audience: input.audience,
|
|
2614
2670
|
session: input.session,
|
|
2615
2671
|
expiresAtMs
|
|
@@ -2672,10 +2728,27 @@ function createSessionCredential2(sessionId = `ses_${randomUUID2()}`) {
|
|
|
2672
2728
|
cookieValue: formatSessionCookieValue2(sessionId, sessionSecret)
|
|
2673
2729
|
};
|
|
2674
2730
|
}
|
|
2731
|
+
var SESSION_ACCESS_TOKEN_PREFIX = "sixb_at_";
|
|
2732
|
+
var SESSION_REFRESH_TOKEN_PREFIX = "sixb_rt_";
|
|
2733
|
+
function createBearerSessionTokens(sessionId) {
|
|
2734
|
+
const accessSecret = generateSessionSecret2();
|
|
2735
|
+
const refreshSecret = generateSessionSecret2();
|
|
2736
|
+
return {
|
|
2737
|
+
accessToken: `${SESSION_ACCESS_TOKEN_PREFIX}${formatSessionCookieValue2(sessionId, accessSecret)}`,
|
|
2738
|
+
refreshToken: `${SESSION_REFRESH_TOKEN_PREFIX}${formatSessionCookieValue2(sessionId, refreshSecret)}`,
|
|
2739
|
+
tokenHash: hashSessionSecret2(accessSecret),
|
|
2740
|
+
refreshTokenHash: hashSessionSecret2(refreshSecret)
|
|
2741
|
+
};
|
|
2742
|
+
}
|
|
2743
|
+
function parseBearerSessionToken(prefix, value) {
|
|
2744
|
+
return value.startsWith(prefix) ? parseSessionCookieValue2(value.slice(prefix.length)) : null;
|
|
2745
|
+
}
|
|
2675
2746
|
|
|
2676
2747
|
// src/auth/runtime.ts
|
|
2677
2748
|
var SESSION_TOUCH_INTERVAL_MS = 60000;
|
|
2678
2749
|
var ACCESS_TOKEN_TOUCH_INTERVAL_MS = 60000;
|
|
2750
|
+
var BEARER_ACCESS_TOKEN_TTL_MS = 15 * 60000;
|
|
2751
|
+
var REFRESH_REUSE_GRACE_MS = 60000;
|
|
2679
2752
|
|
|
2680
2753
|
class AuthRuntime2 {
|
|
2681
2754
|
projectId;
|
|
@@ -2730,19 +2803,17 @@ class AuthRuntime2 {
|
|
|
2730
2803
|
return { authenticated: false, reason: "auth_disabled" };
|
|
2731
2804
|
}
|
|
2732
2805
|
const audience = resolveAuthSessionAudience2(options.audience);
|
|
2733
|
-
|
|
2734
|
-
if (credentialSource !== "session") {
|
|
2735
|
-
const authorizationHeader = request.headers.get("authorization");
|
|
2806
|
+
if (options.credentialSource === "any") {
|
|
2736
2807
|
const tokenValue = getBearerAccessTokenValue2(request);
|
|
2808
|
+
if (tokenValue?.startsWith(SESSION_ACCESS_TOKEN_PREFIX)) {
|
|
2809
|
+
return this.resolveBearerSession(tokenValue);
|
|
2810
|
+
}
|
|
2737
2811
|
if (tokenValue) {
|
|
2738
2812
|
return this.resolveAccessTokenSession(request, tokenValue);
|
|
2739
2813
|
}
|
|
2740
|
-
if (
|
|
2814
|
+
if (request.headers.get("authorization")) {
|
|
2741
2815
|
return { authenticated: false, reason: "invalid_access_token" };
|
|
2742
2816
|
}
|
|
2743
|
-
if (credentialSource === "accessToken") {
|
|
2744
|
-
return { authenticated: false, reason: "missing_access_token" };
|
|
2745
|
-
}
|
|
2746
2817
|
}
|
|
2747
2818
|
return this.resolveCookieSession(request, audience, options.sessionActivity);
|
|
2748
2819
|
}
|
|
@@ -2761,6 +2832,7 @@ class AuthRuntime2 {
|
|
|
2761
2832
|
const cached = this.sessionCache?.get({
|
|
2762
2833
|
sessionId: parts.sessionId,
|
|
2763
2834
|
tokenHash,
|
|
2835
|
+
transport: "cookie",
|
|
2764
2836
|
audience,
|
|
2765
2837
|
nowMs
|
|
2766
2838
|
});
|
|
@@ -2799,41 +2871,109 @@ class AuthRuntime2 {
|
|
|
2799
2871
|
session = renewed;
|
|
2800
2872
|
sessionRenewed = true;
|
|
2801
2873
|
}
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
id: session.userId
|
|
2805
|
-
});
|
|
2806
|
-
if (!user) {
|
|
2807
|
-
return { authenticated: false, reason: "missing_user" };
|
|
2874
|
+
if (!sessionRenewed) {
|
|
2875
|
+
await this.touchSessionLastSeen(storage, session, now);
|
|
2808
2876
|
}
|
|
2809
|
-
|
|
2810
|
-
|
|
2877
|
+
const result = await this.authenticateSession(storage, session, tokenHash, now);
|
|
2878
|
+
return result.authenticated && sessionRenewed ? { ...result, sessionRenewed: true } : result;
|
|
2879
|
+
}
|
|
2880
|
+
async resolveBearerSession(tokenValue) {
|
|
2881
|
+
const parts = parseBearerSessionToken(SESSION_ACCESS_TOKEN_PREFIX, tokenValue);
|
|
2882
|
+
if (!parts) {
|
|
2883
|
+
return { authenticated: false, reason: "invalid_access_token" };
|
|
2811
2884
|
}
|
|
2812
|
-
const
|
|
2885
|
+
const tokenHash = hashSessionSecret2(parts.sessionSecret);
|
|
2886
|
+
const now = new Date;
|
|
2887
|
+
const cached = this.sessionCache?.get({
|
|
2888
|
+
sessionId: parts.sessionId,
|
|
2889
|
+
tokenHash,
|
|
2890
|
+
transport: "bearer",
|
|
2891
|
+
nowMs: now.getTime()
|
|
2892
|
+
});
|
|
2893
|
+
if (cached) {
|
|
2894
|
+
return cached;
|
|
2895
|
+
}
|
|
2896
|
+
const storage = this.requireAuthStorage();
|
|
2897
|
+
const session = await storage.sessions.findValidByAccessTokenHash({
|
|
2813
2898
|
projectId: this.projectId,
|
|
2814
|
-
|
|
2899
|
+
id: parts.sessionId,
|
|
2900
|
+
tokenHash,
|
|
2901
|
+
now
|
|
2815
2902
|
});
|
|
2816
|
-
if (!
|
|
2817
|
-
|
|
2903
|
+
if (!session) {
|
|
2904
|
+
return { authenticated: false, reason: "invalid_access_token" };
|
|
2905
|
+
}
|
|
2906
|
+
await this.touchSessionLastSeen(storage, session, now);
|
|
2907
|
+
return this.authenticateSession(storage, session, tokenHash, now);
|
|
2908
|
+
}
|
|
2909
|
+
async authenticateSession(storage, session, tokenHash, now) {
|
|
2910
|
+
const member = await this.loadActiveUser(storage, session.userId);
|
|
2911
|
+
if (!member.authenticated) {
|
|
2912
|
+
return member;
|
|
2818
2913
|
}
|
|
2819
2914
|
const result = {
|
|
2820
2915
|
authenticated: true,
|
|
2821
2916
|
credentialSource: "session",
|
|
2822
|
-
principal: { type: "user", id: user.id },
|
|
2823
|
-
user,
|
|
2917
|
+
principal: { type: "user", id: member.user.id },
|
|
2918
|
+
user: member.user,
|
|
2824
2919
|
session,
|
|
2825
|
-
groupIds:
|
|
2920
|
+
groupIds: member.groupIds
|
|
2826
2921
|
};
|
|
2827
2922
|
this.sessionCache?.set({
|
|
2828
|
-
sessionId:
|
|
2923
|
+
sessionId: session.id,
|
|
2829
2924
|
tokenHash,
|
|
2830
|
-
audience,
|
|
2925
|
+
audience: session.audience,
|
|
2831
2926
|
session: result,
|
|
2832
|
-
nowMs,
|
|
2927
|
+
nowMs: now.getTime(),
|
|
2833
2928
|
sessionExpiresAtMs: session.expiresAt.getTime(),
|
|
2834
2929
|
sessionAbsoluteExpiresAtMs: session.absoluteExpiresAt?.getTime()
|
|
2835
2930
|
});
|
|
2836
|
-
return
|
|
2931
|
+
return result;
|
|
2932
|
+
}
|
|
2933
|
+
prepareBearerSession(input) {
|
|
2934
|
+
const sessionId = `ses_${randomUUID3()}`;
|
|
2935
|
+
const tokens = createBearerSessionTokens(sessionId);
|
|
2936
|
+
return {
|
|
2937
|
+
tokens,
|
|
2938
|
+
session: {
|
|
2939
|
+
id: sessionId,
|
|
2940
|
+
projectId: this.projectId,
|
|
2941
|
+
userId: input.userId,
|
|
2942
|
+
strategyId: "device",
|
|
2943
|
+
audience: DEFAULT_AUTH_SESSION_AUDIENCE2,
|
|
2944
|
+
tokenHash: tokens.tokenHash,
|
|
2945
|
+
createdAt: input.now,
|
|
2946
|
+
...this.createSessionDeadlines(input.now),
|
|
2947
|
+
bearer: {
|
|
2948
|
+
clientName: input.clientName,
|
|
2949
|
+
accessExpiresAt: new Date(input.now.getTime() + BEARER_ACCESS_TOKEN_TTL_MS),
|
|
2950
|
+
refreshTokenHash: tokens.refreshTokenHash
|
|
2951
|
+
}
|
|
2952
|
+
}
|
|
2953
|
+
};
|
|
2954
|
+
}
|
|
2955
|
+
async refreshSession(refreshToken) {
|
|
2956
|
+
const parts = parseBearerSessionToken(SESSION_REFRESH_TOKEN_PREFIX, refreshToken);
|
|
2957
|
+
if (!parts || !this.isEnabled()) {
|
|
2958
|
+
return null;
|
|
2959
|
+
}
|
|
2960
|
+
const now = new Date;
|
|
2961
|
+
const tokens = createBearerSessionTokens(parts.sessionId);
|
|
2962
|
+
const result = await this.requireAuthStorage().sessions.rotateRefreshToken({
|
|
2963
|
+
projectId: this.projectId,
|
|
2964
|
+
id: parts.sessionId,
|
|
2965
|
+
refreshTokenHash: hashSessionSecret2(parts.sessionSecret),
|
|
2966
|
+
now,
|
|
2967
|
+
reuseGraceMs: REFRESH_REUSE_GRACE_MS,
|
|
2968
|
+
next: {
|
|
2969
|
+
tokenHash: tokens.tokenHash,
|
|
2970
|
+
accessExpiresAt: new Date(now.getTime() + BEARER_ACCESS_TOKEN_TTL_MS),
|
|
2971
|
+
refreshTokenHash: tokens.refreshTokenHash,
|
|
2972
|
+
expiresAt: new Date(now.getTime() + this.config.session.idleTimeoutMs)
|
|
2973
|
+
}
|
|
2974
|
+
});
|
|
2975
|
+
this.sessionCache?.invalidate(parts.sessionId);
|
|
2976
|
+
return result.status === "rotated" ? { tokens, session: result.session } : null;
|
|
2837
2977
|
}
|
|
2838
2978
|
canRenewSession(session, nowMs) {
|
|
2839
2979
|
if (session.expiresAt.getTime() - nowMs > this.config.session.renewalWindowMs) {
|
|
@@ -2863,33 +3003,23 @@ class AuthRuntime2 {
|
|
|
2863
3003
|
return { authenticated: false, reason: "invalid_access_token" };
|
|
2864
3004
|
}
|
|
2865
3005
|
await this.touchAccessTokenLastUsed(storage, accessToken, request, now);
|
|
2866
|
-
if (accessToken.
|
|
2867
|
-
const
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
});
|
|
2871
|
-
if (!user) {
|
|
2872
|
-
return { authenticated: false, reason: "missing_user" };
|
|
3006
|
+
if (accessToken.subject.type === "user") {
|
|
3007
|
+
const member = await this.loadActiveUser(storage, accessToken.subject.id);
|
|
3008
|
+
if (!member.authenticated) {
|
|
3009
|
+
return member;
|
|
2873
3010
|
}
|
|
2874
|
-
if (user.status === "suspended") {
|
|
2875
|
-
return { authenticated: false, reason: "suspended_user" };
|
|
2876
|
-
}
|
|
2877
|
-
const memberships = await storage.groupMemberships.listForUser({
|
|
2878
|
-
projectId: this.projectId,
|
|
2879
|
-
userId: user.id
|
|
2880
|
-
});
|
|
2881
3011
|
return {
|
|
2882
3012
|
authenticated: true,
|
|
2883
3013
|
credentialSource: "accessToken",
|
|
2884
|
-
principal: { type: "user", id: user.id },
|
|
2885
|
-
user,
|
|
3014
|
+
principal: { type: "user", id: member.user.id },
|
|
3015
|
+
user: member.user,
|
|
2886
3016
|
accessToken,
|
|
2887
|
-
groupIds: constrainTokenGroupIds(
|
|
3017
|
+
groupIds: constrainTokenGroupIds(member.groupIds, accessToken)
|
|
2888
3018
|
};
|
|
2889
3019
|
}
|
|
2890
3020
|
const serviceAccount = await storage.serviceAccounts.getById({
|
|
2891
3021
|
projectId: this.projectId,
|
|
2892
|
-
id: accessToken.
|
|
3022
|
+
id: accessToken.subject.id
|
|
2893
3023
|
});
|
|
2894
3024
|
if (!serviceAccount) {
|
|
2895
3025
|
return { authenticated: false, reason: "missing_service_account" };
|
|
@@ -2910,8 +3040,23 @@ class AuthRuntime2 {
|
|
|
2910
3040
|
groupIds: constrainTokenGroupIds(memberships.map((membership) => membership.groupId), accessToken)
|
|
2911
3041
|
};
|
|
2912
3042
|
}
|
|
2913
|
-
|
|
2914
|
-
this.
|
|
3043
|
+
async loadActiveUser(storage, userId) {
|
|
3044
|
+
const user = await storage.users.getById({ projectId: this.projectId, id: userId });
|
|
3045
|
+
if (!user) {
|
|
3046
|
+
return { authenticated: false, reason: "missing_user" };
|
|
3047
|
+
}
|
|
3048
|
+
if (user.status === "suspended") {
|
|
3049
|
+
return { authenticated: false, reason: "suspended_user" };
|
|
3050
|
+
}
|
|
3051
|
+
const memberships = await storage.groupMemberships.listForUser({
|
|
3052
|
+
projectId: this.projectId,
|
|
3053
|
+
userId
|
|
3054
|
+
});
|
|
3055
|
+
return {
|
|
3056
|
+
authenticated: true,
|
|
3057
|
+
user,
|
|
3058
|
+
groupIds: memberships.map((membership) => membership.groupId)
|
|
3059
|
+
};
|
|
2915
3060
|
}
|
|
2916
3061
|
async touchSessionLastSeen(storage, session, now) {
|
|
2917
3062
|
const lastSeen = session.lastSeenAt?.getTime() ?? 0;
|
|
@@ -2933,76 +3078,33 @@ class AuthRuntime2 {
|
|
|
2933
3078
|
id: accessToken.id,
|
|
2934
3079
|
lastUsedAt: now,
|
|
2935
3080
|
userAgent: request.headers.get("user-agent")?.trim() || undefined,
|
|
2936
|
-
ipAddress:
|
|
3081
|
+
ipAddress: getRequestClientAddress2(request)
|
|
2937
3082
|
});
|
|
2938
3083
|
} catch {}
|
|
2939
3084
|
}
|
|
2940
|
-
async requirePrincipal(request, options = {}) {
|
|
2941
|
-
const session = await this.getSession(request, options);
|
|
2942
|
-
if (!session.authenticated) {
|
|
2943
|
-
throw new AuthRuntimeError2("authentication_required", "[Sixb] Authentication is required.");
|
|
2944
|
-
}
|
|
2945
|
-
return session.principal;
|
|
2946
|
-
}
|
|
2947
|
-
async requireUser(request, options = {}) {
|
|
2948
|
-
const session = await this.getSession(request, { ...options, credentialSource: "session" });
|
|
2949
|
-
if (!session.authenticated) {
|
|
2950
|
-
throw new AuthRuntimeError2("authentication_required", "[Sixb] Authentication is required.");
|
|
2951
|
-
}
|
|
2952
|
-
return session;
|
|
2953
|
-
}
|
|
2954
|
-
async requireUserRequest(request, options = {}) {
|
|
2955
|
-
const session = await this.getSession(request, { ...options, credentialSource: "any" });
|
|
2956
|
-
if (!session.authenticated) {
|
|
2957
|
-
throw new AuthRuntimeError2("authentication_required", "[Sixb] Authentication is required.");
|
|
2958
|
-
}
|
|
2959
|
-
if (!isAuthenticatedUserRequestSession(session)) {
|
|
2960
|
-
throw new AuthRuntimeError2("authorization_denied", "[Sixb] User authentication is required.");
|
|
2961
|
-
}
|
|
2962
|
-
return session;
|
|
2963
|
-
}
|
|
2964
|
-
async createSecurityContext(request, options = {}) {
|
|
2965
|
-
const session = await this.requireUser(request, options);
|
|
2966
|
-
return {
|
|
2967
|
-
principal: session.principal,
|
|
2968
|
-
sessionId: session.session.id,
|
|
2969
|
-
projectId: this.projectId,
|
|
2970
|
-
correlationId: resolveCorrelationId(request)
|
|
2971
|
-
};
|
|
2972
|
-
}
|
|
2973
|
-
async createAuthorizationContext(request, options = {}) {
|
|
2974
|
-
const session = await this.getSession(request, options);
|
|
2975
|
-
if (!session.authenticated) {
|
|
2976
|
-
throw new AuthRuntimeError2("authentication_required", "[Sixb] Authentication is required.");
|
|
2977
|
-
}
|
|
2978
|
-
return this.contextFromSession(session);
|
|
2979
|
-
}
|
|
2980
3085
|
contextFromSession(session) {
|
|
2981
3086
|
return resolveAuthorizationContext2({
|
|
2982
3087
|
principal: session.principal,
|
|
2983
|
-
sessionId: session
|
|
3088
|
+
sessionId: callerSessionId(session),
|
|
2984
3089
|
groupIds: session.groupIds,
|
|
2985
3090
|
roles: this.security.listResolvedRoles()
|
|
2986
3091
|
});
|
|
2987
3092
|
}
|
|
2988
|
-
async listPersonalAccessTokens(
|
|
2989
|
-
const session = await this.requireUserRequest(request, options);
|
|
3093
|
+
async listPersonalAccessTokens(caller) {
|
|
2990
3094
|
const storage = this.requireAuthStorage();
|
|
2991
3095
|
const result = await storage.accessTokens.list({
|
|
2992
3096
|
projectId: this.projectId,
|
|
2993
3097
|
kind: "personal",
|
|
2994
|
-
|
|
2995
|
-
subjectId: session.user.id,
|
|
3098
|
+
subject: { type: "user", id: caller.user.id },
|
|
2996
3099
|
includeRevoked: true,
|
|
2997
3100
|
order: "desc",
|
|
2998
3101
|
limit: 100
|
|
2999
3102
|
});
|
|
3000
3103
|
return { accessTokens: result.accessTokens };
|
|
3001
3104
|
}
|
|
3002
|
-
async createPersonalAccessToken(
|
|
3003
|
-
const session = await this.requireUserRequest(request, options);
|
|
3105
|
+
async createPersonalAccessToken(caller, input) {
|
|
3004
3106
|
const storage = this.requireAuthStorage();
|
|
3005
|
-
const groupIds = constrainRequestedGroupIds(input.groupIds,
|
|
3107
|
+
const groupIds = constrainRequestedGroupIds(input.groupIds, caller.groupIds, {
|
|
3006
3108
|
subject: "personal access token"
|
|
3007
3109
|
});
|
|
3008
3110
|
const credential = createAccessTokenCredential2("personal");
|
|
@@ -3011,25 +3113,23 @@ class AuthRuntime2 {
|
|
|
3011
3113
|
projectId: this.projectId,
|
|
3012
3114
|
name: input.name,
|
|
3013
3115
|
kind: "personal",
|
|
3014
|
-
|
|
3015
|
-
subjectId: session.user.id,
|
|
3116
|
+
subject: { type: "user", id: caller.user.id },
|
|
3016
3117
|
tokenHash: credential.tokenHash,
|
|
3017
3118
|
groupIds,
|
|
3018
|
-
createdByPrincipal:
|
|
3019
|
-
createdBySessionId:
|
|
3119
|
+
createdByPrincipal: caller.principal,
|
|
3120
|
+
createdBySessionId: callerSessionId(caller),
|
|
3020
3121
|
createdAt: new Date,
|
|
3021
3122
|
expiresAt: input.expiresAt
|
|
3022
3123
|
});
|
|
3023
3124
|
return { accessToken, tokenValue: credential.tokenValue };
|
|
3024
3125
|
}
|
|
3025
|
-
async revokePersonalAccessToken(
|
|
3026
|
-
const session = await this.requireUserRequest(request, options);
|
|
3126
|
+
async revokePersonalAccessToken(caller, input) {
|
|
3027
3127
|
const storage = this.requireAuthStorage();
|
|
3028
3128
|
const token = await storage.accessTokens.getById({
|
|
3029
3129
|
projectId: this.projectId,
|
|
3030
3130
|
id: input.tokenId
|
|
3031
3131
|
});
|
|
3032
|
-
if (!token || token.kind !== "personal" || token.
|
|
3132
|
+
if (!token || token.kind !== "personal" || token.subject.type !== "user" || token.subject.id !== caller.user.id) {
|
|
3033
3133
|
throw missingAccessTokenError(input.tokenId, this.projectId);
|
|
3034
3134
|
}
|
|
3035
3135
|
const accessToken = await storage.accessTokens.revoke({
|
|
@@ -3039,8 +3139,7 @@ class AuthRuntime2 {
|
|
|
3039
3139
|
});
|
|
3040
3140
|
return { accessToken };
|
|
3041
3141
|
}
|
|
3042
|
-
async listServiceAccounts(
|
|
3043
|
-
const session = await this.requireUserRequest(request, options);
|
|
3142
|
+
async listServiceAccounts(caller) {
|
|
3044
3143
|
const storage = this.requireAuthStorage();
|
|
3045
3144
|
const result = await storage.serviceAccounts.list({
|
|
3046
3145
|
projectId: this.projectId,
|
|
@@ -3052,13 +3151,12 @@ class AuthRuntime2 {
|
|
|
3052
3151
|
groupIds: await this.listServiceAccountGroupIds(storage, serviceAccount.id)
|
|
3053
3152
|
})));
|
|
3054
3153
|
return {
|
|
3055
|
-
serviceAccounts: withGroups.filter(({ groupIds }) => callerCanManageServiceAccount(
|
|
3154
|
+
serviceAccounts: withGroups.filter(({ groupIds }) => callerCanManageServiceAccount(caller.groupIds, groupIds))
|
|
3056
3155
|
};
|
|
3057
3156
|
}
|
|
3058
|
-
async createServiceAccount(
|
|
3059
|
-
const session = await this.requireUserRequest(request, options);
|
|
3157
|
+
async createServiceAccount(caller, input) {
|
|
3060
3158
|
const storage = this.requireAuthStorage();
|
|
3061
|
-
const groupIds = constrainRequestedGroupIds(input.groupIds,
|
|
3159
|
+
const groupIds = constrainRequestedGroupIds(input.groupIds, caller.groupIds, {
|
|
3062
3160
|
subject: "service account"
|
|
3063
3161
|
}) ?? [];
|
|
3064
3162
|
const now = new Date;
|
|
@@ -3067,8 +3165,8 @@ class AuthRuntime2 {
|
|
|
3067
3165
|
projectId: this.projectId,
|
|
3068
3166
|
name: input.name,
|
|
3069
3167
|
description: input.description,
|
|
3070
|
-
createdByPrincipal:
|
|
3071
|
-
createdBySessionId:
|
|
3168
|
+
createdByPrincipal: caller.principal,
|
|
3169
|
+
createdBySessionId: callerSessionId(caller),
|
|
3072
3170
|
createdAt: now,
|
|
3073
3171
|
updatedAt: now
|
|
3074
3172
|
});
|
|
@@ -3084,10 +3182,9 @@ class AuthRuntime2 {
|
|
|
3084
3182
|
}
|
|
3085
3183
|
return { serviceAccount, groupMemberships };
|
|
3086
3184
|
}
|
|
3087
|
-
async disableServiceAccount(
|
|
3088
|
-
const session = await this.requireUserRequest(request, options);
|
|
3185
|
+
async disableServiceAccount(caller, input) {
|
|
3089
3186
|
const storage = this.requireAuthStorage();
|
|
3090
|
-
const { serviceAccount, groupIds } = await this.requireManageableServiceAccount(storage,
|
|
3187
|
+
const { serviceAccount, groupIds } = await this.requireManageableServiceAccount(storage, caller.groupIds, input.serviceAccountId);
|
|
3091
3188
|
const updated = await storage.serviceAccounts.update({
|
|
3092
3189
|
projectId: this.projectId,
|
|
3093
3190
|
id: serviceAccount.id,
|
|
@@ -3096,25 +3193,22 @@ class AuthRuntime2 {
|
|
|
3096
3193
|
});
|
|
3097
3194
|
return { serviceAccount: updated, groupIds };
|
|
3098
3195
|
}
|
|
3099
|
-
async listServiceAccountAccessTokens(
|
|
3100
|
-
const session = await this.requireUserRequest(request, options);
|
|
3196
|
+
async listServiceAccountAccessTokens(caller, input) {
|
|
3101
3197
|
const storage = this.requireAuthStorage();
|
|
3102
|
-
const { serviceAccount } = await this.requireManageableServiceAccount(storage,
|
|
3198
|
+
const { serviceAccount } = await this.requireManageableServiceAccount(storage, caller.groupIds, input.serviceAccountId);
|
|
3103
3199
|
const result = await storage.accessTokens.list({
|
|
3104
3200
|
projectId: this.projectId,
|
|
3105
3201
|
kind: "serviceAccount",
|
|
3106
|
-
|
|
3107
|
-
subjectId: serviceAccount.id,
|
|
3202
|
+
subject: { type: "serviceAccount", id: serviceAccount.id },
|
|
3108
3203
|
includeRevoked: true,
|
|
3109
3204
|
order: "desc",
|
|
3110
3205
|
limit: 100
|
|
3111
3206
|
});
|
|
3112
3207
|
return { serviceAccount, accessTokens: result.accessTokens };
|
|
3113
3208
|
}
|
|
3114
|
-
async createServiceAccountAccessToken(
|
|
3115
|
-
const session = await this.requireUserRequest(request, options);
|
|
3209
|
+
async createServiceAccountAccessToken(caller, input) {
|
|
3116
3210
|
const storage = this.requireAuthStorage();
|
|
3117
|
-
const { serviceAccount, groupIds: serviceAccountGroupIds } = await this.requireManageableServiceAccount(storage,
|
|
3211
|
+
const { serviceAccount, groupIds: serviceAccountGroupIds } = await this.requireManageableServiceAccount(storage, caller.groupIds, input.serviceAccountId);
|
|
3118
3212
|
if (serviceAccount.status === "suspended") {
|
|
3119
3213
|
throw new AuthStorageError2("suspended_service_account", `[Sixb] Service account '${input.serviceAccountId}' is suspended for project '${this.projectId}'.`);
|
|
3120
3214
|
}
|
|
@@ -3127,26 +3221,24 @@ class AuthRuntime2 {
|
|
|
3127
3221
|
projectId: this.projectId,
|
|
3128
3222
|
name: input.name,
|
|
3129
3223
|
kind: "serviceAccount",
|
|
3130
|
-
|
|
3131
|
-
subjectId: serviceAccount.id,
|
|
3224
|
+
subject: { type: "serviceAccount", id: serviceAccount.id },
|
|
3132
3225
|
tokenHash: credential.tokenHash,
|
|
3133
3226
|
groupIds,
|
|
3134
|
-
createdByPrincipal:
|
|
3135
|
-
createdBySessionId:
|
|
3227
|
+
createdByPrincipal: caller.principal,
|
|
3228
|
+
createdBySessionId: callerSessionId(caller),
|
|
3136
3229
|
createdAt: new Date,
|
|
3137
3230
|
expiresAt: input.expiresAt
|
|
3138
3231
|
});
|
|
3139
3232
|
return { accessToken, tokenValue: credential.tokenValue, serviceAccount };
|
|
3140
3233
|
}
|
|
3141
|
-
async revokeServiceAccountAccessToken(
|
|
3142
|
-
const session = await this.requireUserRequest(request, options);
|
|
3234
|
+
async revokeServiceAccountAccessToken(caller, input) {
|
|
3143
3235
|
const storage = this.requireAuthStorage();
|
|
3144
|
-
const { serviceAccount } = await this.requireManageableServiceAccount(storage,
|
|
3236
|
+
const { serviceAccount } = await this.requireManageableServiceAccount(storage, caller.groupIds, input.serviceAccountId);
|
|
3145
3237
|
const token = await storage.accessTokens.getById({
|
|
3146
3238
|
projectId: this.projectId,
|
|
3147
3239
|
id: input.tokenId
|
|
3148
3240
|
});
|
|
3149
|
-
if (!token || token.kind !== "serviceAccount" || token.
|
|
3241
|
+
if (!token || token.kind !== "serviceAccount" || token.subject.type !== "serviceAccount" || token.subject.id !== serviceAccount.id) {
|
|
3150
3242
|
throw missingAccessTokenError(input.tokenId, this.projectId);
|
|
3151
3243
|
}
|
|
3152
3244
|
const accessToken = await storage.accessTokens.revoke({
|
|
@@ -3174,9 +3266,8 @@ class AuthRuntime2 {
|
|
|
3174
3266
|
});
|
|
3175
3267
|
return memberships.map((membership) => membership.groupId);
|
|
3176
3268
|
}
|
|
3177
|
-
async getInvitationOptions(
|
|
3178
|
-
const
|
|
3179
|
-
const scope = this.resolveMembershipPolicyScopeForUser(session.groupIds);
|
|
3269
|
+
async getInvitationOptions(caller) {
|
|
3270
|
+
const scope = this.resolveMembershipPolicyScopeForUser(caller.groupIds);
|
|
3180
3271
|
const inviteScope = scope.operations.invite;
|
|
3181
3272
|
const groups = this.scopedGroupOptions(inviteScope.groupIds);
|
|
3182
3273
|
const hasInviteMembershipPolicy = inviteScope.policyIds.length > 0;
|
|
@@ -3193,18 +3284,16 @@ class AuthRuntime2 {
|
|
|
3193
3284
|
getMembershipCapabilities(input) {
|
|
3194
3285
|
return membershipCapabilities(this.resolveMembershipPolicyScopeForUser(groupIdsOf(input.callerGroups)));
|
|
3195
3286
|
}
|
|
3196
|
-
async getMembershipOptions(
|
|
3197
|
-
const
|
|
3198
|
-
const scope = this.resolveMembershipPolicyScopeForUser(session.groupIds);
|
|
3287
|
+
async getMembershipOptions(caller) {
|
|
3288
|
+
const scope = this.resolveMembershipPolicyScopeForUser(caller.groupIds);
|
|
3199
3289
|
return {
|
|
3200
3290
|
groups: this.scopedGroupOptions(scope.operations.assignGroups.groupIds),
|
|
3201
3291
|
capabilities: membershipCapabilities(scope).holds
|
|
3202
3292
|
};
|
|
3203
3293
|
}
|
|
3204
|
-
async listMembers(
|
|
3205
|
-
const session = await this.requireUser(request, options);
|
|
3294
|
+
async listMembers(caller, input = {}) {
|
|
3206
3295
|
const storage = this.requireAuthStorage();
|
|
3207
|
-
const scope = this.resolveMembershipPolicyScopeForUser(
|
|
3296
|
+
const scope = this.resolveMembershipPolicyScopeForUser(caller.groupIds);
|
|
3208
3297
|
const { limit, offset } = normalizePagination(input);
|
|
3209
3298
|
const result = await storage.users.list({ projectId: this.projectId, order: input.order });
|
|
3210
3299
|
const members = [];
|
|
@@ -3215,7 +3304,7 @@ class AuthRuntime2 {
|
|
|
3215
3304
|
if (!canAssignGroups && !canSuspendScope) {
|
|
3216
3305
|
continue;
|
|
3217
3306
|
}
|
|
3218
|
-
const isSelf = user.id ===
|
|
3307
|
+
const isSelf = user.id === caller.user.id;
|
|
3219
3308
|
members.push({
|
|
3220
3309
|
user,
|
|
3221
3310
|
groupIds,
|
|
@@ -3229,10 +3318,9 @@ class AuthRuntime2 {
|
|
|
3229
3318
|
const page = paginate(members, { limit, offset });
|
|
3230
3319
|
return { members: page.page, hasMore: page.hasMore, total: page.total };
|
|
3231
3320
|
}
|
|
3232
|
-
async updateMemberGroups(
|
|
3233
|
-
const session = await this.requireUser(request, options);
|
|
3321
|
+
async updateMemberGroups(caller, input) {
|
|
3234
3322
|
const storage = this.requireAuthStorage();
|
|
3235
|
-
const scope = this.resolveMembershipPolicyScopeForUser(
|
|
3323
|
+
const scope = this.resolveMembershipPolicyScopeForUser(caller.groupIds);
|
|
3236
3324
|
const userId = assertNonEmpty3(input.userId, "User id");
|
|
3237
3325
|
const { user, groupIds: currentGroupIds } = await this.requireManageableMember(storage, scope, "assignGroups", userId);
|
|
3238
3326
|
const requestedGroupIds = this.resolveMemberGroupIds(input.groupIds);
|
|
@@ -3244,7 +3332,7 @@ class AuthRuntime2 {
|
|
|
3244
3332
|
const requested = new Set(requestedGroupIds);
|
|
3245
3333
|
const additions = requestedGroupIds.filter((groupId) => !current.has(groupId));
|
|
3246
3334
|
const removals = currentGroupIds.filter((groupId) => !requested.has(groupId));
|
|
3247
|
-
if (user.id ===
|
|
3335
|
+
if (user.id === caller.user.id && removals.length > 0) {
|
|
3248
3336
|
throw new AuthRuntimeError2("authorization_denied", "[Sixb] The current user cannot remove their own groups.");
|
|
3249
3337
|
}
|
|
3250
3338
|
const now = new Date;
|
|
@@ -3264,17 +3352,16 @@ class AuthRuntime2 {
|
|
|
3264
3352
|
groupId
|
|
3265
3353
|
});
|
|
3266
3354
|
}
|
|
3267
|
-
this.
|
|
3355
|
+
this.sessionCache?.invalidateUser(user.id);
|
|
3268
3356
|
const groupIds = (await storage.groupMemberships.listForUser({ projectId: this.projectId, userId: user.id })).map((membership) => membership.groupId);
|
|
3269
3357
|
return { user, groupIds };
|
|
3270
3358
|
}
|
|
3271
|
-
async suspendMember(
|
|
3272
|
-
const session = await this.requireUser(request, options);
|
|
3359
|
+
async suspendMember(caller, input) {
|
|
3273
3360
|
const storage = this.requireAuthStorage();
|
|
3274
|
-
const scope = this.resolveMembershipPolicyScopeForUser(
|
|
3361
|
+
const scope = this.resolveMembershipPolicyScopeForUser(caller.groupIds);
|
|
3275
3362
|
const userId = assertNonEmpty3(input.userId, "User id");
|
|
3276
3363
|
const { user, groupIds } = await this.requireManageableMember(storage, scope, "suspend", userId);
|
|
3277
|
-
if (user.id ===
|
|
3364
|
+
if (user.id === caller.user.id) {
|
|
3278
3365
|
throw new AuthRuntimeError2("authorization_denied", "[Sixb] The current user cannot suspend themselves.");
|
|
3279
3366
|
}
|
|
3280
3367
|
const suspended = await storage.suspendUserAndRevokeSessions({
|
|
@@ -3282,13 +3369,12 @@ class AuthRuntime2 {
|
|
|
3282
3369
|
userId: user.id,
|
|
3283
3370
|
suspendedAt: new Date
|
|
3284
3371
|
});
|
|
3285
|
-
this.
|
|
3372
|
+
this.sessionCache?.invalidateUser(user.id);
|
|
3286
3373
|
return { user: suspended, groupIds };
|
|
3287
3374
|
}
|
|
3288
|
-
async reactivateMember(
|
|
3289
|
-
const session = await this.requireUser(request, options);
|
|
3375
|
+
async reactivateMember(caller, input) {
|
|
3290
3376
|
const storage = this.requireAuthStorage();
|
|
3291
|
-
const scope = this.resolveMembershipPolicyScopeForUser(
|
|
3377
|
+
const scope = this.resolveMembershipPolicyScopeForUser(caller.groupIds);
|
|
3292
3378
|
const userId = assertNonEmpty3(input.userId, "User id");
|
|
3293
3379
|
const { user, groupIds } = await this.requireManageableMember(storage, scope, "suspend", userId);
|
|
3294
3380
|
const reactivated = await storage.users.updateStatus({
|
|
@@ -3299,8 +3385,37 @@ class AuthRuntime2 {
|
|
|
3299
3385
|
});
|
|
3300
3386
|
return { user: reactivated, groupIds };
|
|
3301
3387
|
}
|
|
3302
|
-
|
|
3303
|
-
this.
|
|
3388
|
+
async listSessions(caller) {
|
|
3389
|
+
return this.requireAuthStorage().sessions.listActiveByUserId({
|
|
3390
|
+
projectId: this.projectId,
|
|
3391
|
+
userId: caller.user.id,
|
|
3392
|
+
now: new Date
|
|
3393
|
+
});
|
|
3394
|
+
}
|
|
3395
|
+
async revokeSession(caller, sessionId) {
|
|
3396
|
+
const storage = this.requireAuthStorage();
|
|
3397
|
+
const session = await storage.sessions.getById({ projectId: this.projectId, id: sessionId });
|
|
3398
|
+
if (!session || session.userId !== caller.user.id) {
|
|
3399
|
+
return false;
|
|
3400
|
+
}
|
|
3401
|
+
await storage.sessions.revoke({
|
|
3402
|
+
projectId: this.projectId,
|
|
3403
|
+
id: sessionId,
|
|
3404
|
+
revokedAt: new Date
|
|
3405
|
+
});
|
|
3406
|
+
this.sessionCache?.invalidate(sessionId);
|
|
3407
|
+
return true;
|
|
3408
|
+
}
|
|
3409
|
+
async revokeAllSessions(caller) {
|
|
3410
|
+
const revoked = await this.requireAuthStorage().sessions.revokeActiveForUser({
|
|
3411
|
+
projectId: this.projectId,
|
|
3412
|
+
userId: caller.user.id,
|
|
3413
|
+
revokedAt: new Date
|
|
3414
|
+
});
|
|
3415
|
+
for (const session of revoked) {
|
|
3416
|
+
this.sessionCache?.invalidate(session.id);
|
|
3417
|
+
}
|
|
3418
|
+
return revoked.length;
|
|
3304
3419
|
}
|
|
3305
3420
|
scopedGroupOptions(groupIds) {
|
|
3306
3421
|
return this.security.listGroups().filter((group) => groupIds.has(group.id)).map((group) => ({
|
|
@@ -3326,26 +3441,24 @@ class AuthRuntime2 {
|
|
|
3326
3441
|
}
|
|
3327
3442
|
return groupIds;
|
|
3328
3443
|
}
|
|
3329
|
-
async invite(
|
|
3330
|
-
const session = await this.requireUser(request, options);
|
|
3444
|
+
async invite(caller, input, destination) {
|
|
3331
3445
|
const authStorage = this.requireAuthStorage();
|
|
3332
3446
|
const now = new Date;
|
|
3333
3447
|
const groupIds = this.resolveInviteGroupIds(input);
|
|
3334
|
-
this.assertCanManageInvitationGroups(
|
|
3448
|
+
this.assertCanManageInvitationGroups(caller.groupIds, groupIds);
|
|
3335
3449
|
const strategy = this.getStrategy();
|
|
3336
3450
|
if (!isInvitationDeliveryAuthStrategy2(strategy)) {
|
|
3337
3451
|
throw new AuthRuntimeError2("invalid_auth_config", "[Sixb] The active auth strategy does not support invitations.");
|
|
3338
3452
|
}
|
|
3339
3453
|
await this.assertCanInviteRecipient(strategy, authStorage, input.email, now);
|
|
3340
|
-
|
|
3341
|
-
this.assertInvitationApplicationAccess(groupIds, deliveryAudience);
|
|
3454
|
+
this.assertInvitationApplicationAccess(groupIds, destination.audience);
|
|
3342
3455
|
const invitation = await authStorage.invitations.createOrUpdateActive({
|
|
3343
3456
|
id: `inv_${randomUUID3()}`,
|
|
3344
3457
|
projectId: this.projectId,
|
|
3345
3458
|
email: input.email,
|
|
3346
3459
|
groupIds,
|
|
3347
|
-
createdByPrincipal:
|
|
3348
|
-
createdBySessionId:
|
|
3460
|
+
createdByPrincipal: caller.principal,
|
|
3461
|
+
createdBySessionId: callerSessionId(caller),
|
|
3349
3462
|
createdAt: now,
|
|
3350
3463
|
updatedAt: now,
|
|
3351
3464
|
expiresAt: resolveInvitationExpiresAt(input.expiresAt, now)
|
|
@@ -3356,9 +3469,9 @@ class AuthRuntime2 {
|
|
|
3356
3469
|
projectId: this.projectId,
|
|
3357
3470
|
authStorage,
|
|
3358
3471
|
invitation,
|
|
3359
|
-
audience:
|
|
3360
|
-
returnTo:
|
|
3361
|
-
requestOrigin:
|
|
3472
|
+
audience: destination.audience,
|
|
3473
|
+
returnTo: destination.returnTo,
|
|
3474
|
+
requestOrigin: destination.requestOrigin,
|
|
3362
3475
|
revealLink: input.revealLink,
|
|
3363
3476
|
now
|
|
3364
3477
|
});
|
|
@@ -3379,8 +3492,7 @@ class AuthRuntime2 {
|
|
|
3379
3492
|
}
|
|
3380
3493
|
return { invitation, delivery };
|
|
3381
3494
|
}
|
|
3382
|
-
async listInvitations(
|
|
3383
|
-
const session = await this.requireUser(request, options);
|
|
3495
|
+
async listInvitations(caller, input = {}) {
|
|
3384
3496
|
const authStorage = this.requireAuthStorage();
|
|
3385
3497
|
const { limit, offset } = normalizePagination(input);
|
|
3386
3498
|
const result = await authStorage.invitations.list({
|
|
@@ -3389,7 +3501,7 @@ class AuthRuntime2 {
|
|
|
3389
3501
|
statuses: input.statuses,
|
|
3390
3502
|
order: input.order
|
|
3391
3503
|
});
|
|
3392
|
-
const scope = this.resolveMembershipPolicyScopeForUser(
|
|
3504
|
+
const scope = this.resolveMembershipPolicyScopeForUser(caller.groupIds);
|
|
3393
3505
|
const manageable = result.invitations.filter((invitation) => canPerformMembershipOperation(scope, "invite", invitation.groupIds));
|
|
3394
3506
|
const page = paginate(manageable, { limit, offset });
|
|
3395
3507
|
return {
|
|
@@ -3398,8 +3510,7 @@ class AuthRuntime2 {
|
|
|
3398
3510
|
total: page.total
|
|
3399
3511
|
};
|
|
3400
3512
|
}
|
|
3401
|
-
async revokeInvitation(
|
|
3402
|
-
const session = await this.requireUser(request, options);
|
|
3513
|
+
async revokeInvitation(caller, input) {
|
|
3403
3514
|
const authStorage = this.requireAuthStorage();
|
|
3404
3515
|
const invitationId = assertNonEmpty3(input.invitationId, "Invitation id");
|
|
3405
3516
|
const invitation = await authStorage.invitations.getById({
|
|
@@ -3409,7 +3520,7 @@ class AuthRuntime2 {
|
|
|
3409
3520
|
if (!invitation) {
|
|
3410
3521
|
throw new AuthStorageError2("missing_invitation", `[Sixb] Invitation '${invitationId}' not found for project '${this.projectId}'.`);
|
|
3411
3522
|
}
|
|
3412
|
-
this.assertCanManageInvitationGroups(
|
|
3523
|
+
this.assertCanManageInvitationGroups(caller.groupIds, invitation.groupIds);
|
|
3413
3524
|
if (invitation.status !== "pending") {
|
|
3414
3525
|
throw new AuthRuntimeError2("invalid_auth_input", `[Sixb] Invitation '${invitationId}' is already ${invitation.status} and cannot be revoked.`);
|
|
3415
3526
|
}
|
|
@@ -3506,14 +3617,8 @@ class AuthRuntime2 {
|
|
|
3506
3617
|
throw new AuthRuntimeError2("authorization_denied", `[Sixb] The current user is not allowed to create or manage invitations for group(s): ${missing.join(", ")}.`);
|
|
3507
3618
|
}
|
|
3508
3619
|
}
|
|
3509
|
-
function
|
|
3510
|
-
return
|
|
3511
|
-
}
|
|
3512
|
-
function isAuthenticatedUserRequestSession(session) {
|
|
3513
|
-
return session.principal.type === "user";
|
|
3514
|
-
}
|
|
3515
|
-
function resolveRequestIpAddress(request) {
|
|
3516
|
-
return request.headers.get("x-forwarded-for")?.split(",")[0]?.trim() || request.headers.get("x-real-ip")?.trim() || undefined;
|
|
3620
|
+
function callerSessionId(caller) {
|
|
3621
|
+
return caller.credentialSource === "session" ? caller.session.id : undefined;
|
|
3517
3622
|
}
|
|
3518
3623
|
function constrainTokenGroupIds(principalGroupIds, accessToken) {
|
|
3519
3624
|
if (accessToken.groupIds === undefined) {
|
|
@@ -3589,6 +3694,6 @@ var SYSTEM_PRINCIPAL2 = { type: "system", id: "system" };
|
|
|
3589
3694
|
function principalsEqual2(left, right) {
|
|
3590
3695
|
return left.type === right.type && left.id === right.id;
|
|
3591
3696
|
}
|
|
3592
|
-
export { ActionDefinitionError2, ActionEditCommitError2, missingActionMutationMessage, effectsWithoutEditsMessage, assertNonEmpty2, isActionDefinition2, isGlobalActionDefinition2, isObjectActionDefinition2, normalizeActionParams, coerceActionParamsToTyped2, validateActionSubject, resolveObjectActionSubject, PERSONAL_ACCESS_TOKEN_PREFIX2, SERVICE_ACCOUNT_ACCESS_TOKEN_PREFIX2, generateAccessTokenSecret2, hashAccessTokenSecret2, formatAccessTokenValue2, parseAccessTokenValue2, getBearerAccessTokenValue2, createAccessTokenCredential2, CSRF_HEADER_NAME2, generateCsrfToken2, isCsrfExemptMethod2, verifyDoubleSubmitCsrf2, applications2, SecurityValidationError2, isGroupDefinition, isMembershipPolicyDefinition, isRoleDefinition, defineGroup2, defineRole2, defineMembershipPolicy2, every2, ShareDefinitionError2, defineShare2, isShareDefinition, snapshotShareDefinition, can2, SecurityRegistry, AuthStorageError2, MAX_PENDING_DEVICE_AUTHORIZATIONS2, paginate, InMemoryAuthStorage2, generateSessionSecret2, hashSessionSecret2, formatSessionCookieValue2, parseSessionCookieValue2, createSessionCredential2, AuthRuntime2, SYSTEM_PRINCIPAL2, principalsEqual2 };
|
|
3697
|
+
export { ActionDefinitionError2, ActionEditCommitError2, missingActionMutationMessage, effectsWithoutEditsMessage, assertNonEmpty2, isActionDefinition2, isGlobalActionDefinition2, isObjectActionDefinition2, normalizeActionParams, coerceActionParamsToTyped2, validateActionSubject, resolveObjectActionSubject, PERSONAL_ACCESS_TOKEN_PREFIX2, SERVICE_ACCOUNT_ACCESS_TOKEN_PREFIX2, generateAccessTokenSecret2, hashAccessTokenSecret2, formatAccessTokenValue2, parseAccessTokenValue2, getBearerAccessTokenValue2, createAccessTokenCredential2, setRequestClientAddress2, getRequestClientAddress2, CSRF_HEADER_NAME2, generateCsrfToken2, isCsrfExemptMethod2, verifyDoubleSubmitCsrf2, verifyCsrfToken2, applications2, SecurityValidationError2, isGroupDefinition, isMembershipPolicyDefinition, isRoleDefinition, defineGroup2, defineRole2, defineMembershipPolicy2, every2, ShareDefinitionError2, defineShare2, isShareDefinition, snapshotShareDefinition, can2, SecurityRegistry, AuthStorageError2, MAX_PENDING_DEVICE_AUTHORIZATIONS2, paginate, InMemoryAuthStorage2, generateSessionSecret2, hashSessionSecret2, formatSessionCookieValue2, parseSessionCookieValue2, createSessionCredential2, AuthRuntime2, SYSTEM_PRINCIPAL2, principalsEqual2 };
|
|
3593
3698
|
|
|
3594
|
-
//# debugId=
|
|
3699
|
+
//# debugId=934CBDB22AF498A264756E2164756E21
|