keycloak-api-manager 6.0.1 → 6.0.3
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/Handlers/attackDetectionHandler.js +12 -8
- package/Handlers/clientPoliciesHandler.js +4 -2
- package/Handlers/clientScopesHandler.js +9 -9
- package/Handlers/clientsHandler.js +1 -13
- package/Handlers/groupsHandler.js +3 -2
- package/Handlers/organizationsHandler.js +2 -1
- package/Handlers/realmsHandler.js +0 -1
- package/Handlers/rolesHandler.js +14 -12
- package/Handlers/userProfileHandler.js +2 -2
- package/OIDC_MIGRATION_PLAN.md +5 -15
- package/README.md +4 -4
- package/docs/api/attack-detection.md +82 -16
- package/docs/api/authentication-management.md +356 -70
- package/docs/api/client-policies.md +103 -16
- package/docs/api/client-scopes.md +52 -4
- package/docs/api/components.md +107 -19
- package/docs/api/configuration.md +39 -386
- package/docs/api/groups.md +46 -5
- package/docs/api/identity-providers.md +50 -5
- package/docs/api/roles.md +37 -7
- package/docs/api/server-info.md +42 -17
- package/docs/api/user-profile.md +55 -10
- package/docs/api-reference.md +7 -7
- package/docs/guides/PKCE-Login-Flow.md +13 -659
- package/docs/test-configuration.md +19 -1
- package/docs/testing.md +86 -0
- package/index.js +131 -0
- package/package.json +1 -1
- package/test/config/secrets.json.example +1 -1
- package/test/helpers/config.js +15 -9
|
@@ -2,144 +2,417 @@
|
|
|
2
2
|
|
|
3
3
|
Manage required actions, authentication flows, executions, and execution configs.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Namespace: KeycloakManager.authenticationManagement
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
This handler controls Keycloak authentication internals at realm level:
|
|
10
|
+
|
|
11
|
+
- Required actions lifecycle and config.
|
|
12
|
+
- Flow creation/copy/read/update/delete.
|
|
13
|
+
- Execution management inside flows.
|
|
14
|
+
- Execution configuration metadata and values.
|
|
15
|
+
- Provider discovery for authenticators and forms.
|
|
16
|
+
|
|
17
|
+
All methods use the currently configured realm, unless an explicit realm override is supported by upstream endpoint payloads.
|
|
18
|
+
|
|
19
|
+
## Required Actions
|
|
8
20
|
|
|
9
21
|
### getRequiredActions()
|
|
10
|
-
|
|
22
|
+
|
|
23
|
+
List registered required actions in realm.
|
|
24
|
+
|
|
25
|
+
Returns:
|
|
26
|
+
|
|
27
|
+
- Promise<Array<object>>
|
|
11
28
|
|
|
12
29
|
### getUnregisteredRequiredActions()
|
|
13
|
-
|
|
30
|
+
|
|
31
|
+
List available required actions not yet registered in realm.
|
|
32
|
+
|
|
33
|
+
Returns:
|
|
34
|
+
|
|
35
|
+
- Promise<Array<object>>
|
|
14
36
|
|
|
15
37
|
### registerRequiredAction(actionRepresentation)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
38
|
+
|
|
39
|
+
Register a required action.
|
|
40
|
+
|
|
41
|
+
Parameters:
|
|
42
|
+
|
|
43
|
+
- actionRepresentation (object, required)
|
|
44
|
+
- alias (string, required)
|
|
45
|
+
- name (string, required)
|
|
46
|
+
- providerId (string, required)
|
|
47
|
+
- defaultAction (boolean, optional)
|
|
48
|
+
- enabled (boolean, optional)
|
|
49
|
+
- priority (number, optional)
|
|
50
|
+
- config (object, optional)
|
|
51
|
+
|
|
52
|
+
Returns:
|
|
53
|
+
|
|
54
|
+
- Promise<void>
|
|
19
55
|
|
|
20
56
|
### getRequiredActionForAlias(filter)
|
|
21
|
-
|
|
22
|
-
|
|
57
|
+
|
|
58
|
+
Read one required action by alias.
|
|
59
|
+
|
|
60
|
+
Parameters:
|
|
61
|
+
|
|
62
|
+
- filter (object, required)
|
|
63
|
+
- alias (string, required)
|
|
64
|
+
|
|
65
|
+
Returns:
|
|
66
|
+
|
|
67
|
+
- Promise<object>
|
|
23
68
|
|
|
24
69
|
### updateRequiredAction(filter, actionRepresentation)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
70
|
+
|
|
71
|
+
Update one required action.
|
|
72
|
+
|
|
73
|
+
Parameters:
|
|
74
|
+
|
|
75
|
+
- filter (object, required):
|
|
76
|
+
- alias (string, required)
|
|
77
|
+
- actionRepresentation (object, required): updated action definition.
|
|
78
|
+
|
|
79
|
+
Returns:
|
|
80
|
+
|
|
81
|
+
- Promise<void>
|
|
28
82
|
|
|
29
83
|
### deleteRequiredAction(filter)
|
|
30
|
-
|
|
31
|
-
|
|
84
|
+
|
|
85
|
+
Delete one required action by alias.
|
|
86
|
+
|
|
87
|
+
Parameters:
|
|
88
|
+
|
|
89
|
+
- filter (object, required)
|
|
90
|
+
- alias (string, required)
|
|
91
|
+
|
|
92
|
+
Returns:
|
|
93
|
+
|
|
94
|
+
- Promise<void>
|
|
32
95
|
|
|
33
96
|
### raiseRequiredActionPriority(filter)
|
|
34
97
|
### lowerRequiredActionPriority(filter)
|
|
35
|
-
|
|
36
|
-
|
|
98
|
+
|
|
99
|
+
Move required action priority up or down.
|
|
100
|
+
|
|
101
|
+
Parameters:
|
|
102
|
+
|
|
103
|
+
- filter (object, required)
|
|
104
|
+
- alias (string, required)
|
|
105
|
+
|
|
106
|
+
Returns:
|
|
107
|
+
|
|
108
|
+
- Promise<void>
|
|
37
109
|
|
|
38
110
|
### getRequiredActionConfigDescription(filter)
|
|
39
|
-
|
|
40
|
-
|
|
111
|
+
|
|
112
|
+
Get config schema/metadata for one required action.
|
|
113
|
+
|
|
114
|
+
Parameters:
|
|
115
|
+
|
|
116
|
+
- filter (object, required)
|
|
117
|
+
- alias (string, required)
|
|
118
|
+
|
|
119
|
+
Returns:
|
|
120
|
+
|
|
121
|
+
- Promise<object>
|
|
41
122
|
|
|
42
123
|
### getRequiredActionConfig(filter)
|
|
43
|
-
|
|
44
|
-
|
|
124
|
+
|
|
125
|
+
Get current config values for one required action.
|
|
126
|
+
|
|
127
|
+
Parameters:
|
|
128
|
+
|
|
129
|
+
- filter (object, required)
|
|
130
|
+
- alias (string, required)
|
|
131
|
+
|
|
132
|
+
Returns:
|
|
133
|
+
|
|
134
|
+
- Promise<object>
|
|
45
135
|
|
|
46
136
|
### updateRequiredActionConfig(filter, actionConfigRepresentation)
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
137
|
+
|
|
138
|
+
Update config values for one required action.
|
|
139
|
+
|
|
140
|
+
Parameters:
|
|
141
|
+
|
|
142
|
+
- filter (object, required)
|
|
143
|
+
- alias (string, required)
|
|
144
|
+
- actionConfigRepresentation (object, required)
|
|
145
|
+
|
|
146
|
+
Returns:
|
|
147
|
+
|
|
148
|
+
- Promise<void>
|
|
50
149
|
|
|
51
150
|
### removeRequiredActionConfig(filter)
|
|
52
|
-
- **Required**: `filter.alias`
|
|
53
|
-
- **Returns**: Promise<void>
|
|
54
151
|
|
|
55
|
-
|
|
152
|
+
Delete config for one required action.
|
|
153
|
+
|
|
154
|
+
Parameters:
|
|
155
|
+
|
|
156
|
+
- filter (object, required)
|
|
157
|
+
- alias (string, required)
|
|
158
|
+
|
|
159
|
+
Returns:
|
|
160
|
+
|
|
161
|
+
- Promise<void>
|
|
162
|
+
|
|
163
|
+
## Provider Discovery
|
|
56
164
|
|
|
57
165
|
### getClientAuthenticatorProviders()
|
|
58
166
|
### getFormActionProviders()
|
|
59
167
|
### getAuthenticatorProviders()
|
|
60
168
|
### getFormProviders()
|
|
61
|
-
- **Params**: none
|
|
62
|
-
- **Returns**: Promise<Array<object>>
|
|
63
169
|
|
|
64
|
-
|
|
170
|
+
List available provider metadata for the requested category.
|
|
171
|
+
|
|
172
|
+
Parameters:
|
|
173
|
+
|
|
174
|
+
- none
|
|
175
|
+
|
|
176
|
+
Returns:
|
|
177
|
+
|
|
178
|
+
- Promise<Array<object>>
|
|
179
|
+
|
|
180
|
+
## Authentication Flows
|
|
65
181
|
|
|
66
182
|
### getFlows()
|
|
67
|
-
|
|
183
|
+
|
|
184
|
+
List authentication flows.
|
|
185
|
+
|
|
186
|
+
Returns:
|
|
187
|
+
|
|
188
|
+
- Promise<Array<object>>
|
|
68
189
|
|
|
69
190
|
### createFlow(flowRepresentation)
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
191
|
+
|
|
192
|
+
Create flow.
|
|
193
|
+
|
|
194
|
+
Parameters:
|
|
195
|
+
|
|
196
|
+
- flowRepresentation (object, required)
|
|
197
|
+
- alias (string, required)
|
|
198
|
+
- providerId (string, required), example basic-flow
|
|
199
|
+
- topLevel (boolean, required)
|
|
200
|
+
- builtIn (boolean, required)
|
|
201
|
+
- description (string, optional)
|
|
202
|
+
|
|
203
|
+
Returns:
|
|
204
|
+
|
|
205
|
+
- Promise<void>
|
|
73
206
|
|
|
74
207
|
### updateFlow(filter, flowRepresentation)
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
208
|
+
|
|
209
|
+
Update existing flow.
|
|
210
|
+
|
|
211
|
+
Parameters:
|
|
212
|
+
|
|
213
|
+
- filter (object, required):
|
|
214
|
+
- flowId (string, required): flow id used by endpoint.
|
|
215
|
+
- flowRepresentation (object, required)
|
|
216
|
+
|
|
217
|
+
Returns:
|
|
218
|
+
|
|
219
|
+
- Promise<void>
|
|
78
220
|
|
|
79
221
|
### deleteFlow(filter)
|
|
80
|
-
|
|
81
|
-
|
|
222
|
+
|
|
223
|
+
Delete flow.
|
|
224
|
+
|
|
225
|
+
Parameters:
|
|
226
|
+
|
|
227
|
+
- filter (object, required)
|
|
228
|
+
- flowId (string, required): flow alias/id used by endpoint.
|
|
229
|
+
|
|
230
|
+
Returns:
|
|
231
|
+
|
|
232
|
+
- Promise<void>
|
|
82
233
|
|
|
83
234
|
### copyFlow(filter)
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
235
|
+
|
|
236
|
+
Copy existing flow.
|
|
237
|
+
|
|
238
|
+
Parameters:
|
|
239
|
+
|
|
240
|
+
- filter (object, required)
|
|
241
|
+
- flow (string, required): source flow alias.
|
|
242
|
+
- newName (string, required): alias for the copied flow.
|
|
243
|
+
|
|
244
|
+
Returns:
|
|
245
|
+
|
|
246
|
+
- Promise<void>
|
|
87
247
|
|
|
88
248
|
### getFlow(filter)
|
|
89
|
-
- **Required**: flow identifier
|
|
90
|
-
- **Returns**: Promise<object>
|
|
91
249
|
|
|
92
|
-
|
|
250
|
+
Read one flow.
|
|
251
|
+
|
|
252
|
+
Parameters:
|
|
253
|
+
|
|
254
|
+
- filter (object, required)
|
|
255
|
+
- flowId (string, required)
|
|
256
|
+
|
|
257
|
+
Returns:
|
|
258
|
+
|
|
259
|
+
- Promise<object>
|
|
260
|
+
|
|
261
|
+
## Flow Executions
|
|
93
262
|
|
|
94
263
|
### getExecutions(filter)
|
|
95
|
-
|
|
96
|
-
|
|
264
|
+
|
|
265
|
+
List executions of a flow.
|
|
266
|
+
|
|
267
|
+
Parameters:
|
|
268
|
+
|
|
269
|
+
- filter (object, required)
|
|
270
|
+
- flow (string, required): flow alias.
|
|
271
|
+
|
|
272
|
+
Returns:
|
|
273
|
+
|
|
274
|
+
- Promise<Array<object>>
|
|
97
275
|
|
|
98
276
|
### addExecutionToFlow(filter)
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
277
|
+
|
|
278
|
+
Add execution to a flow.
|
|
279
|
+
|
|
280
|
+
Parameters:
|
|
281
|
+
|
|
282
|
+
- filter (object, required)
|
|
283
|
+
- flow (string, required): flow alias.
|
|
284
|
+
- provider (string, required): provider id to add.
|
|
285
|
+
|
|
286
|
+
Returns:
|
|
287
|
+
|
|
288
|
+
- Promise<void>
|
|
102
289
|
|
|
103
290
|
### addFlowToFlow(filter)
|
|
104
|
-
|
|
105
|
-
-
|
|
106
|
-
|
|
291
|
+
|
|
292
|
+
Add sub-flow to a parent flow.
|
|
293
|
+
|
|
294
|
+
Parameters:
|
|
295
|
+
|
|
296
|
+
- filter (object, required)
|
|
297
|
+
- flow (string, required): parent flow alias.
|
|
298
|
+
- alias (string, required): sub-flow alias.
|
|
299
|
+
- type (string, required): flow type.
|
|
300
|
+
- provider (string, required): provider id.
|
|
301
|
+
- description (string, optional)
|
|
302
|
+
|
|
303
|
+
Returns:
|
|
304
|
+
|
|
305
|
+
- Promise<void>
|
|
107
306
|
|
|
108
307
|
### updateExecution(filter, executionRepresentation)
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
308
|
+
|
|
309
|
+
Update execution settings.
|
|
310
|
+
|
|
311
|
+
Parameters:
|
|
312
|
+
|
|
313
|
+
- filter (object, optional): realm-level routing context.
|
|
314
|
+
- executionRepresentation (object, required): execution payload including id and fields like requirement/priority.
|
|
315
|
+
|
|
316
|
+
Returns:
|
|
317
|
+
|
|
318
|
+
- Promise<void>
|
|
112
319
|
|
|
113
320
|
### delExecution(filter)
|
|
114
|
-
|
|
115
|
-
|
|
321
|
+
|
|
322
|
+
Delete execution.
|
|
323
|
+
|
|
324
|
+
Parameters:
|
|
325
|
+
|
|
326
|
+
- filter (object, required)
|
|
327
|
+
- id (string, required): execution id.
|
|
328
|
+
|
|
329
|
+
Returns:
|
|
330
|
+
|
|
331
|
+
- Promise<void>
|
|
116
332
|
|
|
117
333
|
### raisePriorityExecution(filter)
|
|
118
334
|
### lowerPriorityExecution(filter)
|
|
119
|
-
- **Required**: execution reference fields
|
|
120
|
-
- **Returns**: Promise<void>
|
|
121
335
|
|
|
122
|
-
|
|
336
|
+
Change execution order.
|
|
337
|
+
|
|
338
|
+
Parameters:
|
|
339
|
+
|
|
340
|
+
- filter (object, required)
|
|
341
|
+
- id (string, required): execution id.
|
|
342
|
+
|
|
343
|
+
Returns:
|
|
344
|
+
|
|
345
|
+
- Promise<void>
|
|
346
|
+
|
|
347
|
+
## Execution Config
|
|
123
348
|
|
|
124
349
|
### createConfig(filter)
|
|
125
|
-
|
|
126
|
-
|
|
350
|
+
|
|
351
|
+
Create execution config.
|
|
352
|
+
|
|
353
|
+
Parameters:
|
|
354
|
+
|
|
355
|
+
- filter (object, required)
|
|
356
|
+
- id (string, required): execution id.
|
|
357
|
+
- alias (string, required): config alias.
|
|
358
|
+
- config (object, optional): key/value map.
|
|
359
|
+
|
|
360
|
+
Returns:
|
|
361
|
+
|
|
362
|
+
- Promise<object>
|
|
127
363
|
|
|
128
364
|
### getConfig(filter)
|
|
129
|
-
|
|
130
|
-
|
|
365
|
+
|
|
366
|
+
Read one config by id.
|
|
367
|
+
|
|
368
|
+
Parameters:
|
|
369
|
+
|
|
370
|
+
- filter (object, required)
|
|
371
|
+
- id (string, required): config id.
|
|
372
|
+
|
|
373
|
+
Returns:
|
|
374
|
+
|
|
375
|
+
- Promise<object>
|
|
131
376
|
|
|
132
377
|
### updateConfig(filter)
|
|
133
|
-
|
|
134
|
-
|
|
378
|
+
|
|
379
|
+
Update one config.
|
|
380
|
+
|
|
381
|
+
Parameters:
|
|
382
|
+
|
|
383
|
+
- filter (object, required)
|
|
384
|
+
- id (string, required): config id.
|
|
385
|
+
- config (object, required): key/value map.
|
|
386
|
+
|
|
387
|
+
Returns:
|
|
388
|
+
|
|
389
|
+
- Promise<void>
|
|
135
390
|
|
|
136
391
|
### delConfig(filter)
|
|
137
|
-
|
|
138
|
-
|
|
392
|
+
|
|
393
|
+
Delete one config.
|
|
394
|
+
|
|
395
|
+
Parameters:
|
|
396
|
+
|
|
397
|
+
- filter (object, required)
|
|
398
|
+
- id (string, required): config id.
|
|
399
|
+
|
|
400
|
+
Returns:
|
|
401
|
+
|
|
402
|
+
- Promise<void>
|
|
139
403
|
|
|
140
404
|
### getConfigDescription(filter)
|
|
141
|
-
|
|
142
|
-
|
|
405
|
+
|
|
406
|
+
Get config schema description for a provider.
|
|
407
|
+
|
|
408
|
+
Parameters:
|
|
409
|
+
|
|
410
|
+
- filter (object, required)
|
|
411
|
+
- providerId (string, required)
|
|
412
|
+
|
|
413
|
+
Returns:
|
|
414
|
+
|
|
415
|
+
- Promise<object>
|
|
143
416
|
|
|
144
417
|
## Example
|
|
145
418
|
|
|
@@ -153,6 +426,19 @@ await KeycloakManager.authenticationManagement.createFlow({
|
|
|
153
426
|
topLevel: true,
|
|
154
427
|
builtIn: false
|
|
155
428
|
});
|
|
429
|
+
|
|
430
|
+
await KeycloakManager.authenticationManagement.copyFlow({
|
|
431
|
+
flow: customFlowAlias,
|
|
432
|
+
newName: copiedFlowAlias,
|
|
433
|
+
});
|
|
434
|
+
|
|
435
|
+
const executions = await KeycloakManager.authenticationManagement.getExecutions({
|
|
436
|
+
flow: copiedFlowAlias,
|
|
437
|
+
});
|
|
438
|
+
|
|
439
|
+
if (executions[0]?.id) {
|
|
440
|
+
await KeycloakManager.authenticationManagement.raisePriorityExecution({ id: executions[0].id });
|
|
441
|
+
}
|
|
156
442
|
```
|
|
157
443
|
|
|
158
444
|
## See Also
|
|
@@ -2,36 +2,102 @@
|
|
|
2
2
|
|
|
3
3
|
Manage Client Policies and Client Profiles.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
Namespace: KeycloakManager.clientPolicies
|
|
6
|
+
|
|
7
|
+
Required Feature Flag: client-policies
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Client Policies let you enforce security requirements on clients (for example PKCE, redirect URI rules, access type restrictions).
|
|
12
|
+
Client Profiles define reusable executor configurations that policies can reference.
|
|
13
|
+
|
|
14
|
+
This handler exposes both read and update operations.
|
|
15
|
+
|
|
16
|
+
Note: update endpoints are called through direct REST requests for compatibility across admin-client versions.
|
|
7
17
|
|
|
8
18
|
## Methods
|
|
9
19
|
|
|
10
20
|
### getPolicies(filter)
|
|
11
|
-
Get current client policies configuration.
|
|
12
21
|
|
|
13
|
-
|
|
14
|
-
|
|
22
|
+
Get current client-policies configuration.
|
|
23
|
+
|
|
24
|
+
Parameters:
|
|
25
|
+
|
|
26
|
+
- filter (object, optional):
|
|
27
|
+
- realm (string, optional): override target realm.
|
|
28
|
+
|
|
29
|
+
Returns:
|
|
30
|
+
|
|
31
|
+
- Promise<object>: configuration payload with policies and global settings.
|
|
15
32
|
|
|
16
33
|
### updatePolicies(filter, policiesRepresentation)
|
|
17
|
-
Update client policies.
|
|
18
34
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
35
|
+
Update client policies configuration.
|
|
36
|
+
|
|
37
|
+
Parameters:
|
|
38
|
+
|
|
39
|
+
- filter (object, optional):
|
|
40
|
+
- realm (string, optional): override target realm.
|
|
41
|
+
- policiesRepresentation (object, required): payload to persist.
|
|
42
|
+
|
|
43
|
+
Typical fields in policiesRepresentation:
|
|
44
|
+
|
|
45
|
+
- policies (array): list of policy definitions.
|
|
46
|
+
- globalPolicies (array, optional): global policy names.
|
|
47
|
+
|
|
48
|
+
Typical fields per policy item:
|
|
49
|
+
|
|
50
|
+
- name (string, required): policy identifier.
|
|
51
|
+
- description (string, optional): human-readable description.
|
|
52
|
+
- enabled (boolean, optional): active/inactive state.
|
|
53
|
+
- conditions (array, optional): list of match conditions.
|
|
54
|
+
- profiles (array, optional): profile names applied when conditions match.
|
|
55
|
+
|
|
56
|
+
Returns:
|
|
57
|
+
|
|
58
|
+
- Promise<void|object>: usually no content (204), or response payload if provided by server.
|
|
22
59
|
|
|
23
60
|
### getProfiles(filter)
|
|
24
|
-
Get current client profiles configuration.
|
|
25
61
|
|
|
26
|
-
|
|
27
|
-
|
|
62
|
+
Get current client-profiles configuration.
|
|
63
|
+
|
|
64
|
+
Parameters:
|
|
65
|
+
|
|
66
|
+
- filter (object, optional):
|
|
67
|
+
- realm (string, optional): override target realm.
|
|
68
|
+
|
|
69
|
+
Returns:
|
|
70
|
+
|
|
71
|
+
- Promise<object>: configuration payload with profiles.
|
|
28
72
|
|
|
29
73
|
### updateProfiles(filter, profilesRepresentation)
|
|
30
|
-
Update client profiles.
|
|
31
74
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
75
|
+
Update client profiles configuration.
|
|
76
|
+
|
|
77
|
+
Parameters:
|
|
78
|
+
|
|
79
|
+
- filter (object, optional):
|
|
80
|
+
- realm (string, optional): override target realm.
|
|
81
|
+
- profilesRepresentation (object, required): payload to persist.
|
|
82
|
+
|
|
83
|
+
Typical fields in profilesRepresentation:
|
|
84
|
+
|
|
85
|
+
- profiles (array): list of profile definitions.
|
|
86
|
+
|
|
87
|
+
Typical fields per profile item:
|
|
88
|
+
|
|
89
|
+
- name (string, required): profile identifier.
|
|
90
|
+
- description (string, optional)
|
|
91
|
+
- executors (array, optional): executor list.
|
|
92
|
+
|
|
93
|
+
Typical fields per executor item:
|
|
94
|
+
|
|
95
|
+
- executor (string, required): executor type.
|
|
96
|
+
- configuration (object, optional): executor config map.
|
|
97
|
+
|
|
98
|
+
Returns:
|
|
99
|
+
|
|
100
|
+
- Promise<void|object>: usually no content (204), or response payload if provided by server.
|
|
35
101
|
|
|
36
102
|
## Feature Enablement
|
|
37
103
|
|
|
@@ -59,6 +125,27 @@ await KeycloakManager.clientPolicies.updatePolicies({}, {
|
|
|
59
125
|
}
|
|
60
126
|
]
|
|
61
127
|
});
|
|
128
|
+
|
|
129
|
+
const profiles = await KeycloakManager.clientPolicies.getProfiles();
|
|
130
|
+
|
|
131
|
+
await KeycloakManager.clientPolicies.updateProfiles({}, {
|
|
132
|
+
...profiles,
|
|
133
|
+
profiles: [
|
|
134
|
+
...(profiles.profiles || []),
|
|
135
|
+
{
|
|
136
|
+
name: 'pkce-profile',
|
|
137
|
+
description: 'Profile with PKCE related executors',
|
|
138
|
+
executors: [
|
|
139
|
+
{
|
|
140
|
+
executor: 'pkce-enforcer',
|
|
141
|
+
configuration: {
|
|
142
|
+
'pkce-enforcer.enforce.client': 'true'
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
});
|
|
62
149
|
```
|
|
63
150
|
|
|
64
151
|
## See Also
|