@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.
Files changed (235) hide show
  1. package/.openapi-generator/FILES +16 -6
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +5 -4
  4. package/dist/apis/AdminApi.d.ts +26 -0
  5. package/dist/apis/AdminApi.js +128 -0
  6. package/dist/apis/GeneralApi.d.ts +25 -16
  7. package/dist/apis/GeneralApi.js +72 -23
  8. package/dist/apis/RoleApi.d.ts +99 -76
  9. package/dist/apis/RoleApi.js +540 -340
  10. package/dist/apis/ShareApi.d.ts +110 -0
  11. package/dist/apis/ShareApi.js +469 -0
  12. package/dist/apis/UserApi.d.ts +84 -126
  13. package/dist/apis/UserApi.js +467 -538
  14. package/dist/apis/VaultApi.d.ts +52 -49
  15. package/dist/apis/VaultApi.js +413 -341
  16. package/dist/apis/index.d.ts +2 -0
  17. package/dist/apis/index.js +20 -7
  18. package/dist/index.d.ts +2 -2
  19. package/dist/index.js +17 -6
  20. package/dist/models/Options.d.ts +8 -3
  21. package/dist/models/Options.js +23 -15
  22. package/dist/models/ReqAddChildRole.d.ts +11 -6
  23. package/dist/models/ReqAddChildRole.js +33 -19
  24. package/dist/models/ReqAddRolePermission.d.ts +18 -6
  25. package/dist/models/ReqAddRolePermission.js +36 -19
  26. package/dist/models/ReqCreateRole.d.ts +18 -6
  27. package/dist/models/ReqCreateRole.js +36 -19
  28. package/dist/models/ReqGrantRole.d.ts +51 -0
  29. package/dist/models/ReqGrantRole.js +62 -0
  30. package/dist/models/ReqGrantRoleWithPermission.d.ts +57 -0
  31. package/dist/models/ReqGrantRoleWithPermission.js +66 -0
  32. package/dist/models/ReqGrantUserPermission.d.ts +11 -6
  33. package/dist/models/ReqGrantUserPermission.js +33 -19
  34. package/dist/models/ReqPreviewPathPrefix.d.ts +19 -7
  35. package/dist/models/ReqPreviewPathPrefix.js +46 -27
  36. package/dist/models/ReqRemoveChildRole.d.ts +11 -6
  37. package/dist/models/ReqRemoveChildRole.js +33 -19
  38. package/dist/models/ReqRemovePermissionFromAllRoles.d.ts +38 -0
  39. package/dist/models/ReqRemovePermissionFromAllRoles.js +55 -0
  40. package/dist/models/ReqRemoveRolePermission.d.ts +18 -6
  41. package/dist/models/ReqRemoveRolePermission.js +36 -19
  42. package/dist/models/ReqReplacePathPrefix.d.ts +19 -7
  43. package/dist/models/ReqReplacePathPrefix.js +46 -27
  44. package/dist/models/ReqRevokeRole.d.ts +51 -0
  45. package/dist/models/ReqRevokeRole.js +62 -0
  46. package/dist/models/ReqRevokeUserPermission.d.ts +11 -6
  47. package/dist/models/ReqRevokeUserPermission.js +33 -19
  48. package/dist/models/ReqRolePermits.d.ts +45 -0
  49. package/dist/models/ReqRolePermits.js +60 -0
  50. package/dist/models/ReqShareResource.d.ts +68 -0
  51. package/dist/models/ReqShareResource.js +73 -0
  52. package/dist/models/ReqUpdateRoleDescription.d.ts +17 -5
  53. package/dist/models/ReqUpdateRoleDescription.js +32 -17
  54. package/dist/models/ReqUpdateRoleName.d.ts +17 -5
  55. package/dist/models/ReqUpdateRoleName.js +32 -17
  56. package/dist/models/ReqUpdateRoleOwner.d.ts +17 -5
  57. package/dist/models/ReqUpdateRoleOwner.js +34 -19
  58. package/dist/models/ReqUserHasRole.d.ts +18 -6
  59. package/dist/models/ReqUserHasRole.js +38 -21
  60. package/dist/models/ReqUserHasRoleMulti.d.ts +11 -6
  61. package/dist/models/ReqUserHasRoleMulti.js +35 -21
  62. package/dist/models/ReqUserIsAdmin.d.ts +10 -5
  63. package/dist/models/ReqUserIsAdmin.js +29 -17
  64. package/dist/models/ReqUserIsPermitted.d.ts +11 -6
  65. package/dist/models/ReqUserIsPermitted.js +35 -21
  66. package/dist/models/ReqUserIsPermittedMulti.d.ts +11 -6
  67. package/dist/models/ReqUserIsPermittedMulti.js +35 -21
  68. package/dist/models/ReqValidatePwd.d.ts +44 -0
  69. package/dist/models/ReqValidatePwd.js +59 -0
  70. package/dist/models/ReqVersions.d.ts +11 -6
  71. package/dist/models/ReqVersions.js +33 -19
  72. package/dist/models/ReqWriteSecret.d.ts +12 -7
  73. package/dist/models/ReqWriteSecret.js +36 -22
  74. package/dist/models/RespAuthorized.d.ts +27 -4
  75. package/dist/models/RespAuthorized.js +36 -22
  76. package/dist/models/RespBasic.d.ts +26 -3
  77. package/dist/models/RespBasic.js +35 -21
  78. package/dist/models/RespBoolean.d.ts +69 -0
  79. package/dist/models/RespBoolean.js +62 -0
  80. package/dist/models/RespChangeCount.d.ts +27 -4
  81. package/dist/models/RespChangeCount.js +36 -22
  82. package/dist/models/RespName.d.ts +27 -4
  83. package/dist/models/RespName.js +36 -22
  84. package/dist/models/RespNameArray.d.ts +27 -4
  85. package/dist/models/RespNameArray.js +36 -22
  86. package/dist/models/RespPathPrefixes.d.ts +27 -4
  87. package/dist/models/RespPathPrefixes.js +36 -22
  88. package/dist/models/RespProbe.d.ts +27 -4
  89. package/dist/models/RespProbe.js +36 -22
  90. package/dist/models/RespResourceUrl.d.ts +27 -4
  91. package/dist/models/RespResourceUrl.js +36 -22
  92. package/dist/models/RespRole.d.ts +27 -4
  93. package/dist/models/RespRole.js +36 -22
  94. package/dist/models/RespSecret.d.ts +27 -4
  95. package/dist/models/RespSecret.js +36 -22
  96. package/dist/models/RespSecretList.d.ts +27 -4
  97. package/dist/models/RespSecretList.js +36 -22
  98. package/dist/models/RespSecretMeta.d.ts +27 -4
  99. package/dist/models/RespSecretMeta.js +36 -22
  100. package/dist/models/RespSecretVersionMetadata.d.ts +27 -4
  101. package/dist/models/RespSecretVersionMetadata.js +36 -22
  102. package/dist/models/RespShare.d.ts +69 -0
  103. package/dist/models/RespShare.js +62 -0
  104. package/dist/models/RespShareList.d.ts +69 -0
  105. package/dist/models/RespShareList.js +62 -0
  106. package/dist/models/RespVersions.d.ts +26 -3
  107. package/dist/models/RespVersions.js +35 -21
  108. package/dist/models/ResultAuthorized.d.ts +8 -3
  109. package/dist/models/ResultAuthorized.js +23 -15
  110. package/dist/models/ResultBoolean.d.ts +32 -0
  111. package/dist/models/ResultBoolean.js +49 -0
  112. package/dist/models/ResultChangeCount.d.ts +8 -3
  113. package/dist/models/ResultChangeCount.js +23 -15
  114. package/dist/models/ResultName.d.ts +8 -3
  115. package/dist/models/ResultName.js +23 -15
  116. package/dist/models/ResultNameArray.d.ts +8 -3
  117. package/dist/models/ResultNameArray.js +23 -15
  118. package/dist/models/ResultResourceUrl.d.ts +8 -3
  119. package/dist/models/ResultResourceUrl.js +23 -15
  120. package/dist/models/RoleTypeEnum.d.ts +28 -0
  121. package/dist/models/RoleTypeEnum.js +54 -0
  122. package/dist/models/SkProbe.d.ts +8 -21
  123. package/dist/models/SkProbe.js +23 -21
  124. package/dist/models/SkRole.d.ts +19 -7
  125. package/dist/models/SkRole.js +48 -37
  126. package/dist/models/SkSecret.d.ts +9 -4
  127. package/dist/models/SkSecret.js +26 -18
  128. package/dist/models/SkSecretList.d.ts +8 -3
  129. package/dist/models/SkSecretList.js +25 -17
  130. package/dist/models/SkSecretMetadata.d.ts +8 -3
  131. package/dist/models/SkSecretMetadata.js +29 -21
  132. package/dist/models/SkSecretVersion.d.ts +8 -3
  133. package/dist/models/SkSecretVersion.js +29 -21
  134. package/dist/models/SkSecretVersionMetadata.d.ts +9 -4
  135. package/dist/models/SkSecretVersionMetadata.js +34 -26
  136. package/dist/models/SkShare.d.ts +92 -0
  137. package/dist/models/SkShare.js +69 -0
  138. package/dist/models/SkShareList.d.ts +33 -0
  139. package/dist/models/SkShareList.js +50 -0
  140. package/dist/models/Transformation.d.ts +8 -3
  141. package/dist/models/Transformation.js +27 -19
  142. package/dist/models/index.d.ts +14 -6
  143. package/dist/models/index.js +75 -56
  144. package/dist/runtime.d.ts +80 -38
  145. package/dist/runtime.js +313 -171
  146. package/package.json +6 -2
  147. package/src/apis/AdminApi.ts +63 -0
  148. package/src/apis/GeneralApi.ts +48 -24
  149. package/src/apis/RoleApi.ts +374 -220
  150. package/src/apis/ShareApi.ts +418 -0
  151. package/src/apis/UserApi.ts +258 -383
  152. package/src/apis/VaultApi.ts +347 -275
  153. package/src/apis/index.ts +2 -0
  154. package/src/index.ts +2 -2
  155. package/src/models/Options.ts +21 -12
  156. package/src/models/ReqAddChildRole.ts +31 -19
  157. package/src/models/ReqAddRolePermission.ts +49 -19
  158. package/src/models/ReqCreateRole.ts +49 -19
  159. package/src/models/ReqGrantRole.ts +102 -0
  160. package/src/models/ReqGrantRoleWithPermission.ts +111 -0
  161. package/src/models/ReqGrantUserPermission.ts +31 -19
  162. package/src/models/ReqPreviewPathPrefix.ts +59 -28
  163. package/src/models/ReqRemoveChildRole.ts +31 -19
  164. package/src/models/ReqRemovePermissionFromAllRoles.ts +75 -0
  165. package/src/models/ReqRemoveRolePermission.ts +49 -19
  166. package/src/models/ReqReplacePathPrefix.ts +59 -28
  167. package/src/models/ReqRevokeRole.ts +102 -0
  168. package/src/models/ReqRevokeUserPermission.ts +31 -19
  169. package/src/models/ReqRolePermits.ts +94 -0
  170. package/src/models/ReqShareResource.ts +119 -0
  171. package/src/models/ReqUpdateRoleDescription.ts +45 -16
  172. package/src/models/ReqUpdateRoleName.ts +45 -16
  173. package/src/models/ReqUpdateRoleOwner.ts +47 -18
  174. package/src/models/ReqUserHasRole.ts +51 -21
  175. package/src/models/ReqUserHasRoleMulti.ts +33 -21
  176. package/src/models/ReqUserIsAdmin.ts +27 -16
  177. package/src/models/ReqUserIsPermitted.ts +33 -21
  178. package/src/models/ReqUserIsPermittedMulti.ts +33 -21
  179. package/src/models/ReqValidatePwd.ts +84 -0
  180. package/src/models/ReqVersions.ts +31 -19
  181. package/src/models/ReqWriteSecret.ts +36 -23
  182. package/src/models/RespAuthorized.ts +54 -20
  183. package/src/models/RespBasic.ts +51 -18
  184. package/src/models/RespBoolean.ts +121 -0
  185. package/src/models/RespChangeCount.ts +54 -20
  186. package/src/models/RespName.ts +54 -20
  187. package/src/models/RespNameArray.ts +54 -20
  188. package/src/models/RespPathPrefixes.ts +54 -20
  189. package/src/models/RespProbe.ts +54 -20
  190. package/src/models/RespResourceUrl.ts +54 -20
  191. package/src/models/RespRole.ts +54 -20
  192. package/src/models/RespSecret.ts +54 -20
  193. package/src/models/RespSecretList.ts +54 -20
  194. package/src/models/RespSecretMeta.ts +54 -20
  195. package/src/models/RespSecretVersionMetadata.ts +54 -20
  196. package/src/models/RespShare.ts +121 -0
  197. package/src/models/RespShareList.ts +121 -0
  198. package/src/models/RespVersions.ts +51 -18
  199. package/src/models/ResultAuthorized.ts +21 -12
  200. package/src/models/ResultBoolean.ts +65 -0
  201. package/src/models/ResultChangeCount.ts +21 -12
  202. package/src/models/ResultName.ts +21 -12
  203. package/src/models/ResultNameArray.ts +21 -12
  204. package/src/models/ResultResourceUrl.ts +21 -12
  205. package/src/models/RoleTypeEnum.ts +56 -0
  206. package/src/models/SkProbe.ts +21 -36
  207. package/src/models/SkRole.ts +65 -38
  208. package/src/models/SkSecret.ts +26 -16
  209. package/src/models/SkSecretList.ts +23 -14
  210. package/src/models/SkSecretMetadata.ts +27 -18
  211. package/src/models/SkSecretVersion.ts +27 -18
  212. package/src/models/SkSecretVersionMetadata.ts +34 -24
  213. package/src/models/SkShare.ts +145 -0
  214. package/src/models/SkShareList.ts +73 -0
  215. package/src/models/Transformation.ts +25 -16
  216. package/src/models/index.ts +14 -6
  217. package/src/runtime.ts +219 -108
  218. package/dist/models/ReqGrantAdminRole.d.ts +0 -33
  219. package/dist/models/ReqGrantAdminRole.js +0 -43
  220. package/dist/models/ReqGrantUserRole.d.ts +0 -39
  221. package/dist/models/ReqGrantUserRole.js +0 -45
  222. package/dist/models/ReqGrantUserRoleWithPermission.d.ts +0 -45
  223. package/dist/models/ReqGrantUserRoleWithPermission.js +0 -47
  224. package/dist/models/ReqRevokeAdminRole.d.ts +0 -33
  225. package/dist/models/ReqRevokeAdminRole.js +0 -43
  226. package/dist/models/ReqRevokeUserRole.d.ts +0 -39
  227. package/dist/models/ReqRevokeUserRole.js +0 -45
  228. package/dist/models/ReqValidateServicePwd.d.ts +0 -39
  229. package/dist/models/ReqValidateServicePwd.js +0 -45
  230. package/src/models/ReqGrantAdminRole.ts +0 -64
  231. package/src/models/ReqGrantUserRole.ts +0 -72
  232. package/src/models/ReqGrantUserRoleWithPermission.ts +0 -80
  233. package/src/models/ReqRevokeAdminRole.ts +0 -64
  234. package/src/models/ReqRevokeUserRole.ts +0 -72
  235. package/src/models/ReqValidateServicePwd.ts +0 -72
