tapis-sk 0.3.0

The Tapis Security API provides for management of Security Kernel (SK) role-based authorization and secrets resources.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
# \UserApi

All URIs are relative to *http://localhost:8080*

Method | HTTP request | Description
------------- | ------------- | -------------
[**get_admins**](UserApi.md#get_admins) | **GET** /security/user/admins/{tenant} | 
[**get_default_user_role1**](UserApi.md#get_default_user_role1) | **GET** /security/user/defaultRole/{user} | 
[**get_user_names**](UserApi.md#get_user_names) | **GET** /security/user | 
[**get_user_perms**](UserApi.md#get_user_perms) | **GET** /security/user/perms/{user} | 
[**get_user_roles**](UserApi.md#get_user_roles) | **GET** /security/user/roles/{user} | 
[**get_users_with_permission**](UserApi.md#get_users_with_permission) | **GET** /security/user/withPermission/{permSpec} | 
[**get_users_with_role**](UserApi.md#get_users_with_role) | **GET** /security/user/withRole/{roleName} | 
[**grant_role**](UserApi.md#grant_role) | **POST** /security/user/grantRole | 
[**grant_role_with_permission**](UserApi.md#grant_role_with_permission) | **POST** /security/user/grantRoleWithPerm | 
[**grant_user_permission**](UserApi.md#grant_user_permission) | **POST** /security/user/grantUserPermission | 
[**has_role**](UserApi.md#has_role) | **POST** /security/user/hasRole | 
[**has_role_all**](UserApi.md#has_role_all) | **POST** /security/user/hasRoleAll | 
[**has_role_any**](UserApi.md#has_role_any) | **POST** /security/user/hasRoleAny | 
[**is_admin**](UserApi.md#is_admin) | **POST** /security/user/isAdmin | 
[**is_permitted**](UserApi.md#is_permitted) | **POST** /security/user/isPermitted | 
[**is_permitted_all**](UserApi.md#is_permitted_all) | **POST** /security/user/isPermittedAll | 
[**is_permitted_any**](UserApi.md#is_permitted_any) | **POST** /security/user/isPermittedAny | 
[**revoke_role**](UserApi.md#revoke_role) | **POST** /security/user/revokeRole | 
[**revoke_user_permission**](UserApi.md#revoke_user_permission) | **POST** /security/user/revokeUserPermission | 



## get_admins

> models::RespNameArray get_admins(tenant)


Get all users assigned the tenant administrator role ($!tenant_admin).  This request is authorized if the requestor is a service or a user that has access to the specified tenant. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**tenant** | **String** |  | [required] |

### Return type

[**models::RespNameArray**](RespNameArray.md)

### Authorization

[TapisJWT](../README.md#TapisJWT)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_default_user_role1

> models::RespName get_default_user_role1(user)


Get a user's default role. The default role is implicitly created by the system when needed if it doesn't already exist. No authorization required.  A user's default role is constructed by prepending '$$' to the user's name. This implies the maximum length of a user name is 58 since role names are limited to 60 characters. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**user** | **String** |  | [required] |

### Return type

[**models::RespName**](RespName.md)

### Authorization

[TapisJWT](../README.md#TapisJWT)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_user_names

> models::RespNameArray get_user_names(tenant)


Get the names of all users in the tenant that have been granted a role or permission.  This request is authorized if the requestor is a service or a user that has access to the specified tenant. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**tenant** | Option<**String**> |  |  |

### Return type

[**models::RespNameArray**](RespNameArray.md)

### Authorization

[TapisJWT](../README.md#TapisJWT)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_user_perms

> models::RespNameArray get_user_perms(user, tenant, implies, implied_by)


Get the permissions assigned to a user in a tenant, including those assigned transively. The result list can be optionally filtered by the one or both of the query parameters: implies and impliedBy.  When implies is set, the filter _implies_ each entry in the result set. When impliedBy is set, each entry in the result set is _implied by_ the filter. Below are some examples.  Consider a user that is assigned these permissions:      stream:dev:read:project1     stream:dev:read,write:project1     stream:dev:read,write,exec:project1  **Using the *implies* Query Parameter**  When _implies=stream:dev:*:project1_, this endpoint returns:      stream:dev:read:project1     stream:dev:read,write:project1     stream:dev:read,write,exec:project1  When _implies=stream:dev:write:project1_, this endpoint returns an empty list.  **Using the *impliedBy* Query Parameter**  When _impliedBy=stream:dev:*:project1_, this endpoint returns an empty list.  When _impliedBy=stream:dev:write:project1_, this endpoint returns:      stream:dev:read,write:project1     stream:dev:read,write,exec:project1  This request is authorized if the requestor is a service or a user that has access to the specified tenant. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**user** | **String** |  | [required] |
**tenant** | Option<**String**> |  |  |
**implies** | Option<**String**> |  |  |[default to ]
**implied_by** | Option<**String**> |  |  |[default to ]

### Return type

[**models::RespNameArray**](RespNameArray.md)

### Authorization

[TapisJWT](../README.md#TapisJWT)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_user_roles

> models::RespNameArray get_user_roles(user, tenant)


Get the roles assigned to a user in the specified tenant, including those assigned transively.  This request is authorized if the requestor is a service or a user that has access to the specified tenant. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**user** | **String** |  | [required] |
**tenant** | Option<**String**> |  |  |

### Return type

[**models::RespNameArray**](RespNameArray.md)

### Authorization

[TapisJWT](../README.md#TapisJWT)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_users_with_permission

> models::RespNameArray get_users_with_permission(perm_spec, tenant)


Get all users in a tenant assigned a permission. The permSpec parameter is a permission specification that uses colons as separators, the asterisk as a wildcard character and commas to define lists. Here are examples of permission specifications:      system:mytenant:read:mysystem     system:mytenant:*:mysystem     system:mytenant     files:mytenant:read,write:mysystems This method recognizes the percent sign (%) as a string wildcard only in the context of database searching. If a percent sign (%) appears in the permSpec it is interpreted as a zero or more character wildcard. For example, the following specification would match the first three of the above example specifications but not the fourth:      system:mytenant:%  The wildcard character cannot appear as the first character in the permSpec.  This request is authorized if the requestor is a service or a user that has access to the specified tenant. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**perm_spec** | **String** |  | [required] |
**tenant** | Option<**String**> |  |  |

### Return type

[**models::RespNameArray**](RespNameArray.md)

### Authorization

[TapisJWT](../README.md#TapisJWT)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_users_with_role

> models::RespNameArray get_users_with_role(role_name, tenant, role_type)


Get all users assigned a role. The role must exist in the tenant.  This request is authorized if the requestor is a service or a user that has access to the specified tenant. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**role_name** | **String** |  | [required] |
**tenant** | Option<**String**> |  |  |
**role_type** | Option<[**RoleTypeEnum**](.md)> |  |  |

### Return type

[**models::RespNameArray**](RespNameArray.md)

### Authorization

[TapisJWT](../README.md#TapisJWT)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## grant_role

> models::RespChangeCount grant_role(req_grant_role)


Grant a user the specified role. A valid tenant and user must be specified in the request body. The type of role to grant may be specified in the request body. Allowed types are USER, TENANT_ADMIN and RESTRICTED_SVC. Default type is USER.  The user and the role must be in the same tenant.  For roles of type USER the request is authorized only if the requestor is the role owner, a tenant administrator or a site administrator. For roles of type TENANT_ADMIN the requestor must a tenant or site administrator. For roles of type RESTRICTED_SVC the requestor must a site administrator. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**req_grant_role** | [**ReqGrantRole**](ReqGrantRole.md) |  | [required] |

### Return type

[**models::RespChangeCount**](RespChangeCount.md)

### Authorization

[TapisJWT](../README.md#TapisJWT)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## grant_role_with_permission

> models::RespChangeCount grant_role_with_permission(req_grant_role_with_permission)


Grant a user the specified role containing the specified permission. This compound request first adds the permission to the role if it is not already a member of the role and then assigns the role to the user. The change count returned can range from zero to two depending on how many insertions were actually required.  The user and the role must be in the same tenant.  For roles of type USER the request is authorized only if the requestor is the role owner, a tenant administrator or a site administrator. For roles of type TENANT_ADMIN the requestor must a tenant or site administrator. For roles of type RESTRICTED_SVC the requestor must a site administrator. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**req_grant_role_with_permission** | [**ReqGrantRoleWithPermission**](ReqGrantRoleWithPermission.md) |  | [required] |

### Return type

[**models::RespChangeCount**](RespChangeCount.md)

### Authorization

[TapisJWT](../README.md#TapisJWT)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## grant_user_permission

> models::RespChangeCount grant_user_permission(req_grant_user_permission)


Grant a user the specified permission by assigning that permission to to the user's default role. If the user's default role does not exist it will be created.  A user's default role name is discoverable by calling either of the user/defaultRole or role/defaultRole endpoints.  The change count returned can range from zero to three depending on how many insertions and updates were actually required.  The caller must be an administrator or service allowed to perform updates in the user's tenant. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**req_grant_user_permission** | [**ReqGrantUserPermission**](ReqGrantUserPermission.md) |  | [required] |

### Return type

[**models::RespChangeCount**](RespChangeCount.md)

### Authorization

[TapisJWT](../README.md#TapisJWT)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## has_role

> models::RespAuthorized has_role(req_user_has_role)


Check whether a user in a tenant has been assigned the specified role, either directly or transitively.  This request is authorized if the requestor is a service or a user that has access to the specified tenant. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**req_user_has_role** | [**ReqUserHasRole**](ReqUserHasRole.md) |  | [required] |

### Return type

[**models::RespAuthorized**](RespAuthorized.md)

### Authorization

[TapisJWT](../README.md#TapisJWT)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## has_role_all

> models::RespAuthorized has_role_all(req_user_has_role_multi)


Check whether a user in a tenant has been assigned all of the roles specified in the request body.  This request is authorized if the requestor is a service or a user that has access to the specified tenant. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**req_user_has_role_multi** | [**ReqUserHasRoleMulti**](ReqUserHasRoleMulti.md) |  | [required] |

### Return type

[**models::RespAuthorized**](RespAuthorized.md)

### Authorization

[TapisJWT](../README.md#TapisJWT)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## has_role_any

> models::RespAuthorized has_role_any(req_user_has_role_multi)


Check whether a user in a tenant has been assigned any of the roles specified in the request body.  This request is authorized if the requestor is a service or a user that has access to the specified tenant. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**req_user_has_role_multi** | [**ReqUserHasRoleMulti**](ReqUserHasRoleMulti.md) |  | [required] |

### Return type

[**models::RespAuthorized**](RespAuthorized.md)

### Authorization

[TapisJWT](../README.md#TapisJWT)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## is_admin

> models::RespAuthorized is_admin(req_user_is_admin)


Check whether a user in a tenant has been assigned the tenant administrator role, either directly or transitively.  This request is authorized if the requestor is a service or a user that has access to the specified tenant. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**req_user_is_admin** | [**ReqUserIsAdmin**](ReqUserIsAdmin.md) |  | [required] |

### Return type

[**models::RespAuthorized**](RespAuthorized.md)

### Authorization

[TapisJWT](../README.md#TapisJWT)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## is_permitted

> models::RespAuthorized is_permitted(req_user_is_permitted)


Check whether specified permission matches a permission assigned to the user, either directly or transitively.  This request is authorized if the requestor is a service or a user that has access to the specified tenant. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**req_user_is_permitted** | [**ReqUserIsPermitted**](ReqUserIsPermitted.md) |  | [required] |

### Return type

[**models::RespAuthorized**](RespAuthorized.md)

### Authorization

[TapisJWT](../README.md#TapisJWT)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## is_permitted_all

> models::RespAuthorized is_permitted_all(req_user_is_permitted_multi)


Check whether a user's permissions satisfy all of the permission specifications contained in the request body.  This request is authorized if the requestor is a service or a user that has access to the specified tenant. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**req_user_is_permitted_multi** | [**ReqUserIsPermittedMulti**](ReqUserIsPermittedMulti.md) |  | [required] |

### Return type

[**models::RespAuthorized**](RespAuthorized.md)

### Authorization

[TapisJWT](../README.md#TapisJWT)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## is_permitted_any

> models::RespAuthorized is_permitted_any(req_user_is_permitted_multi)


Check whether a user's permissions satisfy any of the permission specifications contained in the request body.  This request is authorized if the requestor is a service or a user that has access to the specified tenant. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**req_user_is_permitted_multi** | [**ReqUserIsPermittedMulti**](ReqUserIsPermittedMulti.md) |  | [required] |

### Return type

[**models::RespAuthorized**](RespAuthorized.md)

### Authorization

[TapisJWT](../README.md#TapisJWT)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## revoke_role

> models::RespChangeCount revoke_role(req_revoke_role)


Revoke a previously granted role from a user. No action is taken if the user is not currently assigned the role. This request is idempotent.  The type of role to grant may be specified in the request body. Allowed types are USER, TENANT_ADMIN and RESTRICTED_SVC. Default type is USER.  The user and the role must be in the same tenant.  For roles of type USER the request is authorized only if the requestor is the role owner, a tenant administrator or a site administrator. For roles of type TENANT_ADMIN the requestor must a tenant or site administrator. For roles of type RESTRICTED_SVC the requestor must a site administrator. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**req_revoke_role** | [**ReqRevokeRole**](ReqRevokeRole.md) |  | [required] |

### Return type

[**models::RespChangeCount**](RespChangeCount.md)

### Authorization

[TapisJWT](../README.md#TapisJWT)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## revoke_user_permission

> models::RespChangeCount revoke_user_permission(req_revoke_user_permission)


Revoke the specified permission from the user's default role. A user's default role is constructed by prepending '$$' to the user's name. Default roles are created on demand. If the role does not exist when this method is called no error is reported and no changes occur.  The change count returned can be zero or one depending on how many permissions were revoked.  A valid tenant and user must be specified in the request body. The caller must be an administrator, a service or the user themselves. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**req_revoke_user_permission** | [**ReqRevokeUserPermission**](ReqRevokeUserPermission.md) |  | [required] |

### Return type

[**models::RespChangeCount**](RespChangeCount.md)

### Authorization

[TapisJWT](../README.md#TapisJWT)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)