@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.
- package/dist/wasmEngine.d.mts +15 -18
- package/dist/wasmEngine.d.mts.map +1 -1
- package/dist/wasmEngine.mjs +15 -18
- package/package.json +6 -6
package/dist/wasmEngine.d.mts
CHANGED
|
@@ -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
|
|
16
|
-
* `#
|
|
17
|
-
*
|
|
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
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
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
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
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
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
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
|
|
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"}
|
package/dist/wasmEngine.mjs
CHANGED
|
@@ -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
|
|
21
|
-
* `#
|
|
22
|
-
*
|
|
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
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
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
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
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
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
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.
|
|
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.
|
|
29
|
+
"@o3co/auth.policy-verifier.cedar": "0.16.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@types/node": "^26.6.
|
|
33
|
-
"@vitest/coverage-v8": "^5.0.
|
|
34
|
-
"vitest": "^5.0.
|
|
35
|
-
"@o3co/auth.policy-verifier.core": "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",
|