@@ -3,9 +3,9 @@
3
3
  /* eslint-disable */
4
4
  /**
5
5
  * Tapis Security API
6
- * The Tapis Security API provides access to the Tapis Security Kernel authorization and secrets facilities.
6
+ * The Tapis Security API provides for management of Security Kernel (SK) role-based authorization and secrets resources.
7
7
  *
8
- * The version of the OpenAPI document: 0.1
8
+ * The version of the OpenAPI document: 1.8.2
9
9
  * Contact: cicsupport@tacc.utexas.edu
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -13,30 +13,36 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  var __extends = (this && this.__extends) || (function () {
16
- var extendStatics = Object.setPrototypeOf ||
17
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
18
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
19
22
  return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
20
25
  extendStatics(d, b);
21
26
  function __() { this.constructor = d; }
22
27
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
23
28
  };
24
29
  })();
25
30
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
31
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
26
32
  return new (P || (P = Promise))(function (resolve, reject) {
27
33
  function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
28
34
  function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
29
- function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
35
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
30
36
  step((generator = generator.apply(thisArg, _arguments || [])).next());
31
37
  });
32
38
  };
33
39
  var __generator = (this && this.__generator) || function (thisArg, body) {
34
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
35
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
40
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
41
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
36
42
  function verb(n) { return function (v) { return step([n, v]); }; }
37
43
  function step(op) {
38
44
  if (f) throw new TypeError("Generator is already executing.");
39
- while (_) try {
45
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
40
46
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
41
47
  if (y = 0, t) op = [op[0] & 2, t.value];
42
48
  switch (op[0]) {
@@ -58,8 +64,9 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
58
64
  }
59
65
  };
60
66
  Object.defineProperty(exports, "__esModule", { value: true });
67
+ exports.VaultApi = void 0;
61
68
  var runtime = require("../runtime");
62
- var models_1 = require("../models");
69
+ var index_1 = require("../models/index");
63
70
  /**
64
71
  *
65
72
  */
