@homeflare/distilled-openbao 0.2.0

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 (313) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +78 -0
  3. package/dist/credentials.d.ts +32 -0
  4. package/dist/credentials.d.ts.map +1 -0
  5. package/dist/credentials.js +66 -0
  6. package/dist/credentials.js.map +1 -0
  7. package/dist/credentials.test.d.ts +2 -0
  8. package/dist/credentials.test.d.ts.map +1 -0
  9. package/dist/credentials.test.js +29 -0
  10. package/dist/credentials.test.js.map +1 -0
  11. package/dist/errors.d.ts +57 -0
  12. package/dist/errors.d.ts.map +1 -0
  13. package/dist/errors.js +37 -0
  14. package/dist/errors.js.map +1 -0
  15. package/dist/index.d.ts +30 -0
  16. package/dist/index.d.ts.map +1 -0
  17. package/dist/index.js +30 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/protocol.d.ts +18 -0
  20. package/dist/protocol.d.ts.map +1 -0
  21. package/dist/protocol.js +96 -0
  22. package/dist/protocol.js.map +1 -0
  23. package/dist/protocol.test.d.ts +2 -0
  24. package/dist/protocol.test.d.ts.map +1 -0
  25. package/dist/protocol.test.js +78 -0
  26. package/dist/protocol.test.js.map +1 -0
  27. package/dist/retry.d.ts +60 -0
  28. package/dist/retry.d.ts.map +1 -0
  29. package/dist/retry.js +53 -0
  30. package/dist/retry.js.map +1 -0
  31. package/dist/services/alias.d.ts +73 -0
  32. package/dist/services/alias.d.ts.map +1 -0
  33. package/dist/services/alias.js +91 -0
  34. package/dist/services/alias.js.map +1 -0
  35. package/dist/services/approle.d.ts +918 -0
  36. package/dist/services/approle.d.ts.map +1 -0
  37. package/dist/services/approle.js +1206 -0
  38. package/dist/services/approle.js.map +1 -0
  39. package/dist/services/auditing.d.ts +97 -0
  40. package/dist/services/auditing.d.ts.map +1 -0
  41. package/dist/services/auditing.js +158 -0
  42. package/dist/services/auditing.js.map +1 -0
  43. package/dist/services/auth.d.ts +160 -0
  44. package/dist/services/auth.d.ts.map +1 -0
  45. package/dist/services/auth.js +169 -0
  46. package/dist/services/auth.js.map +1 -0
  47. package/dist/services/collect.d.ts +35 -0
  48. package/dist/services/collect.d.ts.map +1 -0
  49. package/dist/services/collect.js +46 -0
  50. package/dist/services/collect.js.map +1 -0
  51. package/dist/services/configure.d.ts +35 -0
  52. package/dist/services/configure.d.ts.map +1 -0
  53. package/dist/services/configure.js +43 -0
  54. package/dist/services/configure.js.map +1 -0
  55. package/dist/services/cors.d.ts +54 -0
  56. package/dist/services/cors.d.ts.map +1 -0
  57. package/dist/services/cors.js +65 -0
  58. package/dist/services/cors.js.map +1 -0
  59. package/dist/services/cubbyhole.d.ts +40 -0
  60. package/dist/services/cubbyhole.d.ts.map +1 -0
  61. package/dist/services/cubbyhole.js +56 -0
  62. package/dist/services/cubbyhole.js.map +1 -0
  63. package/dist/services/database.d.ts +278 -0
  64. package/dist/services/database.d.ts.map +1 -0
  65. package/dist/services/database.js +384 -0
  66. package/dist/services/database.js.map +1 -0
  67. package/dist/services/decode.d.ts +18 -0
  68. package/dist/services/decode.d.ts.map +1 -0
  69. package/dist/services/decode.js +24 -0
  70. package/dist/services/decode.js.map +1 -0
  71. package/dist/services/entity.d.ts +257 -0
  72. package/dist/services/entity.d.ts.map +1 -0
  73. package/dist/services/entity.js +313 -0
  74. package/dist/services/entity.js.map +1 -0
  75. package/dist/services/generate.d.ts +136 -0
  76. package/dist/services/generate.d.ts.map +1 -0
  77. package/dist/services/generate.js +188 -0
  78. package/dist/services/generate.js.map +1 -0
  79. package/dist/services/group.d.ts +244 -0
  80. package/dist/services/group.d.ts.map +1 -0
  81. package/dist/services/group.js +277 -0
  82. package/dist/services/group.js.map +1 -0
  83. package/dist/services/ha.d.ts +17 -0
  84. package/dist/services/ha.d.ts.map +1 -0
  85. package/dist/services/ha.js +24 -0
  86. package/dist/services/ha.js.map +1 -0
  87. package/dist/services/index.d.ts +54 -0
  88. package/dist/services/index.d.ts.map +1 -0
  89. package/dist/services/index.js +55 -0
  90. package/dist/services/index.js.map +1 -0
  91. package/dist/services/initialize.d.ts +34 -0
  92. package/dist/services/initialize.d.ts.map +1 -0
  93. package/dist/services/initialize.js +31 -0
  94. package/dist/services/initialize.js.map +1 -0
  95. package/dist/services/internal.d.ts +131 -0
  96. package/dist/services/internal.d.ts.map +1 -0
  97. package/dist/services/internal.js +199 -0
  98. package/dist/services/internal.js.map +1 -0
  99. package/dist/services/jwt.d.ts +684 -0
  100. package/dist/services/jwt.d.ts.map +1 -0
  101. package/dist/services/jwt.js +801 -0
  102. package/dist/services/jwt.js.map +1 -0
  103. package/dist/services/kubernetes.d.ts +166 -0
  104. package/dist/services/kubernetes.d.ts.map +1 -0
  105. package/dist/services/kubernetes.js +187 -0
  106. package/dist/services/kubernetes.js.map +1 -0
  107. package/dist/services/kv.d.ts +519 -0
  108. package/dist/services/kv.d.ts.map +1 -0
  109. package/dist/services/kv.js +655 -0
  110. package/dist/services/kv.js.map +1 -0
  111. package/dist/services/leader.d.ts +21 -0
  112. package/dist/services/leader.d.ts.map +1 -0
  113. package/dist/services/leader.js +29 -0
  114. package/dist/services/leader.js.map +1 -0
  115. package/dist/services/leases.d.ts +185 -0
  116. package/dist/services/leases.d.ts.map +1 -0
  117. package/dist/services/leases.js +238 -0
  118. package/dist/services/leases.js.map +1 -0
  119. package/dist/services/locked.d.ts +27 -0
  120. package/dist/services/locked.d.ts.map +1 -0
  121. package/dist/services/locked.js +42 -0
  122. package/dist/services/locked.js.map +1 -0
  123. package/dist/services/loggers.d.ts +69 -0
  124. package/dist/services/loggers.d.ts.map +1 -0
  125. package/dist/services/loggers.js +100 -0
  126. package/dist/services/loggers.js.map +1 -0
  127. package/dist/services/mfa.d.ts +386 -0
  128. package/dist/services/mfa.d.ts.map +1 -0
  129. package/dist/services/mfa.js +553 -0
  130. package/dist/services/mfa.js.map +1 -0
  131. package/dist/services/misc.d.ts +103 -0
  132. package/dist/services/misc.d.ts.map +1 -0
  133. package/dist/services/misc.js +120 -0
  134. package/dist/services/misc.js.map +1 -0
  135. package/dist/services/mounts.d.ts +173 -0
  136. package/dist/services/mounts.d.ts.map +1 -0
  137. package/dist/services/mounts.js +168 -0
  138. package/dist/services/mounts.js.map +1 -0
  139. package/dist/services/namespaces.d.ts +257 -0
  140. package/dist/services/namespaces.d.ts.map +1 -0
  141. package/dist/services/namespaces.js +320 -0
  142. package/dist/services/namespaces.js.map +1 -0
  143. package/dist/services/oidc.d.ts +509 -0
  144. package/dist/services/oidc.d.ts.map +1 -0
  145. package/dist/services/oidc.js +718 -0
  146. package/dist/services/oidc.js.map +1 -0
  147. package/dist/services/persona.d.ts +73 -0
  148. package/dist/services/persona.d.ts.map +1 -0
  149. package/dist/services/persona.js +91 -0
  150. package/dist/services/persona.js.map +1 -0
  151. package/dist/services/pki.d.ts +5783 -0
  152. package/dist/services/pki.d.ts.map +1 -0
  153. package/dist/services/pki.js +4995 -0
  154. package/dist/services/pki.js.map +1 -0
  155. package/dist/services/plugins.d.ts +203 -0
  156. package/dist/services/plugins.d.ts.map +1 -0
  157. package/dist/services/plugins.js +237 -0
  158. package/dist/services/plugins.js.map +1 -0
  159. package/dist/services/policies.d.ts +250 -0
  160. package/dist/services/policies.d.ts.map +1 -0
  161. package/dist/services/policies.js +312 -0
  162. package/dist/services/policies.js.map +1 -0
  163. package/dist/services/pprof.d.ts +104 -0
  164. package/dist/services/pprof.d.ts.map +1 -0
  165. package/dist/services/pprof.js +161 -0
  166. package/dist/services/pprof.js.map +1 -0
  167. package/dist/services/query.d.ts +65 -0
  168. package/dist/services/query.d.ts.map +1 -0
  169. package/dist/services/query.js +66 -0
  170. package/dist/services/query.js.map +1 -0
  171. package/dist/services/rate.d.ts +102 -0
  172. package/dist/services/rate.d.ts.map +1 -0
  173. package/dist/services/rate.js +129 -0
  174. package/dist/services/rate.js.map +1 -0
  175. package/dist/services/raw.d.ts +85 -0
  176. package/dist/services/raw.d.ts.map +1 -0
  177. package/dist/services/raw.js +116 -0
  178. package/dist/services/raw.js.map +1 -0
  179. package/dist/services/read.d.ts +87 -0
  180. package/dist/services/read.d.ts.map +1 -0
  181. package/dist/services/read.js +123 -0
  182. package/dist/services/read.js.map +1 -0
  183. package/dist/services/rekey.d.ts +184 -0
  184. package/dist/services/rekey.d.ts.map +1 -0
  185. package/dist/services/rekey.js +243 -0
  186. package/dist/services/rekey.js.map +1 -0
  187. package/dist/services/reload.d.ts +15 -0
  188. package/dist/services/reload.d.ts.map +1 -0
  189. package/dist/services/reload.js +27 -0
  190. package/dist/services/reload.js.map +1 -0
  191. package/dist/services/remount.d.ts +18 -0
  192. package/dist/services/remount.d.ts.map +1 -0
  193. package/dist/services/remount.js +30 -0
  194. package/dist/services/remount.js.map +1 -0
  195. package/dist/services/root.d.ts +134 -0
  196. package/dist/services/root.d.ts.map +1 -0
  197. package/dist/services/root.js +180 -0
  198. package/dist/services/root.js.map +1 -0
  199. package/dist/services/rotate.d.ts +367 -0
  200. package/dist/services/rotate.d.ts.map +1 -0
  201. package/dist/services/rotate.js +473 -0
  202. package/dist/services/rotate.js.map +1 -0
  203. package/dist/services/seal.d.ts +29 -0
  204. package/dist/services/seal.d.ts.map +1 -0
  205. package/dist/services/seal.js +37 -0
  206. package/dist/services/seal.js.map +1 -0
  207. package/dist/services/ssh.d.ts +491 -0
  208. package/dist/services/ssh.d.ts.map +1 -0
  209. package/dist/services/ssh.js +582 -0
  210. package/dist/services/ssh.js.map +1 -0
  211. package/dist/services/status.d.ts +17 -0
  212. package/dist/services/status.d.ts.map +1 -0
  213. package/dist/services/status.js +25 -0
  214. package/dist/services/status.js.map +1 -0
  215. package/dist/services/step.d.ts +14 -0
  216. package/dist/services/step.d.ts.map +1 -0
  217. package/dist/services/step.js +21 -0
  218. package/dist/services/step.js.map +1 -0
  219. package/dist/services/system.d.ts +33 -0
  220. package/dist/services/system.d.ts.map +1 -0
  221. package/dist/services/system.js +47 -0
  222. package/dist/services/system.js.map +1 -0
  223. package/dist/services/token.d.ts +408 -0
  224. package/dist/services/token.d.ts.map +1 -0
  225. package/dist/services/token.js +415 -0
  226. package/dist/services/token.js.map +1 -0
  227. package/dist/services/ui.d.ts +70 -0
  228. package/dist/services/ui.d.ts.map +1 -0
  229. package/dist/services/ui.js +95 -0
  230. package/dist/services/ui.js.map +1 -0
  231. package/dist/services/update.d.ts +25 -0
  232. package/dist/services/update.d.ts.map +1 -0
  233. package/dist/services/update.js +36 -0
  234. package/dist/services/update.js.map +1 -0
  235. package/dist/services/userpass.d.ts +151 -0
  236. package/dist/services/userpass.d.ts.map +1 -0
  237. package/dist/services/userpass.js +177 -0
  238. package/dist/services/userpass.js.map +1 -0
  239. package/dist/services/version.d.ts +22 -0
  240. package/dist/services/version.d.ts.map +1 -0
  241. package/dist/services/version.js +28 -0
  242. package/dist/services/version.js.map +1 -0
  243. package/dist/services/workflows.d.ts +122 -0
  244. package/dist/services/workflows.d.ts.map +1 -0
  245. package/dist/services/workflows.js +149 -0
  246. package/dist/services/workflows.js.map +1 -0
  247. package/dist/traits.d.ts +11 -0
  248. package/dist/traits.d.ts.map +1 -0
  249. package/dist/traits.js +12 -0
  250. package/dist/traits.js.map +1 -0
  251. package/package.json +75 -0
  252. package/src/credentials.test.ts +36 -0
  253. package/src/credentials.ts +100 -0
  254. package/src/errors.ts +73 -0
  255. package/src/index.ts +33 -0
  256. package/src/protocol.test.ts +123 -0
  257. package/src/protocol.ts +120 -0
  258. package/src/retry.ts +84 -0
  259. package/src/services/alias.ts +208 -0
  260. package/src/services/approle.ts +2750 -0
  261. package/src/services/auditing.ts +318 -0
  262. package/src/services/auth.ts +416 -0
  263. package/src/services/collect.ts +103 -0
  264. package/src/services/configure.ts +94 -0
  265. package/src/services/cors.ts +155 -0
  266. package/src/services/cubbyhole.ts +117 -0
  267. package/src/services/database.ts +854 -0
  268. package/src/services/decode.ts +49 -0
  269. package/src/services/entity.ts +744 -0
  270. package/src/services/generate.ts +409 -0
  271. package/src/services/group.ts +677 -0
  272. package/src/services/ha.ts +52 -0
  273. package/src/services/index.ts +54 -0
  274. package/src/services/initialize.ts +76 -0
  275. package/src/services/internal.ts +425 -0
  276. package/src/services/jwt.ts +1838 -0
  277. package/src/services/kubernetes.ts +446 -0
  278. package/src/services/kv.ts +1480 -0
  279. package/src/services/leader.ts +57 -0
  280. package/src/services/leases.ts +532 -0
  281. package/src/services/locked.ts +86 -0
  282. package/src/services/loggers.ts +215 -0
  283. package/src/services/mfa.ts +1193 -0
  284. package/src/services/misc.ts +286 -0
  285. package/src/services/mounts.ts +428 -0
  286. package/src/services/namespaces.ts +707 -0
  287. package/src/services/oidc.ts +1613 -0
  288. package/src/services/persona.ts +210 -0
  289. package/src/services/pki.ts +13320 -0
  290. package/src/services/plugins.ts +549 -0
  291. package/src/services/policies.ts +689 -0
  292. package/src/services/pprof.ts +351 -0
  293. package/src/services/query.ts +170 -0
  294. package/src/services/rate.ts +303 -0
  295. package/src/services/raw.ts +244 -0
  296. package/src/services/read.ts +266 -0
  297. package/src/services/rekey.ts +540 -0
  298. package/src/services/reload.ts +51 -0
  299. package/src/services/remount.ts +58 -0
  300. package/src/services/root.ts +393 -0
  301. package/src/services/rotate.ts +1088 -0
  302. package/src/services/seal.ts +75 -0
  303. package/src/services/ssh.ts +1351 -0
  304. package/src/services/status.ts +51 -0
  305. package/src/services/step.ts +43 -0
  306. package/src/services/system.ts +98 -0
  307. package/src/services/token.ts +1046 -0
  308. package/src/services/ui.ts +207 -0
  309. package/src/services/update.ts +73 -0
  310. package/src/services/userpass.ts +410 -0
  311. package/src/services/version.ts +60 -0
  312. package/src/services/workflows.ts +327 -0
  313. package/src/traits.ts +45 -0
