@janssenproject/cedarling_wasm 0.0.369-nodejs → 0.0.370-nodejs
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/README.md +7 -8
- package/cedarling_wasm.d.ts +11 -3
- package/cedarling_wasm.js +31 -19
- package/cedarling_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -104,8 +104,11 @@ export class Cedarling {
|
|
|
104
104
|
*/
|
|
105
105
|
static new_from_map(config: Map<any, any>): Promise<Cedarling>;
|
|
106
106
|
/**
|
|
107
|
-
* Authorize request
|
|
108
|
-
*
|
|
107
|
+
* Authorize an unsigned request carrying an optional single principal.
|
|
108
|
+
* Makes an authorization decision based on the [`RequestUnsigned`].
|
|
109
|
+
* When `principal` is omitted / `null` the core uses Cedar partial evaluation;
|
|
110
|
+
* residual-dependent requests fail closed with `Decision::Deny` and surface
|
|
111
|
+
* residual policy ids in `response.diagnostics.reason`.
|
|
109
112
|
*/
|
|
110
113
|
authorize_unsigned(request: any): Promise<AuthorizeResult>;
|
|
111
114
|
/**
|
|
@@ -261,13 +264,9 @@ export class AuthorizeResult {
|
|
|
261
264
|
*/
|
|
262
265
|
json_string(): string;
|
|
263
266
|
/**
|
|
264
|
-
*
|
|
267
|
+
* Cedar authorization response for the request.
|
|
265
268
|
*/
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* Get result for a specific principal
|
|
269
|
-
*/
|
|
270
|
-
principal(principal: string): AuthorizeResultResponse | undefined;
|
|
269
|
+
response: AuthorizeResultResponse;
|
|
271
270
|
/**
|
|
272
271
|
* Result of authorization
|
|
273
272
|
* true means `ALLOW`
|
package/cedarling_wasm.d.ts
CHANGED
|
@@ -20,7 +20,6 @@ export class AuthorizeResult {
|
|
|
20
20
|
* Convert `AuthorizeResult` to json string value
|
|
21
21
|
*/
|
|
22
22
|
json_string(): string;
|
|
23
|
-
principal(principal: string): AuthorizeResultResponse | undefined;
|
|
24
23
|
/**
|
|
25
24
|
* Result of authorization
|
|
26
25
|
* true means `ALLOW`
|
|
@@ -33,6 +32,10 @@ export class AuthorizeResult {
|
|
|
33
32
|
* Request ID of the authorization request
|
|
34
33
|
*/
|
|
35
34
|
request_id: string;
|
|
35
|
+
/**
|
|
36
|
+
* Cedar authorization response for the request.
|
|
37
|
+
*/
|
|
38
|
+
response: AuthorizeResultResponse;
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
/**
|
|
@@ -66,8 +69,13 @@ export class Cedarling {
|
|
|
66
69
|
*/
|
|
67
70
|
authorize_multi_issuer(request: any): Promise<MultiIssuerAuthorizeResult>;
|
|
68
71
|
/**
|
|
69
|
-
* Authorize request
|
|
70
|
-
*
|
|
72
|
+
* Authorize an unsigned request carrying an optional single principal.
|
|
73
|
+
* Makes an authorization decision based on the [`RequestUnsigned`].
|
|
74
|
+
*
|
|
75
|
+
* When `principal` is omitted / `null` on the JS side the core uses Cedar
|
|
76
|
+
* partial evaluation; residual-dependent requests fail closed with
|
|
77
|
+
* `Decision::Deny` and surface residual policy ids in
|
|
78
|
+
* `response.diagnostics.reason`.
|
|
71
79
|
*/
|
|
72
80
|
authorize_unsigned(request: any): Promise<AuthorizeResult>;
|
|
73
81
|
/**
|
package/cedarling_wasm.js
CHANGED
|
@@ -38,16 +38,6 @@ class AuthorizeResult {
|
|
|
38
38
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
/**
|
|
42
|
-
* @param {string} principal
|
|
43
|
-
* @returns {AuthorizeResultResponse | undefined}
|
|
44
|
-
*/
|
|
45
|
-
principal(principal) {
|
|
46
|
-
const ptr0 = passStringToWasm0(principal, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
47
|
-
const len0 = WASM_VECTOR_LEN;
|
|
48
|
-
const ret = wasm.authorizeresult_principal(this.__wbg_ptr, ptr0, len0);
|
|
49
|
-
return ret === 0 ? undefined : AuthorizeResultResponse.__wrap(ret);
|
|
50
|
-
}
|
|
51
41
|
/**
|
|
52
42
|
* Result of authorization
|
|
53
43
|
* true means `ALLOW`
|
|
@@ -76,6 +66,14 @@ class AuthorizeResult {
|
|
|
76
66
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
77
67
|
}
|
|
78
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Cedar authorization response for the request.
|
|
71
|
+
* @returns {AuthorizeResultResponse}
|
|
72
|
+
*/
|
|
73
|
+
get response() {
|
|
74
|
+
const ret = wasm.__wbg_get_authorizeresult_response(this.__wbg_ptr);
|
|
75
|
+
return AuthorizeResultResponse.__wrap(ret);
|
|
76
|
+
}
|
|
79
77
|
/**
|
|
80
78
|
* Result of authorization
|
|
81
79
|
* true means `ALLOW`
|
|
@@ -96,6 +94,15 @@ class AuthorizeResult {
|
|
|
96
94
|
const len0 = WASM_VECTOR_LEN;
|
|
97
95
|
wasm.__wbg_set_authorizeresult_request_id(this.__wbg_ptr, ptr0, len0);
|
|
98
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Cedar authorization response for the request.
|
|
99
|
+
* @param {AuthorizeResultResponse} arg0
|
|
100
|
+
*/
|
|
101
|
+
set response(arg0) {
|
|
102
|
+
_assertClass(arg0, AuthorizeResultResponse);
|
|
103
|
+
var ptr0 = arg0.__destroy_into_raw();
|
|
104
|
+
wasm.__wbg_set_authorizeresult_response(this.__wbg_ptr, ptr0);
|
|
105
|
+
}
|
|
99
106
|
}
|
|
100
107
|
if (Symbol.dispose) AuthorizeResult.prototype[Symbol.dispose] = AuthorizeResult.prototype.free;
|
|
101
108
|
exports.AuthorizeResult = AuthorizeResult;
|
|
@@ -174,8 +181,13 @@ class Cedarling {
|
|
|
174
181
|
return ret;
|
|
175
182
|
}
|
|
176
183
|
/**
|
|
177
|
-
* Authorize request
|
|
178
|
-
*
|
|
184
|
+
* Authorize an unsigned request carrying an optional single principal.
|
|
185
|
+
* Makes an authorization decision based on the [`RequestUnsigned`].
|
|
186
|
+
*
|
|
187
|
+
* When `principal` is omitted / `null` on the JS side the core uses Cedar
|
|
188
|
+
* partial evaluation; residual-dependent requests fail closed with
|
|
189
|
+
* `Decision::Deny` and surface residual policy ids in
|
|
190
|
+
* `response.diagnostics.reason`.
|
|
179
191
|
* @param {any} request
|
|
180
192
|
* @returns {Promise<AuthorizeResult>}
|
|
181
193
|
*/
|
|
@@ -1890,22 +1902,22 @@ function __wbg_get_imports() {
|
|
|
1890
1902
|
console.warn(...arg0);
|
|
1891
1903
|
},
|
|
1892
1904
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
1893
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1905
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 2202, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1894
1906
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h10797b50422db1d9);
|
|
1895
1907
|
return ret;
|
|
1896
1908
|
},
|
|
1897
1909
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
1898
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
1910
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 631, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1899
1911
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__hc1f7fa9b168b3277);
|
|
1900
1912
|
return ret;
|
|
1901
1913
|
},
|
|
1902
1914
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
1903
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
1904
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1915
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 587, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1916
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h6f3d4b30895d4f66);
|
|
1905
1917
|
return ret;
|
|
1906
1918
|
},
|
|
1907
1919
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
1908
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
1920
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 748, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1909
1921
|
const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h1de102d8396d84e7);
|
|
1910
1922
|
return ret;
|
|
1911
1923
|
},
|
|
@@ -1950,8 +1962,8 @@ function __wbg_get_imports() {
|
|
|
1950
1962
|
};
|
|
1951
1963
|
}
|
|
1952
1964
|
|
|
1953
|
-
function
|
|
1954
|
-
wasm.
|
|
1965
|
+
function wasm_bindgen__convert__closures_____invoke__h6f3d4b30895d4f66(arg0, arg1) {
|
|
1966
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h6f3d4b30895d4f66(arg0, arg1);
|
|
1955
1967
|
}
|
|
1956
1968
|
|
|
1957
1969
|
function wasm_bindgen__convert__closures_____invoke__h1de102d8396d84e7(arg0, arg1) {
|
package/cedarling_wasm_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@janssenproject/cedarling_wasm",
|
|
3
3
|
"description": "The Cedarling is a performant local authorization service that runs the Rust Cedar Engine",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.370-nodejs",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|