@homeflare/distilled-openbao 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -3
- package/dist/protocol-mount-tables.d.ts +10 -0
- package/dist/protocol-mount-tables.d.ts.map +1 -0
- package/dist/protocol-mount-tables.js +39 -0
- package/dist/protocol-mount-tables.js.map +1 -0
- package/dist/protocol-mount-tables.test.d.ts +2 -0
- package/dist/protocol-mount-tables.test.d.ts.map +1 -0
- package/dist/protocol-mount-tables.test.js +164 -0
- package/dist/protocol-mount-tables.test.js.map +1 -0
- package/dist/protocol-requests.test.js +2 -2
- package/dist/protocol-requests.test.js.map +1 -1
- package/dist/protocol.d.ts +2 -2
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +5 -2
- package/dist/protocol.js.map +1 -1
- package/dist/protocol.test.js +2 -2
- package/dist/protocol.test.js.map +1 -1
- package/dist/services/auth.d.ts +46 -1
- package/dist/services/auth.d.ts.map +1 -1
- package/dist/services/auth.js +39 -1
- package/dist/services/auth.js.map +1 -1
- package/dist/services/mounts.d.ts +46 -1
- package/dist/services/mounts.d.ts.map +1 -1
- package/dist/services/mounts.js +39 -1
- package/dist/services/mounts.js.map +1 -1
- package/dist/traits.d.ts +3 -8
- package/dist/traits.d.ts.map +1 -1
- package/dist/traits.js +5 -1
- package/dist/traits.js.map +1 -1
- package/package.json +3 -3
- package/src/protocol-mount-tables.test.ts +190 -0
- package/src/protocol-mount-tables.ts +60 -0
- package/src/protocol-requests.test.ts +2 -2
- package/src/protocol.test.ts +2 -2
- package/src/protocol.ts +10 -4
- package/src/services/auth.ts +96 -2
- package/src/services/mounts.ts +96 -2
- package/src/traits.ts +9 -1
package/src/services/auth.ts
CHANGED
|
@@ -83,9 +83,103 @@ export const AuthListEnabledMethodsRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
83
83
|
identifier: "AuthListEnabledMethodsRequest",
|
|
84
84
|
}) as any as S.Schema<AuthListEnabledMethodsRequest>;
|
|
85
85
|
|
|
86
|
-
export
|
|
86
|
+
export type MountOptions = { [key: string]: string | undefined };
|
|
87
|
+
export const MountOptions = /*@__PURE__*/ S.Record(
|
|
88
|
+
S.String,
|
|
89
|
+
S.String,
|
|
90
|
+
) as any as S.Schema<MountOptions>;
|
|
91
|
+
|
|
92
|
+
export type MountStrings = Array<string>;
|
|
93
|
+
export const MountStrings = /*@__PURE__*/ S.Array(
|
|
94
|
+
S.String,
|
|
95
|
+
) as any as S.Schema<MountStrings>;
|
|
96
|
+
|
|
97
|
+
export interface MountUserLockoutConfig {
|
|
98
|
+
user_lockout_counter_reset_duration: number;
|
|
99
|
+
user_lockout_threshold: number;
|
|
100
|
+
user_lockout_duration: number;
|
|
101
|
+
user_lockout_disable: boolean;
|
|
102
|
+
}
|
|
103
|
+
export const MountUserLockoutConfig = /*@__PURE__*/ S.suspend(() =>
|
|
104
|
+
S.Struct({
|
|
105
|
+
user_lockout_counter_reset_duration: S.Number,
|
|
106
|
+
user_lockout_threshold: S.Number,
|
|
107
|
+
user_lockout_duration: S.Number,
|
|
108
|
+
user_lockout_disable: S.Boolean,
|
|
109
|
+
}),
|
|
110
|
+
).annotate({
|
|
111
|
+
identifier: "MountUserLockoutConfig",
|
|
112
|
+
}) as any as S.Schema<MountUserLockoutConfig>;
|
|
113
|
+
|
|
114
|
+
export interface MountConfig {
|
|
115
|
+
default_lease_ttl: number;
|
|
116
|
+
max_lease_ttl: number;
|
|
117
|
+
force_no_cache: boolean;
|
|
118
|
+
audit_non_hmac_request_keys?: MountStrings;
|
|
119
|
+
audit_non_hmac_response_keys?: MountStrings;
|
|
120
|
+
passthrough_request_headers?: MountStrings;
|
|
121
|
+
allowed_response_headers?: MountStrings;
|
|
122
|
+
listing_visibility?: string;
|
|
123
|
+
token_type?: string;
|
|
124
|
+
user_lockout_config?: MountUserLockoutConfig;
|
|
125
|
+
}
|
|
126
|
+
export const MountConfig = /*@__PURE__*/ S.suspend(() =>
|
|
127
|
+
S.Struct({
|
|
128
|
+
default_lease_ttl: S.Number,
|
|
129
|
+
max_lease_ttl: S.Number,
|
|
130
|
+
force_no_cache: S.Boolean,
|
|
131
|
+
audit_non_hmac_request_keys: S.optional(MountStrings),
|
|
132
|
+
audit_non_hmac_response_keys: S.optional(MountStrings),
|
|
133
|
+
passthrough_request_headers: S.optional(MountStrings),
|
|
134
|
+
allowed_response_headers: S.optional(MountStrings),
|
|
135
|
+
listing_visibility: S.optional(S.String),
|
|
136
|
+
token_type: S.optional(S.String),
|
|
137
|
+
user_lockout_config: S.optional(MountUserLockoutConfig),
|
|
138
|
+
}),
|
|
139
|
+
).annotate({ identifier: "MountConfig" }) as any as S.Schema<MountConfig>;
|
|
140
|
+
|
|
141
|
+
export interface MountInfo {
|
|
142
|
+
type: string;
|
|
143
|
+
description: string;
|
|
144
|
+
accessor: string;
|
|
145
|
+
uuid: string;
|
|
146
|
+
plugin_version: string;
|
|
147
|
+
running_plugin_version: string;
|
|
148
|
+
running_sha256: string;
|
|
149
|
+
local: boolean;
|
|
150
|
+
seal_wrap: boolean;
|
|
151
|
+
external_entropy_access: boolean;
|
|
152
|
+
options: MountOptions | null;
|
|
153
|
+
config: MountConfig;
|
|
154
|
+
deprecation_status?: string;
|
|
155
|
+
}
|
|
156
|
+
export const MountInfo = /*@__PURE__*/ S.suspend(() =>
|
|
157
|
+
S.Struct({
|
|
158
|
+
type: S.String,
|
|
159
|
+
description: S.String,
|
|
160
|
+
accessor: S.String,
|
|
161
|
+
uuid: S.String,
|
|
162
|
+
plugin_version: S.String,
|
|
163
|
+
running_plugin_version: S.String,
|
|
164
|
+
running_sha256: S.String,
|
|
165
|
+
local: S.Boolean,
|
|
166
|
+
seal_wrap: S.Boolean,
|
|
167
|
+
external_entropy_access: S.Boolean,
|
|
168
|
+
options: S.NullOr(MountOptions),
|
|
169
|
+
config: MountConfig,
|
|
170
|
+
deprecation_status: S.optional(S.String),
|
|
171
|
+
}),
|
|
172
|
+
).annotate({ identifier: "MountInfo" }) as any as S.Schema<MountInfo>;
|
|
173
|
+
|
|
174
|
+
export type MountTable = { [key: string]: MountInfo | undefined };
|
|
175
|
+
export const MountTable = /*@__PURE__*/ S.Record(
|
|
176
|
+
S.String,
|
|
177
|
+
MountInfo,
|
|
178
|
+
) as any as S.Schema<MountTable>;
|
|
179
|
+
|
|
180
|
+
export type AuthListEnabledMethodsResponse = MountTable;
|
|
87
181
|
export const AuthListEnabledMethodsResponse = /*@__PURE__*/ S.suspend(() =>
|
|
88
|
-
|
|
182
|
+
MountTable.pipe(T.MountTable()),
|
|
89
183
|
).annotate({
|
|
90
184
|
identifier: "AuthListEnabledMethodsResponse",
|
|
91
185
|
}) as any as S.Schema<AuthListEnabledMethodsResponse>;
|
package/src/services/mounts.ts
CHANGED
|
@@ -83,9 +83,103 @@ export const MountsListSecretsEnginesRequest = /*@__PURE__*/ S.suspend(() =>
|
|
|
83
83
|
identifier: "MountsListSecretsEnginesRequest",
|
|
84
84
|
}) as any as S.Schema<MountsListSecretsEnginesRequest>;
|
|
85
85
|
|
|
86
|
-
export
|
|
86
|
+
export type MountOptions = { [key: string]: string | undefined };
|
|
87
|
+
export const MountOptions = /*@__PURE__*/ S.Record(
|
|
88
|
+
S.String,
|
|
89
|
+
S.String,
|
|
90
|
+
) as any as S.Schema<MountOptions>;
|
|
91
|
+
|
|
92
|
+
export type MountStrings = Array<string>;
|
|
93
|
+
export const MountStrings = /*@__PURE__*/ S.Array(
|
|
94
|
+
S.String,
|
|
95
|
+
) as any as S.Schema<MountStrings>;
|
|
96
|
+
|
|
97
|
+
export interface MountUserLockoutConfig {
|
|
98
|
+
user_lockout_counter_reset_duration: number;
|
|
99
|
+
user_lockout_threshold: number;
|
|
100
|
+
user_lockout_duration: number;
|
|
101
|
+
user_lockout_disable: boolean;
|
|
102
|
+
}
|
|
103
|
+
export const MountUserLockoutConfig = /*@__PURE__*/ S.suspend(() =>
|
|
104
|
+
S.Struct({
|
|
105
|
+
user_lockout_counter_reset_duration: S.Number,
|
|
106
|
+
user_lockout_threshold: S.Number,
|
|
107
|
+
user_lockout_duration: S.Number,
|
|
108
|
+
user_lockout_disable: S.Boolean,
|
|
109
|
+
}),
|
|
110
|
+
).annotate({
|
|
111
|
+
identifier: "MountUserLockoutConfig",
|
|
112
|
+
}) as any as S.Schema<MountUserLockoutConfig>;
|
|
113
|
+
|
|
114
|
+
export interface MountConfig {
|
|
115
|
+
default_lease_ttl: number;
|
|
116
|
+
max_lease_ttl: number;
|
|
117
|
+
force_no_cache: boolean;
|
|
118
|
+
audit_non_hmac_request_keys?: MountStrings;
|
|
119
|
+
audit_non_hmac_response_keys?: MountStrings;
|
|
120
|
+
passthrough_request_headers?: MountStrings;
|
|
121
|
+
allowed_response_headers?: MountStrings;
|
|
122
|
+
listing_visibility?: string;
|
|
123
|
+
token_type?: string;
|
|
124
|
+
user_lockout_config?: MountUserLockoutConfig;
|
|
125
|
+
}
|
|
126
|
+
export const MountConfig = /*@__PURE__*/ S.suspend(() =>
|
|
127
|
+
S.Struct({
|
|
128
|
+
default_lease_ttl: S.Number,
|
|
129
|
+
max_lease_ttl: S.Number,
|
|
130
|
+
force_no_cache: S.Boolean,
|
|
131
|
+
audit_non_hmac_request_keys: S.optional(MountStrings),
|
|
132
|
+
audit_non_hmac_response_keys: S.optional(MountStrings),
|
|
133
|
+
passthrough_request_headers: S.optional(MountStrings),
|
|
134
|
+
allowed_response_headers: S.optional(MountStrings),
|
|
135
|
+
listing_visibility: S.optional(S.String),
|
|
136
|
+
token_type: S.optional(S.String),
|
|
137
|
+
user_lockout_config: S.optional(MountUserLockoutConfig),
|
|
138
|
+
}),
|
|
139
|
+
).annotate({ identifier: "MountConfig" }) as any as S.Schema<MountConfig>;
|
|
140
|
+
|
|
141
|
+
export interface MountInfo {
|
|
142
|
+
type: string;
|
|
143
|
+
description: string;
|
|
144
|
+
accessor: string;
|
|
145
|
+
uuid: string;
|
|
146
|
+
plugin_version: string;
|
|
147
|
+
running_plugin_version: string;
|
|
148
|
+
running_sha256: string;
|
|
149
|
+
local: boolean;
|
|
150
|
+
seal_wrap: boolean;
|
|
151
|
+
external_entropy_access: boolean;
|
|
152
|
+
options: MountOptions | null;
|
|
153
|
+
config: MountConfig;
|
|
154
|
+
deprecation_status?: string;
|
|
155
|
+
}
|
|
156
|
+
export const MountInfo = /*@__PURE__*/ S.suspend(() =>
|
|
157
|
+
S.Struct({
|
|
158
|
+
type: S.String,
|
|
159
|
+
description: S.String,
|
|
160
|
+
accessor: S.String,
|
|
161
|
+
uuid: S.String,
|
|
162
|
+
plugin_version: S.String,
|
|
163
|
+
running_plugin_version: S.String,
|
|
164
|
+
running_sha256: S.String,
|
|
165
|
+
local: S.Boolean,
|
|
166
|
+
seal_wrap: S.Boolean,
|
|
167
|
+
external_entropy_access: S.Boolean,
|
|
168
|
+
options: S.NullOr(MountOptions),
|
|
169
|
+
config: MountConfig,
|
|
170
|
+
deprecation_status: S.optional(S.String),
|
|
171
|
+
}),
|
|
172
|
+
).annotate({ identifier: "MountInfo" }) as any as S.Schema<MountInfo>;
|
|
173
|
+
|
|
174
|
+
export type MountTable = { [key: string]: MountInfo | undefined };
|
|
175
|
+
export const MountTable = /*@__PURE__*/ S.Record(
|
|
176
|
+
S.String,
|
|
177
|
+
MountInfo,
|
|
178
|
+
) as any as S.Schema<MountTable>;
|
|
179
|
+
|
|
180
|
+
export type MountsListSecretsEnginesResponse = MountTable;
|
|
87
181
|
export const MountsListSecretsEnginesResponse = /*@__PURE__*/ S.suspend(() =>
|
|
88
|
-
|
|
182
|
+
MountTable.pipe(T.MountTable()),
|
|
89
183
|
).annotate({
|
|
90
184
|
identifier: "MountsListSecretsEnginesResponse",
|
|
91
185
|
}) as any as S.Schema<MountsListSecretsEnginesResponse>;
|
package/src/traits.ts
CHANGED
|
@@ -4,8 +4,16 @@
|
|
|
4
4
|
* Re-exports the generic protocol traits from core so generated operations
|
|
5
5
|
* import everything from one place. OpenBao speaks plain token-REST JSON
|
|
6
6
|
* with a `data`-enveloped success body (unwrapped in `protocol.ts`), so
|
|
7
|
-
*
|
|
7
|
+
* MountTable marks the two inventory responses whose data is a path-keyed map.
|
|
8
8
|
*/
|
|
9
|
+
import { makeAnnotation } from "@distilled.cloud/core/trait";
|
|
10
|
+
|
|
11
|
+
export const mountTableSymbol = Symbol.for(
|
|
12
|
+
"@distilled.cloud/openbao/mount-table",
|
|
13
|
+
);
|
|
14
|
+
/** A typed dynamic map inside a required logical-response data envelope. */
|
|
15
|
+
export const MountTable = () => makeAnnotation(mountTableSymbol, true);
|
|
16
|
+
|
|
9
17
|
export {
|
|
10
18
|
Body,
|
|
11
19
|
Header,
|