@spinajs/authz-http-admin 3.0.3 → 3.0.5
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/lib/cjs/controllers/AuthzAdminController.d.ts +35 -19
- package/lib/cjs/controllers/AuthzAdminController.d.ts.map +1 -1
- package/lib/cjs/controllers/AuthzAdminController.js +56 -28
- package/lib/cjs/controllers/AuthzAdminController.js.map +1 -1
- package/lib/cjs/routes/query.d.ts +12 -4
- package/lib/cjs/routes/query.d.ts.map +1 -1
- package/lib/cjs/routes/query.js +18 -6
- package/lib/cjs/routes/query.js.map +1 -1
- package/lib/cjs/routes/status.d.ts +1 -1
- package/lib/cjs/routes/status.d.ts.map +1 -1
- package/lib/cjs/routes/status.js +4 -2
- package/lib/cjs/routes/status.js.map +1 -1
- package/lib/cjs/schemas/bodies.d.ts +1 -0
- package/lib/cjs/schemas/bodies.d.ts.map +1 -1
- package/lib/cjs/schemas/bodies.js +3 -7
- package/lib/cjs/schemas/bodies.js.map +1 -1
- package/lib/cjs/schemas/commands.d.ts +15 -1
- package/lib/cjs/schemas/commands.d.ts.map +1 -1
- package/lib/cjs/schemas/commands.js +48 -3
- package/lib/cjs/schemas/commands.js.map +1 -1
- package/lib/cjs/schemas/document.d.ts +5 -2
- package/lib/cjs/schemas/document.d.ts.map +1 -1
- package/lib/cjs/schemas/document.js +12 -8
- package/lib/cjs/schemas/document.js.map +1 -1
- package/lib/cjs/schemas/index.d.ts +1 -0
- package/lib/cjs/schemas/index.d.ts.map +1 -1
- package/lib/cjs/schemas/index.js +1 -0
- package/lib/cjs/schemas/index.js.map +1 -1
- package/lib/cjs/schemas/primitives.d.ts +2 -0
- package/lib/cjs/schemas/primitives.d.ts.map +1 -1
- package/lib/cjs/schemas/primitives.js +10 -0
- package/lib/cjs/schemas/primitives.js.map +1 -1
- package/lib/cjs/schemas/provider.d.ts +5 -1
- package/lib/cjs/schemas/provider.d.ts.map +1 -1
- package/lib/cjs/schemas/provider.js +15 -1
- package/lib/cjs/schemas/provider.js.map +1 -1
- package/lib/cjs/schemas/registry.d.ts +21 -0
- package/lib/cjs/schemas/registry.d.ts.map +1 -0
- package/lib/cjs/schemas/registry.js +71 -0
- package/lib/cjs/schemas/registry.js.map +1 -0
- package/lib/mjs/controllers/AuthzAdminController.d.ts +35 -19
- package/lib/mjs/controllers/AuthzAdminController.d.ts.map +1 -1
- package/lib/mjs/controllers/AuthzAdminController.js +58 -30
- package/lib/mjs/controllers/AuthzAdminController.js.map +1 -1
- package/lib/mjs/routes/query.d.ts +12 -4
- package/lib/mjs/routes/query.d.ts.map +1 -1
- package/lib/mjs/routes/query.js +18 -6
- package/lib/mjs/routes/query.js.map +1 -1
- package/lib/mjs/routes/status.d.ts +1 -1
- package/lib/mjs/routes/status.d.ts.map +1 -1
- package/lib/mjs/routes/status.js +4 -2
- package/lib/mjs/routes/status.js.map +1 -1
- package/lib/mjs/schemas/bodies.d.ts +1 -0
- package/lib/mjs/schemas/bodies.d.ts.map +1 -1
- package/lib/mjs/schemas/bodies.js +4 -8
- package/lib/mjs/schemas/bodies.js.map +1 -1
- package/lib/mjs/schemas/commands.d.ts +15 -1
- package/lib/mjs/schemas/commands.d.ts.map +1 -1
- package/lib/mjs/schemas/commands.js +47 -2
- package/lib/mjs/schemas/commands.js.map +1 -1
- package/lib/mjs/schemas/document.d.ts +5 -2
- package/lib/mjs/schemas/document.d.ts.map +1 -1
- package/lib/mjs/schemas/document.js +12 -8
- package/lib/mjs/schemas/document.js.map +1 -1
- package/lib/mjs/schemas/index.d.ts +1 -0
- package/lib/mjs/schemas/index.d.ts.map +1 -1
- package/lib/mjs/schemas/index.js +1 -0
- package/lib/mjs/schemas/index.js.map +1 -1
- package/lib/mjs/schemas/primitives.d.ts +2 -0
- package/lib/mjs/schemas/primitives.d.ts.map +1 -1
- package/lib/mjs/schemas/primitives.js +9 -0
- package/lib/mjs/schemas/primitives.js.map +1 -1
- package/lib/mjs/schemas/provider.d.ts +5 -1
- package/lib/mjs/schemas/provider.d.ts.map +1 -1
- package/lib/mjs/schemas/provider.js +16 -2
- package/lib/mjs/schemas/provider.js.map +1 -1
- package/lib/mjs/schemas/registry.d.ts +21 -0
- package/lib/mjs/schemas/registry.d.ts.map +1 -0
- package/lib/mjs/schemas/registry.js +67 -0
- package/lib/mjs/schemas/registry.js.map +1 -0
- package/lib/tsconfig.cjs.tsbuildinfo +1 -1
- package/lib/tsconfig.mjs.tsbuildinfo +1 -1
- package/package.json +12 -12
|
@@ -16,8 +16,11 @@ import '../schemas/provider.js';
|
|
|
16
16
|
export declare class AuthzAdminController extends BaseController {
|
|
17
17
|
protected AdminDomain: string;
|
|
18
18
|
protected Domains: AuthzDomains;
|
|
19
|
-
/**
|
|
20
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Runs a route on the AuthzAdmin of the domain the AuthzDomainResolver names for `req`, `authz.http.admin.domain` being its fallback and the domain without a request.
|
|
21
|
+
* An AuthzAdminFailure becomes its status with `{ error }`, a domain no live domain bears 403 `unknown_domain`, anything else propagates.
|
|
22
|
+
*/
|
|
23
|
+
protected guarded(fn: (admin: AuthzAdmin) => Promise<Response>, req?: Request): Promise<Response>;
|
|
21
24
|
/** One batch built from the route, with the options of the query string. */
|
|
22
25
|
protected single(req: Request, build: () => AuthzCommand[]): Promise<Response<any>>;
|
|
23
26
|
protected list(req: Request, build: () => AuthzAdminQuery): Promise<Response<any>>;
|
|
@@ -29,15 +32,16 @@ export declare class AuthzAdminController extends BaseController {
|
|
|
29
32
|
* @response 200 {AuthzAdminResults} Every command succeeded
|
|
30
33
|
* @response 400 {AuthzAdminError} invalid_request, invalid_batch or a validation code of the command
|
|
31
34
|
* @response 401 Unauthorized: a valid session or token is required
|
|
32
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
35
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
33
36
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
34
37
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
38
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
35
39
|
*/
|
|
36
40
|
commands(req: Request): Promise<Response<any>>;
|
|
37
41
|
/**
|
|
38
42
|
* List assignments
|
|
39
43
|
* Lists assignments, filtered by the query.
|
|
40
|
-
* Query: `scope` (`<type>` or `<type>:<id>`), `subject` (`<type>:<id>` or `set:<role>@<type>:<id>`), `role`, `includeExpired` (`true` or `false`), `limit`, `offset
|
|
44
|
+
* Query: `scope` (`<type>` or `<type>:<id>`), `subject` (`<type>:<id>` or `set:<role>@<type>:<id>`), `role`, `includeExpired` (`true` or `false`), `limit`, `offset` or `after` (the `next` of the previous page).
|
|
41
45
|
* @response 200 {AuthzAdminPage} One page of rows
|
|
42
46
|
* @response 400 {AuthzAdminError} invalid_query: a malformed query parameter
|
|
43
47
|
* @response 401 Unauthorized: a valid session or token is required
|
|
@@ -47,7 +51,7 @@ export declare class AuthzAdminController extends BaseController {
|
|
|
47
51
|
/**
|
|
48
52
|
* List holders
|
|
49
53
|
* Who holds a permission on a resource through role assignments on it, its ancestors or $global; each principal is verified by a fresh check.
|
|
50
|
-
* Query: `scope` (`<type>:<id>`), `permission`, `expandSets` (`true` or `false`), `limit`, `offset
|
|
54
|
+
* Query: `scope` (`<type>:<id>`), `permission`, `expandSets` (`true` or `false`), `limit`, `offset` or `after` (the `next` of the previous page).
|
|
51
55
|
* @response 200 {AuthzAdminPage} One page of holders
|
|
52
56
|
* @response 400 {AuthzAdminError} invalid_query: a malformed or missing query parameter
|
|
53
57
|
* @response 401 Unauthorized: a valid session or token is required
|
|
@@ -62,9 +66,10 @@ export declare class AuthzAdminController extends BaseController {
|
|
|
62
66
|
* @response 200 {AuthzAdminResults} Every command succeeded
|
|
63
67
|
* @response 400 {AuthzAdminError} invalid_request, invalid_query (an option of the query string), invalid_batch or a validation code of the command
|
|
64
68
|
* @response 401 Unauthorized: a valid session or token is required
|
|
65
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
69
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
66
70
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
67
71
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
72
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
68
73
|
*/
|
|
69
74
|
grant(req: Request): Promise<Response<any>>;
|
|
70
75
|
/**
|
|
@@ -75,9 +80,10 @@ export declare class AuthzAdminController extends BaseController {
|
|
|
75
80
|
* @response 200 {AuthzAdminResults} Every command succeeded
|
|
76
81
|
* @response 400 {AuthzAdminError} invalid_request, invalid_query (an option of the query string), invalid_batch or a validation code of the command
|
|
77
82
|
* @response 401 Unauthorized: a valid session or token is required
|
|
78
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
83
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
79
84
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
80
85
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
86
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
81
87
|
*/
|
|
82
88
|
patchAssignment(req: Request): Promise<Response<any>>;
|
|
83
89
|
/**
|
|
@@ -87,15 +93,16 @@ export declare class AuthzAdminController extends BaseController {
|
|
|
87
93
|
* @response 200 {AuthzAdminResults} Every command succeeded
|
|
88
94
|
* @response 400 {AuthzAdminError} invalid_request, invalid_query (an option of the query string), invalid_batch or a validation code of the command
|
|
89
95
|
* @response 401 Unauthorized: a valid session or token is required
|
|
90
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
96
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
91
97
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
92
98
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
99
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
93
100
|
*/
|
|
94
101
|
revoke(req: Request): Promise<Response<any>>;
|
|
95
102
|
/**
|
|
96
103
|
* List share links
|
|
97
104
|
* Lists the share links, filtered by the query. A listing never carries a token or its hash: the token is shown once, when the link is created.
|
|
98
|
-
* Query: `scope` (`<type>` or `<type>:<id>`), `limit`, `offset
|
|
105
|
+
* Query: `scope` (`<type>` or `<type>:<id>`), `limit`, `offset` or `after` (the `next` of the previous page).
|
|
99
106
|
* @response 200 {AuthzAdminPage} One page of rows
|
|
100
107
|
* @response 400 {AuthzAdminError} invalid_query: a malformed query parameter
|
|
101
108
|
* @response 401 Unauthorized: a valid session or token is required
|
|
@@ -110,9 +117,10 @@ export declare class AuthzAdminController extends BaseController {
|
|
|
110
117
|
* @response 200 {AuthzAdminResults} The link was created; results[0] holds its id and token
|
|
111
118
|
* @response 400 {AuthzAdminError} invalid_request, invalid_query (an option of the query string), invalid_batch or a validation code of the command
|
|
112
119
|
* @response 401 Unauthorized: a valid session or token is required
|
|
113
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
120
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
114
121
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
115
122
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
123
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
116
124
|
*/
|
|
117
125
|
createLink(req: Request): Promise<Response<any>>;
|
|
118
126
|
/**
|
|
@@ -123,9 +131,10 @@ export declare class AuthzAdminController extends BaseController {
|
|
|
123
131
|
* @response 200 {AuthzAdminResults} Every command succeeded
|
|
124
132
|
* @response 400 {AuthzAdminError} invalid_request, invalid_query (an option of the query string), invalid_batch or a validation code of the command
|
|
125
133
|
* @response 401 Unauthorized: a valid session or token is required
|
|
126
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
134
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
127
135
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
128
136
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
137
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
129
138
|
*/
|
|
130
139
|
patchLink(req: Request): Promise<Response<any>>;
|
|
131
140
|
/**
|
|
@@ -135,15 +144,16 @@ export declare class AuthzAdminController extends BaseController {
|
|
|
135
144
|
* @response 200 {AuthzAdminResults} Every command succeeded
|
|
136
145
|
* @response 400 {AuthzAdminError} invalid_request, invalid_query (an option of the query string), invalid_batch or a validation code of the command
|
|
137
146
|
* @response 401 Unauthorized: a valid session or token is required
|
|
138
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
147
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
139
148
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
140
149
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
150
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
141
151
|
*/
|
|
142
152
|
revokeLink(req: Request): Promise<Response<any>>;
|
|
143
153
|
/**
|
|
144
154
|
* List rules
|
|
145
155
|
* Lists the RBAC rules held as rows.
|
|
146
|
-
* Query: `scope` (`<type>` or `<type>:<id>`), `limit`, `offset
|
|
156
|
+
* Query: `scope` (`<type>` or `<type>:<id>`), `limit`, `offset` or `after` (the `next` of the previous page).
|
|
147
157
|
* @response 200 {AuthzAdminPage} One page of rows
|
|
148
158
|
* @response 400 {AuthzAdminError} invalid_query: a malformed query parameter
|
|
149
159
|
* @response 401 Unauthorized: a valid session or token is required
|
|
@@ -158,9 +168,10 @@ export declare class AuthzAdminController extends BaseController {
|
|
|
158
168
|
* @response 200 {AuthzAdminResults} Every command succeeded
|
|
159
169
|
* @response 400 {AuthzAdminError} invalid_request, invalid_query (an option of the query string), invalid_batch or a validation code of the command
|
|
160
170
|
* @response 401 Unauthorized: a valid session or token is required
|
|
161
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
171
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
162
172
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
163
173
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
174
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
164
175
|
*/
|
|
165
176
|
putRule(req: Request): Promise<Response<any>>;
|
|
166
177
|
/**
|
|
@@ -170,9 +181,10 @@ export declare class AuthzAdminController extends BaseController {
|
|
|
170
181
|
* @response 200 {AuthzAdminResults} Every command succeeded
|
|
171
182
|
* @response 400 {AuthzAdminError} invalid_request, invalid_query (an option of the query string), invalid_batch or a validation code of the command
|
|
172
183
|
* @response 401 Unauthorized: a valid session or token is required
|
|
173
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
184
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
174
185
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
175
186
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
187
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
176
188
|
*/
|
|
177
189
|
deleteRule(req: Request): Promise<Response<any>>;
|
|
178
190
|
/**
|
|
@@ -193,9 +205,10 @@ export declare class AuthzAdminController extends BaseController {
|
|
|
193
205
|
* @response 200 {AuthzAdminResults} Every command succeeded
|
|
194
206
|
* @response 400 {AuthzAdminError} invalid_request, invalid_query (an option of the query string), invalid_batch or a validation code of the command
|
|
195
207
|
* @response 401 Unauthorized: a valid session or token is required
|
|
196
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
208
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
197
209
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
198
210
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
211
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
199
212
|
*/
|
|
200
213
|
putPolicy(req: Request): Promise<Response<any>>;
|
|
201
214
|
/**
|
|
@@ -205,9 +218,10 @@ export declare class AuthzAdminController extends BaseController {
|
|
|
205
218
|
* @response 200 {AuthzAdminResults} Every command succeeded
|
|
206
219
|
* @response 400 {AuthzAdminError} invalid_request, invalid_query (an option of the query string), invalid_batch or a validation code of the command
|
|
207
220
|
* @response 401 Unauthorized: a valid session or token is required
|
|
208
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
221
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
209
222
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
210
223
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
224
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
211
225
|
*/
|
|
212
226
|
deletePolicy(req: Request): Promise<Response<any>>;
|
|
213
227
|
/**
|
|
@@ -227,9 +241,10 @@ export declare class AuthzAdminController extends BaseController {
|
|
|
227
241
|
* @response 200 {AuthzAdminResults} Every command succeeded
|
|
228
242
|
* @response 400 {AuthzAdminError} invalid_request, invalid_query (an option of the query string), invalid_batch or a validation code of the command
|
|
229
243
|
* @response 401 Unauthorized: a valid session or token is required
|
|
230
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
244
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
231
245
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
232
246
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
247
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
233
248
|
*/
|
|
234
249
|
patchAttributes(req: Request): Promise<Response<any>>;
|
|
235
250
|
/**
|
|
@@ -240,9 +255,10 @@ export declare class AuthzAdminController extends BaseController {
|
|
|
240
255
|
* @response 200 {AuthzAdminResults} Every command succeeded
|
|
241
256
|
* @response 400 {AuthzAdminError} invalid_request, invalid_query (an option of the query string), invalid_batch or a validation code of the command
|
|
242
257
|
* @response 401 Unauthorized: a valid session or token is required
|
|
243
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
258
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
244
259
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
245
260
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
261
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
246
262
|
*/
|
|
247
263
|
replaceAttributes(req: Request): Promise<Response<any>>;
|
|
248
264
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthzAdminController.d.ts","sourceRoot":"","sources":["../../../src/controllers/AuthzAdminController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGjE,OAAO,KAAK,EAAE,UAAU,EAAqB,eAAe,EAAE,YAAY,EAA0B,MAAM,gBAAgB,CAAC;AAC3H,OAAO,E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0BAY/C;IAED;;;;;;;;;;;OAWG;IAEU,MAAM,CAAQ,GAAG,EAAE,OAAO,0BAEtC;IAED;;;;;;;;OAQG;IAEU,SAAS,CAAQ,GAAG,EAAE,OAAO,0BAEzC;IAED;;;;;;;;;;;;OAYG;IAEU,UAAU,CAAQ,GAAG,EAAE,OAAO,0BAG1C;IAED;;;;;;;;;;;;OAYG;IAEU,SAAS,CAAQ,GAAG,EAAE,OAAO,0BAEzC;IAED;;;;;;;;;;;OAWG;IAEU,UAAU,CAAQ,GAAG,EAAE,OAAO,0BAE1C;IAED;;;;;;;;OAQG;IAEU,SAAS,CAAQ,GAAG,EAAE,OAAO,0BAEzC;IAED;;;;;;;;;;;;OAYG;IAEU,OAAO,CAAQ,GAAG,EAAE,OAAO,0BAEvC;IAED;;;;;;;;;;;OAWG;IAEU,UAAU,CAAQ,GAAG,EAAE,OAAO,0BAE1C;IAED;;;;;;;;OAQG;IAEU,YAAY,CAAQ,GAAG,EAAE,OAAO,0BAE5C;IAED;;;;;;;;;;;;OAYG;IAEU,SAAS,CAAQ,GAAG,EAAE,OAAO,0BAEzC;IAED;;;;;;;;;;;OAWG;IAEU,YAAY,CAAQ,GAAG,EAAE,OAAO,0BAE5C;IAED;;;;;;;OAOG;IAEU,UAAU,CAAQ,GAAG,EAAE,OAAO,0BAE1C;IAED;;;;;;;;;;;;OAYG;IAEU,eAAe,CAAQ,GAAG,EAAE,OAAO,0BAE/C;IAED;;;;;;;;;;;;OAYG;IAEU,iBAAiB,CAAQ,GAAG,EAAE,OAAO,0BAEjD;CACF"}
|
|
@@ -35,6 +35,8 @@ function respond(status, body) {
|
|
|
35
35
|
return new http_1.NotFound(body);
|
|
36
36
|
case 409:
|
|
37
37
|
return new http_1.Conflict(body);
|
|
38
|
+
case 500:
|
|
39
|
+
return new http_1.ServerError(body);
|
|
38
40
|
default:
|
|
39
41
|
return new http_1.BadRequestResponse(body);
|
|
40
42
|
}
|
|
@@ -57,6 +59,8 @@ function withPathId(body, id, what) {
|
|
|
57
59
|
badRequest(`the body id ${JSON.stringify(o.id)} is not the path id ${JSON.stringify(id)}`, 'id');
|
|
58
60
|
return { ...o, id };
|
|
59
61
|
}
|
|
62
|
+
// The routes serve the RBAC and ABAC commands, whose AuthzCommandMap entries this package does not import.
|
|
63
|
+
const byId = (kind, id) => ({ kind, id });
|
|
60
64
|
const LINK_PATCH_KEYS = ['expiresAt', 'attributes', 'role', 'tags'];
|
|
61
65
|
/** PATCH /authz/links/:id as one link.update; like the assignment patch, a key it does not serve is refused, not ignored. */
|
|
62
66
|
function linkUpdate(body, id) {
|
|
@@ -88,9 +92,20 @@ const scopeOf = (req) => ({ type: param(req, 'type'), id: param(req, 'id') });
|
|
|
88
92
|
* @tags Authz admin
|
|
89
93
|
*/
|
|
90
94
|
let AuthzAdminController = class AuthzAdminController extends http_1.BaseController {
|
|
91
|
-
/**
|
|
92
|
-
|
|
93
|
-
|
|
95
|
+
/**
|
|
96
|
+
* Runs a route on the AuthzAdmin of the domain the AuthzDomainResolver names for `req`, `authz.http.admin.domain` being its fallback and the domain without a request.
|
|
97
|
+
* An AuthzAdminFailure becomes its status with `{ error }`, a domain no live domain bears 403 `unknown_domain`, anything else propagates.
|
|
98
|
+
*/
|
|
99
|
+
async guarded(fn, req) {
|
|
100
|
+
let admin;
|
|
101
|
+
try {
|
|
102
|
+
admin = (await this.Domains.service(req ? await (0, authz_http_1.resolveAuthzDomain)(req, this.AdminDomain) : this.AdminDomain)).admin();
|
|
103
|
+
}
|
|
104
|
+
catch (e) {
|
|
105
|
+
if (e instanceof authz_http_1.UnknownAuthzDomain)
|
|
106
|
+
return respond(403, { error: { code: 'unknown_domain', message: e.message } });
|
|
107
|
+
throw e;
|
|
108
|
+
}
|
|
94
109
|
try {
|
|
95
110
|
return await fn(admin);
|
|
96
111
|
}
|
|
@@ -105,10 +120,10 @@ let AuthzAdminController = class AuthzAdminController extends http_1.BaseControl
|
|
|
105
120
|
return this.guarded(async (admin) => {
|
|
106
121
|
const opts = (0, query_js_1.readWriteOptions)(query(req));
|
|
107
122
|
return results(await admin.execute(actorOf(req), build(), opts));
|
|
108
|
-
});
|
|
123
|
+
}, req);
|
|
109
124
|
}
|
|
110
125
|
list(req, build) {
|
|
111
|
-
return this.guarded(async (admin) => respond(200, await admin.list(actorOf(req), build())));
|
|
126
|
+
return this.guarded(async (admin) => respond(200, await admin.list(actorOf(req), build())), req);
|
|
112
127
|
}
|
|
113
128
|
/**
|
|
114
129
|
* Run a batch of commands
|
|
@@ -118,9 +133,10 @@ let AuthzAdminController = class AuthzAdminController extends http_1.BaseControl
|
|
|
118
133
|
* @response 200 {AuthzAdminResults} Every command succeeded
|
|
119
134
|
* @response 400 {AuthzAdminError} invalid_request, invalid_batch or a validation code of the command
|
|
120
135
|
* @response 401 Unauthorized: a valid session or token is required
|
|
121
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
136
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
122
137
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
123
138
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
139
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
124
140
|
*/
|
|
125
141
|
async commands(req) {
|
|
126
142
|
noStore(req);
|
|
@@ -131,12 +147,12 @@ let AuthzAdminController = class AuthzAdminController extends http_1.BaseControl
|
|
|
131
147
|
if (key in body)
|
|
132
148
|
opts[key] = body[key];
|
|
133
149
|
return results(await admin.execute(actorOf(req), (0, decode_js_1.decodeCommands)(body.commands), opts));
|
|
134
|
-
});
|
|
150
|
+
}, req);
|
|
135
151
|
}
|
|
136
152
|
/**
|
|
137
153
|
* List assignments
|
|
138
154
|
* Lists assignments, filtered by the query.
|
|
139
|
-
* Query: `scope` (`<type>` or `<type>:<id>`), `subject` (`<type>:<id>` or `set:<role>@<type>:<id>`), `role`, `includeExpired` (`true` or `false`), `limit`, `offset
|
|
155
|
+
* Query: `scope` (`<type>` or `<type>:<id>`), `subject` (`<type>:<id>` or `set:<role>@<type>:<id>`), `role`, `includeExpired` (`true` or `false`), `limit`, `offset` or `after` (the `next` of the previous page).
|
|
140
156
|
* @response 200 {AuthzAdminPage} One page of rows
|
|
141
157
|
* @response 400 {AuthzAdminError} invalid_query: a malformed query parameter
|
|
142
158
|
* @response 401 Unauthorized: a valid session or token is required
|
|
@@ -148,7 +164,7 @@ let AuthzAdminController = class AuthzAdminController extends http_1.BaseControl
|
|
|
148
164
|
/**
|
|
149
165
|
* List holders
|
|
150
166
|
* Who holds a permission on a resource through role assignments on it, its ancestors or $global; each principal is verified by a fresh check.
|
|
151
|
-
* Query: `scope` (`<type>:<id>`), `permission`, `expandSets` (`true` or `false`), `limit`, `offset
|
|
167
|
+
* Query: `scope` (`<type>:<id>`), `permission`, `expandSets` (`true` or `false`), `limit`, `offset` or `after` (the `next` of the previous page).
|
|
152
168
|
* @response 200 {AuthzAdminPage} One page of holders
|
|
153
169
|
* @response 400 {AuthzAdminError} invalid_query: a malformed or missing query parameter
|
|
154
170
|
* @response 401 Unauthorized: a valid session or token is required
|
|
@@ -165,9 +181,10 @@ let AuthzAdminController = class AuthzAdminController extends http_1.BaseControl
|
|
|
165
181
|
* @response 200 {AuthzAdminResults} Every command succeeded
|
|
166
182
|
* @response 400 {AuthzAdminError} invalid_request, invalid_query (an option of the query string), invalid_batch or a validation code of the command
|
|
167
183
|
* @response 401 Unauthorized: a valid session or token is required
|
|
168
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
184
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
169
185
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
170
186
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
187
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
171
188
|
*/
|
|
172
189
|
async grant(req) {
|
|
173
190
|
return this.single(req, () => [(0, decode_js_1.decodeCommand)({ ...objectBody(req.body, 'the fields of assignment.grant'), kind: 'assignment.grant' })]);
|
|
@@ -180,9 +197,10 @@ let AuthzAdminController = class AuthzAdminController extends http_1.BaseControl
|
|
|
180
197
|
* @response 200 {AuthzAdminResults} Every command succeeded
|
|
181
198
|
* @response 400 {AuthzAdminError} invalid_request, invalid_query (an option of the query string), invalid_batch or a validation code of the command
|
|
182
199
|
* @response 401 Unauthorized: a valid session or token is required
|
|
183
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
200
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
184
201
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
185
202
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
203
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
186
204
|
*/
|
|
187
205
|
async patchAssignment(req) {
|
|
188
206
|
return this.single(req, () => {
|
|
@@ -209,17 +227,18 @@ let AuthzAdminController = class AuthzAdminController extends http_1.BaseControl
|
|
|
209
227
|
* @response 200 {AuthzAdminResults} Every command succeeded
|
|
210
228
|
* @response 400 {AuthzAdminError} invalid_request, invalid_query (an option of the query string), invalid_batch or a validation code of the command
|
|
211
229
|
* @response 401 Unauthorized: a valid session or token is required
|
|
212
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
230
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
213
231
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
214
232
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
233
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
215
234
|
*/
|
|
216
235
|
async revoke(req) {
|
|
217
|
-
return this.single(req, () => [
|
|
236
|
+
return this.single(req, () => [byId('assignment.revoke', param(req, 'id'))]);
|
|
218
237
|
}
|
|
219
238
|
/**
|
|
220
239
|
* List share links
|
|
221
240
|
* Lists the share links, filtered by the query. A listing never carries a token or its hash: the token is shown once, when the link is created.
|
|
222
|
-
* Query: `scope` (`<type>` or `<type>:<id>`), `limit`, `offset
|
|
241
|
+
* Query: `scope` (`<type>` or `<type>:<id>`), `limit`, `offset` or `after` (the `next` of the previous page).
|
|
223
242
|
* @response 200 {AuthzAdminPage} One page of rows
|
|
224
243
|
* @response 400 {AuthzAdminError} invalid_query: a malformed query parameter
|
|
225
244
|
* @response 401 Unauthorized: a valid session or token is required
|
|
@@ -236,9 +255,10 @@ let AuthzAdminController = class AuthzAdminController extends http_1.BaseControl
|
|
|
236
255
|
* @response 200 {AuthzAdminResults} The link was created; results[0] holds its id and token
|
|
237
256
|
* @response 400 {AuthzAdminError} invalid_request, invalid_query (an option of the query string), invalid_batch or a validation code of the command
|
|
238
257
|
* @response 401 Unauthorized: a valid session or token is required
|
|
239
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
258
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
240
259
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
241
260
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
261
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
242
262
|
*/
|
|
243
263
|
async createLink(req) {
|
|
244
264
|
noStore(req);
|
|
@@ -252,9 +272,10 @@ let AuthzAdminController = class AuthzAdminController extends http_1.BaseControl
|
|
|
252
272
|
* @response 200 {AuthzAdminResults} Every command succeeded
|
|
253
273
|
* @response 400 {AuthzAdminError} invalid_request, invalid_query (an option of the query string), invalid_batch or a validation code of the command
|
|
254
274
|
* @response 401 Unauthorized: a valid session or token is required
|
|
255
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
275
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
256
276
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
257
277
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
278
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
258
279
|
*/
|
|
259
280
|
async patchLink(req) {
|
|
260
281
|
return this.single(req, () => [linkUpdate(req.body, param(req, 'id'))]);
|
|
@@ -266,17 +287,18 @@ let AuthzAdminController = class AuthzAdminController extends http_1.BaseControl
|
|
|
266
287
|
* @response 200 {AuthzAdminResults} Every command succeeded
|
|
267
288
|
* @response 400 {AuthzAdminError} invalid_request, invalid_query (an option of the query string), invalid_batch or a validation code of the command
|
|
268
289
|
* @response 401 Unauthorized: a valid session or token is required
|
|
269
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
290
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
270
291
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
271
292
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
293
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
272
294
|
*/
|
|
273
295
|
async revokeLink(req) {
|
|
274
|
-
return this.single(req, () => [
|
|
296
|
+
return this.single(req, () => [byId('link.revoke', param(req, 'id'))]);
|
|
275
297
|
}
|
|
276
298
|
/**
|
|
277
299
|
* List rules
|
|
278
300
|
* Lists the RBAC rules held as rows.
|
|
279
|
-
* Query: `scope` (`<type>` or `<type>:<id>`), `limit`, `offset
|
|
301
|
+
* Query: `scope` (`<type>` or `<type>:<id>`), `limit`, `offset` or `after` (the `next` of the previous page).
|
|
280
302
|
* @response 200 {AuthzAdminPage} One page of rows
|
|
281
303
|
* @response 400 {AuthzAdminError} invalid_query: a malformed query parameter
|
|
282
304
|
* @response 401 Unauthorized: a valid session or token is required
|
|
@@ -293,9 +315,10 @@ let AuthzAdminController = class AuthzAdminController extends http_1.BaseControl
|
|
|
293
315
|
* @response 200 {AuthzAdminResults} Every command succeeded
|
|
294
316
|
* @response 400 {AuthzAdminError} invalid_request, invalid_query (an option of the query string), invalid_batch or a validation code of the command
|
|
295
317
|
* @response 401 Unauthorized: a valid session or token is required
|
|
296
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
318
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
297
319
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
298
320
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
321
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
299
322
|
*/
|
|
300
323
|
async putRule(req) {
|
|
301
324
|
return this.single(req, () => [(0, decode_js_1.decodeCommand)({ kind: 'rule.put', rule: withPathId(req.body, param(req, 'id'), 'a rule') })]);
|
|
@@ -307,12 +330,13 @@ let AuthzAdminController = class AuthzAdminController extends http_1.BaseControl
|
|
|
307
330
|
* @response 200 {AuthzAdminResults} Every command succeeded
|
|
308
331
|
* @response 400 {AuthzAdminError} invalid_request, invalid_query (an option of the query string), invalid_batch or a validation code of the command
|
|
309
332
|
* @response 401 Unauthorized: a valid session or token is required
|
|
310
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
333
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
311
334
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
312
335
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
336
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
313
337
|
*/
|
|
314
338
|
async deleteRule(req) {
|
|
315
|
-
return this.single(req, () => [
|
|
339
|
+
return this.single(req, () => [byId('rule.delete', param(req, 'id'))]);
|
|
316
340
|
}
|
|
317
341
|
/**
|
|
318
342
|
* List policies
|
|
@@ -334,9 +358,10 @@ let AuthzAdminController = class AuthzAdminController extends http_1.BaseControl
|
|
|
334
358
|
* @response 200 {AuthzAdminResults} Every command succeeded
|
|
335
359
|
* @response 400 {AuthzAdminError} invalid_request, invalid_query (an option of the query string), invalid_batch or a validation code of the command
|
|
336
360
|
* @response 401 Unauthorized: a valid session or token is required
|
|
337
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
361
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
338
362
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
339
363
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
364
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
340
365
|
*/
|
|
341
366
|
async putPolicy(req) {
|
|
342
367
|
return this.single(req, () => [(0, decode_js_1.decodeCommand)({ kind: 'policy.put', policy: withPathId(req.body, param(req, 'id'), 'a policy') })]);
|
|
@@ -348,12 +373,13 @@ let AuthzAdminController = class AuthzAdminController extends http_1.BaseControl
|
|
|
348
373
|
* @response 200 {AuthzAdminResults} Every command succeeded
|
|
349
374
|
* @response 400 {AuthzAdminError} invalid_request, invalid_query (an option of the query string), invalid_batch or a validation code of the command
|
|
350
375
|
* @response 401 Unauthorized: a valid session or token is required
|
|
351
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
376
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
352
377
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
353
378
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
379
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
354
380
|
*/
|
|
355
381
|
async deletePolicy(req) {
|
|
356
|
-
return this.single(req, () => [
|
|
382
|
+
return this.single(req, () => [byId('policy.delete', param(req, 'id'))]);
|
|
357
383
|
}
|
|
358
384
|
/**
|
|
359
385
|
* Read scope attributes
|
|
@@ -374,9 +400,10 @@ let AuthzAdminController = class AuthzAdminController extends http_1.BaseControl
|
|
|
374
400
|
* @response 200 {AuthzAdminResults} Every command succeeded
|
|
375
401
|
* @response 400 {AuthzAdminError} invalid_request, invalid_query (an option of the query string), invalid_batch or a validation code of the command
|
|
376
402
|
* @response 401 Unauthorized: a valid session or token is required
|
|
377
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
403
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
378
404
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
379
405
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
406
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
380
407
|
*/
|
|
381
408
|
async patchAttributes(req) {
|
|
382
409
|
return this.single(req, () => [{ kind: 'scope.setAttributes', scope: scopeOf(req), patch: req.body }]);
|
|
@@ -389,9 +416,10 @@ let AuthzAdminController = class AuthzAdminController extends http_1.BaseControl
|
|
|
389
416
|
* @response 200 {AuthzAdminResults} Every command succeeded
|
|
390
417
|
* @response 400 {AuthzAdminError} invalid_request, invalid_query (an option of the query string), invalid_batch or a validation code of the command
|
|
391
418
|
* @response 401 Unauthorized: a valid session or token is required
|
|
392
|
-
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout or
|
|
419
|
+
* @response 403 {AuthzAdminError} forbidden, escalation, last_holder, self_lockout, protected_role or hook:<code> (an action hook refused)
|
|
393
420
|
* @response 404 {AuthzAdminError} not_found: a row the command names does not exist
|
|
394
421
|
* @response 409 {AuthzAdminError} conflict: the row changed or exists already
|
|
422
|
+
* @response 500 {AuthzAdminError} hook_error: an action hook threw or timed out
|
|
395
423
|
*/
|
|
396
424
|
async replaceAttributes(req) {
|
|
397
425
|
return this.single(req, () => [{ kind: 'scope.replaceAttributes', scope: scopeOf(req), attributes: req.body }]);
|
|
@@ -541,7 +569,7 @@ __decorate([
|
|
|
541
569
|
], AuthzAdminController.prototype, "replaceAttributes", null);
|
|
542
570
|
exports.AuthzAdminController = AuthzAdminController = __decorate([
|
|
543
571
|
(0, http_1.Policy)(authz_http_1.IsAuthenticated),
|
|
544
|
-
(0, http_1.BasePath)('authz')
|
|
572
|
+
(0, http_1.BasePath)({ config: 'authz.http.admin.basePath', default: 'authz' })
|
|
545
573
|
], AuthzAdminController);
|
|
546
574
|
function results(r) {
|
|
547
575
|
return respond((0, status_js_1.resultsStatus)(r), { results: r });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthzAdminController.js","sourceRoot":"","sources":["../../../src/controllers/AuthzAdminController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,0CAAiE;AACjE,0DAAgD;AAChD,oCAAyC;AAEzC,wCAAiK;AAEjK,oDAAsD;AACtD,wCAA8C;AAE9C,kCAAgC;AAChC,mDAAoE;AACpE,iDAA6G;AAE7G,mDAAsE;AAEtE,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,CAAU,CAAC;AAC3E,MAAM,WAAW,GAAG,EAAE,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,uBAAuB,EAAW,CAAC;AAEhI,SAAS,OAAO,CAAC,MAAc,EAAE,IAAa;IAC5C,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,GAAG;YACN,OAAO,IAAI,SAAE,CAAC,IAAI,CAAC,CAAC;QACtB,KAAK,GAAG;YACN,OAAO,IAAI,wBAAiB,CAAC,IAAI,CAA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OAAO,EAAE,OAAO,EAAE,CAAC;GACvD,oBAAoB,CAgXhC;AAED,SAAS,OAAO,CAAC,CAA6C;IAC5D,OAAO,OAAO,CAAC,IAAA,yBAAa,EAAC,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -1,16 +1,24 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AuthzAdminOptions, AuthzAdminQuery, PrincipalRef, ResourceRef } from '@spinajs/authz';
|
|
2
2
|
/** A parsed query string (express: string, string[] or a nested object per key). */
|
|
3
3
|
export type QueryInput = Readonly<Record<string, unknown>>;
|
|
4
|
+
/** authz-rbac's AssignmentSubject; the list queries belong to models this package does not import. */
|
|
5
|
+
type AssignmentSubject = PrincipalRef | {
|
|
6
|
+
readonly set: {
|
|
7
|
+
readonly role: string;
|
|
8
|
+
readonly scope: ResourceRef;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
4
11
|
/** `<type>` or `<type>:<id>`, split at the first `:` (ids may hold more); `$global` is GLOBAL. */
|
|
5
12
|
export declare function parseResourceRef(value: string, field: string): ResourceRef;
|
|
6
13
|
/** `<type>:<id>` (a principal) or `set:<role>@<type>:<id>` (a subject set). */
|
|
7
14
|
export declare function parseAssignmentSubject(value: string, field?: string): AssignmentSubject;
|
|
8
|
-
/** GET /authz/assignments: `scope`, `subject`, `role`, `includeExpired`, `limit`, `offset`. */
|
|
15
|
+
/** GET /authz/assignments: `scope`, `subject`, `role`, `includeExpired`, `limit`, `offset` or `after`. */
|
|
9
16
|
export declare function readAssignmentsQuery(q: QueryInput): AuthzAdminQuery;
|
|
10
|
-
/** GET /authz/holders: `scope` and `permission` (both required), `expandSets`, `limit`, `offset`. */
|
|
17
|
+
/** GET /authz/holders: `scope` and `permission` (both required), `expandSets`, `limit`, `offset` or `after`. */
|
|
11
18
|
export declare function readHoldersQuery(q: QueryInput): AuthzAdminQuery;
|
|
12
|
-
/** GET /authz/links
|
|
19
|
+
/** GET /authz/links and /authz/rules: `scope`, `limit`, `offset` or `after`; GET /authz/policies has no `after`. */
|
|
13
20
|
export declare function readPageQuery(kind: 'links' | 'rules' | 'policies', q: QueryInput): AuthzAdminQuery;
|
|
14
21
|
/** The AuthzAdminOptions of a single-command route: `reason`, `idempotencyKey`, `dryRun`. */
|
|
15
22
|
export declare function readWriteOptions(q: QueryInput): AuthzAdminOptions;
|
|
23
|
+
export {};
|
|
16
24
|
//# sourceMappingURL=query.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/routes/query.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/routes/query.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEpG,oFAAoF;AACpF,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAI3D,sGAAsG;AACtG,KAAK,iBAAiB,GAAG,YAAY,GAAG;IAAE,QAAQ,CAAC,GAAG,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAA;KAAE,CAAA;CAAE,CAAC;AAajH,kGAAkG;AAClG,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,CAS1E;AAED,+EAA+E;AAC/E,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,SAAY,GAAG,iBAAiB,CAa1F;AAsCD,0GAA0G;AAC1G,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,UAAU,GAAG,eAAe,CAYnE;AAED,gHAAgH;AAChH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,UAAU,GAAG,eAAe,CAa/D;AAED,oHAAoH;AACpH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,UAAU,EAAE,CAAC,EAAE,UAAU,GAAG,eAAe,CAGlG;AAED,6FAA6F;AAC7F,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,UAAU,GAAG,iBAAiB,CASjE"}
|