@@ -69,66 +76,67 @@ var VaultApi = /** @class */ (function (_super) {
69
76
  return _super !== null && _super.apply(this, arguments) || this;
70
77
  }
71
78
  /**
72
- * 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 | 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
79
+ * 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
73
80
  */
74
81
  VaultApi.prototype.deleteSecretRaw = function (requestParameters, initOverrides) {
75
82
  return __awaiter(this, void 0, void 0, function () {
76
- var queryParameters, headerParameters, response;
77
- return __generator(this, function (_a) {
78
- switch (_a.label) {
83
+ var queryParameters, headerParameters, _a, _b, response;
84
+ return __generator(this, function (_c) {
85
+ switch (_c.label) {
79
86
  case 0:
80
- if (requestParameters.secretType === null || requestParameters.secretType === undefined) {
81
- throw new runtime.RequiredError('secretType', 'Required parameter requestParameters.secretType was null or undefined when calling deleteSecret.');
87
+ if (requestParameters['secretType'] == null) {
88
+ throw new runtime.RequiredError('secretType', 'Required parameter "secretType" was null or undefined when calling deleteSecret().');
82
89
  }
83
- if (requestParameters.secretName === null || requestParameters.secretName === undefined) {
84
- throw new runtime.RequiredError('secretName', 'Required parameter requestParameters.secretName was null or undefined when calling deleteSecret.');
90
+ if (requestParameters['secretName'] == null) {
91
+ throw new runtime.RequiredError('secretName', 'Required parameter "secretName" was null or undefined when calling deleteSecret().');
85
92
  }
86
- if (requestParameters.reqVersions === null || requestParameters.reqVersions === undefined) {
87
- throw new runtime.RequiredError('reqVersions', 'Required parameter requestParameters.reqVersions was null or undefined when calling deleteSecret.');
93
+ if (requestParameters['reqVersions'] == null) {
94
+ throw new runtime.RequiredError('reqVersions', 'Required parameter "reqVersions" was null or undefined when calling deleteSecret().');
88
95
  }
89
96
  queryParameters = {};
90
- if (requestParameters.pretty !== undefined) {
91
- queryParameters['pretty'] = requestParameters.pretty;
92
- }
93
- if (requestParameters.sysid !== undefined) {
94
- queryParameters['sysid'] = requestParameters.sysid;
97
+ if (requestParameters['sysid'] != null) {
98
+ queryParameters['sysid'] = requestParameters['sysid'];
95
99
  }
96
- if (requestParameters.sysuser !== undefined) {
97
- queryParameters['sysuser'] = requestParameters.sysuser;
100
+ if (requestParameters['sysuser'] != null) {
101
+ queryParameters['sysuser'] = requestParameters['sysuser'];
98
102
  }
99
- if (requestParameters.keytype !== undefined) {
100
- queryParameters['keytype'] = requestParameters.keytype;
103
+ if (requestParameters['keytype'] != null) {
104
+ queryParameters['keytype'] = requestParameters['keytype'];
101
105
  }
102
- if (requestParameters.dbhost !== undefined) {
103
- queryParameters['dbhost'] = requestParameters.dbhost;
106
+ if (requestParameters['dbhost'] != null) {
107
+ queryParameters['dbhost'] = requestParameters['dbhost'];
104
108
  }
105
- if (requestParameters.dbname !== undefined) {
106
- queryParameters['dbname'] = requestParameters.dbname;
109
+ if (requestParameters['dbname'] != null) {
110
+ queryParameters['dbname'] = requestParameters['dbname'];
107
111
  }
108
- if (requestParameters.dbservice !== undefined) {
109
- queryParameters['dbservice'] = requestParameters.dbservice;
112
+ if (requestParameters['dbservice'] != null) {
113
+ queryParameters['dbservice'] = requestParameters['dbservice'];
110
114
  }
111
115
  headerParameters = {};
112
116
  headerParameters['Content-Type'] = 'application/json';
113
- if (this.configuration && this.configuration.apiKey) {
114
- headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
115
- }
116
- return [4 /*yield*/, this.request({
117
- path: "/security/vault/secret/delete/{secretType}/{secretName}".replace("{" + "secretType" + "}", encodeURIComponent(String(requestParameters.secretType))).replace("{" + "secretName" + "}", encodeURIComponent(String(requestParameters.secretName))),
118
- method: 'POST',
119
- headers: headerParameters,
120
- query: queryParameters,
121
- body: models_1.ReqVersionsToJSON(requestParameters.reqVersions),
122
- }, initOverrides)];
117
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
118
+ _a = headerParameters;
119
+ _b = "X-Tapis-Token";
120
+ return [4 /*yield*/, this.configuration.apiKey("X-Tapis-Token")];
123
121
  case 1:
124
- response = _a.sent();
125
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return models_1.RespVersionsFromJSON(jsonValue); })];
122
+ _a[_b] = _c.sent(); // TapisJWT authentication
123
+ _c.label = 2;
124
+ case 2: return [4 /*yield*/, this.request({
125
+ path: "/security/vault/secret/delete/{secretType}/{secretName}".replace("{".concat("secretType", "}"), encodeURIComponent(String(requestParameters['secretType']))).replace("{".concat("secretName", "}"), encodeURIComponent(String(requestParameters['secretName']))),
126
+ method: 'POST',
127
+ headers: headerParameters,
128
+ query: queryParameters,
129
+ body: (0, index_1.ReqVersionsToJSON)(requestParameters['reqVersions']),
130
+ }, initOverrides)];
131
+ case 3:
132
+ response = _c.sent();
133
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.RespVersionsFromJSON)(jsonValue); })];
126
134
  }
127
135
  });
128
136
  });
129
137
  };
130
138
  /**
131
- * 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 | 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
139
+ * 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
132
140
  */
133
141
  VaultApi.prototype.deleteSecret = function (requestParameters, initOverrides) {
134
142
  return __awaiter(this, void 0, void 0, function () {
@@ -145,66 +153,67 @@ var VaultApi = /** @class */ (function (_super) {
145
153
  });
146
154
  };
147
155
  /**
148
- * 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 | 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
156
+ * 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
149
157
  */
150
158
  VaultApi.prototype.destroySecretRaw = function (requestParameters, initOverrides) {
151
159
  return __awaiter(this, void 0, void 0, function () {
152
- var queryParameters, headerParameters, response;
153
- return __generator(this, function (_a) {
154
- switch (_a.label) {
160
+ var queryParameters, headerParameters, _a, _b, response;
161
+ return __generator(this, function (_c) {
162
+ switch (_c.label) {
155
163
  case 0:
156
- if (requestParameters.secretType === null || requestParameters.secretType === undefined) {
157
- throw new runtime.RequiredError('secretType', 'Required parameter requestParameters.secretType was null or undefined when calling destroySecret.');
164
+ if (requestParameters['secretType'] == null) {
165
+ throw new runtime.RequiredError('secretType', 'Required parameter "secretType" was null or undefined when calling destroySecret().');
158
166
  }
159
- if (requestParameters.secretName === null || requestParameters.secretName === undefined) {
160
- throw new runtime.RequiredError('secretName', 'Required parameter requestParameters.secretName was null or undefined when calling destroySecret.');
167
+ if (requestParameters['secretName'] == null) {
168
+ throw new runtime.RequiredError('secretName', 'Required parameter "secretName" was null or undefined when calling destroySecret().');
161
169
  }
162
- if (requestParameters.reqVersions === null || requestParameters.reqVersions === undefined) {
163
- throw new runtime.RequiredError('reqVersions', 'Required parameter requestParameters.reqVersions was null or undefined when calling destroySecret.');
170
+ if (requestParameters['reqVersions'] == null) {
171
+ throw new runtime.RequiredError('reqVersions', 'Required parameter "reqVersions" was null or undefined when calling destroySecret().');
164
172
  }
165
173
  queryParameters = {};
166
- if (requestParameters.pretty !== undefined) {
167
- queryParameters['pretty'] = requestParameters.pretty;
168
- }
169
- if (requestParameters.sysid !== undefined) {
170
- queryParameters['sysid'] = requestParameters.sysid;
174
+ if (requestParameters['sysid'] != null) {
175
+ queryParameters['sysid'] = requestParameters['sysid'];
171
176
  }
172
- if (requestParameters.sysuser !== undefined) {
173
- queryParameters['sysuser'] = requestParameters.sysuser;
177
+ if (requestParameters['sysuser'] != null) {
178
+ queryParameters['sysuser'] = requestParameters['sysuser'];
174
179
  }
175
- if (requestParameters.keytype !== undefined) {
176
- queryParameters['keytype'] = requestParameters.keytype;
180
+ if (requestParameters['keytype'] != null) {
181
+ queryParameters['keytype'] = requestParameters['keytype'];
177
182
  }
178
- if (requestParameters.dbhost !== undefined) {
179
- queryParameters['dbhost'] = requestParameters.dbhost;
183
+ if (requestParameters['dbhost'] != null) {
184
+ queryParameters['dbhost'] = requestParameters['dbhost'];
180
185
  }
181
- if (requestParameters.dbname !== undefined) {
182
- queryParameters['dbname'] = requestParameters.dbname;
186
+ if (requestParameters['dbname'] != null) {
187
+ queryParameters['dbname'] = requestParameters['dbname'];
183
188
  }
184
- if (requestParameters.dbservice !== undefined) {
185
- queryParameters['dbservice'] = requestParameters.dbservice;
189
+ if (requestParameters['dbservice'] != null) {
190
+ queryParameters['dbservice'] = requestParameters['dbservice'];
186
191
  }
187
192
  headerParameters = {};
188
193
  headerParameters['Content-Type'] = 'application/json';
189
- if (this.configuration && this.configuration.apiKey) {
190
- headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
191
- }
192
- return [4 /*yield*/, this.request({
193
- path: "/security/vault/secret/destroy/{secretType}/{secretName}".replace("{" + "secretType" + "}", encodeURIComponent(String(requestParameters.secretType))).replace("{" + "secretName" + "}", encodeURIComponent(String(requestParameters.secretName))),
194
- method: 'POST',
195
- headers: headerParameters,
196
- query: queryParameters,
197
- body: models_1.ReqVersionsToJSON(requestParameters.reqVersions),
198
- }, initOverrides)];
194
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
195
+ _a = headerParameters;
196
+ _b = "X-Tapis-Token";
197
+ return [4 /*yield*/, this.configuration.apiKey("X-Tapis-Token")];
199
198
  case 1:
200
- response = _a.sent();
201
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return models_1.RespVersionsFromJSON(jsonValue); })];
199
+ _a[_b] = _c.sent(); // TapisJWT authentication
200
+ _c.label = 2;
201
+ case 2: return [4 /*yield*/, this.request({
202
+ path: "/security/vault/secret/destroy/{secretType}/{secretName}".replace("{".concat("secretType", "}"), encodeURIComponent(String(requestParameters['secretType']))).replace("{".concat("secretName", "}"), encodeURIComponent(String(requestParameters['secretName']))),
203
+ method: 'POST',
204
+ headers: headerParameters,
205
+ query: queryParameters,
206
+ body: (0, index_1.ReqVersionsToJSON)(requestParameters['reqVersions']),
207
+ }, initOverrides)];
208
+ case 3:
209
+ response = _c.sent();
210
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.RespVersionsFromJSON)(jsonValue); })];
202
211
  }
203
212
  });
204
213
  });
205
214
  };
206
215
  /**
207
- * 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 | 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
216
+ * 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
208
217
  */
209
218
  VaultApi.prototype.destroySecret = function (requestParameters, initOverrides) {
210
219
  return __awaiter(this, void 0, void 0, function () {
@@ -221,67 +230,68 @@ var VaultApi = /** @class */ (function (_super) {
221
230
  });
222
231
  };
223
232
  /**
224
- * 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 | 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
233
+ * 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
225
234
  */
226
235
  VaultApi.prototype.destroySecretMetaRaw = function (requestParameters, initOverrides) {
227
236
  return __awaiter(this, void 0, void 0, function () {
228
- var queryParameters, headerParameters, response;
229
- return __generator(this, function (_a) {
230
- switch (_a.label) {
237
+ var queryParameters, headerParameters, _a, _b, response;
238
+ return __generator(this, function (_c) {
239
+ switch (_c.label) {
231
240
  case 0:
232
- if (requestParameters.secretType === null || requestParameters.secretType === undefined) {
233
- throw new runtime.RequiredError('secretType', 'Required parameter requestParameters.secretType was null or undefined when calling destroySecretMeta.');
241
+ if (requestParameters['secretType'] == null) {
242
+ throw new runtime.RequiredError('secretType', 'Required parameter "secretType" was null or undefined when calling destroySecretMeta().');
234
243
  }
235
- if (requestParameters.secretName === null || requestParameters.secretName === undefined) {
236
- throw new runtime.RequiredError('secretName', 'Required parameter requestParameters.secretName was null or undefined when calling destroySecretMeta.');
244
+ if (requestParameters['secretName'] == null) {
245
+ throw new runtime.RequiredError('secretName', 'Required parameter "secretName" was null or undefined when calling destroySecretMeta().');
237
246
  }
238
247
  queryParameters = {};
239
- if (requestParameters.tenant !== undefined) {
240
- queryParameters['tenant'] = requestParameters.tenant;
241
- }
242
- if (requestParameters.user !== undefined) {
243
- queryParameters['user'] = requestParameters.user;
248
+ if (requestParameters['tenant'] != null) {
249
+ queryParameters['tenant'] = requestParameters['tenant'];
244
250
  }
245
- if (requestParameters.pretty !== undefined) {
246
- queryParameters['pretty'] = requestParameters.pretty;
251
+ if (requestParameters['user'] != null) {
252
+ queryParameters['user'] = requestParameters['user'];
247
253
  }
248
- if (requestParameters.sysid !== undefined) {
249
- queryParameters['sysid'] = requestParameters.sysid;
254
+ if (requestParameters['sysid'] != null) {
255
+ queryParameters['sysid'] = requestParameters['sysid'];
250
256
  }
251
- if (requestParameters.sysuser !== undefined) {
252
- queryParameters['sysuser'] = requestParameters.sysuser;
257
+ if (requestParameters['sysuser'] != null) {
258
+ queryParameters['sysuser'] = requestParameters['sysuser'];
253
259
  }
254
- if (requestParameters.keytype !== undefined) {
255
- queryParameters['keytype'] = requestParameters.keytype;
260
+ if (requestParameters['keytype'] != null) {
261
+ queryParameters['keytype'] = requestParameters['keytype'];
256
262
  }
257
- if (requestParameters.dbhost !== undefined) {
258
- queryParameters['dbhost'] = requestParameters.dbhost;
263
+ if (requestParameters['dbhost'] != null) {
264
+ queryParameters['dbhost'] = requestParameters['dbhost'];
259
265
  }
260
- if (requestParameters.dbname !== undefined) {
261
- queryParameters['dbname'] = requestParameters.dbname;
266
+ if (requestParameters['dbname'] != null) {
267
+ queryParameters['dbname'] = requestParameters['dbname'];
262
268
  }
263
- if (requestParameters.dbservice !== undefined) {
264
- queryParameters['dbservice'] = requestParameters.dbservice;
269
+ if (requestParameters['dbservice'] != null) {
270
+ queryParameters['dbservice'] = requestParameters['dbservice'];
265
271
  }
266
272
  headerParameters = {};
267
- if (this.configuration && this.configuration.apiKey) {
268
- headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
269
- }
270
- return [4 /*yield*/, this.request({
271
- path: "/security/vault/secret/destroy/meta/{secretType}/{secretName}".replace("{" + "secretType" + "}", encodeURIComponent(String(requestParameters.secretType))).replace("{" + "secretName" + "}", encodeURIComponent(String(requestParameters.secretName))),
272
- method: 'DELETE',
273
- headers: headerParameters,
274
- query: queryParameters,
275
- }, initOverrides)];
273
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
274
+ _a = headerParameters;
275
+ _b = "X-Tapis-Token";
276
+ return [4 /*yield*/, this.configuration.apiKey("X-Tapis-Token")];
276
277
  case 1:
277
- response = _a.sent();
278
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return models_1.RespBasicFromJSON(jsonValue); })];
278
+ _a[_b] = _c.sent(); // TapisJWT authentication
279
+ _c.label = 2;
280
+ case 2: return [4 /*yield*/, this.request({
281
+ path: "/security/vault/secret/destroy/meta/{secretType}/{secretName}".replace("{".concat("secretType", "}"), encodeURIComponent(String(requestParameters['secretType']))).replace("{".concat("secretName", "}"), encodeURIComponent(String(requestParameters['secretName']))),
282
+ method: 'DELETE',
283
+ headers: headerParameters,
284
+ query: queryParameters,
285
+ }, initOverrides)];
286
+ case 3:
287
+ response = _c.sent();
288
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.RespBasicFromJSON)(jsonValue); })];
279
289
  }
280
290
  });
281
291
  });
282
292
  };
283
293
  /**
284
- * 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 | 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
294
+ * 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
285
295
  */
286
296
  VaultApi.prototype.destroySecretMeta = function (requestParameters, initOverrides) {
287
297
  return __awaiter(this, void 0, void 0, function () {
@@ -298,64 +308,65 @@ var VaultApi = /** @class */ (function (_super) {
298
308
  });
299
309
  };
300
310
  /**
301
- * 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 | 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
311
+ * 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
302
312
  */
303
313
  VaultApi.prototype.listSecretMetaRaw = function (requestParameters, initOverrides) {
304
314
  return __awaiter(this, void 0, void 0, function () {
305
- var queryParameters, headerParameters, response;
306
- return __generator(this, function (_a) {
307
- switch (_a.label) {
315
+ var queryParameters, headerParameters, _a, _b, response;
316
+ return __generator(this, function (_c) {
317
+ switch (_c.label) {
308
318
  case 0:
309
- if (requestParameters.secretType === null || requestParameters.secretType === undefined) {
310
- throw new runtime.RequiredError('secretType', 'Required parameter requestParameters.secretType was null or undefined when calling listSecretMeta.');
319
+ if (requestParameters['secretType'] == null) {
320
+ throw new runtime.RequiredError('secretType', 'Required parameter "secretType" was null or undefined when calling listSecretMeta().');
311
321
  }
312
322
  queryParameters = {};
313
- if (requestParameters.tenant !== undefined) {
314
- queryParameters['tenant'] = requestParameters.tenant;
315
- }
316
- if (requestParameters.user !== undefined) {
317
- queryParameters['user'] = requestParameters.user;
323
+ if (requestParameters['tenant'] != null) {
324
+ queryParameters['tenant'] = requestParameters['tenant'];
318
325
  }
319
- if (requestParameters.pretty !== undefined) {
320
- queryParameters['pretty'] = requestParameters.pretty;
326
+ if (requestParameters['user'] != null) {
327
+ queryParameters['user'] = requestParameters['user'];
321
328
  }
322
- if (requestParameters.sysid !== undefined) {
323
- queryParameters['sysid'] = requestParameters.sysid;
329
+ if (requestParameters['sysid'] != null) {
330
+ queryParameters['sysid'] = requestParameters['sysid'];
324
331
  }
325
- if (requestParameters.sysuser !== undefined) {
326
- queryParameters['sysuser'] = requestParameters.sysuser;
332
+ if (requestParameters['sysuser'] != null) {
333
+ queryParameters['sysuser'] = requestParameters['sysuser'];
327
334
  }
328
- if (requestParameters.keytype !== undefined) {
329
- queryParameters['keytype'] = requestParameters.keytype;
335
+ if (requestParameters['keytype'] != null) {
336
+ queryParameters['keytype'] = requestParameters['keytype'];
330
337
  }
331
- if (requestParameters.dbhost !== undefined) {
332
- queryParameters['dbhost'] = requestParameters.dbhost;
338
+ if (requestParameters['dbhost'] != null) {
339
+ queryParameters['dbhost'] = requestParameters['dbhost'];
333
340
  }
334
- if (requestParameters.dbname !== undefined) {
335
- queryParameters['dbname'] = requestParameters.dbname;
341
+ if (requestParameters['dbname'] != null) {
342
+ queryParameters['dbname'] = requestParameters['dbname'];
336
343
  }
337
- if (requestParameters.dbservice !== undefined) {
338
- queryParameters['dbservice'] = requestParameters.dbservice;
344
+ if (requestParameters['dbservice'] != null) {
345
+ queryParameters['dbservice'] = requestParameters['dbservice'];
339
346
  }
340
347
  headerParameters = {};
341
- if (this.configuration && this.configuration.apiKey) {
342
- headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
343
- }
344
- return [4 /*yield*/, this.request({
345
- path: "/security/vault/secret/list/meta/{secretType}".replace("{" + "secretType" + "}", encodeURIComponent(String(requestParameters.secretType))),
346
- method: 'GET',
347
- headers: headerParameters,
348
- query: queryParameters,
349
- }, initOverrides)];
348
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
349
+ _a = headerParameters;
350
+ _b = "X-Tapis-Token";
351
+ return [4 /*yield*/, this.configuration.apiKey("X-Tapis-Token")];
350
352
  case 1:
351
- response = _a.sent();
352
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return models_1.RespSecretListFromJSON(jsonValue); })];
353
+ _a[_b] = _c.sent(); // TapisJWT authentication
354
+ _c.label = 2;
355
+ case 2: return [4 /*yield*/, this.request({
356
+ path: "/security/vault/secret/list/meta/{secretType}".replace("{".concat("secretType", "}"), encodeURIComponent(String(requestParameters['secretType']))),
357
+ method: 'GET',
358
+ headers: headerParameters,
359
+ query: queryParameters,
360
+ }, initOverrides)];
361
+ case 3:
362
+ response = _c.sent();
363
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.RespSecretListFromJSON)(jsonValue); })];
353
364
  }
354
365
  });
355
366
  });
356
367
  };
357
368
  /**
358
- * 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 | 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
369
+ * 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
359
370
  */
360
371
  VaultApi.prototype.listSecretMeta = function (requestParameters, initOverrides) {
361
372
  return __awaiter(this, void 0, void 0, function () {
@@ -372,70 +383,71 @@ var VaultApi = /** @class */ (function (_super) {
372
383
  });
373
384
  };
374
385
  /**
375
- * 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 | 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
386
+ * 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
376
387
  */
377
388
  VaultApi.prototype.readSecretRaw = function (requestParameters, initOverrides) {
378
389
  return __awaiter(this, void 0, void 0, function () {
379
- var queryParameters, headerParameters, response;
380
- return __generator(this, function (_a) {
381
- switch (_a.label) {
390
+ var queryParameters, headerParameters, _a, _b, response;
391
+ return __generator(this, function (_c) {
392
+ switch (_c.label) {
382
393
  case 0:
383
- if (requestParameters.secretType === null || requestParameters.secretType === undefined) {
384
- throw new runtime.RequiredError('secretType', 'Required parameter requestParameters.secretType was null or undefined when calling readSecret.');
394
+ if (requestParameters['secretType'] == null) {
395
+ throw new runtime.RequiredError('secretType', 'Required parameter "secretType" was null or undefined when calling readSecret().');
385
396
  }
386
- if (requestParameters.secretName === null || requestParameters.secretName === undefined) {
387
- throw new runtime.RequiredError('secretName', 'Required parameter requestParameters.secretName was null or undefined when calling readSecret.');
397
+ if (requestParameters['secretName'] == null) {
398
+ throw new runtime.RequiredError('secretName', 'Required parameter "secretName" was null or undefined when calling readSecret().');
388
399
  }
389
400
  queryParameters = {};
390
- if (requestParameters.tenant !== undefined) {
391
- queryParameters['tenant'] = requestParameters.tenant;
392
- }
393
- if (requestParameters.user !== undefined) {
394
- queryParameters['user'] = requestParameters.user;
401
+ if (requestParameters['tenant'] != null) {
402
+ queryParameters['tenant'] = requestParameters['tenant'];
395
403
  }
396
- if (requestParameters.version !== undefined) {
397
- queryParameters['version'] = requestParameters.version;
404
+ if (requestParameters['user'] != null) {
405
+ queryParameters['user'] = requestParameters['user'];
398
406
  }
399
- if (requestParameters.pretty !== undefined) {
400
- queryParameters['pretty'] = requestParameters.pretty;
407
+ if (requestParameters['version'] != null) {
408
+ queryParameters['version'] = requestParameters['version'];
401
409
  }
402
- if (requestParameters.sysid !== undefined) {
403
- queryParameters['sysid'] = requestParameters.sysid;
410
+ if (requestParameters['sysid'] != null) {
411
+ queryParameters['sysid'] = requestParameters['sysid'];
404
412
  }
405
- if (requestParameters.sysuser !== undefined) {
406
- queryParameters['sysuser'] = requestParameters.sysuser;
413
+ if (requestParameters['sysuser'] != null) {
414
+ queryParameters['sysuser'] = requestParameters['sysuser'];
407
415
  }
408
- if (requestParameters.keytype !== undefined) {
409
- queryParameters['keytype'] = requestParameters.keytype;
416
+ if (requestParameters['keytype'] != null) {
417
+ queryParameters['keytype'] = requestParameters['keytype'];
410
418
  }
411
- if (requestParameters.dbhost !== undefined) {
412
- queryParameters['dbhost'] = requestParameters.dbhost;
419
+ if (requestParameters['dbhost'] != null) {
420
+ queryParameters['dbhost'] = requestParameters['dbhost'];
413
421
  }
414
- if (requestParameters.dbname !== undefined) {
415
- queryParameters['dbname'] = requestParameters.dbname;
422
+ if (requestParameters['dbname'] != null) {
423
+ queryParameters['dbname'] = requestParameters['dbname'];
416
424
  }
417
- if (requestParameters.dbservice !== undefined) {
418
- queryParameters['dbservice'] = requestParameters.dbservice;
425
+ if (requestParameters['dbservice'] != null) {
426
+ queryParameters['dbservice'] = requestParameters['dbservice'];
419
427
  }
420
428
  headerParameters = {};
421
- if (this.configuration && this.configuration.apiKey) {
422
- headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
423
- }
424
- return [4 /*yield*/, this.request({
425
- path: "/security/vault/secret/{secretType}/{secretName}".replace("{" + "secretType" + "}", encodeURIComponent(String(requestParameters.secretType))).replace("{" + "secretName" + "}", encodeURIComponent(String(requestParameters.secretName))),
426
- method: 'GET',
427
- headers: headerParameters,
428
- query: queryParameters,
429
- }, initOverrides)];
429
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
430
+ _a = headerParameters;
431
+ _b = "X-Tapis-Token";
432
+ return [4 /*yield*/, this.configuration.apiKey("X-Tapis-Token")];
430
433
  case 1:
431
- response = _a.sent();
432
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return models_1.RespSecretFromJSON(jsonValue); })];
434
+ _a[_b] = _c.sent(); // TapisJWT authentication
435
+ _c.label = 2;
436
+ case 2: return [4 /*yield*/, this.request({
437
+ path: "/security/vault/secret/{secretType}/{secretName}".replace("{".concat("secretType", "}"), encodeURIComponent(String(requestParameters['secretType']))).replace("{".concat("secretName", "}"), encodeURIComponent(String(requestParameters['secretName']))),
438
+ method: 'GET',
439
+ headers: headerParameters,
440
+ query: queryParameters,
441
+ }, initOverrides)];
442
+ case 3:
443
+ response = _c.sent();
444
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.RespSecretFromJSON)(jsonValue); })];
433
445
  }
434
446
  });
435
447
  });
436
448
  };
437
449
  /**
438
- * 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 | 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
450
+ * 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
439
451
  */
440
452
  VaultApi.prototype.readSecret = function (requestParameters, initOverrides) {
441
453
  return __awaiter(this, void 0, void 0, function () {
@@ -452,67 +464,68 @@ var VaultApi = /** @class */ (function (_super) {
452
464
  });
453
465
  };
454
466
  /**
455
- * 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 | 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
467
+ * 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
456
468
  */
457
469
  VaultApi.prototype.readSecretMetaRaw = function (requestParameters, initOverrides) {
458
470
  return __awaiter(this, void 0, void 0, function () {
459
- var queryParameters, headerParameters, response;
460
- return __generator(this, function (_a) {
461
- switch (_a.label) {
471
+ var queryParameters, headerParameters, _a, _b, response;
472
+ return __generator(this, function (_c) {
473
+ switch (_c.label) {
462
474
  case 0:
463
- if (requestParameters.secretType === null || requestParameters.secretType === undefined) {
464
- throw new runtime.RequiredError('secretType', 'Required parameter requestParameters.secretType was null or undefined when calling readSecretMeta.');
475
+ if (requestParameters['secretType'] == null) {
476
+ throw new runtime.RequiredError('secretType', 'Required parameter "secretType" was null or undefined when calling readSecretMeta().');
465
477
  }
466
- if (requestParameters.secretName === null || requestParameters.secretName === undefined) {
467
- throw new runtime.RequiredError('secretName', 'Required parameter requestParameters.secretName was null or undefined when calling readSecretMeta.');
478
+ if (requestParameters['secretName'] == null) {
479
+ throw new runtime.RequiredError('secretName', 'Required parameter "secretName" was null or undefined when calling readSecretMeta().');
468
480
  }
469
481
  queryParameters = {};
470
- if (requestParameters.tenant !== undefined) {
471
- queryParameters['tenant'] = requestParameters.tenant;
472
- }
473
- if (requestParameters.user !== undefined) {
474
- queryParameters['user'] = requestParameters.user;
482
+ if (requestParameters['tenant'] != null) {
483
+ queryParameters['tenant'] = requestParameters['tenant'];
475
484
  }
476
- if (requestParameters.pretty !== undefined) {
477
- queryParameters['pretty'] = requestParameters.pretty;
485
+ if (requestParameters['user'] != null) {
486
+ queryParameters['user'] = requestParameters['user'];
478
487
  }
479
- if (requestParameters.sysid !== undefined) {
480
- queryParameters['sysid'] = requestParameters.sysid;
488
+ if (requestParameters['sysid'] != null) {
489
+ queryParameters['sysid'] = requestParameters['sysid'];
481
490
  }
482
- if (requestParameters.sysuser !== undefined) {
483
- queryParameters['sysuser'] = requestParameters.sysuser;
491
+ if (requestParameters['sysuser'] != null) {
492
+ queryParameters['sysuser'] = requestParameters['sysuser'];
484
493
  }
485
- if (requestParameters.keytype !== undefined) {
486
- queryParameters['keytype'] = requestParameters.keytype;
494
+ if (requestParameters['keytype'] != null) {
495
+ queryParameters['keytype'] = requestParameters['keytype'];
487
496
  }
488
- if (requestParameters.dbhost !== undefined) {
489
- queryParameters['dbhost'] = requestParameters.dbhost;
497
+ if (requestParameters['dbhost'] != null) {
498
+ queryParameters['dbhost'] = requestParameters['dbhost'];
490
499
  }
491
- if (requestParameters.dbname !== undefined) {
492
- queryParameters['dbname'] = requestParameters.dbname;
500
+ if (requestParameters['dbname'] != null) {
501
+ queryParameters['dbname'] = requestParameters['dbname'];
493
502
  }
494
- if (requestParameters.dbservice !== undefined) {
495
- queryParameters['dbservice'] = requestParameters.dbservice;
503
+ if (requestParameters['dbservice'] != null) {
504
+ queryParameters['dbservice'] = requestParameters['dbservice'];
496
505
  }
497
506
  headerParameters = {};
498
- if (this.configuration && this.configuration.apiKey) {
499
- headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
500
- }
501
- return [4 /*yield*/, this.request({
502
- path: "/security/vault/secret/read/meta/{secretType}/{secretName}".replace("{" + "secretType" + "}", encodeURIComponent(String(requestParameters.secretType))).replace("{" + "secretName" + "}", encodeURIComponent(String(requestParameters.secretName))),
503
- method: 'GET',
504
- headers: headerParameters,
505
- query: queryParameters,
506
- }, initOverrides)];
507
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
508
+ _a = headerParameters;
509
+ _b = "X-Tapis-Token";
510
+ return [4 /*yield*/, this.configuration.apiKey("X-Tapis-Token")];
507
511
  case 1:
508
- response = _a.sent();
509
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return models_1.RespSecretVersionMetadataFromJSON(jsonValue); })];
512
+ _a[_b] = _c.sent(); // TapisJWT authentication
513
+ _c.label = 2;
514
+ case 2: return [4 /*yield*/, this.request({
515
+ path: "/security/vault/secret/read/meta/{secretType}/{secretName}".replace("{".concat("secretType", "}"), encodeURIComponent(String(requestParameters['secretType']))).replace("{".concat("secretName", "}"), encodeURIComponent(String(requestParameters['secretName']))),
516
+ method: 'GET',
517
+ headers: headerParameters,
518
+ query: queryParameters,
519
+ }, initOverrides)];
520
+ case 3:
521
+ response = _c.sent();
522
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.RespSecretVersionMetadataFromJSON)(jsonValue); })];
510
523
  }
511
524
  });
512
525
  });
513
526
  };
514
527
  /**
515
- * 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 | 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
528
+ * 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
516
529
  */
517
530
  VaultApi.prototype.readSecretMeta = function (requestParameters, initOverrides) {
518
531
  return __awaiter(this, void 0, void 0, function () {
@@ -529,66 +542,67 @@ var VaultApi = /** @class */ (function (_super) {
529
542
  });
530
543
  };
531
544
  /**
532
- * 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 | 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
545
+ * 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
533
546
  */
534
547
  VaultApi.prototype.undeleteSecretRaw = function (requestParameters, initOverrides) {
535
548
  return __awaiter(this, void 0, void 0, function () {
536
- var queryParameters, headerParameters, response;
537
- return __generator(this, function (_a) {
538
- switch (_a.label) {
549
+ var queryParameters, headerParameters, _a, _b, response;
550
+ return __generator(this, function (_c) {
551
+ switch (_c.label) {
539
552
  case 0:
540
- if (requestParameters.secretType === null || requestParameters.secretType === undefined) {
541
- throw new runtime.RequiredError('secretType', 'Required parameter requestParameters.secretType was null or undefined when calling undeleteSecret.');
553
+ if (requestParameters['secretType'] == null) {
554
+ throw new runtime.RequiredError('secretType', 'Required parameter "secretType" was null or undefined when calling undeleteSecret().');
542
555
  }
543
- if (requestParameters.secretName === null || requestParameters.secretName === undefined) {
544
- throw new runtime.RequiredError('secretName', 'Required parameter requestParameters.secretName was null or undefined when calling undeleteSecret.');
556
+ if (requestParameters['secretName'] == null) {
557
+ throw new runtime.RequiredError('secretName', 'Required parameter "secretName" was null or undefined when calling undeleteSecret().');
545
558
  }
546
- if (requestParameters.reqVersions === null || requestParameters.reqVersions === undefined) {
547
- throw new runtime.RequiredError('reqVersions', 'Required parameter requestParameters.reqVersions was null or undefined when calling undeleteSecret.');
559
+ if (requestParameters['reqVersions'] == null) {
560
+ throw new runtime.RequiredError('reqVersions', 'Required parameter "reqVersions" was null or undefined when calling undeleteSecret().');
548
561
  }
549
562
  queryParameters = {};
550
- if (requestParameters.pretty !== undefined) {
551
- queryParameters['pretty'] = requestParameters.pretty;
552
- }
553
- if (requestParameters.sysid !== undefined) {
554
- queryParameters['sysid'] = requestParameters.sysid;
563
+ if (requestParameters['sysid'] != null) {
564
+ queryParameters['sysid'] = requestParameters['sysid'];
555
565
  }
556
- if (requestParameters.sysuser !== undefined) {
557
- queryParameters['sysuser'] = requestParameters.sysuser;
566
+ if (requestParameters['sysuser'] != null) {
567
+ queryParameters['sysuser'] = requestParameters['sysuser'];
558
568
  }
559
- if (requestParameters.keytype !== undefined) {
560
- queryParameters['keytype'] = requestParameters.keytype;
569
+ if (requestParameters['keytype'] != null) {
570
+ queryParameters['keytype'] = requestParameters['keytype'];
561
571
  }
562
- if (requestParameters.dbhost !== undefined) {
563
- queryParameters['dbhost'] = requestParameters.dbhost;
572
+ if (requestParameters['dbhost'] != null) {
573
+ queryParameters['dbhost'] = requestParameters['dbhost'];
564
574
  }
565
- if (requestParameters.dbname !== undefined) {
566
- queryParameters['dbname'] = requestParameters.dbname;
575
+ if (requestParameters['dbname'] != null) {
576
+ queryParameters['dbname'] = requestParameters['dbname'];
567
577
  }
568
- if (requestParameters.dbservice !== undefined) {
569
- queryParameters['dbservice'] = requestParameters.dbservice;
578
+ if (requestParameters['dbservice'] != null) {
579
+ queryParameters['dbservice'] = requestParameters['dbservice'];
570
580
  }
571
581
  headerParameters = {};
572
582
  headerParameters['Content-Type'] = 'application/json';
573
- if (this.configuration && this.configuration.apiKey) {
574
- headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
575
- }
576
- return [4 /*yield*/, this.request({
577
- path: "/security/vault/secret/undelete/{secretType}/{secretName}".replace("{" + "secretType" + "}", encodeURIComponent(String(requestParameters.secretType))).replace("{" + "secretName" + "}", encodeURIComponent(String(requestParameters.secretName))),
578
- method: 'POST',
579
- headers: headerParameters,
580
- query: queryParameters,
581
- body: models_1.ReqVersionsToJSON(requestParameters.reqVersions),
582
- }, initOverrides)];
583
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
584
+ _a = headerParameters;
585
+ _b = "X-Tapis-Token";
586
+ return [4 /*yield*/, this.configuration.apiKey("X-Tapis-Token")];
583
587
  case 1:
584
- response = _a.sent();
585
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return models_1.RespVersionsFromJSON(jsonValue); })];
588
+ _a[_b] = _c.sent(); // TapisJWT authentication
589
+ _c.label = 2;
590
+ case 2: return [4 /*yield*/, this.request({
591
+ path: "/security/vault/secret/undelete/{secretType}/{secretName}".replace("{".concat("secretType", "}"), encodeURIComponent(String(requestParameters['secretType']))).replace("{".concat("secretName", "}"), encodeURIComponent(String(requestParameters['secretName']))),
592
+ method: 'POST',
593
+ headers: headerParameters,
594
+ query: queryParameters,
595
+ body: (0, index_1.ReqVersionsToJSON)(requestParameters['reqVersions']),
596
+ }, initOverrides)];
597
+ case 3:
598
+ response = _c.sent();
599
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.RespVersionsFromJSON)(jsonValue); })];
586
600
  }
587
601
  });
588
602
  });
589
603
  };
590
604
  /**
591
- * 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 | 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
+ * 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
592
606
  */
593
607
  VaultApi.prototype.undeleteSecret = function (requestParameters, initOverrides) {
594
608
  return __awaiter(this, void 0, void 0, function () {
@@ -605,45 +619,46 @@ var VaultApi = /** @class */ (function (_super) {
605
619
  });
606
620
  };
607
621
  /**
608
- * 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 specifiedin the X-Tapis-User header. The secret name is the path under whichthe 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.
622
+ * 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.
609
623
  */
610
624
  VaultApi.prototype.validateServicePasswordRaw = function (requestParameters, initOverrides) {
611
625
  return __awaiter(this, void 0, void 0, function () {
612
- var queryParameters, headerParameters, response;
613
- return __generator(this, function (_a) {
614
- switch (_a.label) {
626
+ var queryParameters, headerParameters, _a, _b, response;
627
+ return __generator(this, function (_c) {
628
+ switch (_c.label) {
615
629
  case 0:
616
- if (requestParameters.secretName === null || requestParameters.secretName === undefined) {
617
- throw new runtime.RequiredError('secretName', 'Required parameter requestParameters.secretName was null or undefined when calling validateServicePassword.');
630
+ if (requestParameters['secretName'] == null) {
631
+ throw new runtime.RequiredError('secretName', 'Required parameter "secretName" was null or undefined when calling validateServicePassword().');
618
632
  }
619
- if (requestParameters.reqValidateServicePwd === null || requestParameters.reqValidateServicePwd === undefined) {
620
- throw new runtime.RequiredError('reqValidateServicePwd', 'Required parameter requestParameters.reqValidateServicePwd was null or undefined when calling validateServicePassword.');
633
+ if (requestParameters['reqValidatePwd'] == null) {
634
+ throw new runtime.RequiredError('reqValidatePwd', 'Required parameter "reqValidatePwd" was null or undefined when calling validateServicePassword().');
621
635
  }
622
636
  queryParameters = {};
623
- if (requestParameters.pretty !== undefined) {
624
- queryParameters['pretty'] = requestParameters.pretty;
625
- }
626
637
  headerParameters = {};
627
638
  headerParameters['Content-Type'] = 'application/json';
628
- if (this.configuration && this.configuration.apiKey) {
629
- headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
630
- }
631
- return [4 /*yield*/, this.request({
632
- path: "/security/vault/secret/validateServicePassword/{secretName}".replace("{" + "secretName" + "}", encodeURIComponent(String(requestParameters.secretName))),
633
- method: 'POST',
634
- headers: headerParameters,
635
- query: queryParameters,
636
- body: models_1.ReqValidateServicePwdToJSON(requestParameters.reqValidateServicePwd),
637
- }, initOverrides)];
639
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
640
+ _a = headerParameters;
641
+ _b = "X-Tapis-Token";
642
+ return [4 /*yield*/, this.configuration.apiKey("X-Tapis-Token")];
638
643
  case 1:
639
- response = _a.sent();
640
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return models_1.RespAuthorizedFromJSON(jsonValue); })];
644
+ _a[_b] = _c.sent(); // TapisJWT authentication
645
+ _c.label = 2;
646
+ case 2: return [4 /*yield*/, this.request({
647
+ path: "/security/vault/secret/validateServicePassword/{secretName}".replace("{".concat("secretName", "}"), encodeURIComponent(String(requestParameters['secretName']))),
648
+ method: 'POST',
649
+ headers: headerParameters,
650
+ query: queryParameters,
651
+ body: (0, index_1.ReqValidatePwdToJSON)(requestParameters['reqValidatePwd']),
652
+ }, initOverrides)];
653
+ case 3:
654
+ response = _c.sent();
655
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.RespAuthorizedFromJSON)(jsonValue); })];
641
656
  }
642
657
  });
643
658
  });
644
659
  };
645
660
  /**
646
- * 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 specifiedin the X-Tapis-User header. The secret name is the path under whichthe 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.
661
+ * 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.
647
662
  */
648
663
  VaultApi.prototype.validateServicePassword = function (requestParameters, initOverrides) {
649
664
  return __awaiter(this, void 0, void 0, function () {
@@ -660,66 +675,123 @@ var VaultApi = /** @class */ (function (_super) {
660
675
  });
661
676
  };
662
677
  /**
663
- * 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 | 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
+ * 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.
664
679
  */
665
- VaultApi.prototype.writeSecretRaw = function (requestParameters, initOverrides) {
680
+ VaultApi.prototype.validateSiteAdminPasswordRaw = function (requestParameters, initOverrides) {
681
+ return __awaiter(this, void 0, void 0, function () {
682
+ var queryParameters, headerParameters, _a, _b, response;
683
+ return __generator(this, function (_c) {
684
+ switch (_c.label) {
685
+ case 0:
686
+ if (requestParameters['secretName'] == null) {
687
+ throw new runtime.RequiredError('secretName', 'Required parameter "secretName" was null or undefined when calling validateSiteAdminPassword().');
688
+ }
689
+ if (requestParameters['reqValidatePwd'] == null) {
690
+ throw new runtime.RequiredError('reqValidatePwd', 'Required parameter "reqValidatePwd" was null or undefined when calling validateSiteAdminPassword().');
691
+ }
692
+ queryParameters = {};
693
+ headerParameters = {};
694
+ headerParameters['Content-Type'] = 'application/json';
695
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
696
+ _a = headerParameters;
697
+ _b = "X-Tapis-Token";
698
+ return [4 /*yield*/, this.configuration.apiKey("X-Tapis-Token")];
699
+ case 1:
700
+ _a[_b] = _c.sent(); // TapisJWT authentication
701
+ _c.label = 2;
702
+ case 2: return [4 /*yield*/, this.request({
703
+ path: "/security/vault/secret/validateSiteAdminPassword/{secretName}".replace("{".concat("secretName", "}"), encodeURIComponent(String(requestParameters['secretName']))),
704
+ method: 'POST',
705
+ headers: headerParameters,
706
+ query: queryParameters,
707
+ body: (0, index_1.ReqValidatePwdToJSON)(requestParameters['reqValidatePwd']),
708
+ }, initOverrides)];
709
+ case 3:
710
+ response = _c.sent();
711
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.RespAuthorizedFromJSON)(jsonValue); })];
712
+ }
713
+ });
714
+ });
715
+ };
716
+ /**
717
+ * 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.
718
+ */
719
+ VaultApi.prototype.validateSiteAdminPassword = function (requestParameters, initOverrides) {
666
720
  return __awaiter(this, void 0, void 0, function () {
667
- var queryParameters, headerParameters, response;
721
+ var response;
668
722
  return __generator(this, function (_a) {
669
723
  switch (_a.label) {
724
+ case 0: return [4 /*yield*/, this.validateSiteAdminPasswordRaw(requestParameters, initOverrides)];
725
+ case 1:
726
+ response = _a.sent();
727
+ return [4 /*yield*/, response.value()];
728
+ case 2: return [2 /*return*/, _a.sent()];
729
+ }
730
+ });
731
+ });
732
+ };
733
+ /**
734
+ * 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.
735
+ */
736
+ VaultApi.prototype.writeSecretRaw = function (requestParameters, initOverrides) {
737
+ return __awaiter(this, void 0, void 0, function () {
738
+ var queryParameters, headerParameters, _a, _b, response;
739
+ return __generator(this, function (_c) {
740
+ switch (_c.label) {
670
741
  case 0:
671
- if (requestParameters.secretType === null || requestParameters.secretType === undefined) {
672
- throw new runtime.RequiredError('secretType', 'Required parameter requestParameters.secretType was null or undefined when calling writeSecret.');
742
+ if (requestParameters['secretType'] == null) {
743
+ throw new runtime.RequiredError('secretType', 'Required parameter "secretType" was null or undefined when calling writeSecret().');
673
744
  }
674
- if (requestParameters.secretName === null || requestParameters.secretName === undefined) {
675
- throw new runtime.RequiredError('secretName', 'Required parameter requestParameters.secretName was null or undefined when calling writeSecret.');
745
+ if (requestParameters['secretName'] == null) {
746
+ throw new runtime.RequiredError('secretName', 'Required parameter "secretName" was null or undefined when calling writeSecret().');
676
747
  }
677
- if (requestParameters.reqWriteSecret === null || requestParameters.reqWriteSecret === undefined) {
678
- throw new runtime.RequiredError('reqWriteSecret', 'Required parameter requestParameters.reqWriteSecret was null or undefined when calling writeSecret.');
748
+ if (requestParameters['reqWriteSecret'] == null) {
749
+ throw new runtime.RequiredError('reqWriteSecret', 'Required parameter "reqWriteSecret" was null or undefined when calling writeSecret().');
679
750
  }
680
751
  queryParameters = {};
681
- if (requestParameters.pretty !== undefined) {
682
- queryParameters['pretty'] = requestParameters.pretty;
683
- }
684
- if (requestParameters.sysid !== undefined) {
685
- queryParameters['sysid'] = requestParameters.sysid;
752
+ if (requestParameters['sysid'] != null) {
753
+ queryParameters['sysid'] = requestParameters['sysid'];
686
754
  }
687
- if (requestParameters.sysuser !== undefined) {
688
- queryParameters['sysuser'] = requestParameters.sysuser;
755
+ if (requestParameters['sysuser'] != null) {
756
+ queryParameters['sysuser'] = requestParameters['sysuser'];
689
757
  }
690
- if (requestParameters.keytype !== undefined) {
691
- queryParameters['keytype'] = requestParameters.keytype;
758
+ if (requestParameters['keytype'] != null) {
759
+ queryParameters['keytype'] = requestParameters['keytype'];
692
760
  }
693
- if (requestParameters.dbhost !== undefined) {
694
- queryParameters['dbhost'] = requestParameters.dbhost;
761
+ if (requestParameters['dbhost'] != null) {
762
+ queryParameters['dbhost'] = requestParameters['dbhost'];
695
763
  }
696
- if (requestParameters.dbname !== undefined) {
697
- queryParameters['dbname'] = requestParameters.dbname;
764
+ if (requestParameters['dbname'] != null) {
765
+ queryParameters['dbname'] = requestParameters['dbname'];
698
766
  }
699
- if (requestParameters.dbservice !== undefined) {
700
- queryParameters['dbservice'] = requestParameters.dbservice;
767
+ if (requestParameters['dbservice'] != null) {
768
+ queryParameters['dbservice'] = requestParameters['dbservice'];
701
769
  }
702
770
  headerParameters = {};
703
771
  headerParameters['Content-Type'] = 'application/json';
704
- if (this.configuration && this.configuration.apiKey) {
705
- headerParameters["X-Tapis-Token"] = this.configuration.apiKey("X-Tapis-Token"); // TapisJWT authentication
706
- }
707
- return [4 /*yield*/, this.request({
708
- path: "/security/vault/secret/{secretType}/{secretName}".replace("{" + "secretType" + "}", encodeURIComponent(String(requestParameters.secretType))).replace("{" + "secretName" + "}", encodeURIComponent(String(requestParameters.secretName))),
709
- method: 'POST',
710
- headers: headerParameters,
711
- query: queryParameters,
712
- body: models_1.ReqWriteSecretToJSON(requestParameters.reqWriteSecret),
713
- }, initOverrides)];
772
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
773
+ _a = headerParameters;
774
+ _b = "X-Tapis-Token";
775
+ return [4 /*yield*/, this.configuration.apiKey("X-Tapis-Token")];
714
776
  case 1:
715
- response = _a.sent();
716
- return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return models_1.RespSecretMetaFromJSON(jsonValue); })];
777
+ _a[_b] = _c.sent(); // TapisJWT authentication
778
+ _c.label = 2;
779
+ case 2: return [4 /*yield*/, this.request({
780
+ path: "/security/vault/secret/{secretType}/{secretName}".replace("{".concat("secretType", "}"), encodeURIComponent(String(requestParameters['secretType']))).replace("{".concat("secretName", "}"), encodeURIComponent(String(requestParameters['secretName']))),
781
+ method: 'POST',
782
+ headers: headerParameters,
783
+ query: queryParameters,
784
+ body: (0, index_1.ReqWriteSecretToJSON)(requestParameters['reqWriteSecret']),
785
+ }, initOverrides)];
786
+ case 3:
787
+ response = _c.sent();
788
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.RespSecretMetaFromJSON)(jsonValue); })];
717
789
  }
718
790
  });
719
791
  });
720
792
  };
721
793
  /**
722
- * 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 | 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
794
+ * 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.
723
795
  */
724
796
  VaultApi.prototype.writeSecret = function (requestParameters, initOverrides) {
725
797
  return __awaiter(this, void 0, void 0, function () {