@o3co/auth.policy-verifier.cedar-wasm 0.15.0 → 0.16.1

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.
@@ -12,29 +12,26 @@ export interface CedarWasmEngine extends CedarEngine {
12
12
  *
13
13
  * `load` parses every file on its own — so a syntax error names the file that
14
14
  * contains it — splits it into its policies, and names each for its file
15
- * (`namePolicies`, #199): the file's name for a file that holds one, numbered
16
- * `#1`, `#2`… for one that holds several. Those are the ids Cedar answers with
17
- * in `diagnostics.reason` and names in `errors`, and the ids the http engine
15
+ * (`namePolicies`): the file's name for a file that holds one, numbered `#1`,
16
+ * `#2`… for one that holds several. Those are the ids Cedar answers with in
17
+ * `diagnostics.reason` and names in `errors`, and the ids the http engine
18
18
  * gives cedar-agent, so a corpus laid out one policy per file reads the same
19
19
  * under both. Refused at load: two policies that would share an id (`a.cedar`
20
20
  * holding two, beside `a#1.cedar`), a policy in a file named only `.cedar`,
21
- * and a template. The set is then compiled once, at boot, into
22
- * wasm memory under a per-load id. `isAuthorized` references that id per
23
- * request and re-parses nothing; the call is synchronous, deterministic, and a
24
- * few tens of microseconds, so the policy set answers as a plain `Rule`.
21
+ * and a template. The set is then compiled once, at boot, into wasm memory
22
+ * under a per-load id. `isAuthorized` references that id per request and
23
+ * re-parses nothing; the call is synchronous, deterministic, and a few tens of
24
+ * microseconds, so the policy set answers as a plain `Rule`.
25
25
  *
26
- * What this engine costs is paid at import: the wasm module (about 12 MB on
27
- * disk) is instantiated when the bindings load. That is why it lives in its
28
- * own package — a deployment that evaluates out of process never carries it.
26
+ * The wasm module (about 12 MB on disk) is instantiated when the bindings
27
+ * load, which is why this engine lives in its own package: a deployment that
28
+ * evaluates out of process never carries it.
29
29
  *
30
- * It vouches for the revision it evaluated (`confirmsRevision`, #244), and can:
31
- * the set is compiled here, from the source `load` was handed, under an id
32
- * minted here and known to nothing else. An answer through that id cannot have
33
- * come from any other policies, so every answer names the revision of that
34
- * source — read once, at `load`, beside the compile. `PolicySource` is a plain
35
- * object the caller still holds; reading `source.revision` when answering would
36
- * be reading "the current revision", which is a claim about the object and not
37
- * about the policies that were compiled.
30
+ * It vouches for the revision it evaluated (`confirmsRevision`): the set is
31
+ * compiled here, under an id known to nothing else, so an answer through that
32
+ * id comes from the source `load` was handed and names that source's revision,
33
+ * read once at `load`. Reading `source.revision` when answering would describe
34
+ * the caller's object as it is now, not the policies that were compiled.
38
35
  */
39
36
  export declare const cedarWasmEngine: CedarWasmEngine;
40
37
  //# sourceMappingURL=wasmEngine.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wasmEngine.d.mts","sourceRoot":"","sources":["../src/wasmEngine.mts"],"names":[],"mappings":"AAeA,OAAO,EAEN,KAAK,WAAW,EAKhB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,MAAM,kCAAkC,CAAC;AAE1C,kFAAkF;AAClF,eAAO,MAAM,sBAAsB,EAAG,MAAe,CAAC;AAEtD,oFAAoF;AACpF,MAAM,WAAW,eAAgB,SAAQ,WAAW;IACnD,QAAQ,CAAC,IAAI,EAAE,OAAO,sBAAsB,CAAC;IAC7C,IAAI,CAAC,MAAM,EAAE,YAAY,GAAG,kBAAkB,CAAC;CAC/C;AAKD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,eAAe,EAAE,eAuC7B,CAAC"}
1
+ {"version":3,"file":"wasmEngine.d.mts","sourceRoot":"","sources":["../src/wasmEngine.mts"],"names":[],"mappings":"AAeA,OAAO,EAEN,KAAK,WAAW,EAKhB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,MAAM,kCAAkC,CAAC;AAE1C,kFAAkF;AAClF,eAAO,MAAM,sBAAsB,EAAG,MAAe,CAAC;AAEtD,oFAAoF;AACpF,MAAM,WAAW,eAAgB,SAAQ,WAAW;IACnD,QAAQ,CAAC,IAAI,EAAE,OAAO,sBAAsB,CAAC;IAC7C,IAAI,CAAC,MAAM,EAAE,YAAY,GAAG,kBAAkB,CAAC;CAC/C;AAKD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,eAAe,EAAE,eAuC7B,CAAC"}
@@ -17,29 +17,26 @@ let policySetCounter = 0;
17
17
  *
18
18
  * `load` parses every file on its own — so a syntax error names the file that
19
19
  * contains it — splits it into its policies, and names each for its file
20
- * (`namePolicies`, #199): the file's name for a file that holds one, numbered
21
- * `#1`, `#2`… for one that holds several. Those are the ids Cedar answers with
22
- * in `diagnostics.reason` and names in `errors`, and the ids the http engine
20
+ * (`namePolicies`): the file's name for a file that holds one, numbered `#1`,
21
+ * `#2`… for one that holds several. Those are the ids Cedar answers with in
22
+ * `diagnostics.reason` and names in `errors`, and the ids the http engine
23
23
  * gives cedar-agent, so a corpus laid out one policy per file reads the same
24
24
  * under both. Refused at load: two policies that would share an id (`a.cedar`
25
25
  * holding two, beside `a#1.cedar`), a policy in a file named only `.cedar`,
26
- * and a template. The set is then compiled once, at boot, into
27
- * wasm memory under a per-load id. `isAuthorized` references that id per
28
- * request and re-parses nothing; the call is synchronous, deterministic, and a
29
- * few tens of microseconds, so the policy set answers as a plain `Rule`.
26
+ * and a template. The set is then compiled once, at boot, into wasm memory
27
+ * under a per-load id. `isAuthorized` references that id per request and
28
+ * re-parses nothing; the call is synchronous, deterministic, and a few tens of
29
+ * microseconds, so the policy set answers as a plain `Rule`.
30
30
  *
31
- * What this engine costs is paid at import: the wasm module (about 12 MB on
32
- * disk) is instantiated when the bindings load. That is why it lives in its
33
- * own package — a deployment that evaluates out of process never carries it.
31
+ * The wasm module (about 12 MB on disk) is instantiated when the bindings
32
+ * load, which is why this engine lives in its own package: a deployment that
33
+ * evaluates out of process never carries it.
34
34
  *
35
- * It vouches for the revision it evaluated (`confirmsRevision`, #244), and can:
36
- * the set is compiled here, from the source `load` was handed, under an id
37
- * minted here and known to nothing else. An answer through that id cannot have
38
- * come from any other policies, so every answer names the revision of that
39
- * source — read once, at `load`, beside the compile. `PolicySource` is a plain
40
- * object the caller still holds; reading `source.revision` when answering would
41
- * be reading "the current revision", which is a claim about the object and not
42
- * about the policies that were compiled.
35
+ * It vouches for the revision it evaluated (`confirmsRevision`): the set is
36
+ * compiled here, under an id known to nothing else, so an answer through that
37
+ * id comes from the source `load` was handed and names that source's revision,
38
+ * read once at `load`. Reading `source.revision` when answering would describe
39
+ * the caller's object as it is now, not the policies that were compiled.
43
40
  */
44
41
  export const cedarWasmEngine = {
45
42
  name: CEDAR_WASM_ENGINE_NAME,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3co/auth.policy-verifier.cedar-wasm",
3
- "version": "0.15.0",
3
+ "version": "0.16.1",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "engines": {
@@ -26,13 +26,13 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@cedar-policy/cedar-wasm": "4.13.0",
29
- "@o3co/auth.policy-verifier.cedar": "0.15.0"
29
+ "@o3co/auth.policy-verifier.cedar": "0.16.1"
30
30
  },
31
31
  "devDependencies": {
32
- "@types/node": "^26.6.2",
33
- "@vitest/coverage-v8": "^5.0.1",
34
- "vitest": "^5.0.1",
35
- "@o3co/auth.policy-verifier.core": "0.15.0"
32
+ "@types/node": "^26.6.3",
33
+ "@vitest/coverage-v8": "^5.0.2",
34
+ "vitest": "^5.0.2",
35
+ "@o3co/auth.policy-verifier.core": "0.16.1"
36
36
  },
37
37
  "scripts": {
38
38
  "prebuild": "rimraf dist",