@tapis/tapis-typescript-sk 0.0.2 → 0.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/.openapi-generator/FILES +16 -6
- package/.openapi-generator/VERSION +1 -1
- package/README.md +5 -4
- package/dist/apis/AdminApi.d.ts +26 -0
- package/dist/apis/AdminApi.js +128 -0
- package/dist/apis/GeneralApi.d.ts +25 -16
- package/dist/apis/GeneralApi.js +72 -23
- package/dist/apis/RoleApi.d.ts +99 -76
- package/dist/apis/RoleApi.js +540 -340
- package/dist/apis/ShareApi.d.ts +110 -0
- package/dist/apis/ShareApi.js +469 -0
- package/dist/apis/UserApi.d.ts +84 -126
- package/dist/apis/UserApi.js +467 -538
- package/dist/apis/VaultApi.d.ts +52 -49
- package/dist/apis/VaultApi.js +413 -341
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +20 -7
- package/dist/index.d.ts +2 -2
- package/dist/index.js +17 -6
- package/dist/models/Options.d.ts +8 -3
- package/dist/models/Options.js +23 -15
- package/dist/models/ReqAddChildRole.d.ts +11 -6
- package/dist/models/ReqAddChildRole.js +33 -19
- package/dist/models/ReqAddRolePermission.d.ts +18 -6
- package/dist/models/ReqAddRolePermission.js +36 -19
- package/dist/models/ReqCreateRole.d.ts +18 -6
- package/dist/models/ReqCreateRole.js +36 -19
- package/dist/models/ReqGrantRole.d.ts +51 -0
- package/dist/models/ReqGrantRole.js +62 -0
- package/dist/models/ReqGrantRoleWithPermission.d.ts +57 -0
- package/dist/models/ReqGrantRoleWithPermission.js +66 -0
- package/dist/models/ReqGrantUserPermission.d.ts +11 -6
- package/dist/models/ReqGrantUserPermission.js +33 -19
- package/dist/models/ReqPreviewPathPrefix.d.ts +19 -7
- package/dist/models/ReqPreviewPathPrefix.js +46 -27
- package/dist/models/ReqRemoveChildRole.d.ts +11 -6
- package/dist/models/ReqRemoveChildRole.js +33 -19
- package/dist/models/ReqRemovePermissionFromAllRoles.d.ts +38 -0
- package/dist/models/ReqRemovePermissionFromAllRoles.js +55 -0
- package/dist/models/ReqRemoveRolePermission.d.ts +18 -6
- package/dist/models/ReqRemoveRolePermission.js +36 -19
- package/dist/models/ReqReplacePathPrefix.d.ts +19 -7
- package/dist/models/ReqReplacePathPrefix.js +46 -27
- package/dist/models/ReqRevokeRole.d.ts +51 -0
- package/dist/models/ReqRevokeRole.js +62 -0
- package/dist/models/ReqRevokeUserPermission.d.ts +11 -6
- package/dist/models/ReqRevokeUserPermission.js +33 -19
- package/dist/models/ReqRolePermits.d.ts +45 -0
- package/dist/models/ReqRolePermits.js +60 -0
- package/dist/models/ReqShareResource.d.ts +68 -0
- package/dist/models/ReqShareResource.js +73 -0
- package/dist/models/ReqUpdateRoleDescription.d.ts +17 -5
- package/dist/models/ReqUpdateRoleDescription.js +32 -17
- package/dist/models/ReqUpdateRoleName.d.ts +17 -5
- package/dist/models/ReqUpdateRoleName.js +32 -17
- package/dist/models/ReqUpdateRoleOwner.d.ts +17 -5
- package/dist/models/ReqUpdateRoleOwner.js +34 -19
- package/dist/models/ReqUserHasRole.d.ts +18 -6
- package/dist/models/ReqUserHasRole.js +38 -21
- package/dist/models/ReqUserHasRoleMulti.d.ts +11 -6
- package/dist/models/ReqUserHasRoleMulti.js +35 -21
- package/dist/models/ReqUserIsAdmin.d.ts +10 -5
- package/dist/models/ReqUserIsAdmin.js +29 -17
- package/dist/models/ReqUserIsPermitted.d.ts +11 -6
- package/dist/models/ReqUserIsPermitted.js +35 -21
- package/dist/models/ReqUserIsPermittedMulti.d.ts +11 -6
- package/dist/models/ReqUserIsPermittedMulti.js +35 -21
- package/dist/models/ReqValidatePwd.d.ts +44 -0
- package/dist/models/ReqValidatePwd.js +59 -0
- package/dist/models/ReqVersions.d.ts +11 -6
- package/dist/models/ReqVersions.js +33 -19
- package/dist/models/ReqWriteSecret.d.ts +12 -7
- package/dist/models/ReqWriteSecret.js +36 -22
- package/dist/models/RespAuthorized.d.ts +27 -4
- package/dist/models/RespAuthorized.js +36 -22
- package/dist/models/RespBasic.d.ts +26 -3
- package/dist/models/RespBasic.js +35 -21
- package/dist/models/RespBoolean.d.ts +69 -0
- package/dist/models/RespBoolean.js +62 -0
- package/dist/models/RespChangeCount.d.ts +27 -4
- package/dist/models/RespChangeCount.js +36 -22
- package/dist/models/RespName.d.ts +27 -4
- package/dist/models/RespName.js +36 -22
- package/dist/models/RespNameArray.d.ts +27 -4
- package/dist/models/RespNameArray.js +36 -22
- package/dist/models/RespPathPrefixes.d.ts +27 -4
- package/dist/models/RespPathPrefixes.js +36 -22
- package/dist/models/RespProbe.d.ts +27 -4
- package/dist/models/RespProbe.js +36 -22
- package/dist/models/RespResourceUrl.d.ts +27 -4
- package/dist/models/RespResourceUrl.js +36 -22
- package/dist/models/RespRole.d.ts +27 -4
- package/dist/models/RespRole.js +36 -22
- package/dist/models/RespSecret.d.ts +27 -4
- package/dist/models/RespSecret.js +36 -22
- package/dist/models/RespSecretList.d.ts +27 -4
- package/dist/models/RespSecretList.js +36 -22
- package/dist/models/RespSecretMeta.d.ts +27 -4
- package/dist/models/RespSecretMeta.js +36 -22
- package/dist/models/RespSecretVersionMetadata.d.ts +27 -4
- package/dist/models/RespSecretVersionMetadata.js +36 -22
- package/dist/models/RespShare.d.ts +69 -0
- package/dist/models/RespShare.js +62 -0
- package/dist/models/RespShareList.d.ts +69 -0
- package/dist/models/RespShareList.js +62 -0
- package/dist/models/RespVersions.d.ts +26 -3
- package/dist/models/RespVersions.js +35 -21
- package/dist/models/ResultAuthorized.d.ts +8 -3
- package/dist/models/ResultAuthorized.js +23 -15
- package/dist/models/ResultBoolean.d.ts +32 -0
- package/dist/models/ResultBoolean.js +49 -0
- package/dist/models/ResultChangeCount.d.ts +8 -3
- package/dist/models/ResultChangeCount.js +23 -15
- package/dist/models/ResultName.d.ts +8 -3
- package/dist/models/ResultName.js +23 -15
- package/dist/models/ResultNameArray.d.ts +8 -3
- package/dist/models/ResultNameArray.js +23 -15
- package/dist/models/ResultResourceUrl.d.ts +8 -3
- package/dist/models/ResultResourceUrl.js +23 -15
- package/dist/models/RoleTypeEnum.d.ts +28 -0
- package/dist/models/RoleTypeEnum.js +54 -0
- package/dist/models/SkProbe.d.ts +8 -21
- package/dist/models/SkProbe.js +23 -21
- package/dist/models/SkRole.d.ts +19 -7
- package/dist/models/SkRole.js +48 -37
- package/dist/models/SkSecret.d.ts +9 -4
- package/dist/models/SkSecret.js +26 -18
- package/dist/models/SkSecretList.d.ts +8 -3
- package/dist/models/SkSecretList.js +25 -17
- package/dist/models/SkSecretMetadata.d.ts +8 -3
- package/dist/models/SkSecretMetadata.js +29 -21
- package/dist/models/SkSecretVersion.d.ts +8 -3
- package/dist/models/SkSecretVersion.js +29 -21
- package/dist/models/SkSecretVersionMetadata.d.ts +9 -4
- package/dist/models/SkSecretVersionMetadata.js +34 -26
- package/dist/models/SkShare.d.ts +92 -0
- package/dist/models/SkShare.js +69 -0
- package/dist/models/SkShareList.d.ts +33 -0
- package/dist/models/SkShareList.js +50 -0
- package/dist/models/Transformation.d.ts +8 -3
- package/dist/models/Transformation.js +27 -19
- package/dist/models/index.d.ts +14 -6
- package/dist/models/index.js +75 -56
- package/dist/runtime.d.ts +80 -38
- package/dist/runtime.js +313 -171
- package/package.json +6 -2
- package/src/apis/AdminApi.ts +63 -0
- package/src/apis/GeneralApi.ts +48 -24
- package/src/apis/RoleApi.ts +374 -220
- package/src/apis/ShareApi.ts +418 -0
- package/src/apis/UserApi.ts +258 -383
- package/src/apis/VaultApi.ts +347 -275
- package/src/apis/index.ts +2 -0
- package/src/index.ts +2 -2
- package/src/models/Options.ts +21 -12
- package/src/models/ReqAddChildRole.ts +31 -19
- package/src/models/ReqAddRolePermission.ts +49 -19
- package/src/models/ReqCreateRole.ts +49 -19
- package/src/models/ReqGrantRole.ts +102 -0
- package/src/models/ReqGrantRoleWithPermission.ts +111 -0
- package/src/models/ReqGrantUserPermission.ts +31 -19
- package/src/models/ReqPreviewPathPrefix.ts +59 -28
- package/src/models/ReqRemoveChildRole.ts +31 -19
- package/src/models/ReqRemovePermissionFromAllRoles.ts +75 -0
- package/src/models/ReqRemoveRolePermission.ts +49 -19
- package/src/models/ReqReplacePathPrefix.ts +59 -28
- package/src/models/ReqRevokeRole.ts +102 -0
- package/src/models/ReqRevokeUserPermission.ts +31 -19
- package/src/models/ReqRolePermits.ts +94 -0
- package/src/models/ReqShareResource.ts +119 -0
- package/src/models/ReqUpdateRoleDescription.ts +45 -16
- package/src/models/ReqUpdateRoleName.ts +45 -16
- package/src/models/ReqUpdateRoleOwner.ts +47 -18
- package/src/models/ReqUserHasRole.ts +51 -21
- package/src/models/ReqUserHasRoleMulti.ts +33 -21
- package/src/models/ReqUserIsAdmin.ts +27 -16
- package/src/models/ReqUserIsPermitted.ts +33 -21
- package/src/models/ReqUserIsPermittedMulti.ts +33 -21
- package/src/models/ReqValidatePwd.ts +84 -0
- package/src/models/ReqVersions.ts +31 -19
- package/src/models/ReqWriteSecret.ts +36 -23
- package/src/models/RespAuthorized.ts +54 -20
- package/src/models/RespBasic.ts +51 -18
- package/src/models/RespBoolean.ts +121 -0
- package/src/models/RespChangeCount.ts +54 -20
- package/src/models/RespName.ts +54 -20
- package/src/models/RespNameArray.ts +54 -20
- package/src/models/RespPathPrefixes.ts +54 -20
- package/src/models/RespProbe.ts +54 -20
- package/src/models/RespResourceUrl.ts +54 -20
- package/src/models/RespRole.ts +54 -20
- package/src/models/RespSecret.ts +54 -20
- package/src/models/RespSecretList.ts +54 -20
- package/src/models/RespSecretMeta.ts +54 -20
- package/src/models/RespSecretVersionMetadata.ts +54 -20
- package/src/models/RespShare.ts +121 -0
- package/src/models/RespShareList.ts +121 -0
- package/src/models/RespVersions.ts +51 -18
- package/src/models/ResultAuthorized.ts +21 -12
- package/src/models/ResultBoolean.ts +65 -0
- package/src/models/ResultChangeCount.ts +21 -12
- package/src/models/ResultName.ts +21 -12
- package/src/models/ResultNameArray.ts +21 -12
- package/src/models/ResultResourceUrl.ts +21 -12
- package/src/models/RoleTypeEnum.ts +56 -0
- package/src/models/SkProbe.ts +21 -36
- package/src/models/SkRole.ts +65 -38
- package/src/models/SkSecret.ts +26 -16
- package/src/models/SkSecretList.ts +23 -14
- package/src/models/SkSecretMetadata.ts +27 -18
- package/src/models/SkSecretVersion.ts +27 -18
- package/src/models/SkSecretVersionMetadata.ts +34 -24
- package/src/models/SkShare.ts +145 -0
- package/src/models/SkShareList.ts +73 -0
- package/src/models/Transformation.ts +25 -16
- package/src/models/index.ts +14 -6
- package/src/runtime.ts +219 -108
- package/dist/models/ReqGrantAdminRole.d.ts +0 -33
- package/dist/models/ReqGrantAdminRole.js +0 -43
- package/dist/models/ReqGrantUserRole.d.ts +0 -39
- package/dist/models/ReqGrantUserRole.js +0 -45
- package/dist/models/ReqGrantUserRoleWithPermission.d.ts +0 -45
- package/dist/models/ReqGrantUserRoleWithPermission.js +0 -47
- package/dist/models/ReqRevokeAdminRole.d.ts +0 -33
- package/dist/models/ReqRevokeAdminRole.js +0 -43
- package/dist/models/ReqRevokeUserRole.d.ts +0 -39
- package/dist/models/ReqRevokeUserRole.js +0 -45
- package/dist/models/ReqValidateServicePwd.d.ts +0 -39
- package/dist/models/ReqValidateServicePwd.js +0 -45
- package/src/models/ReqGrantAdminRole.ts +0 -64
- package/src/models/ReqGrantUserRole.ts +0 -72
- package/src/models/ReqGrantUserRoleWithPermission.ts +0 -80
- package/src/models/ReqRevokeAdminRole.ts +0 -64
- package/src/models/ReqRevokeUserRole.ts +0 -72
- package/src/models/ReqValidateServicePwd.ts +0 -72
package/src/apis/VaultApi.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
4
|
* Tapis Security API
|
|
5
|
-
* The Tapis Security API provides
|
|
5
|
+
* The Tapis Security API provides for management of Security Kernel (SK) role-based authorization and secrets resources.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document:
|
|
7
|
+
* The version of the OpenAPI document: 1.8.2
|
|
8
8
|
* Contact: cicsupport@tacc.utexas.edu
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -14,44 +14,45 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
ReqValidatePwd,
|
|
19
|
+
ReqVersions,
|
|
20
|
+
ReqWriteSecret,
|
|
21
|
+
RespAuthorized,
|
|
22
|
+
RespBasic,
|
|
23
|
+
RespSecret,
|
|
24
|
+
RespSecretList,
|
|
25
|
+
RespSecretMeta,
|
|
26
|
+
RespSecretVersionMetadata,
|
|
27
|
+
RespVersions,
|
|
28
|
+
} from '../models/index';
|
|
17
29
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
ReqValidateServicePwdToJSON,
|
|
21
|
-
ReqVersions,
|
|
30
|
+
ReqValidatePwdFromJSON,
|
|
31
|
+
ReqValidatePwdToJSON,
|
|
22
32
|
ReqVersionsFromJSON,
|
|
23
33
|
ReqVersionsToJSON,
|
|
24
|
-
ReqWriteSecret,
|
|
25
34
|
ReqWriteSecretFromJSON,
|
|
26
35
|
ReqWriteSecretToJSON,
|
|
27
|
-
RespAuthorized,
|
|
28
36
|
RespAuthorizedFromJSON,
|
|
29
37
|
RespAuthorizedToJSON,
|
|
30
|
-
RespBasic,
|
|
31
38
|
RespBasicFromJSON,
|
|
32
39
|
RespBasicToJSON,
|
|
33
|
-
RespSecret,
|
|
34
40
|
RespSecretFromJSON,
|
|
35
41
|
RespSecretToJSON,
|
|
36
|
-
RespSecretList,
|
|
37
42
|
RespSecretListFromJSON,
|
|
38
43
|
RespSecretListToJSON,
|
|
39
|
-
RespSecretMeta,
|
|
40
44
|
RespSecretMetaFromJSON,
|
|
41
45
|
RespSecretMetaToJSON,
|
|
42
|
-
RespSecretVersionMetadata,
|
|
43
46
|
RespSecretVersionMetadataFromJSON,
|
|
44
47
|
RespSecretVersionMetadataToJSON,
|
|
45
|
-
RespVersions,
|
|
46
48
|
RespVersionsFromJSON,
|
|
47
49
|
RespVersionsToJSON,
|
|
48
|
-
} from '../models';
|
|
50
|
+
} from '../models/index';
|
|
49
51
|
|
|
50
52
|
export interface DeleteSecretRequest {
|
|
51
53
|
secretType: string;
|
|
52
54
|
secretName: string;
|
|
53
55
|
reqVersions: ReqVersions;
|
|
54
|
-
pretty?: boolean;
|
|
55
56
|
sysid?: string;
|
|
56
57
|
sysuser?: string;
|
|
57
58
|
keytype?: string;
|
|
@@ -64,7 +65,6 @@ export interface DestroySecretRequest {
|
|
|
64
65
|
secretType: string;
|
|
65
66
|
secretName: string;
|
|
66
67
|
reqVersions: ReqVersions;
|
|
67
|
-
pretty?: boolean;
|
|
68
68
|
sysid?: string;
|
|
69
69
|
sysuser?: string;
|
|
70
70
|
keytype?: string;
|
|
@@ -78,7 +78,6 @@ export interface DestroySecretMetaRequest {
|
|
|
78
78
|
secretName: string;
|
|
79
79
|
tenant?: string;
|
|
80
80
|
user?: string;
|
|
81
|
-
pretty?: boolean;
|
|
82
81
|
sysid?: string;
|
|
83
82
|
sysuser?: string;
|
|
84
83
|
keytype?: string;
|
|
@@ -91,7 +90,6 @@ export interface ListSecretMetaRequest {
|
|
|
91
90
|
secretType: string;
|
|
92
91
|
tenant?: string;
|
|
93
92
|
user?: string;
|
|
94
|
-
pretty?: boolean;
|
|
95
93
|
sysid?: string;
|
|
96
94
|
sysuser?: string;
|
|
97
95
|
keytype?: string;
|
|
@@ -106,7 +104,6 @@ export interface ReadSecretRequest {
|
|
|
106
104
|
tenant?: string;
|
|
107
105
|
user?: string;
|
|
108
106
|
version?: number;
|
|
109
|
-
pretty?: boolean;
|
|
110
107
|
sysid?: string;
|
|
111
108
|
sysuser?: string;
|
|
112
109
|
keytype?: string;
|
|
@@ -120,7 +117,6 @@ export interface ReadSecretMetaRequest {
|
|
|
120
117
|
secretName: string;
|
|
121
118
|
tenant?: string;
|
|
122
119
|
user?: string;
|
|
123
|
-
pretty?: boolean;
|
|
124
120
|
sysid?: string;
|
|
125
121
|
sysuser?: string;
|
|
126
122
|
keytype?: string;
|
|
@@ -133,7 +129,6 @@ export interface UndeleteSecretRequest {
|
|
|
133
129
|
secretType: string;
|
|
134
130
|
secretName: string;
|
|
135
131
|
reqVersions: ReqVersions;
|
|
136
|
-
pretty?: boolean;
|
|
137
132
|
sysid?: string;
|
|
138
133
|
sysuser?: string;
|
|
139
134
|
keytype?: string;
|
|
@@ -144,15 +139,18 @@ export interface UndeleteSecretRequest {
|
|
|
144
139
|
|
|
145
140
|
export interface ValidateServicePasswordRequest {
|
|
146
141
|
secretName: string;
|
|
147
|
-
|
|
148
|
-
|
|
142
|
+
reqValidatePwd: ReqValidatePwd;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export interface ValidateSiteAdminPasswordRequest {
|
|
146
|
+
secretName: string;
|
|
147
|
+
reqValidatePwd: ReqValidatePwd;
|
|
149
148
|
}
|
|
150
149
|
|
|
151
150
|
export interface WriteSecretRequest {
|
|
152
151
|
secretType: string;
|
|
153
152
|
secretName: string;
|
|
154
153
|
reqWriteSecret: ReqWriteSecret;
|
|
155
|
-
pretty?: boolean;
|
|
156
154
|
sysid?: string;
|
|
157
155
|
sysuser?: string;
|
|
158
156
|
keytype?: string;
|
|
@@ -167,49 +165,54 @@ export interface WriteSecretRequest {
|
|
|
167
165
|
export class VaultApi extends runtime.BaseAPI {
|
|
168
166
|
|
|
169
167
|
/**
|
|
170
|
-
* Soft delete one or more versions of a secret. Each version can be deleted individually or as part of a group specified in the input array. Deletion can be reversed using the *secret/undelete/{secretName}* endpoint, which make this a _soft_ deletion operation. The input versions array is interpreted as follows: * [-] - empty = delete all versions * [0] - zero = delete only the latest version * [1, 3, ...] - list = delete the specified versions A valid tenant and user must also be specified in the body. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*.
|
|
168
|
+
* Soft delete one or more versions of a secret. Each version can be deleted individually or as part of a group specified in the input array. Deletion can be reversed using the *secret/undelete/{secretName}* endpoint, which make this a _soft_ deletion operation. The input versions array is interpreted as follows: * [-] - empty = delete all versions * [0] - zero = delete only the latest version * [1, 3, ...] - list = delete the specified versions A valid tenant and user must also be specified in the body. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*. These characters will be converted to slashes upon receipt, allowing secrets to be arranged in folders. A secret is assigned a path name constructed from the *secretType* and *secretName* path parameters and, optionally, from query parameters determined by the *secretType*. Each *secretType* determines a specific transformation from the url path to a path in the vault. The *secretType* may require certain query parameters to be present on the request in order to construct the vault path. See the next section for details. ### Secret Types The list below documents each *secretType* and their applicable query parameters. Highlighted parameter names indicate required parameters. When present, default values are listed first and also highlighted. - **system** - *sysid*: the unique system id - *sysuser*: the accessing user (except when keytype=cert) - keytype: *sshkey* | password | accesskey | token | tmskey | cert - **dbcred** - *dbhost*: the DBMS hostname, IP address or alias - *dbname*: the database name or alias - *dbservice*: service name - **jwtsigning** - *no query parameters* - **user** - *no query parameters* - **service** - *no query parameters* ### Authorization Requestors are authorized based on the secret type specified in the URL path. The following authorizations are enforced: - system: limited to the systems service - dbcred: any service - jwtsigning: limited to the tokens service - user: any user - service: any service
|
|
171
169
|
*/
|
|
172
|
-
async deleteSecretRaw(requestParameters: DeleteSecretRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespVersions>> {
|
|
173
|
-
if (requestParameters
|
|
174
|
-
throw new runtime.RequiredError(
|
|
170
|
+
async deleteSecretRaw(requestParameters: DeleteSecretRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespVersions>> {
|
|
171
|
+
if (requestParameters['secretType'] == null) {
|
|
172
|
+
throw new runtime.RequiredError(
|
|
173
|
+
'secretType',
|
|
174
|
+
'Required parameter "secretType" was null or undefined when calling deleteSecret().'
|
|
175
|
+
);
|
|
175
176
|
}
|
|
176
177
|
|
|
177
|
-
if (requestParameters
|
|
178
|
-
throw new runtime.RequiredError(
|
|
178
|
+
if (requestParameters['secretName'] == null) {
|
|
179
|
+
throw new runtime.RequiredError(
|
|
180
|
+
'secretName',
|
|
181
|
+
'Required parameter "secretName" was null or undefined when calling deleteSecret().'
|
|
182
|
+
);
|
|
179
183
|
}
|
|
180
184
|
|
|
181
|
-
if (requestParameters
|
|
182
|
-
throw new runtime.RequiredError(
|
|
185
|
+
if (requestParameters['reqVersions'] == null) {
|
|
186
|
+
throw new runtime.RequiredError(
|
|
187
|
+
'reqVersions',
|
|
188
|
+
'Required parameter "reqVersions" was null or undefined when calling deleteSecret().'
|
|
189
|
+
);
|
|
183
190
|
}
|
|
184
191
|
|
|
185
192
|
const queryParameters: any = {};
|
|
186
193
|
|
|
187
|
-
if (requestParameters
|
|
188
|
-
queryParameters['
|
|
194
|
+
if (requestParameters['sysid'] != null) {
|
|
195
|
+
queryParameters['sysid'] = requestParameters['sysid'];
|
|
189
196
|
}
|
|
190
197
|
|
|
191
|
-
if (requestParameters
|
|
192
|
-
queryParameters['
|
|
198
|
+
if (requestParameters['sysuser'] != null) {
|
|
199
|
+
queryParameters['sysuser'] = requestParameters['sysuser'];
|
|
193
200
|
}
|
|
194
201
|
|
|
195
|
-
if (requestParameters
|
|
196
|
-
queryParameters['
|
|
202
|
+
if (requestParameters['keytype'] != null) {
|
|
203
|
+
queryParameters['keytype'] = requestParameters['keytype'];
|
|
197
204
|
}
|
|
198
205
|
|
|
199
|
-
if (requestParameters
|
|
200
|
-
queryParameters['
|
|
206
|
+
if (requestParameters['dbhost'] != null) {
|
|
207
|
+
queryParameters['dbhost'] = requestParameters['dbhost'];
|
|
201
208
|
}
|
|
202
209
|
|
|
203
|
-
if (requestParameters
|
|
204
|
-
queryParameters['
|
|
210
|
+
if (requestParameters['dbname'] != null) {
|
|
211
|
+
queryParameters['dbname'] = requestParameters['dbname'];
|
|
205
212
|
}
|
|
206
213
|
|
|
207
|
-
if (requestParameters
|
|
208
|
-
queryParameters['
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
if (requestParameters.dbservice !== undefined) {
|
|
212
|
-
queryParameters['dbservice'] = requestParameters.dbservice;
|
|
214
|
+
if (requestParameters['dbservice'] != null) {
|
|
215
|
+
queryParameters['dbservice'] = requestParameters['dbservice'];
|
|
213
216
|
}
|
|
214
217
|
|
|
215
218
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
@@ -217,72 +220,77 @@ export class VaultApi extends runtime.BaseAPI {
|
|
|
217
220
|
headerParameters['Content-Type'] = 'application/json';
|
|
218
221
|
|
|
219
222
|
if (this.configuration && this.configuration.apiKey) {
|
|
220
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
223
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
221
224
|
}
|
|
222
225
|
|
|
223
226
|
const response = await this.request({
|
|
224
|
-
path: `/security/vault/secret/delete/{secretType}/{secretName}`.replace(`{${"secretType"}}`, encodeURIComponent(String(requestParameters
|
|
227
|
+
path: `/security/vault/secret/delete/{secretType}/{secretName}`.replace(`{${"secretType"}}`, encodeURIComponent(String(requestParameters['secretType']))).replace(`{${"secretName"}}`, encodeURIComponent(String(requestParameters['secretName']))),
|
|
225
228
|
method: 'POST',
|
|
226
229
|
headers: headerParameters,
|
|
227
230
|
query: queryParameters,
|
|
228
|
-
body: ReqVersionsToJSON(requestParameters
|
|
231
|
+
body: ReqVersionsToJSON(requestParameters['reqVersions']),
|
|
229
232
|
}, initOverrides);
|
|
230
233
|
|
|
231
234
|
return new runtime.JSONApiResponse(response, (jsonValue) => RespVersionsFromJSON(jsonValue));
|
|
232
235
|
}
|
|
233
236
|
|
|
234
237
|
/**
|
|
235
|
-
* Soft delete one or more versions of a secret. Each version can be deleted individually or as part of a group specified in the input array. Deletion can be reversed using the *secret/undelete/{secretName}* endpoint, which make this a _soft_ deletion operation. The input versions array is interpreted as follows: * [-] - empty = delete all versions * [0] - zero = delete only the latest version * [1, 3, ...] - list = delete the specified versions A valid tenant and user must also be specified in the body. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*.
|
|
238
|
+
* Soft delete one or more versions of a secret. Each version can be deleted individually or as part of a group specified in the input array. Deletion can be reversed using the *secret/undelete/{secretName}* endpoint, which make this a _soft_ deletion operation. The input versions array is interpreted as follows: * [-] - empty = delete all versions * [0] - zero = delete only the latest version * [1, 3, ...] - list = delete the specified versions A valid tenant and user must also be specified in the body. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*. These characters will be converted to slashes upon receipt, allowing secrets to be arranged in folders. A secret is assigned a path name constructed from the *secretType* and *secretName* path parameters and, optionally, from query parameters determined by the *secretType*. Each *secretType* determines a specific transformation from the url path to a path in the vault. The *secretType* may require certain query parameters to be present on the request in order to construct the vault path. See the next section for details. ### Secret Types The list below documents each *secretType* and their applicable query parameters. Highlighted parameter names indicate required parameters. When present, default values are listed first and also highlighted. - **system** - *sysid*: the unique system id - *sysuser*: the accessing user (except when keytype=cert) - keytype: *sshkey* | password | accesskey | token | tmskey | cert - **dbcred** - *dbhost*: the DBMS hostname, IP address or alias - *dbname*: the database name or alias - *dbservice*: service name - **jwtsigning** - *no query parameters* - **user** - *no query parameters* - **service** - *no query parameters* ### Authorization Requestors are authorized based on the secret type specified in the URL path. The following authorizations are enforced: - system: limited to the systems service - dbcred: any service - jwtsigning: limited to the tokens service - user: any user - service: any service
|
|
236
239
|
*/
|
|
237
|
-
async deleteSecret(requestParameters: DeleteSecretRequest, initOverrides?: RequestInit): Promise<RespVersions> {
|
|
240
|
+
async deleteSecret(requestParameters: DeleteSecretRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespVersions> {
|
|
238
241
|
const response = await this.deleteSecretRaw(requestParameters, initOverrides);
|
|
239
242
|
return await response.value();
|
|
240
243
|
}
|
|
241
244
|
|
|
242
245
|
/**
|
|
243
|
-
* Destroy one or more versions of a secret. Destroy implements a hard delete which delete that cannot be undone. It does not, however, remove any metadata associated with the secret. The input versions array is interpreted as follows: * [-] - empty = destroy all versions * [0] - zero = destroy only the latest version * [1, 3, ...] - list = destroy the specified versions A valid tenant and user must be specified in the body. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*.
|
|
246
|
+
* Destroy one or more versions of a secret. Destroy implements a hard delete which delete that cannot be undone. It does not, however, remove any metadata associated with the secret. The input versions array is interpreted as follows: * [-] - empty = destroy all versions * [0] - zero = destroy only the latest version * [1, 3, ...] - list = destroy the specified versions A valid tenant and user must be specified in the body. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*. These characters will be converted to slashes upon receipt, allowing secrets to be arranged in folders. A secret is assigned a path name constructed from the *secretType* and *secretName* path parameters and, optionally, from query parameters determined by the *secretType*. Each *secretType* determines a specific transformation from the url path to a path in the vault. The *secretType* may require certain query parameters to be present on the request in order to construct the vault path. See the next section for details. ### Secret Types The list below documents each *secretType* and their applicable query parameters. Highlighted parameter names indicate required parameters. When present, default values are listed first and also highlighted. - **system** - *sysid*: the unique system id - *sysuser*: the accessing user (except when keytype=cert) - keytype: *sshkey* | password | accesskey | token | tmskey | cert - **dbcred** - *dbhost*: the DBMS hostname, IP address or alias - *dbname*: the database name or alias - *dbservice*: service name - **jwtsigning** - *no query parameters* - **user** - *no query parameters* - **service** - *no query parameters* ### Authorization Requestors are authorized based on the secret type specified in the URL path. The following authorizations are enforced: - system: limited to the systems service - dbcred: any service - jwtsigning: limited to the tokens service - user: any user - service: any service
|
|
244
247
|
*/
|
|
245
|
-
async destroySecretRaw(requestParameters: DestroySecretRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespVersions>> {
|
|
246
|
-
if (requestParameters
|
|
247
|
-
throw new runtime.RequiredError(
|
|
248
|
+
async destroySecretRaw(requestParameters: DestroySecretRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespVersions>> {
|
|
249
|
+
if (requestParameters['secretType'] == null) {
|
|
250
|
+
throw new runtime.RequiredError(
|
|
251
|
+
'secretType',
|
|
252
|
+
'Required parameter "secretType" was null or undefined when calling destroySecret().'
|
|
253
|
+
);
|
|
248
254
|
}
|
|
249
255
|
|
|
250
|
-
if (requestParameters
|
|
251
|
-
throw new runtime.RequiredError(
|
|
256
|
+
if (requestParameters['secretName'] == null) {
|
|
257
|
+
throw new runtime.RequiredError(
|
|
258
|
+
'secretName',
|
|
259
|
+
'Required parameter "secretName" was null or undefined when calling destroySecret().'
|
|
260
|
+
);
|
|
252
261
|
}
|
|
253
262
|
|
|
254
|
-
if (requestParameters
|
|
255
|
-
throw new runtime.RequiredError(
|
|
263
|
+
if (requestParameters['reqVersions'] == null) {
|
|
264
|
+
throw new runtime.RequiredError(
|
|
265
|
+
'reqVersions',
|
|
266
|
+
'Required parameter "reqVersions" was null or undefined when calling destroySecret().'
|
|
267
|
+
);
|
|
256
268
|
}
|
|
257
269
|
|
|
258
270
|
const queryParameters: any = {};
|
|
259
271
|
|
|
260
|
-
if (requestParameters
|
|
261
|
-
queryParameters['
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
if (requestParameters.sysid !== undefined) {
|
|
265
|
-
queryParameters['sysid'] = requestParameters.sysid;
|
|
272
|
+
if (requestParameters['sysid'] != null) {
|
|
273
|
+
queryParameters['sysid'] = requestParameters['sysid'];
|
|
266
274
|
}
|
|
267
275
|
|
|
268
|
-
if (requestParameters
|
|
269
|
-
queryParameters['sysuser'] = requestParameters
|
|
276
|
+
if (requestParameters['sysuser'] != null) {
|
|
277
|
+
queryParameters['sysuser'] = requestParameters['sysuser'];
|
|
270
278
|
}
|
|
271
279
|
|
|
272
|
-
if (requestParameters
|
|
273
|
-
queryParameters['keytype'] = requestParameters
|
|
280
|
+
if (requestParameters['keytype'] != null) {
|
|
281
|
+
queryParameters['keytype'] = requestParameters['keytype'];
|
|
274
282
|
}
|
|
275
283
|
|
|
276
|
-
if (requestParameters
|
|
277
|
-
queryParameters['dbhost'] = requestParameters
|
|
284
|
+
if (requestParameters['dbhost'] != null) {
|
|
285
|
+
queryParameters['dbhost'] = requestParameters['dbhost'];
|
|
278
286
|
}
|
|
279
287
|
|
|
280
|
-
if (requestParameters
|
|
281
|
-
queryParameters['dbname'] = requestParameters
|
|
288
|
+
if (requestParameters['dbname'] != null) {
|
|
289
|
+
queryParameters['dbname'] = requestParameters['dbname'];
|
|
282
290
|
}
|
|
283
291
|
|
|
284
|
-
if (requestParameters
|
|
285
|
-
queryParameters['dbservice'] = requestParameters
|
|
292
|
+
if (requestParameters['dbservice'] != null) {
|
|
293
|
+
queryParameters['dbservice'] = requestParameters['dbservice'];
|
|
286
294
|
}
|
|
287
295
|
|
|
288
296
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
@@ -290,86 +298,88 @@ export class VaultApi extends runtime.BaseAPI {
|
|
|
290
298
|
headerParameters['Content-Type'] = 'application/json';
|
|
291
299
|
|
|
292
300
|
if (this.configuration && this.configuration.apiKey) {
|
|
293
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
301
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
294
302
|
}
|
|
295
303
|
|
|
296
304
|
const response = await this.request({
|
|
297
|
-
path: `/security/vault/secret/destroy/{secretType}/{secretName}`.replace(`{${"secretType"}}`, encodeURIComponent(String(requestParameters
|
|
305
|
+
path: `/security/vault/secret/destroy/{secretType}/{secretName}`.replace(`{${"secretType"}}`, encodeURIComponent(String(requestParameters['secretType']))).replace(`{${"secretName"}}`, encodeURIComponent(String(requestParameters['secretName']))),
|
|
298
306
|
method: 'POST',
|
|
299
307
|
headers: headerParameters,
|
|
300
308
|
query: queryParameters,
|
|
301
|
-
body: ReqVersionsToJSON(requestParameters
|
|
309
|
+
body: ReqVersionsToJSON(requestParameters['reqVersions']),
|
|
302
310
|
}, initOverrides);
|
|
303
311
|
|
|
304
312
|
return new runtime.JSONApiResponse(response, (jsonValue) => RespVersionsFromJSON(jsonValue));
|
|
305
313
|
}
|
|
306
314
|
|
|
307
315
|
/**
|
|
308
|
-
* Destroy one or more versions of a secret. Destroy implements a hard delete which delete that cannot be undone. It does not, however, remove any metadata associated with the secret. The input versions array is interpreted as follows: * [-] - empty = destroy all versions * [0] - zero = destroy only the latest version * [1, 3, ...] - list = destroy the specified versions A valid tenant and user must be specified in the body. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*.
|
|
316
|
+
* Destroy one or more versions of a secret. Destroy implements a hard delete which delete that cannot be undone. It does not, however, remove any metadata associated with the secret. The input versions array is interpreted as follows: * [-] - empty = destroy all versions * [0] - zero = destroy only the latest version * [1, 3, ...] - list = destroy the specified versions A valid tenant and user must be specified in the body. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*. These characters will be converted to slashes upon receipt, allowing secrets to be arranged in folders. A secret is assigned a path name constructed from the *secretType* and *secretName* path parameters and, optionally, from query parameters determined by the *secretType*. Each *secretType* determines a specific transformation from the url path to a path in the vault. The *secretType* may require certain query parameters to be present on the request in order to construct the vault path. See the next section for details. ### Secret Types The list below documents each *secretType* and their applicable query parameters. Highlighted parameter names indicate required parameters. When present, default values are listed first and also highlighted. - **system** - *sysid*: the unique system id - *sysuser*: the accessing user (except when keytype=cert) - keytype: *sshkey* | password | accesskey | token | tmskey | cert - **dbcred** - *dbhost*: the DBMS hostname, IP address or alias - *dbname*: the database name or alias - *dbservice*: service name - **jwtsigning** - *no query parameters* - **user** - *no query parameters* - **service** - *no query parameters* ### Authorization Requestors are authorized based on the secret type specified in the URL path. The following authorizations are enforced: - system: limited to the systems service - dbcred: any service - jwtsigning: limited to the tokens service - user: any user - service: any service
|
|
309
317
|
*/
|
|
310
|
-
async destroySecret(requestParameters: DestroySecretRequest, initOverrides?: RequestInit): Promise<RespVersions> {
|
|
318
|
+
async destroySecret(requestParameters: DestroySecretRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespVersions> {
|
|
311
319
|
const response = await this.destroySecretRaw(requestParameters, initOverrides);
|
|
312
320
|
return await response.value();
|
|
313
321
|
}
|
|
314
322
|
|
|
315
323
|
/**
|
|
316
|
-
* Erase all traces of a secret: its key, all versions of its value and all its metadata. Specifying a folder erases all secrets in that folder. A valid tenant and user must be specified as query parameters. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*.
|
|
324
|
+
* Erase all traces of a secret: its key, all versions of its value and all its metadata. Specifying a folder erases all secrets in that folder. A valid tenant and user must be specified as query parameters. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*. These characters will be converted to slashes upon receipt, allowing secrets to be arranged in folders. A secret is assigned a path name constructed from the *secretType* and *secretName* path parameters and, optionally, from query parameters determined by the *secretType*. Each *secretType* determines a specific transformation from the url path to a path in the vault. The *secretType* may require certain query parameters to be present on the request in order to construct the vault path. See the next section for details. ### Secret Types The list below documents each *secretType* and their applicable query parameters. Highlighted parameter names indicate required parameters. When present, default values are listed first and also highlighted. - **system** - *sysid*: the unique system id - *sysuser*: the accessing user (except when keytype=cert) - keytype: *sshkey* | password | accesskey | token | tmskey | cert - **dbcred** - *dbhost*: the DBMS hostname, IP address or alias - *dbname*: the database name or alias - *dbservice*: service name - **jwtsigning** - *no query parameters* - **user** - *no query parameters* - **service** - *no query parameters* ### Authorization Requestors are authorized based on the secret type specified in the URL path. The following authorizations are enforced: - system: limited to the systems service - dbcred: any service - jwtsigning: limited to the tokens service - user: any user - service: any service
|
|
317
325
|
*/
|
|
318
|
-
async destroySecretMetaRaw(requestParameters: DestroySecretMetaRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespBasic>> {
|
|
319
|
-
if (requestParameters
|
|
320
|
-
throw new runtime.RequiredError(
|
|
326
|
+
async destroySecretMetaRaw(requestParameters: DestroySecretMetaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespBasic>> {
|
|
327
|
+
if (requestParameters['secretType'] == null) {
|
|
328
|
+
throw new runtime.RequiredError(
|
|
329
|
+
'secretType',
|
|
330
|
+
'Required parameter "secretType" was null or undefined when calling destroySecretMeta().'
|
|
331
|
+
);
|
|
321
332
|
}
|
|
322
333
|
|
|
323
|
-
if (requestParameters
|
|
324
|
-
throw new runtime.RequiredError(
|
|
334
|
+
if (requestParameters['secretName'] == null) {
|
|
335
|
+
throw new runtime.RequiredError(
|
|
336
|
+
'secretName',
|
|
337
|
+
'Required parameter "secretName" was null or undefined when calling destroySecretMeta().'
|
|
338
|
+
);
|
|
325
339
|
}
|
|
326
340
|
|
|
327
341
|
const queryParameters: any = {};
|
|
328
342
|
|
|
329
|
-
if (requestParameters
|
|
330
|
-
queryParameters['tenant'] = requestParameters
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
if (requestParameters.user !== undefined) {
|
|
334
|
-
queryParameters['user'] = requestParameters.user;
|
|
343
|
+
if (requestParameters['tenant'] != null) {
|
|
344
|
+
queryParameters['tenant'] = requestParameters['tenant'];
|
|
335
345
|
}
|
|
336
346
|
|
|
337
|
-
if (requestParameters
|
|
338
|
-
queryParameters['
|
|
347
|
+
if (requestParameters['user'] != null) {
|
|
348
|
+
queryParameters['user'] = requestParameters['user'];
|
|
339
349
|
}
|
|
340
350
|
|
|
341
|
-
if (requestParameters
|
|
342
|
-
queryParameters['sysid'] = requestParameters
|
|
351
|
+
if (requestParameters['sysid'] != null) {
|
|
352
|
+
queryParameters['sysid'] = requestParameters['sysid'];
|
|
343
353
|
}
|
|
344
354
|
|
|
345
|
-
if (requestParameters
|
|
346
|
-
queryParameters['sysuser'] = requestParameters
|
|
355
|
+
if (requestParameters['sysuser'] != null) {
|
|
356
|
+
queryParameters['sysuser'] = requestParameters['sysuser'];
|
|
347
357
|
}
|
|
348
358
|
|
|
349
|
-
if (requestParameters
|
|
350
|
-
queryParameters['keytype'] = requestParameters
|
|
359
|
+
if (requestParameters['keytype'] != null) {
|
|
360
|
+
queryParameters['keytype'] = requestParameters['keytype'];
|
|
351
361
|
}
|
|
352
362
|
|
|
353
|
-
if (requestParameters
|
|
354
|
-
queryParameters['dbhost'] = requestParameters
|
|
363
|
+
if (requestParameters['dbhost'] != null) {
|
|
364
|
+
queryParameters['dbhost'] = requestParameters['dbhost'];
|
|
355
365
|
}
|
|
356
366
|
|
|
357
|
-
if (requestParameters
|
|
358
|
-
queryParameters['dbname'] = requestParameters
|
|
367
|
+
if (requestParameters['dbname'] != null) {
|
|
368
|
+
queryParameters['dbname'] = requestParameters['dbname'];
|
|
359
369
|
}
|
|
360
370
|
|
|
361
|
-
if (requestParameters
|
|
362
|
-
queryParameters['dbservice'] = requestParameters
|
|
371
|
+
if (requestParameters['dbservice'] != null) {
|
|
372
|
+
queryParameters['dbservice'] = requestParameters['dbservice'];
|
|
363
373
|
}
|
|
364
374
|
|
|
365
375
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
366
376
|
|
|
367
377
|
if (this.configuration && this.configuration.apiKey) {
|
|
368
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
378
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
369
379
|
}
|
|
370
380
|
|
|
371
381
|
const response = await this.request({
|
|
372
|
-
path: `/security/vault/secret/destroy/meta/{secretType}/{secretName}`.replace(`{${"secretType"}}`, encodeURIComponent(String(requestParameters
|
|
382
|
+
path: `/security/vault/secret/destroy/meta/{secretType}/{secretName}`.replace(`{${"secretType"}}`, encodeURIComponent(String(requestParameters['secretType']))).replace(`{${"secretName"}}`, encodeURIComponent(String(requestParameters['secretName']))),
|
|
373
383
|
method: 'DELETE',
|
|
374
384
|
headers: headerParameters,
|
|
375
385
|
query: queryParameters,
|
|
@@ -379,67 +389,66 @@ export class VaultApi extends runtime.BaseAPI {
|
|
|
379
389
|
}
|
|
380
390
|
|
|
381
391
|
/**
|
|
382
|
-
* Erase all traces of a secret: its key, all versions of its value and all its metadata. Specifying a folder erases all secrets in that folder. A valid tenant and user must be specified as query parameters. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*.
|
|
392
|
+
* Erase all traces of a secret: its key, all versions of its value and all its metadata. Specifying a folder erases all secrets in that folder. A valid tenant and user must be specified as query parameters. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*. These characters will be converted to slashes upon receipt, allowing secrets to be arranged in folders. A secret is assigned a path name constructed from the *secretType* and *secretName* path parameters and, optionally, from query parameters determined by the *secretType*. Each *secretType* determines a specific transformation from the url path to a path in the vault. The *secretType* may require certain query parameters to be present on the request in order to construct the vault path. See the next section for details. ### Secret Types The list below documents each *secretType* and their applicable query parameters. Highlighted parameter names indicate required parameters. When present, default values are listed first and also highlighted. - **system** - *sysid*: the unique system id - *sysuser*: the accessing user (except when keytype=cert) - keytype: *sshkey* | password | accesskey | token | tmskey | cert - **dbcred** - *dbhost*: the DBMS hostname, IP address or alias - *dbname*: the database name or alias - *dbservice*: service name - **jwtsigning** - *no query parameters* - **user** - *no query parameters* - **service** - *no query parameters* ### Authorization Requestors are authorized based on the secret type specified in the URL path. The following authorizations are enforced: - system: limited to the systems service - dbcred: any service - jwtsigning: limited to the tokens service - user: any user - service: any service
|
|
383
393
|
*/
|
|
384
|
-
async destroySecretMeta(requestParameters: DestroySecretMetaRequest, initOverrides?: RequestInit): Promise<RespBasic> {
|
|
394
|
+
async destroySecretMeta(requestParameters: DestroySecretMetaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespBasic> {
|
|
385
395
|
const response = await this.destroySecretMetaRaw(requestParameters, initOverrides);
|
|
386
396
|
return await response.value();
|
|
387
397
|
}
|
|
388
398
|
|
|
389
399
|
/**
|
|
390
|
-
* List the secret names at the specified path. The path must represent a folder, not an actual secret name. If the path does not have a trailing slash one will be inserted. Secret names should not encode private information. A valid tenant and user must be specified as query parameters. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the secret name.
|
|
400
|
+
* List the secret names at the specified path. The path must represent a folder, not an actual secret name. If the path does not have a trailing slash one will be inserted. Secret names should not encode private information. A valid tenant and user must be specified as query parameters. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the secret name. These characters will be converted to slashes upon receipt, allowing secrets to be arranged in folders. A secret is assigned a path name constructed from the *secretType* path parameter and, optionally, from query parameters determined by the *secretType*. Each *secretType* determines a specific transformation from the url path to a path in the vault. The *secretType* may require certain query parameters to be present on the request in order to construct the vault path. See the next section for details. ### Secret Types The list below documents each *secretType* and their applicable query parameters. Highlighted parameter names indicate required parameters. When present, default values are listed first and also highlighted. - **system** - *sysid*: the unique system id - *sysuser*: the accessing user (except when keytype=cert) - keytype: *sshkey* | password | accesskey | token | tmskey | cert - **dbcred** - *dbhost*: the DBMS hostname, IP address or alias - *dbname*: the database name or alias - *dbservice*: service name - **jwtsigning** - *no query parameters* - **user** - *no query parameters* - **service** - *no query parameters* ### Authorization Requestors are authorized based on the secret type specified in the URL path. The following authorizations are enforced: - system: limited to the systems service - dbcred: any service - jwtsigning: limited to the tokens service - user: any user - service: any service
|
|
391
401
|
*/
|
|
392
|
-
async listSecretMetaRaw(requestParameters: ListSecretMetaRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespSecretList>> {
|
|
393
|
-
if (requestParameters
|
|
394
|
-
throw new runtime.RequiredError(
|
|
402
|
+
async listSecretMetaRaw(requestParameters: ListSecretMetaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespSecretList>> {
|
|
403
|
+
if (requestParameters['secretType'] == null) {
|
|
404
|
+
throw new runtime.RequiredError(
|
|
405
|
+
'secretType',
|
|
406
|
+
'Required parameter "secretType" was null or undefined when calling listSecretMeta().'
|
|
407
|
+
);
|
|
395
408
|
}
|
|
396
409
|
|
|
397
410
|
const queryParameters: any = {};
|
|
398
411
|
|
|
399
|
-
if (requestParameters
|
|
400
|
-
queryParameters['tenant'] = requestParameters
|
|
412
|
+
if (requestParameters['tenant'] != null) {
|
|
413
|
+
queryParameters['tenant'] = requestParameters['tenant'];
|
|
401
414
|
}
|
|
402
415
|
|
|
403
|
-
if (requestParameters
|
|
404
|
-
queryParameters['user'] = requestParameters
|
|
416
|
+
if (requestParameters['user'] != null) {
|
|
417
|
+
queryParameters['user'] = requestParameters['user'];
|
|
405
418
|
}
|
|
406
419
|
|
|
407
|
-
if (requestParameters
|
|
408
|
-
queryParameters['
|
|
420
|
+
if (requestParameters['sysid'] != null) {
|
|
421
|
+
queryParameters['sysid'] = requestParameters['sysid'];
|
|
409
422
|
}
|
|
410
423
|
|
|
411
|
-
if (requestParameters
|
|
412
|
-
queryParameters['
|
|
424
|
+
if (requestParameters['sysuser'] != null) {
|
|
425
|
+
queryParameters['sysuser'] = requestParameters['sysuser'];
|
|
413
426
|
}
|
|
414
427
|
|
|
415
|
-
if (requestParameters
|
|
416
|
-
queryParameters['
|
|
428
|
+
if (requestParameters['keytype'] != null) {
|
|
429
|
+
queryParameters['keytype'] = requestParameters['keytype'];
|
|
417
430
|
}
|
|
418
431
|
|
|
419
|
-
if (requestParameters
|
|
420
|
-
queryParameters['
|
|
432
|
+
if (requestParameters['dbhost'] != null) {
|
|
433
|
+
queryParameters['dbhost'] = requestParameters['dbhost'];
|
|
421
434
|
}
|
|
422
435
|
|
|
423
|
-
if (requestParameters
|
|
424
|
-
queryParameters['
|
|
436
|
+
if (requestParameters['dbname'] != null) {
|
|
437
|
+
queryParameters['dbname'] = requestParameters['dbname'];
|
|
425
438
|
}
|
|
426
439
|
|
|
427
|
-
if (requestParameters
|
|
428
|
-
queryParameters['
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
if (requestParameters.dbservice !== undefined) {
|
|
432
|
-
queryParameters['dbservice'] = requestParameters.dbservice;
|
|
440
|
+
if (requestParameters['dbservice'] != null) {
|
|
441
|
+
queryParameters['dbservice'] = requestParameters['dbservice'];
|
|
433
442
|
}
|
|
434
443
|
|
|
435
444
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
436
445
|
|
|
437
446
|
if (this.configuration && this.configuration.apiKey) {
|
|
438
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
447
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
439
448
|
}
|
|
440
449
|
|
|
441
450
|
const response = await this.request({
|
|
442
|
-
path: `/security/vault/secret/list/meta/{secretType}`.replace(`{${"secretType"}}`, encodeURIComponent(String(requestParameters
|
|
451
|
+
path: `/security/vault/secret/list/meta/{secretType}`.replace(`{${"secretType"}}`, encodeURIComponent(String(requestParameters['secretType']))),
|
|
443
452
|
method: 'GET',
|
|
444
453
|
headers: headerParameters,
|
|
445
454
|
query: queryParameters,
|
|
@@ -449,75 +458,77 @@ export class VaultApi extends runtime.BaseAPI {
|
|
|
449
458
|
}
|
|
450
459
|
|
|
451
460
|
/**
|
|
452
|
-
* List the secret names at the specified path. The path must represent a folder, not an actual secret name. If the path does not have a trailing slash one will be inserted. Secret names should not encode private information. A valid tenant and user must be specified as query parameters. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the secret name.
|
|
461
|
+
* List the secret names at the specified path. The path must represent a folder, not an actual secret name. If the path does not have a trailing slash one will be inserted. Secret names should not encode private information. A valid tenant and user must be specified as query parameters. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the secret name. These characters will be converted to slashes upon receipt, allowing secrets to be arranged in folders. A secret is assigned a path name constructed from the *secretType* path parameter and, optionally, from query parameters determined by the *secretType*. Each *secretType* determines a specific transformation from the url path to a path in the vault. The *secretType* may require certain query parameters to be present on the request in order to construct the vault path. See the next section for details. ### Secret Types The list below documents each *secretType* and their applicable query parameters. Highlighted parameter names indicate required parameters. When present, default values are listed first and also highlighted. - **system** - *sysid*: the unique system id - *sysuser*: the accessing user (except when keytype=cert) - keytype: *sshkey* | password | accesskey | token | tmskey | cert - **dbcred** - *dbhost*: the DBMS hostname, IP address or alias - *dbname*: the database name or alias - *dbservice*: service name - **jwtsigning** - *no query parameters* - **user** - *no query parameters* - **service** - *no query parameters* ### Authorization Requestors are authorized based on the secret type specified in the URL path. The following authorizations are enforced: - system: limited to the systems service - dbcred: any service - jwtsigning: limited to the tokens service - user: any user - service: any service
|
|
453
462
|
*/
|
|
454
|
-
async listSecretMeta(requestParameters: ListSecretMetaRequest, initOverrides?: RequestInit): Promise<RespSecretList> {
|
|
463
|
+
async listSecretMeta(requestParameters: ListSecretMetaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespSecretList> {
|
|
455
464
|
const response = await this.listSecretMetaRaw(requestParameters, initOverrides);
|
|
456
465
|
return await response.value();
|
|
457
466
|
}
|
|
458
467
|
|
|
459
468
|
/**
|
|
460
|
-
* Read a versioned secret. By default, the latest version of the secret is read. If the *version* query parameter is specified then that version of the secret is read.
|
|
469
|
+
* Read a versioned secret. By default, the latest version of the secret is read. If the *version* query parameter is specified then that version of the secret is read. The *version* parameter should be passed as an integer with zero indicating the latest version of the secret. A NOT FOUND status code is returned if the secret version does not exist or if it\'s deleted or destroyed. The response object includes the map of zero or more key/value pairs and metadata that describes the secret. The metadata includes which version of the secret was returned. A valid tenant and user must be specified as query parameters. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*. These characters will be converted to slashes upon receipt, allowing secrets to be arranged in folders. A secret is assigned a path name constructed from the *secretType* and *secretName* path parameters and, optionally, from query parameters determined by the *secretType*. Each *secretType* determines a specific transformation from the url path to a path in the vault. The *secretType* may require certain query parameters to be present on the request in order to construct the vault path. See the next section for details. ### Secret Types The list below documents each *secretType* and their applicable query parameters. Highlighted parameter names indicate required parameters. When present, default values are listed first and also highlighted. - **system** - *sysid*: the unique system id - *sysuser*: the accessing user (except when keytype=cert) - keytype: *sshkey* | password | accesskey | token | tmskey | cert - **dbcred** - *dbhost*: the DBMS hostname, IP address or alias - *dbname*: the database name or alias - *dbservice*: service name - **jwtsigning** - *no query parameters* - **user** - *no query parameters* - **service** - *no query parameters* ### Authorization Requestors are authorized based on the secret type specified in the URL path. The following authorizations are enforced: - system: limited to the systems service - dbcred: any service - jwtsigning: limited to the tokens service - user: any user - service: any service
|
|
461
470
|
*/
|
|
462
|
-
async readSecretRaw(requestParameters: ReadSecretRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespSecret>> {
|
|
463
|
-
if (requestParameters
|
|
464
|
-
throw new runtime.RequiredError(
|
|
471
|
+
async readSecretRaw(requestParameters: ReadSecretRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespSecret>> {
|
|
472
|
+
if (requestParameters['secretType'] == null) {
|
|
473
|
+
throw new runtime.RequiredError(
|
|
474
|
+
'secretType',
|
|
475
|
+
'Required parameter "secretType" was null or undefined when calling readSecret().'
|
|
476
|
+
);
|
|
465
477
|
}
|
|
466
478
|
|
|
467
|
-
if (requestParameters
|
|
468
|
-
throw new runtime.RequiredError(
|
|
479
|
+
if (requestParameters['secretName'] == null) {
|
|
480
|
+
throw new runtime.RequiredError(
|
|
481
|
+
'secretName',
|
|
482
|
+
'Required parameter "secretName" was null or undefined when calling readSecret().'
|
|
483
|
+
);
|
|
469
484
|
}
|
|
470
485
|
|
|
471
486
|
const queryParameters: any = {};
|
|
472
487
|
|
|
473
|
-
if (requestParameters
|
|
474
|
-
queryParameters['tenant'] = requestParameters
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
if (requestParameters.user !== undefined) {
|
|
478
|
-
queryParameters['user'] = requestParameters.user;
|
|
488
|
+
if (requestParameters['tenant'] != null) {
|
|
489
|
+
queryParameters['tenant'] = requestParameters['tenant'];
|
|
479
490
|
}
|
|
480
491
|
|
|
481
|
-
if (requestParameters
|
|
482
|
-
queryParameters['
|
|
492
|
+
if (requestParameters['user'] != null) {
|
|
493
|
+
queryParameters['user'] = requestParameters['user'];
|
|
483
494
|
}
|
|
484
495
|
|
|
485
|
-
if (requestParameters
|
|
486
|
-
queryParameters['
|
|
496
|
+
if (requestParameters['version'] != null) {
|
|
497
|
+
queryParameters['version'] = requestParameters['version'];
|
|
487
498
|
}
|
|
488
499
|
|
|
489
|
-
if (requestParameters
|
|
490
|
-
queryParameters['sysid'] = requestParameters
|
|
500
|
+
if (requestParameters['sysid'] != null) {
|
|
501
|
+
queryParameters['sysid'] = requestParameters['sysid'];
|
|
491
502
|
}
|
|
492
503
|
|
|
493
|
-
if (requestParameters
|
|
494
|
-
queryParameters['sysuser'] = requestParameters
|
|
504
|
+
if (requestParameters['sysuser'] != null) {
|
|
505
|
+
queryParameters['sysuser'] = requestParameters['sysuser'];
|
|
495
506
|
}
|
|
496
507
|
|
|
497
|
-
if (requestParameters
|
|
498
|
-
queryParameters['keytype'] = requestParameters
|
|
508
|
+
if (requestParameters['keytype'] != null) {
|
|
509
|
+
queryParameters['keytype'] = requestParameters['keytype'];
|
|
499
510
|
}
|
|
500
511
|
|
|
501
|
-
if (requestParameters
|
|
502
|
-
queryParameters['dbhost'] = requestParameters
|
|
512
|
+
if (requestParameters['dbhost'] != null) {
|
|
513
|
+
queryParameters['dbhost'] = requestParameters['dbhost'];
|
|
503
514
|
}
|
|
504
515
|
|
|
505
|
-
if (requestParameters
|
|
506
|
-
queryParameters['dbname'] = requestParameters
|
|
516
|
+
if (requestParameters['dbname'] != null) {
|
|
517
|
+
queryParameters['dbname'] = requestParameters['dbname'];
|
|
507
518
|
}
|
|
508
519
|
|
|
509
|
-
if (requestParameters
|
|
510
|
-
queryParameters['dbservice'] = requestParameters
|
|
520
|
+
if (requestParameters['dbservice'] != null) {
|
|
521
|
+
queryParameters['dbservice'] = requestParameters['dbservice'];
|
|
511
522
|
}
|
|
512
523
|
|
|
513
524
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
514
525
|
|
|
515
526
|
if (this.configuration && this.configuration.apiKey) {
|
|
516
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
527
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
517
528
|
}
|
|
518
529
|
|
|
519
530
|
const response = await this.request({
|
|
520
|
-
path: `/security/vault/secret/{secretType}/{secretName}`.replace(`{${"secretType"}}`, encodeURIComponent(String(requestParameters
|
|
531
|
+
path: `/security/vault/secret/{secretType}/{secretName}`.replace(`{${"secretType"}}`, encodeURIComponent(String(requestParameters['secretType']))).replace(`{${"secretName"}}`, encodeURIComponent(String(requestParameters['secretName']))),
|
|
521
532
|
method: 'GET',
|
|
522
533
|
headers: headerParameters,
|
|
523
534
|
query: queryParameters,
|
|
@@ -527,71 +538,73 @@ export class VaultApi extends runtime.BaseAPI {
|
|
|
527
538
|
}
|
|
528
539
|
|
|
529
540
|
/**
|
|
530
|
-
* Read a versioned secret. By default, the latest version of the secret is read. If the *version* query parameter is specified then that version of the secret is read.
|
|
541
|
+
* Read a versioned secret. By default, the latest version of the secret is read. If the *version* query parameter is specified then that version of the secret is read. The *version* parameter should be passed as an integer with zero indicating the latest version of the secret. A NOT FOUND status code is returned if the secret version does not exist or if it\'s deleted or destroyed. The response object includes the map of zero or more key/value pairs and metadata that describes the secret. The metadata includes which version of the secret was returned. A valid tenant and user must be specified as query parameters. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*. These characters will be converted to slashes upon receipt, allowing secrets to be arranged in folders. A secret is assigned a path name constructed from the *secretType* and *secretName* path parameters and, optionally, from query parameters determined by the *secretType*. Each *secretType* determines a specific transformation from the url path to a path in the vault. The *secretType* may require certain query parameters to be present on the request in order to construct the vault path. See the next section for details. ### Secret Types The list below documents each *secretType* and their applicable query parameters. Highlighted parameter names indicate required parameters. When present, default values are listed first and also highlighted. - **system** - *sysid*: the unique system id - *sysuser*: the accessing user (except when keytype=cert) - keytype: *sshkey* | password | accesskey | token | tmskey | cert - **dbcred** - *dbhost*: the DBMS hostname, IP address or alias - *dbname*: the database name or alias - *dbservice*: service name - **jwtsigning** - *no query parameters* - **user** - *no query parameters* - **service** - *no query parameters* ### Authorization Requestors are authorized based on the secret type specified in the URL path. The following authorizations are enforced: - system: limited to the systems service - dbcred: any service - jwtsigning: limited to the tokens service - user: any user - service: any service
|
|
531
542
|
*/
|
|
532
|
-
async readSecret(requestParameters: ReadSecretRequest, initOverrides?: RequestInit): Promise<RespSecret> {
|
|
543
|
+
async readSecret(requestParameters: ReadSecretRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespSecret> {
|
|
533
544
|
const response = await this.readSecretRaw(requestParameters, initOverrides);
|
|
534
545
|
return await response.value();
|
|
535
546
|
}
|
|
536
547
|
|
|
537
548
|
/**
|
|
538
|
-
* List a secret\'s metadata including its version information. The input parameter must be a secret name, not a folder. The result includes which version of the secret is the latest. A valid tenant and user must be specified as query parameters. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*.
|
|
549
|
+
* List a secret\'s metadata including its version information. The input parameter must be a secret name, not a folder. The result includes which version of the secret is the latest. A valid tenant and user must be specified as query parameters. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*. These characters will be converted to slashes upon receipt, allowing secrets to be arranged in folders. A secret is assigned a path name constructed from the *secretType* and *secretName* path parameters and, optionally, from query parameters determined by the *secretType*. Each *secretType* determines a specific transformation from the url path to a path in the vault. The *secretType* may require certain query parameters to be present on the request in order to construct the vault path. See the next section for details. ### Secret Types The list below documents each *secretType* and their applicable query parameters. Highlighted parameter names indicate required parameters. When present, default values are listed first and also highlighted. - **system** - *sysid*: the unique system id - *sysuser*: the accessing user (except when keytype=cert) - keytype: *sshkey* | password | accesskey | token | tmskey | cert - **dbcred** - *dbhost*: the DBMS hostname, IP address or alias - *dbname*: the database name or alias - *dbservice*: service name - **jwtsigning** - *no query parameters* - **user** - *no query parameters* - **service** - *no query parameters* ### Authorization Requestors are authorized based on the secret type specified in the URL path. The following authorizations are enforced: - system: limited to the systems service - dbcred: any service - jwtsigning: limited to the tokens service - user: any user - service: any service
|
|
539
550
|
*/
|
|
540
|
-
async readSecretMetaRaw(requestParameters: ReadSecretMetaRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespSecretVersionMetadata>> {
|
|
541
|
-
if (requestParameters
|
|
542
|
-
throw new runtime.RequiredError(
|
|
551
|
+
async readSecretMetaRaw(requestParameters: ReadSecretMetaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespSecretVersionMetadata>> {
|
|
552
|
+
if (requestParameters['secretType'] == null) {
|
|
553
|
+
throw new runtime.RequiredError(
|
|
554
|
+
'secretType',
|
|
555
|
+
'Required parameter "secretType" was null or undefined when calling readSecretMeta().'
|
|
556
|
+
);
|
|
543
557
|
}
|
|
544
558
|
|
|
545
|
-
if (requestParameters
|
|
546
|
-
throw new runtime.RequiredError(
|
|
559
|
+
if (requestParameters['secretName'] == null) {
|
|
560
|
+
throw new runtime.RequiredError(
|
|
561
|
+
'secretName',
|
|
562
|
+
'Required parameter "secretName" was null or undefined when calling readSecretMeta().'
|
|
563
|
+
);
|
|
547
564
|
}
|
|
548
565
|
|
|
549
566
|
const queryParameters: any = {};
|
|
550
567
|
|
|
551
|
-
if (requestParameters
|
|
552
|
-
queryParameters['tenant'] = requestParameters
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
if (requestParameters.user !== undefined) {
|
|
556
|
-
queryParameters['user'] = requestParameters.user;
|
|
568
|
+
if (requestParameters['tenant'] != null) {
|
|
569
|
+
queryParameters['tenant'] = requestParameters['tenant'];
|
|
557
570
|
}
|
|
558
571
|
|
|
559
|
-
if (requestParameters
|
|
560
|
-
queryParameters['
|
|
572
|
+
if (requestParameters['user'] != null) {
|
|
573
|
+
queryParameters['user'] = requestParameters['user'];
|
|
561
574
|
}
|
|
562
575
|
|
|
563
|
-
if (requestParameters
|
|
564
|
-
queryParameters['sysid'] = requestParameters
|
|
576
|
+
if (requestParameters['sysid'] != null) {
|
|
577
|
+
queryParameters['sysid'] = requestParameters['sysid'];
|
|
565
578
|
}
|
|
566
579
|
|
|
567
|
-
if (requestParameters
|
|
568
|
-
queryParameters['sysuser'] = requestParameters
|
|
580
|
+
if (requestParameters['sysuser'] != null) {
|
|
581
|
+
queryParameters['sysuser'] = requestParameters['sysuser'];
|
|
569
582
|
}
|
|
570
583
|
|
|
571
|
-
if (requestParameters
|
|
572
|
-
queryParameters['keytype'] = requestParameters
|
|
584
|
+
if (requestParameters['keytype'] != null) {
|
|
585
|
+
queryParameters['keytype'] = requestParameters['keytype'];
|
|
573
586
|
}
|
|
574
587
|
|
|
575
|
-
if (requestParameters
|
|
576
|
-
queryParameters['dbhost'] = requestParameters
|
|
588
|
+
if (requestParameters['dbhost'] != null) {
|
|
589
|
+
queryParameters['dbhost'] = requestParameters['dbhost'];
|
|
577
590
|
}
|
|
578
591
|
|
|
579
|
-
if (requestParameters
|
|
580
|
-
queryParameters['dbname'] = requestParameters
|
|
592
|
+
if (requestParameters['dbname'] != null) {
|
|
593
|
+
queryParameters['dbname'] = requestParameters['dbname'];
|
|
581
594
|
}
|
|
582
595
|
|
|
583
|
-
if (requestParameters
|
|
584
|
-
queryParameters['dbservice'] = requestParameters
|
|
596
|
+
if (requestParameters['dbservice'] != null) {
|
|
597
|
+
queryParameters['dbservice'] = requestParameters['dbservice'];
|
|
585
598
|
}
|
|
586
599
|
|
|
587
600
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
588
601
|
|
|
589
602
|
if (this.configuration && this.configuration.apiKey) {
|
|
590
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
603
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
591
604
|
}
|
|
592
605
|
|
|
593
606
|
const response = await this.request({
|
|
594
|
-
path: `/security/vault/secret/read/meta/{secretType}/{secretName}`.replace(`{${"secretType"}}`, encodeURIComponent(String(requestParameters
|
|
607
|
+
path: `/security/vault/secret/read/meta/{secretType}/{secretName}`.replace(`{${"secretType"}}`, encodeURIComponent(String(requestParameters['secretType']))).replace(`{${"secretName"}}`, encodeURIComponent(String(requestParameters['secretName']))),
|
|
595
608
|
method: 'GET',
|
|
596
609
|
headers: headerParameters,
|
|
597
610
|
query: queryParameters,
|
|
@@ -601,57 +614,62 @@ export class VaultApi extends runtime.BaseAPI {
|
|
|
601
614
|
}
|
|
602
615
|
|
|
603
616
|
/**
|
|
604
|
-
* List a secret\'s metadata including its version information. The input parameter must be a secret name, not a folder. The result includes which version of the secret is the latest. A valid tenant and user must be specified as query parameters. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*.
|
|
617
|
+
* List a secret\'s metadata including its version information. The input parameter must be a secret name, not a folder. The result includes which version of the secret is the latest. A valid tenant and user must be specified as query parameters. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*. These characters will be converted to slashes upon receipt, allowing secrets to be arranged in folders. A secret is assigned a path name constructed from the *secretType* and *secretName* path parameters and, optionally, from query parameters determined by the *secretType*. Each *secretType* determines a specific transformation from the url path to a path in the vault. The *secretType* may require certain query parameters to be present on the request in order to construct the vault path. See the next section for details. ### Secret Types The list below documents each *secretType* and their applicable query parameters. Highlighted parameter names indicate required parameters. When present, default values are listed first and also highlighted. - **system** - *sysid*: the unique system id - *sysuser*: the accessing user (except when keytype=cert) - keytype: *sshkey* | password | accesskey | token | tmskey | cert - **dbcred** - *dbhost*: the DBMS hostname, IP address or alias - *dbname*: the database name or alias - *dbservice*: service name - **jwtsigning** - *no query parameters* - **user** - *no query parameters* - **service** - *no query parameters* ### Authorization Requestors are authorized based on the secret type specified in the URL path. The following authorizations are enforced: - system: limited to the systems service - dbcred: any service - jwtsigning: limited to the tokens service - user: any user - service: any service
|
|
605
618
|
*/
|
|
606
|
-
async readSecretMeta(requestParameters: ReadSecretMetaRequest, initOverrides?: RequestInit): Promise<RespSecretVersionMetadata> {
|
|
619
|
+
async readSecretMeta(requestParameters: ReadSecretMetaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespSecretVersionMetadata> {
|
|
607
620
|
const response = await this.readSecretMetaRaw(requestParameters, initOverrides);
|
|
608
621
|
return await response.value();
|
|
609
622
|
}
|
|
610
623
|
|
|
611
624
|
/**
|
|
612
|
-
* Restore one or more versions of a secret that have previously been deleted. This endpoint undoes soft deletions performed using the *secret/delete/{secretType}/{secretName}* endpoint. The input versions array is interpreted as follows: * [-] - empty = undelete all versions * [0] - zero = undelete only the latest version * [1, 3, ...] - list = undelete the specified versions A valid tenant and user must be specified in the body. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*.
|
|
625
|
+
* Restore one or more versions of a secret that have previously been deleted. This endpoint undoes soft deletions performed using the *secret/delete/{secretType}/{secretName}* endpoint. The input versions array is interpreted as follows: * [-] - empty = undelete all versions * [0] - zero = undelete only the latest version * [1, 3, ...] - list = undelete the specified versions A valid tenant and user must be specified in the body. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*. These characters will be converted to slashes upon receipt, allowing secrets to be arranged in folders. A secret is assigned a path name constructed from the *secretType* and *secretName* path parameters and, optionally, from query parameters determined by the *secretType*. Each *secretType* determines a specific transformation from the url path to a path in the vault. The *secretType* may require certain query parameters to be present on the request in order to construct the vault path. See the next section for details. ### Secret Types The list below documents each *secretType* and their applicable query parameters. Highlighted parameter names indicate required parameters. When present, default values are listed first and also highlighted. - **system** - *sysid*: the unique system id - *sysuser*: the accessing user (except when keytype=cert) - keytype: *sshkey* | password | accesskey | token | tmskey | cert - **dbcred** - *dbhost*: the DBMS hostname, IP address or alias - *dbname*: the database name or alias - *dbservice*: service name - **jwtsigning** - *no query parameters* - **user** - *no query parameters* - **service** - *no query parameters* ### Authorization Requestors are authorized based on the secret type specified in the URL path. The following authorizations are enforced: - system: limited to the systems service - dbcred: any service - jwtsigning: limited to the tokens service - user: any user - service: any service
|
|
613
626
|
*/
|
|
614
|
-
async undeleteSecretRaw(requestParameters: UndeleteSecretRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespVersions>> {
|
|
615
|
-
if (requestParameters
|
|
616
|
-
throw new runtime.RequiredError(
|
|
627
|
+
async undeleteSecretRaw(requestParameters: UndeleteSecretRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespVersions>> {
|
|
628
|
+
if (requestParameters['secretType'] == null) {
|
|
629
|
+
throw new runtime.RequiredError(
|
|
630
|
+
'secretType',
|
|
631
|
+
'Required parameter "secretType" was null or undefined when calling undeleteSecret().'
|
|
632
|
+
);
|
|
617
633
|
}
|
|
618
634
|
|
|
619
|
-
if (requestParameters
|
|
620
|
-
throw new runtime.RequiredError(
|
|
635
|
+
if (requestParameters['secretName'] == null) {
|
|
636
|
+
throw new runtime.RequiredError(
|
|
637
|
+
'secretName',
|
|
638
|
+
'Required parameter "secretName" was null or undefined when calling undeleteSecret().'
|
|
639
|
+
);
|
|
621
640
|
}
|
|
622
641
|
|
|
623
|
-
if (requestParameters
|
|
624
|
-
throw new runtime.RequiredError(
|
|
642
|
+
if (requestParameters['reqVersions'] == null) {
|
|
643
|
+
throw new runtime.RequiredError(
|
|
644
|
+
'reqVersions',
|
|
645
|
+
'Required parameter "reqVersions" was null or undefined when calling undeleteSecret().'
|
|
646
|
+
);
|
|
625
647
|
}
|
|
626
648
|
|
|
627
649
|
const queryParameters: any = {};
|
|
628
650
|
|
|
629
|
-
if (requestParameters
|
|
630
|
-
queryParameters['
|
|
651
|
+
if (requestParameters['sysid'] != null) {
|
|
652
|
+
queryParameters['sysid'] = requestParameters['sysid'];
|
|
631
653
|
}
|
|
632
654
|
|
|
633
|
-
if (requestParameters
|
|
634
|
-
queryParameters['
|
|
655
|
+
if (requestParameters['sysuser'] != null) {
|
|
656
|
+
queryParameters['sysuser'] = requestParameters['sysuser'];
|
|
635
657
|
}
|
|
636
658
|
|
|
637
|
-
if (requestParameters
|
|
638
|
-
queryParameters['
|
|
659
|
+
if (requestParameters['keytype'] != null) {
|
|
660
|
+
queryParameters['keytype'] = requestParameters['keytype'];
|
|
639
661
|
}
|
|
640
662
|
|
|
641
|
-
if (requestParameters
|
|
642
|
-
queryParameters['
|
|
663
|
+
if (requestParameters['dbhost'] != null) {
|
|
664
|
+
queryParameters['dbhost'] = requestParameters['dbhost'];
|
|
643
665
|
}
|
|
644
666
|
|
|
645
|
-
if (requestParameters
|
|
646
|
-
queryParameters['
|
|
667
|
+
if (requestParameters['dbname'] != null) {
|
|
668
|
+
queryParameters['dbname'] = requestParameters['dbname'];
|
|
647
669
|
}
|
|
648
670
|
|
|
649
|
-
if (requestParameters
|
|
650
|
-
queryParameters['
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
if (requestParameters.dbservice !== undefined) {
|
|
654
|
-
queryParameters['dbservice'] = requestParameters.dbservice;
|
|
671
|
+
if (requestParameters['dbservice'] != null) {
|
|
672
|
+
queryParameters['dbservice'] = requestParameters['dbservice'];
|
|
655
673
|
}
|
|
656
674
|
|
|
657
675
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
@@ -659,117 +677,171 @@ export class VaultApi extends runtime.BaseAPI {
|
|
|
659
677
|
headerParameters['Content-Type'] = 'application/json';
|
|
660
678
|
|
|
661
679
|
if (this.configuration && this.configuration.apiKey) {
|
|
662
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
680
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
663
681
|
}
|
|
664
682
|
|
|
665
683
|
const response = await this.request({
|
|
666
|
-
path: `/security/vault/secret/undelete/{secretType}/{secretName}`.replace(`{${"secretType"}}`, encodeURIComponent(String(requestParameters
|
|
684
|
+
path: `/security/vault/secret/undelete/{secretType}/{secretName}`.replace(`{${"secretType"}}`, encodeURIComponent(String(requestParameters['secretType']))).replace(`{${"secretName"}}`, encodeURIComponent(String(requestParameters['secretName']))),
|
|
667
685
|
method: 'POST',
|
|
668
686
|
headers: headerParameters,
|
|
669
687
|
query: queryParameters,
|
|
670
|
-
body: ReqVersionsToJSON(requestParameters
|
|
688
|
+
body: ReqVersionsToJSON(requestParameters['reqVersions']),
|
|
671
689
|
}, initOverrides);
|
|
672
690
|
|
|
673
691
|
return new runtime.JSONApiResponse(response, (jsonValue) => RespVersionsFromJSON(jsonValue));
|
|
674
692
|
}
|
|
675
693
|
|
|
676
694
|
/**
|
|
677
|
-
* Restore one or more versions of a secret that have previously been deleted. This endpoint undoes soft deletions performed using the *secret/delete/{secretType}/{secretName}* endpoint. The input versions array is interpreted as follows: * [-] - empty = undelete all versions * [0] - zero = undelete only the latest version * [1, 3, ...] - list = undelete the specified versions A valid tenant and user must be specified in the body. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*.
|
|
695
|
+
* Restore one or more versions of a secret that have previously been deleted. This endpoint undoes soft deletions performed using the *secret/delete/{secretType}/{secretName}* endpoint. The input versions array is interpreted as follows: * [-] - empty = undelete all versions * [0] - zero = undelete only the latest version * [1, 3, ...] - list = undelete the specified versions A valid tenant and user must be specified in the body. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*. These characters will be converted to slashes upon receipt, allowing secrets to be arranged in folders. A secret is assigned a path name constructed from the *secretType* and *secretName* path parameters and, optionally, from query parameters determined by the *secretType*. Each *secretType* determines a specific transformation from the url path to a path in the vault. The *secretType* may require certain query parameters to be present on the request in order to construct the vault path. See the next section for details. ### Secret Types The list below documents each *secretType* and their applicable query parameters. Highlighted parameter names indicate required parameters. When present, default values are listed first and also highlighted. - **system** - *sysid*: the unique system id - *sysuser*: the accessing user (except when keytype=cert) - keytype: *sshkey* | password | accesskey | token | tmskey | cert - **dbcred** - *dbhost*: the DBMS hostname, IP address or alias - *dbname*: the database name or alias - *dbservice*: service name - **jwtsigning** - *no query parameters* - **user** - *no query parameters* - **service** - *no query parameters* ### Authorization Requestors are authorized based on the secret type specified in the URL path. The following authorizations are enforced: - system: limited to the systems service - dbcred: any service - jwtsigning: limited to the tokens service - user: any user - service: any service
|
|
678
696
|
*/
|
|
679
|
-
async undeleteSecret(requestParameters: UndeleteSecretRequest, initOverrides?: RequestInit): Promise<RespVersions> {
|
|
697
|
+
async undeleteSecret(requestParameters: UndeleteSecretRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespVersions> {
|
|
680
698
|
const response = await this.undeleteSecretRaw(requestParameters, initOverrides);
|
|
681
699
|
return await response.value();
|
|
682
700
|
}
|
|
683
701
|
|
|
684
702
|
/**
|
|
685
|
-
* Validate a service\'s password. The JSON payload contains the password that needs to be validated against the password stored in the vault for the service
|
|
703
|
+
* Validate a service\'s password. The JSON payload contains the password that needs to be validated against the password stored in the vault for the service specifie din the X-Tapis-User header. The secret name is the path under which the password was stored. A valid tenant and user must also be specified in the payload. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*. These characters will be converted to slashes upon receipt, allowing secrets to be arranged in folders. Only services can make this request.
|
|
686
704
|
*/
|
|
687
|
-
async validateServicePasswordRaw(requestParameters: ValidateServicePasswordRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<RespAuthorized>> {
|
|
688
|
-
if (requestParameters
|
|
689
|
-
throw new runtime.RequiredError(
|
|
705
|
+
async validateServicePasswordRaw(requestParameters: ValidateServicePasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespAuthorized>> {
|
|
706
|
+
if (requestParameters['secretName'] == null) {
|
|
707
|
+
throw new runtime.RequiredError(
|
|
708
|
+
'secretName',
|
|
709
|
+
'Required parameter "secretName" was null or undefined when calling validateServicePassword().'
|
|
710
|
+
);
|
|
690
711
|
}
|
|
691
712
|
|
|
692
|
-
if (requestParameters
|
|
693
|
-
throw new runtime.RequiredError(
|
|
713
|
+
if (requestParameters['reqValidatePwd'] == null) {
|
|
714
|
+
throw new runtime.RequiredError(
|
|
715
|
+
'reqValidatePwd',
|
|
716
|
+
'Required parameter "reqValidatePwd" was null or undefined when calling validateServicePassword().'
|
|
717
|
+
);
|
|
694
718
|
}
|
|
695
719
|
|
|
696
720
|
const queryParameters: any = {};
|
|
697
721
|
|
|
698
|
-
if (requestParameters.pretty !== undefined) {
|
|
699
|
-
queryParameters['pretty'] = requestParameters.pretty;
|
|
700
|
-
}
|
|
701
|
-
|
|
702
722
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
703
723
|
|
|
704
724
|
headerParameters['Content-Type'] = 'application/json';
|
|
705
725
|
|
|
706
726
|
if (this.configuration && this.configuration.apiKey) {
|
|
707
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
727
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
708
728
|
}
|
|
709
729
|
|
|
710
730
|
const response = await this.request({
|
|
711
|
-
path: `/security/vault/secret/validateServicePassword/{secretName}`.replace(`{${"secretName"}}`, encodeURIComponent(String(requestParameters
|
|
731
|
+
path: `/security/vault/secret/validateServicePassword/{secretName}`.replace(`{${"secretName"}}`, encodeURIComponent(String(requestParameters['secretName']))),
|
|
712
732
|
method: 'POST',
|
|
713
733
|
headers: headerParameters,
|
|
714
734
|
query: queryParameters,
|
|
715
|
-
body:
|
|
735
|
+
body: ReqValidatePwdToJSON(requestParameters['reqValidatePwd']),
|
|
716
736
|
}, initOverrides);
|
|
717
737
|
|
|
718
738
|
return new runtime.JSONApiResponse(response, (jsonValue) => RespAuthorizedFromJSON(jsonValue));
|
|
719
739
|
}
|
|
720
740
|
|
|
721
741
|
/**
|
|
722
|
-
* Validate a service\'s password. The JSON payload contains the password that needs to be validated against the password stored in the vault for the service
|
|
742
|
+
* Validate a service\'s password. The JSON payload contains the password that needs to be validated against the password stored in the vault for the service specifie din the X-Tapis-User header. The secret name is the path under which the password was stored. A valid tenant and user must also be specified in the payload. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*. These characters will be converted to slashes upon receipt, allowing secrets to be arranged in folders. Only services can make this request.
|
|
723
743
|
*/
|
|
724
|
-
async validateServicePassword(requestParameters: ValidateServicePasswordRequest, initOverrides?: RequestInit): Promise<RespAuthorized> {
|
|
744
|
+
async validateServicePassword(requestParameters: ValidateServicePasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespAuthorized> {
|
|
725
745
|
const response = await this.validateServicePasswordRaw(requestParameters, initOverrides);
|
|
726
746
|
return await response.value();
|
|
727
747
|
}
|
|
728
748
|
|
|
729
749
|
/**
|
|
730
|
-
*
|
|
750
|
+
* Validate a Site Admin\'s password. The JSON payload contains the password that needs to be validated against the password stored in the vault for the site admin specified in the X-Tapis-User header. The secret name is the path under which the password was stored. A valid tenant and user must also be specified in the payload. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*. These characters will be converted to slashes upon receipt, allowing secrets to be arranged in folders. Only services can make this request.
|
|
731
751
|
*/
|
|
732
|
-
async
|
|
733
|
-
if (requestParameters
|
|
734
|
-
throw new runtime.RequiredError(
|
|
752
|
+
async validateSiteAdminPasswordRaw(requestParameters: ValidateSiteAdminPasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespAuthorized>> {
|
|
753
|
+
if (requestParameters['secretName'] == null) {
|
|
754
|
+
throw new runtime.RequiredError(
|
|
755
|
+
'secretName',
|
|
756
|
+
'Required parameter "secretName" was null or undefined when calling validateSiteAdminPassword().'
|
|
757
|
+
);
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
if (requestParameters['reqValidatePwd'] == null) {
|
|
761
|
+
throw new runtime.RequiredError(
|
|
762
|
+
'reqValidatePwd',
|
|
763
|
+
'Required parameter "reqValidatePwd" was null or undefined when calling validateSiteAdminPassword().'
|
|
764
|
+
);
|
|
735
765
|
}
|
|
736
766
|
|
|
737
|
-
|
|
738
|
-
|
|
767
|
+
const queryParameters: any = {};
|
|
768
|
+
|
|
769
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
770
|
+
|
|
771
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
772
|
+
|
|
773
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
774
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
739
775
|
}
|
|
740
776
|
|
|
741
|
-
|
|
742
|
-
|
|
777
|
+
const response = await this.request({
|
|
778
|
+
path: `/security/vault/secret/validateSiteAdminPassword/{secretName}`.replace(`{${"secretName"}}`, encodeURIComponent(String(requestParameters['secretName']))),
|
|
779
|
+
method: 'POST',
|
|
780
|
+
headers: headerParameters,
|
|
781
|
+
query: queryParameters,
|
|
782
|
+
body: ReqValidatePwdToJSON(requestParameters['reqValidatePwd']),
|
|
783
|
+
}, initOverrides);
|
|
784
|
+
|
|
785
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => RespAuthorizedFromJSON(jsonValue));
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* Validate a Site Admin\'s password. The JSON payload contains the password that needs to be validated against the password stored in the vault for the site admin specified in the X-Tapis-User header. The secret name is the path under which the password was stored. A valid tenant and user must also be specified in the payload. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*. These characters will be converted to slashes upon receipt, allowing secrets to be arranged in folders. Only services can make this request.
|
|
790
|
+
*/
|
|
791
|
+
async validateSiteAdminPassword(requestParameters: ValidateSiteAdminPasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespAuthorized> {
|
|
792
|
+
const response = await this.validateSiteAdminPasswordRaw(requestParameters, initOverrides);
|
|
793
|
+
return await response.value();
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* Create or update a secret. The JSON payload contains a required *data* object and an optional *options* object. It also contains the required tenant and user fields. The *data* object is a JSON object that contains one or more key/value pairs in which both the key and value are strings. These are the individual secrets that are saved under the path name. The secrets are automatically versioned, which allows a pre-configured number of past secret values to be accessible even after new values are assigned. See the various GET operations for details on how to access different aspects of secrets. NOTE: The *cas* option is currently ignored but documented here for future reference. The *options* object can contain a *cas* key and with an integer value that represents a secret version. CAS stands for check-and-set and will check an existing secret\'s version before updating. If cas is not set the write will be always be allowed. If set to 0, a write will only be allowed if the key doesn’t exist. If the index is greater than zero, then the write will only be allowed if the key’s current version matches the version specified in the cas parameter. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*. These characters will be converted to slashes upon receipt, allowing secrets to be arranged in folders. A secret is assigned a path name constructed from the *secretType* and *secretName* path parameters and, optionally, from query parameters determined by the *secretType*. Each *secretType* determines a specific transformation from the url path to a path in the vault. The *secretType* may require certain query parameters to be present on the request in order to construct the vault path. See the next section for details. ### Secret Types The list below documents each *secretType* and their applicable query parameters. Highlighted parameter names indicate required parameters. When present, default values are listed first and also highlighted. - **system** - *sysid*: the unique system id - *sysuser*: the accessing user (except when keytype=cert) - keytype: *sshkey* | password | accesskey | token | tmskey | cert - **dbcred** - *dbhost*: the DBMS hostname, IP address or alias - *dbname*: the database name or alias - *dbservice*: service name - **jwtsigning** - *no query parameters* - **user** - *no query parameters* - **service** - *no query parameters* ### Authorization Requestors are authorized based on the secret type specified in the URL path. The following authorizations are enforced: - system: limited to the systems service - dbcred: any service - jwtsigning: limited to the tokens service - user: any user - service: any service ### Generating Secrets Passwords and public/private key pairs appropriate for Tapis use can be generated as part of this secret write call. To direct SK to create a secret, assign the special value `<generate-secret>` to a key. When SK detects this value, it generates a password or key pair depending on context, and replaces the `<generate-secret>` text with the generated secret. In the case of a key pair, both the public and private keys are saved. Key pairs are always generated for secrets of type JWTSigning, while passwords are generated for all other secret types unless the key is named *privateKey*. To generate a key pair, insert the following key/value pair into the payload\'s data map: key=\"privateKey\", value=\"<generate-secret>\" When the key pair is generated, the above key/value item is replaced by these two key/value pairs: key=\"privateKey\", value=<private key in pem format> key=\"publicKey\", value=<public key in pem format> In non-JWTSigning secret types, passwords are generated whenever the following key/value pair is encountered in the payload\'s data map: key=<name other than privateKey>, value=\"<generate-secret>\" The generated password simply replaces the item\'s value and the key name is left unchanged.
|
|
798
|
+
*/
|
|
799
|
+
async writeSecretRaw(requestParameters: WriteSecretRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespSecretMeta>> {
|
|
800
|
+
if (requestParameters['secretType'] == null) {
|
|
801
|
+
throw new runtime.RequiredError(
|
|
802
|
+
'secretType',
|
|
803
|
+
'Required parameter "secretType" was null or undefined when calling writeSecret().'
|
|
804
|
+
);
|
|
743
805
|
}
|
|
744
806
|
|
|
745
|
-
|
|
807
|
+
if (requestParameters['secretName'] == null) {
|
|
808
|
+
throw new runtime.RequiredError(
|
|
809
|
+
'secretName',
|
|
810
|
+
'Required parameter "secretName" was null or undefined when calling writeSecret().'
|
|
811
|
+
);
|
|
812
|
+
}
|
|
746
813
|
|
|
747
|
-
if (requestParameters
|
|
748
|
-
|
|
814
|
+
if (requestParameters['reqWriteSecret'] == null) {
|
|
815
|
+
throw new runtime.RequiredError(
|
|
816
|
+
'reqWriteSecret',
|
|
817
|
+
'Required parameter "reqWriteSecret" was null or undefined when calling writeSecret().'
|
|
818
|
+
);
|
|
749
819
|
}
|
|
750
820
|
|
|
751
|
-
|
|
752
|
-
|
|
821
|
+
const queryParameters: any = {};
|
|
822
|
+
|
|
823
|
+
if (requestParameters['sysid'] != null) {
|
|
824
|
+
queryParameters['sysid'] = requestParameters['sysid'];
|
|
753
825
|
}
|
|
754
826
|
|
|
755
|
-
if (requestParameters
|
|
756
|
-
queryParameters['sysuser'] = requestParameters
|
|
827
|
+
if (requestParameters['sysuser'] != null) {
|
|
828
|
+
queryParameters['sysuser'] = requestParameters['sysuser'];
|
|
757
829
|
}
|
|
758
830
|
|
|
759
|
-
if (requestParameters
|
|
760
|
-
queryParameters['keytype'] = requestParameters
|
|
831
|
+
if (requestParameters['keytype'] != null) {
|
|
832
|
+
queryParameters['keytype'] = requestParameters['keytype'];
|
|
761
833
|
}
|
|
762
834
|
|
|
763
|
-
if (requestParameters
|
|
764
|
-
queryParameters['dbhost'] = requestParameters
|
|
835
|
+
if (requestParameters['dbhost'] != null) {
|
|
836
|
+
queryParameters['dbhost'] = requestParameters['dbhost'];
|
|
765
837
|
}
|
|
766
838
|
|
|
767
|
-
if (requestParameters
|
|
768
|
-
queryParameters['dbname'] = requestParameters
|
|
839
|
+
if (requestParameters['dbname'] != null) {
|
|
840
|
+
queryParameters['dbname'] = requestParameters['dbname'];
|
|
769
841
|
}
|
|
770
842
|
|
|
771
|
-
if (requestParameters
|
|
772
|
-
queryParameters['dbservice'] = requestParameters
|
|
843
|
+
if (requestParameters['dbservice'] != null) {
|
|
844
|
+
queryParameters['dbservice'] = requestParameters['dbservice'];
|
|
773
845
|
}
|
|
774
846
|
|
|
775
847
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
@@ -777,24 +849,24 @@ export class VaultApi extends runtime.BaseAPI {
|
|
|
777
849
|
headerParameters['Content-Type'] = 'application/json';
|
|
778
850
|
|
|
779
851
|
if (this.configuration && this.configuration.apiKey) {
|
|
780
|
-
headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
852
|
+
headerParameters["X-Tapis-Token"] = await this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
|
|
781
853
|
}
|
|
782
854
|
|
|
783
855
|
const response = await this.request({
|
|
784
|
-
path: `/security/vault/secret/{secretType}/{secretName}`.replace(`{${"secretType"}}`, encodeURIComponent(String(requestParameters
|
|
856
|
+
path: `/security/vault/secret/{secretType}/{secretName}`.replace(`{${"secretType"}}`, encodeURIComponent(String(requestParameters['secretType']))).replace(`{${"secretName"}}`, encodeURIComponent(String(requestParameters['secretName']))),
|
|
785
857
|
method: 'POST',
|
|
786
858
|
headers: headerParameters,
|
|
787
859
|
query: queryParameters,
|
|
788
|
-
body: ReqWriteSecretToJSON(requestParameters
|
|
860
|
+
body: ReqWriteSecretToJSON(requestParameters['reqWriteSecret']),
|
|
789
861
|
}, initOverrides);
|
|
790
862
|
|
|
791
863
|
return new runtime.JSONApiResponse(response, (jsonValue) => RespSecretMetaFromJSON(jsonValue));
|
|
792
864
|
}
|
|
793
865
|
|
|
794
866
|
/**
|
|
795
|
-
* Create or update a secret. The JSON payload contains a required *data* object and an optional *options* object.
|
|
867
|
+
* Create or update a secret. The JSON payload contains a required *data* object and an optional *options* object. It also contains the required tenant and user fields. The *data* object is a JSON object that contains one or more key/value pairs in which both the key and value are strings. These are the individual secrets that are saved under the path name. The secrets are automatically versioned, which allows a pre-configured number of past secret values to be accessible even after new values are assigned. See the various GET operations for details on how to access different aspects of secrets. NOTE: The *cas* option is currently ignored but documented here for future reference. The *options* object can contain a *cas* key and with an integer value that represents a secret version. CAS stands for check-and-set and will check an existing secret\'s version before updating. If cas is not set the write will be always be allowed. If set to 0, a write will only be allowed if the key doesn’t exist. If the index is greater than zero, then the write will only be allowed if the key’s current version matches the version specified in the cas parameter. ### Naming Secrets Secrets can be arranged hierarchically by using the \"+\" characters in the *secretName*. These characters will be converted to slashes upon receipt, allowing secrets to be arranged in folders. A secret is assigned a path name constructed from the *secretType* and *secretName* path parameters and, optionally, from query parameters determined by the *secretType*. Each *secretType* determines a specific transformation from the url path to a path in the vault. The *secretType* may require certain query parameters to be present on the request in order to construct the vault path. See the next section for details. ### Secret Types The list below documents each *secretType* and their applicable query parameters. Highlighted parameter names indicate required parameters. When present, default values are listed first and also highlighted. - **system** - *sysid*: the unique system id - *sysuser*: the accessing user (except when keytype=cert) - keytype: *sshkey* | password | accesskey | token | tmskey | cert - **dbcred** - *dbhost*: the DBMS hostname, IP address or alias - *dbname*: the database name or alias - *dbservice*: service name - **jwtsigning** - *no query parameters* - **user** - *no query parameters* - **service** - *no query parameters* ### Authorization Requestors are authorized based on the secret type specified in the URL path. The following authorizations are enforced: - system: limited to the systems service - dbcred: any service - jwtsigning: limited to the tokens service - user: any user - service: any service ### Generating Secrets Passwords and public/private key pairs appropriate for Tapis use can be generated as part of this secret write call. To direct SK to create a secret, assign the special value `<generate-secret>` to a key. When SK detects this value, it generates a password or key pair depending on context, and replaces the `<generate-secret>` text with the generated secret. In the case of a key pair, both the public and private keys are saved. Key pairs are always generated for secrets of type JWTSigning, while passwords are generated for all other secret types unless the key is named *privateKey*. To generate a key pair, insert the following key/value pair into the payload\'s data map: key=\"privateKey\", value=\"<generate-secret>\" When the key pair is generated, the above key/value item is replaced by these two key/value pairs: key=\"privateKey\", value=<private key in pem format> key=\"publicKey\", value=<public key in pem format> In non-JWTSigning secret types, passwords are generated whenever the following key/value pair is encountered in the payload\'s data map: key=<name other than privateKey>, value=\"<generate-secret>\" The generated password simply replaces the item\'s value and the key name is left unchanged.
|
|
796
868
|
*/
|
|
797
|
-
async writeSecret(requestParameters: WriteSecretRequest, initOverrides?: RequestInit): Promise<RespSecretMeta> {
|
|
869
|
+
async writeSecret(requestParameters: WriteSecretRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespSecretMeta> {
|
|
798
870
|
const response = await this.writeSecretRaw(requestParameters, initOverrides);
|
|
799
871
|
return await response.value();
|
|
800
872
|
}
|