@@ -0,0 +1,446 @@
1
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (specs/spec-mirror-openbao, generated — see fetch-specs.ts). Do not edit.
2
+ import * as S from "@distilled.cloud/core/schema";
3
+ import * as API from "@distilled.cloud/core/api";
4
+ import * as T from "../traits.ts";
5
+ import {
6
+ OpenBaoProtocol,
7
+ type OpenBaoOpError,
8
+ type OpenBaoOpContext,
9
+ } from "../protocol.ts";
10
+ import * as Retry from "../retry.ts";
11
+
12
+ export type { OpenBaoOpError, OpenBaoOpContext };
13
+
14
+ /** Optional list of PEM-formated public keys or certificates used to verify the signatures of kubernetes service account JWTs. If a certificate is given, its public key will be extracted. Not every installation of Kubernetes exposes these keys. */
15
+ export type KubernetesConfigureAuthRequestPemKeysList = Array<string>;
16
+ export const KubernetesConfigureAuthRequestPemKeysList = /*@__PURE__*/ S.Array(
17
+ S.String,
18
+ ) as any as S.Schema<KubernetesConfigureAuthRequestPemKeysList>;
19
+
20
+ export interface KubernetesConfigureAuthRequest {
21
+ /** Path that the backend was mounted at */
22
+ kubernetes_mount_path: string;
23
+ /** Disable JWT issuer validation (Deprecated, will be removed in a future release) */
24
+ disable_iss_validation?: boolean;
25
+ /** Disable defaulting to the local CA cert and service account JWT when running in a Kubernetes pod */
26
+ disable_local_ca_jwt?: boolean;
27
+ /** Optional JWT issuer. If no issuer is specified, then this plugin will use kubernetes.io/serviceaccount as the default issuer. (Deprecated, will be removed in a future release) */
28
+ issuer?: string;
29
+ /** PEM encoded CA cert for use by the TLS client used to talk with the API. */
30
+ kubernetes_ca_cert?: string;
31
+ /** Host must be a host string, a host:port pair, or a URL to the base of the Kubernetes API server. */
32
+ kubernetes_host?: string;
33
+ /** Optional list of PEM-formated public keys or certificates used to verify the signatures of kubernetes service account JWTs. If a certificate is given, its public key will be extracted. Not every installation of Kubernetes exposes these keys. */
34
+ pem_keys?: KubernetesConfigureAuthRequestPemKeysList;
35
+ /** A service account JWT (or other token) used as a bearer token to access the TokenReview API to validate other JWTs during login. If not set the JWT used for login will be used to access the API. */
36
+ token_reviewer_jwt?: string;
37
+ }
38
+ export const KubernetesConfigureAuthRequest = /*@__PURE__*/ S.suspend(() =>
39
+ S.Struct({
40
+ kubernetes_mount_path: S.String.pipe(T.Label()),
41
+ disable_iss_validation: S.optional(S.Boolean),
42
+ disable_local_ca_jwt: S.optional(S.Boolean),
43
+ issuer: S.optional(S.String),
44
+ kubernetes_ca_cert: S.optional(S.String),
45
+ kubernetes_host: S.optional(S.String),
46
+ pem_keys: S.optional(KubernetesConfigureAuthRequestPemKeysList),
47
+ token_reviewer_jwt: S.optional(S.String),
48
+ }).pipe(
49
+ T.Http({
50
+ method: "POST",
51
+ uri: "/auth/{kubernetes_mount_path}/config",
52
+ code: 200,
53
+ }),
54
+ ),
55
+ ).annotate({
56
+ identifier: "KubernetesConfigureAuthRequest",
57
+ }) as any as S.Schema<KubernetesConfigureAuthRequest>;
58
+
59
+ export interface KubernetesConfigureAuthResponse {}
60
+ export const KubernetesConfigureAuthResponse = /*@__PURE__*/ S.suspend(() =>
61
+ S.Struct({}),
62
+ ).annotate({
63
+ identifier: "KubernetesConfigureAuthResponse",
64
+ }) as any as S.Schema<KubernetesConfigureAuthResponse>;
65
+
66
+ export interface KubernetesDeleteAuthRoleRequest {
67
+ /** Path that the backend was mounted at */
68
+ kubernetes_mount_path: string;
69
+ /** Name of the role. */
70
+ name: string;
71
+ }
72
+ export const KubernetesDeleteAuthRoleRequest = /*@__PURE__*/ S.suspend(() =>
73
+ S.Struct({
74
+ kubernetes_mount_path: S.String.pipe(T.Label()),
75
+ name: S.String.pipe(T.Label()),
76
+ }).pipe(
77
+ T.Http({
78
+ method: "DELETE",
79
+ uri: "/auth/{kubernetes_mount_path}/role/{name}",
80
+ code: 200,
81
+ }),
82
+ ),
83
+ ).annotate({
84
+ identifier: "KubernetesDeleteAuthRoleRequest",
85
+ }) as any as S.Schema<KubernetesDeleteAuthRoleRequest>;
86
+
87
+ export interface KubernetesDeleteAuthRoleResponse {}
88
+ export const KubernetesDeleteAuthRoleResponse = /*@__PURE__*/ S.suspend(() =>
89
+ S.Struct({}),
90
+ ).annotate({
91
+ identifier: "KubernetesDeleteAuthRoleResponse",
92
+ }) as any as S.Schema<KubernetesDeleteAuthRoleResponse>;
93
+
94
+ export type KubernetesListAuthRolesRequestList = "true";
95
+ export const KubernetesListAuthRolesRequestList = S.String;
96
+
97
+ export interface KubernetesListAuthRolesRequest {
98
+ /** Path that the backend was mounted at */
99
+ kubernetes_mount_path: string;
100
+ /** Must be set to `true` */
101
+ list: KubernetesListAuthRolesRequestList | (string & {});
102
+ }
103
+ export const KubernetesListAuthRolesRequest = /*@__PURE__*/ S.suspend(() =>
104
+ S.Struct({
105
+ kubernetes_mount_path: S.String.pipe(T.Label()),
106
+ list: KubernetesListAuthRolesRequestList.pipe(T.Query()),
107
+ }).pipe(
108
+ T.Http({
109
+ method: "GET",
110
+ uri: "/auth/{kubernetes_mount_path}/role",
111
+ code: 200,
112
+ }),
113
+ ),
114
+ ).annotate({
115
+ identifier: "KubernetesListAuthRolesRequest",
116
+ }) as any as S.Schema<KubernetesListAuthRolesRequest>;
117
+
118
+ export interface KubernetesListAuthRolesResponse {}
119
+ export const KubernetesListAuthRolesResponse = /*@__PURE__*/ S.suspend(() =>
120
+ S.Struct({}),
121
+ ).annotate({
122
+ identifier: "KubernetesListAuthRolesResponse",
123
+ }) as any as S.Schema<KubernetesListAuthRolesResponse>;
124
+
125
+ export interface KubernetesReadAuthConfigurationRequest {
126
+ /** Path that the backend was mounted at */
127
+ kubernetes_mount_path: string;
128
+ }
129
+ export const KubernetesReadAuthConfigurationRequest = /*@__PURE__*/ S.suspend(
130
+ () =>
131
+ S.Struct({
132
+ kubernetes_mount_path: S.String.pipe(T.Label()),
133
+ }).pipe(
134
+ T.Http({
135
+ method: "GET",
136
+ uri: "/auth/{kubernetes_mount_path}/config",
137
+ code: 200,
138
+ }),
139
+ ),
140
+ ).annotate({
141
+ identifier: "KubernetesReadAuthConfigurationRequest",
142
+ }) as any as S.Schema<KubernetesReadAuthConfigurationRequest>;
143
+
144
+ export interface KubernetesReadAuthConfigurationResponse {}
145
+ export const KubernetesReadAuthConfigurationResponse = /*@__PURE__*/ S.suspend(
146
+ () => S.Struct({}),
147
+ ).annotate({
148
+ identifier: "KubernetesReadAuthConfigurationResponse",
149
+ }) as any as S.Schema<KubernetesReadAuthConfigurationResponse>;
150
+
151
+ export interface KubernetesReadAuthRoleRequest {
152
+ /** Path that the backend was mounted at */
153
+ kubernetes_mount_path: string;
154
+ /** Name of the role. */
155
+ name: string;
156
+ }
157
+ export const KubernetesReadAuthRoleRequest = /*@__PURE__*/ S.suspend(() =>
158
+ S.Struct({
159
+ kubernetes_mount_path: S.String.pipe(T.Label()),
160
+ name: S.String.pipe(T.Label()),
161
+ }).pipe(
162
+ T.Http({
163
+ method: "GET",
164
+ uri: "/auth/{kubernetes_mount_path}/role/{name}",
165
+ code: 200,
166
+ }),
167
+ ),
168
+ ).annotate({
169
+ identifier: "KubernetesReadAuthRoleRequest",
170
+ }) as any as S.Schema<KubernetesReadAuthRoleRequest>;
171
+
172
+ export interface KubernetesReadAuthRoleResponse {}
173
+ export const KubernetesReadAuthRoleResponse = /*@__PURE__*/ S.suspend(() =>
174
+ S.Struct({}),
175
+ ).annotate({
176
+ identifier: "KubernetesReadAuthRoleResponse",
177
+ }) as any as S.Schema<KubernetesReadAuthRoleResponse>;
178
+
179
+ /** Use "token_bound_cidrs" instead. If this and "token_bound_cidrs" are both specified, only "token_bound_cidrs" will be used. */
180
+ export type KubernetesWriteAuthRoleRequestBoundCidrsList = Array<string>;
181
+ export const KubernetesWriteAuthRoleRequestBoundCidrsList =
182
+ /*@__PURE__*/ S.Array(
183
+ S.String,
184
+ ) as any as S.Schema<KubernetesWriteAuthRoleRequestBoundCidrsList>;
185
+
186
+ /** List of service account names able to access this role. If set to "*" all names are allowed. */
187
+ export type KubernetesWriteAuthRoleRequestBoundServiceAccountNamesList =
188
+ Array<string>;
189
+ export const KubernetesWriteAuthRoleRequestBoundServiceAccountNamesList =
190
+ /*@__PURE__*/ S.Array(
191
+ S.String,
192
+ ) as any as S.Schema<KubernetesWriteAuthRoleRequestBoundServiceAccountNamesList>;
193
+
194
+ /** List of namespaces allowed to access this role. If set to "*" all namespaces are allowed. */
195
+ export type KubernetesWriteAuthRoleRequestBoundServiceAccountNamespacesList =
196
+ Array<string>;
197
+ export const KubernetesWriteAuthRoleRequestBoundServiceAccountNamespacesList =
198
+ /*@__PURE__*/ S.Array(
199
+ S.String,
200
+ ) as any as S.Schema<KubernetesWriteAuthRoleRequestBoundServiceAccountNamespacesList>;
201
+
202
+ /** Use "token_policies" instead. If this and "token_policies" are both specified, only "token_policies" will be used. */
203
+ export type KubernetesWriteAuthRoleRequestPoliciesList = Array<string>;
204
+ export const KubernetesWriteAuthRoleRequestPoliciesList = /*@__PURE__*/ S.Array(
205
+ S.String,
206
+ ) as any as S.Schema<KubernetesWriteAuthRoleRequestPoliciesList>;
207
+
208
+ /** Comma separated string or JSON list of CIDR blocks. If set, specifies the blocks of IP addresses which are allowed to use the generated token. */
209
+ export type KubernetesWriteAuthRoleRequestTokenBoundCidrsList = Array<string>;
210
+ export const KubernetesWriteAuthRoleRequestTokenBoundCidrsList =
211
+ /*@__PURE__*/ S.Array(
212
+ S.String,
213
+ ) as any as S.Schema<KubernetesWriteAuthRoleRequestTokenBoundCidrsList>;
214
+
215
+ /** Comma-separated list of policies */
216
+ export type KubernetesWriteAuthRoleRequestTokenPoliciesList = Array<string>;
217
+ export const KubernetesWriteAuthRoleRequestTokenPoliciesList =
218
+ /*@__PURE__*/ S.Array(
219
+ S.String,
220
+ ) as any as S.Schema<KubernetesWriteAuthRoleRequestTokenPoliciesList>;
221
+
222
+ export interface KubernetesWriteAuthRoleRequest {
223
+ /** Path that the backend was mounted at */
224
+ kubernetes_mount_path: string;
225
+ /** Name of the role. */
226
+ name: string;
227
+ /** Source to use when deriving the Alias name. valid choices: "serviceaccount_uid" : <token.uid> e.g. 474b11b5-0f20-4f9d-8ca5-65715ab325e0 (most secure choice) "serviceaccount_name" : <namespace>/<serviceaccount> e.g. vault/vault-agent default: "serviceaccount_uid" */
228
+ alias_name_source?: string;
229
+ /** Optional Audience claim to verify in the jwt. */
230
+ audience?: string;
231
+ /** Use "token_bound_cidrs" instead. If this and "token_bound_cidrs" are both specified, only "token_bound_cidrs" will be used. */
232
+ bound_cidrs?: KubernetesWriteAuthRoleRequestBoundCidrsList;
233
+ /** List of service account names able to access this role. If set to "*" all names are allowed. */
234
+ bound_service_account_names?: KubernetesWriteAuthRoleRequestBoundServiceAccountNamesList;
235
+ /** A label selector for Kubernetes namespaces which are allowed to access this role. Accepts either a JSON or YAML object. If set with bound_service_account_namespaces, the conditions are ORed. */
236
+ bound_service_account_namespace_selector?: string;
237
+ /** List of namespaces allowed to access this role. If set to "*" all namespaces are allowed. */
238
+ bound_service_account_namespaces?: KubernetesWriteAuthRoleRequestBoundServiceAccountNamespacesList;
239
+ /** Use "token_max_ttl" instead. If this and "token_max_ttl" are both specified, only "token_max_ttl" will be used. */
240
+ max_ttl?: number;
241
+ /** Use "token_num_uses" instead. If this and "token_num_uses" are both specified, only "token_num_uses" will be used. */
242
+ num_uses?: number;
243
+ /** Use "token_period" instead. If this and "token_period" are both specified, only "token_period" will be used. */
244
+ period?: number;
245
+ /** Use "token_policies" instead. If this and "token_policies" are both specified, only "token_policies" will be used. */
246
+ policies?: KubernetesWriteAuthRoleRequestPoliciesList;
247
+ /** Comma separated string or JSON list of CIDR blocks. If set, specifies the blocks of IP addresses which are allowed to use the generated token. */
248
+ token_bound_cidrs?: KubernetesWriteAuthRoleRequestTokenBoundCidrsList;
249
+ /** If set, tokens created via this role carry an explicit maximum TTL. During renewal, the current maximum TTL values of the role and the mount are not checked for changes, and any updates to these values will have no effect on the token being renewed. */
250
+ token_explicit_max_ttl?: number;
251
+ /** The maximum lifetime of the generated token */
252
+ token_max_ttl?: number;
253
+ /** If true, the 'default' policy will not automatically be added to generated tokens */
254
+ token_no_default_policy?: boolean;
255
+ /** The maximum number of times a token may be used, a value of zero means unlimited */
256
+ token_num_uses?: number;
257
+ /** If set, tokens created via this role will have no max lifetime; instead, their renewal period will be fixed to this value. This takes an integer number of seconds, or a string duration (e.g. "24h"). */
258
+ token_period?: number;
259
+ /** Comma-separated list of policies */
260
+ token_policies?: KubernetesWriteAuthRoleRequestTokenPoliciesList;
261
+ /** If true, CIDRs for the token will be strictly bound to the source IP address of the login request */
262
+ token_strictly_bind_ip?: boolean;
263
+ /** The initial ttl of the token to generate */
264
+ token_ttl?: number;
265
+ /** The type of token to generate, service or batch */
266
+ token_type?: string;
267
+ /** Use "token_ttl" instead. If this and "token_ttl" are both specified, only "token_ttl" will be used. */
268
+ ttl?: number;
269
+ }
270
+ export const KubernetesWriteAuthRoleRequest = /*@__PURE__*/ S.suspend(() =>
271
+ S.Struct({
272
+ kubernetes_mount_path: S.String.pipe(T.Label()),
273
+ name: S.String.pipe(T.Label()),
274
+ alias_name_source: S.optional(S.String),
275
+ audience: S.optional(S.String),
276
+ bound_cidrs: S.optional(KubernetesWriteAuthRoleRequestBoundCidrsList),
277
+ bound_service_account_names: S.optional(
278
+ KubernetesWriteAuthRoleRequestBoundServiceAccountNamesList,
279
+ ),
280
+ bound_service_account_namespace_selector: S.optional(S.String),
281
+ bound_service_account_namespaces: S.optional(
282
+ KubernetesWriteAuthRoleRequestBoundServiceAccountNamespacesList,
283
+ ),
284
+ max_ttl: S.optional(S.Number),
285
+ num_uses: S.optional(S.Number),
286
+ period: S.optional(S.Number),
287
+ policies: S.optional(KubernetesWriteAuthRoleRequestPoliciesList),
288
+ token_bound_cidrs: S.optional(
289
+ KubernetesWriteAuthRoleRequestTokenBoundCidrsList,
290
+ ),
291
+ token_explicit_max_ttl: S.optional(S.Number),
292
+ token_max_ttl: S.optional(S.Number),
293
+ token_no_default_policy: S.optional(S.Boolean),
294
+ token_num_uses: S.optional(S.Number),
295
+ token_period: S.optional(S.Number),
296
+ token_policies: S.optional(KubernetesWriteAuthRoleRequestTokenPoliciesList),
297
+ token_strictly_bind_ip: S.optional(S.Boolean),
298
+ token_ttl: S.optional(S.Number),
299
+ token_type: S.optional(S.String),
300
+ ttl: S.optional(S.Number),
301
+ }).pipe(
302
+ T.Http({
303
+ method: "POST",
304
+ uri: "/auth/{kubernetes_mount_path}/role/{name}",
305
+ code: 200,
306
+ }),
307
+ ),
308
+ ).annotate({
309
+ identifier: "KubernetesWriteAuthRoleRequest",
310
+ }) as any as S.Schema<KubernetesWriteAuthRoleRequest>;
311
+
312
+ export interface KubernetesWriteAuthRoleResponse {}
313
+ export const KubernetesWriteAuthRoleResponse = /*@__PURE__*/ S.suspend(() =>
314
+ S.Struct({}),
315
+ ).annotate({
316
+ identifier: "KubernetesWriteAuthRoleResponse",
317
+ }) as any as S.Schema<KubernetesWriteAuthRoleResponse>;
318
+
319
+ export interface LoginKubernetesRequest {
320
+ /** Path that the backend was mounted at */
321
+ kubernetes_mount_path: string;
322
+ /** A signed JWT for authenticating a service account. This field is required. */
323
+ jwt?: string;
324
+ /** Name of the role against which the login is being attempted. This field is required */
325
+ role?: string;
326
+ }
327
+ export const LoginKubernetesRequest = /*@__PURE__*/ S.suspend(() =>
328
+ S.Struct({
329
+ kubernetes_mount_path: S.String.pipe(T.Label()),
330
+ jwt: S.optional(S.String),
331
+ role: S.optional(S.String),
332
+ }).pipe(
333
+ T.Http({
334
+ method: "POST",
335
+ uri: "/auth/{kubernetes_mount_path}/login",
336
+ code: 200,
337
+ }),
338
+ ),
339
+ ).annotate({
340
+ identifier: "LoginKubernetesRequest",
341
+ }) as any as S.Schema<LoginKubernetesRequest>;
342
+
343
+ export interface LoginKubernetesResponse {}
344
+ export const LoginKubernetesResponse = /*@__PURE__*/ S.suspend(() =>
345
+ S.Struct({}),
346
+ ).annotate({
347
+ identifier: "LoginKubernetesResponse",
348
+ }) as any as S.Schema<LoginKubernetesResponse>;
349
+
350
+ export type KubernetesConfigureAuthError = OpenBaoOpError;
351
+ export const kubernetesConfigureAuth: API.OperationMethod<
352
+ KubernetesConfigureAuthRequest,
353
+ KubernetesConfigureAuthResponse,
354
+ KubernetesConfigureAuthError,
355
+ OpenBaoOpContext
356
+ > = /*@__PURE__*/ API.make(() => ({
357
+ input: KubernetesConfigureAuthRequest,
358
+ output: KubernetesConfigureAuthResponse,
359
+ errors: [],
360
+ protocol: OpenBaoProtocol,
361
+ retry: Retry.Retry,
362
+ }));
363
+
364
+ export type KubernetesDeleteAuthRoleError = OpenBaoOpError;
365
+ export const kubernetesDeleteAuthRole: API.OperationMethod<
366
+ KubernetesDeleteAuthRoleRequest,
367
+ KubernetesDeleteAuthRoleResponse,
368
+ KubernetesDeleteAuthRoleError,
369
+ OpenBaoOpContext
370
+ > = /*@__PURE__*/ API.make(() => ({
371
+ input: KubernetesDeleteAuthRoleRequest,
372
+ output: KubernetesDeleteAuthRoleResponse,
373
+ errors: [],
374
+ protocol: OpenBaoProtocol,
375
+ retry: Retry.Retry,
376
+ }));
377
+
378
+ export type KubernetesListAuthRolesError = OpenBaoOpError;
379
+ export const kubernetesListAuthRoles: API.OperationMethod<
380
+ KubernetesListAuthRolesRequest,
381
+ KubernetesListAuthRolesResponse,
382
+ KubernetesListAuthRolesError,
383
+ OpenBaoOpContext
384
+ > = /*@__PURE__*/ API.make(() => ({
385
+ input: KubernetesListAuthRolesRequest,
386
+ output: KubernetesListAuthRolesResponse,
387
+ errors: [],
388
+ protocol: OpenBaoProtocol,
389
+ retry: Retry.Retry,
390
+ }));
391
+
392
+ export type KubernetesReadAuthConfigurationError = OpenBaoOpError;
393
+ export const kubernetesReadAuthConfiguration: API.OperationMethod<
394
+ KubernetesReadAuthConfigurationRequest,
395
+ KubernetesReadAuthConfigurationResponse,
396
+ KubernetesReadAuthConfigurationError,
397
+ OpenBaoOpContext
398
+ > = /*@__PURE__*/ API.make(() => ({
399
+ input: KubernetesReadAuthConfigurationRequest,
400
+ output: KubernetesReadAuthConfigurationResponse,
401
+ errors: [],
402
+ protocol: OpenBaoProtocol,
403
+ retry: Retry.Retry,
404
+ }));
405
+
406
+ export type KubernetesReadAuthRoleError = OpenBaoOpError;
407
+ export const kubernetesReadAuthRole: API.OperationMethod<
408
+ KubernetesReadAuthRoleRequest,
409
+ KubernetesReadAuthRoleResponse,
410
+ KubernetesReadAuthRoleError,
411
+ OpenBaoOpContext
412
+ > = /*@__PURE__*/ API.make(() => ({
413
+ input: KubernetesReadAuthRoleRequest,
414
+ output: KubernetesReadAuthRoleResponse,
415
+ errors: [],
416
+ protocol: OpenBaoProtocol,
417
+ retry: Retry.Retry,
418
+ }));
419
+
420
+ export type KubernetesWriteAuthRoleError = OpenBaoOpError;
421
+ export const kubernetesWriteAuthRole: API.OperationMethod<
422
+ KubernetesWriteAuthRoleRequest,
423
+ KubernetesWriteAuthRoleResponse,
424
+ KubernetesWriteAuthRoleError,
425
+ OpenBaoOpContext
426
+ > = /*@__PURE__*/ API.make(() => ({
427
+ input: KubernetesWriteAuthRoleRequest,
428
+ output: KubernetesWriteAuthRoleResponse,
429
+ errors: [],
430
+ protocol: OpenBaoProtocol,
431
+ retry: Retry.Retry,
432
+ }));
433
+
434
+ export type LoginKubernetesError = OpenBaoOpError;
435
+ export const loginKubernetes: API.OperationMethod<
436
+ LoginKubernetesRequest,
437
+ LoginKubernetesResponse,
438
+ LoginKubernetesError,
439
+ OpenBaoOpContext
440
+ > = /*@__PURE__*/ API.make(() => ({
441
+ input: LoginKubernetesRequest,
442
+ output: LoginKubernetesResponse,
443
+ errors: [],
444
+ protocol: OpenBaoProtocol,
445
+ retry: Retry.Retry,
446
+ }));