@kustodian/plugin-authentik 1.0.0 → 2.0.1

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.
@@ -0,0 +1,11 @@
1
+ import type { KustodianPluginType } from '@kustodian/plugins';
2
+ /**
3
+ * Creates the Authentik plugin.
4
+ */
5
+ export declare function create_authentik_plugin(options?: Record<string, unknown>): KustodianPluginType;
6
+ /**
7
+ * Default plugin export.
8
+ */
9
+ export declare const plugin: KustodianPluginType;
10
+ export default plugin;
11
+ //# sourceMappingURL=plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAKV,mBAAmB,EAIpB,MAAM,oBAAoB,CAAC;AA4G5B;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GACpC,mBAAmB,CAqOrB;AAED;;GAEG;AACH,eAAO,MAAM,MAAM,qBAA4B,CAAC;AAEhD,eAAe,MAAM,CAAC"}
@@ -0,0 +1,559 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Authentik authorization flow types
4
+ */
5
+ export declare const authentik_flow_schema: z.ZodEnum<["implicit-consent", "explicit-consent", "default-provider-authorization-implicit-consent", "default-provider-authorization-explicit-consent"]>;
6
+ export type AuthentikFlowType = z.infer<typeof authentik_flow_schema>;
7
+ /**
8
+ * Authentik provider types
9
+ */
10
+ export declare const auth_provider_schema: z.ZodEnum<["oauth2", "saml", "proxy"]>;
11
+ export type AuthProviderType = z.infer<typeof auth_provider_schema>;
12
+ /**
13
+ * OAuth2/OIDC client types
14
+ */
15
+ export declare const client_type_schema: z.ZodEnum<["confidential", "public"]>;
16
+ export type ClientTypeType = z.infer<typeof client_type_schema>;
17
+ /**
18
+ * Authentik proxy mode types
19
+ */
20
+ export declare const proxy_mode_schema: z.ZodEnum<["proxy", "forward_single", "forward_domain"]>;
21
+ export type ProxyModeType = z.infer<typeof proxy_mode_schema>;
22
+ /**
23
+ * SAML SP binding types
24
+ */
25
+ export declare const saml_binding_schema: z.ZodEnum<["post", "redirect"]>;
26
+ export type SAMLBindingType = z.infer<typeof saml_binding_schema>;
27
+ /**
28
+ * SAML NameID policy types
29
+ */
30
+ export declare const saml_nameid_policy_schema: z.ZodEnum<["urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", "urn:oasis:names:tc:SAML:2.0:nameid-format:transient", "urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName"]>;
31
+ export type SAMLNameIDPolicyType = z.infer<typeof saml_nameid_policy_schema>;
32
+ /**
33
+ * OAuth2/OIDC provider configuration for Authentik
34
+ */
35
+ export declare const oauth2_provider_config_schema: z.ZodObject<{
36
+ /** Unique client identifier */
37
+ client_id: z.ZodString;
38
+ /** Client type (confidential or public) */
39
+ client_type: z.ZodDefault<z.ZodEnum<["confidential", "public"]>>;
40
+ /** Client secret (will be generated if not provided) */
41
+ client_secret: z.ZodOptional<z.ZodString>;
42
+ /** Redirect URIs for OAuth callbacks */
43
+ redirect_uris: z.ZodArray<z.ZodString, "many">;
44
+ /** Authorization flow slug */
45
+ authorization_flow: z.ZodOptional<z.ZodEnum<["implicit-consent", "explicit-consent", "default-provider-authorization-implicit-consent", "default-provider-authorization-explicit-consent"]>>;
46
+ /** Signing key (optional, for JWT signing) */
47
+ signing_key: z.ZodOptional<z.ZodString>;
48
+ /** Include claims in ID token */
49
+ include_claims_in_id_token: z.ZodDefault<z.ZodBoolean>;
50
+ /** Additional scopes beyond openid */
51
+ additional_scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
52
+ /** Access token validity in seconds */
53
+ access_token_validity: z.ZodDefault<z.ZodString>;
54
+ /** Refresh token validity in seconds */
55
+ refresh_token_validity: z.ZodDefault<z.ZodString>;
56
+ /** Subject mode: based_on_username, based_on_user_email, based_on_user_uuid, based_on_hashed_user_identifier */
57
+ sub_mode: z.ZodDefault<z.ZodString>;
58
+ /** Issue refresh tokens */
59
+ issue_refresh_tokens: z.ZodDefault<z.ZodBoolean>;
60
+ }, "strip", z.ZodTypeAny, {
61
+ client_id: string;
62
+ client_type: "confidential" | "public";
63
+ redirect_uris: string[];
64
+ include_claims_in_id_token: boolean;
65
+ access_token_validity: string;
66
+ refresh_token_validity: string;
67
+ sub_mode: string;
68
+ issue_refresh_tokens: boolean;
69
+ client_secret?: string | undefined;
70
+ authorization_flow?: "implicit-consent" | "explicit-consent" | "default-provider-authorization-implicit-consent" | "default-provider-authorization-explicit-consent" | undefined;
71
+ signing_key?: string | undefined;
72
+ additional_scopes?: string[] | undefined;
73
+ }, {
74
+ client_id: string;
75
+ redirect_uris: string[];
76
+ client_type?: "confidential" | "public" | undefined;
77
+ client_secret?: string | undefined;
78
+ authorization_flow?: "implicit-consent" | "explicit-consent" | "default-provider-authorization-implicit-consent" | "default-provider-authorization-explicit-consent" | undefined;
79
+ signing_key?: string | undefined;
80
+ include_claims_in_id_token?: boolean | undefined;
81
+ additional_scopes?: string[] | undefined;
82
+ access_token_validity?: string | undefined;
83
+ refresh_token_validity?: string | undefined;
84
+ sub_mode?: string | undefined;
85
+ issue_refresh_tokens?: boolean | undefined;
86
+ }>;
87
+ export type OAuth2ProviderConfigType = z.infer<typeof oauth2_provider_config_schema>;
88
+ /**
89
+ * SAML provider configuration for Authentik
90
+ */
91
+ export declare const saml_provider_config_schema: z.ZodObject<{
92
+ /** ACS (Assertion Consumer Service) URL */
93
+ acs_url: z.ZodString;
94
+ /** Entity ID / Issuer */
95
+ issuer: z.ZodString;
96
+ /** SP (Service Provider) binding method */
97
+ sp_binding: z.ZodDefault<z.ZodEnum<["post", "redirect"]>>;
98
+ /** Audience for SAML assertions */
99
+ audience: z.ZodOptional<z.ZodString>;
100
+ /** Authorization flow slug */
101
+ authorization_flow: z.ZodOptional<z.ZodEnum<["implicit-consent", "explicit-consent", "default-provider-authorization-implicit-consent", "default-provider-authorization-explicit-consent"]>>;
102
+ /** Signing certificate */
103
+ signing_kp: z.ZodOptional<z.ZodString>;
104
+ /** NameID policy */
105
+ name_id_policy: z.ZodDefault<z.ZodEnum<["urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", "urn:oasis:names:tc:SAML:2.0:nameid-format:transient", "urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName"]>>;
106
+ /** Assertion validity (not before) in seconds */
107
+ assertion_valid_not_before: z.ZodDefault<z.ZodString>;
108
+ /** Assertion validity (not on or after) in seconds */
109
+ assertion_valid_not_on_or_after: z.ZodDefault<z.ZodString>;
110
+ /** Session validity (not on or after) in seconds */
111
+ session_valid_not_on_or_after: z.ZodDefault<z.ZodString>;
112
+ }, "strip", z.ZodTypeAny, {
113
+ acs_url: string;
114
+ issuer: string;
115
+ sp_binding: "post" | "redirect";
116
+ name_id_policy: "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" | "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" | "urn:oasis:names:tc:SAML:2.0:nameid-format:transient" | "urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName";
117
+ assertion_valid_not_before: string;
118
+ assertion_valid_not_on_or_after: string;
119
+ session_valid_not_on_or_after: string;
120
+ authorization_flow?: "implicit-consent" | "explicit-consent" | "default-provider-authorization-implicit-consent" | "default-provider-authorization-explicit-consent" | undefined;
121
+ audience?: string | undefined;
122
+ signing_kp?: string | undefined;
123
+ }, {
124
+ acs_url: string;
125
+ issuer: string;
126
+ authorization_flow?: "implicit-consent" | "explicit-consent" | "default-provider-authorization-implicit-consent" | "default-provider-authorization-explicit-consent" | undefined;
127
+ sp_binding?: "post" | "redirect" | undefined;
128
+ audience?: string | undefined;
129
+ signing_kp?: string | undefined;
130
+ name_id_policy?: "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" | "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" | "urn:oasis:names:tc:SAML:2.0:nameid-format:transient" | "urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName" | undefined;
131
+ assertion_valid_not_before?: string | undefined;
132
+ assertion_valid_not_on_or_after?: string | undefined;
133
+ session_valid_not_on_or_after?: string | undefined;
134
+ }>;
135
+ export type SAMLProviderConfigType = z.infer<typeof saml_provider_config_schema>;
136
+ /**
137
+ * Proxy provider configuration for Authentik
138
+ */
139
+ export declare const proxy_provider_config_schema: z.ZodObject<{
140
+ /** External host (public URL) */
141
+ external_host: z.ZodString;
142
+ /** Internal host (backend service URL) */
143
+ internal_host: z.ZodOptional<z.ZodString>;
144
+ /** Internal host (SSL validation) */
145
+ internal_host_ssl_validation: z.ZodDefault<z.ZodBoolean>;
146
+ /** Certificate for internal SSL */
147
+ certificate: z.ZodOptional<z.ZodString>;
148
+ /** Skip path regex (paths to skip authentication) */
149
+ skip_path_regex: z.ZodOptional<z.ZodString>;
150
+ /** Basic auth enabled */
151
+ basic_auth_enabled: z.ZodDefault<z.ZodBoolean>;
152
+ /** Basic auth password attribute */
153
+ basic_auth_password_attribute: z.ZodOptional<z.ZodString>;
154
+ /** Basic auth user attribute */
155
+ basic_auth_user_attribute: z.ZodOptional<z.ZodString>;
156
+ /** Mode: proxy, forward_single, or forward_domain */
157
+ mode: z.ZodDefault<z.ZodEnum<["proxy", "forward_single", "forward_domain"]>>;
158
+ /** Authorization flow slug */
159
+ authorization_flow: z.ZodOptional<z.ZodEnum<["implicit-consent", "explicit-consent", "default-provider-authorization-implicit-consent", "default-provider-authorization-explicit-consent"]>>;
160
+ /** Access token validity in seconds */
161
+ access_token_validity: z.ZodDefault<z.ZodString>;
162
+ /** Intercept header auth */
163
+ intercept_header_auth: z.ZodDefault<z.ZodBoolean>;
164
+ }, "strip", z.ZodTypeAny, {
165
+ access_token_validity: string;
166
+ external_host: string;
167
+ internal_host_ssl_validation: boolean;
168
+ basic_auth_enabled: boolean;
169
+ mode: "proxy" | "forward_single" | "forward_domain";
170
+ intercept_header_auth: boolean;
171
+ authorization_flow?: "implicit-consent" | "explicit-consent" | "default-provider-authorization-implicit-consent" | "default-provider-authorization-explicit-consent" | undefined;
172
+ internal_host?: string | undefined;
173
+ certificate?: string | undefined;
174
+ skip_path_regex?: string | undefined;
175
+ basic_auth_password_attribute?: string | undefined;
176
+ basic_auth_user_attribute?: string | undefined;
177
+ }, {
178
+ external_host: string;
179
+ authorization_flow?: "implicit-consent" | "explicit-consent" | "default-provider-authorization-implicit-consent" | "default-provider-authorization-explicit-consent" | undefined;
180
+ access_token_validity?: string | undefined;
181
+ internal_host?: string | undefined;
182
+ internal_host_ssl_validation?: boolean | undefined;
183
+ certificate?: string | undefined;
184
+ skip_path_regex?: string | undefined;
185
+ basic_auth_enabled?: boolean | undefined;
186
+ basic_auth_password_attribute?: string | undefined;
187
+ basic_auth_user_attribute?: string | undefined;
188
+ mode?: "proxy" | "forward_single" | "forward_domain" | undefined;
189
+ intercept_header_auth?: boolean | undefined;
190
+ }>;
191
+ export type ProxyProviderConfigType = z.infer<typeof proxy_provider_config_schema>;
192
+ /**
193
+ * Authentication configuration in template kustomizations
194
+ */
195
+ export declare const auth_config_schema: z.ZodObject<{
196
+ /** Authentication provider type */
197
+ provider: z.ZodEnum<["oauth2", "saml", "proxy"]>;
198
+ /** Application name (used as identifier) */
199
+ app_name: z.ZodString;
200
+ /** Display name for the application */
201
+ app_display_name: z.ZodOptional<z.ZodString>;
202
+ /** Application description */
203
+ app_description: z.ZodOptional<z.ZodString>;
204
+ /** Application icon URL */
205
+ app_icon: z.ZodOptional<z.ZodString>;
206
+ /** Application group/category */
207
+ app_group: z.ZodOptional<z.ZodString>;
208
+ /** Application launch URL */
209
+ app_launch_url: z.ZodOptional<z.ZodString>;
210
+ /** OAuth2/OIDC-specific configuration */
211
+ oauth2: z.ZodOptional<z.ZodObject<{
212
+ client_id: z.ZodOptional<z.ZodString>;
213
+ client_type: z.ZodOptional<z.ZodDefault<z.ZodEnum<["confidential", "public"]>>>;
214
+ client_secret: z.ZodOptional<z.ZodOptional<z.ZodString>>;
215
+ redirect_uris: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
216
+ authorization_flow: z.ZodOptional<z.ZodOptional<z.ZodEnum<["implicit-consent", "explicit-consent", "default-provider-authorization-implicit-consent", "default-provider-authorization-explicit-consent"]>>>;
217
+ signing_key: z.ZodOptional<z.ZodOptional<z.ZodString>>;
218
+ include_claims_in_id_token: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
219
+ additional_scopes: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
220
+ access_token_validity: z.ZodOptional<z.ZodDefault<z.ZodString>>;
221
+ refresh_token_validity: z.ZodOptional<z.ZodDefault<z.ZodString>>;
222
+ sub_mode: z.ZodOptional<z.ZodDefault<z.ZodString>>;
223
+ issue_refresh_tokens: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
224
+ }, "strip", z.ZodTypeAny, {
225
+ client_id?: string | undefined;
226
+ client_type?: "confidential" | "public" | undefined;
227
+ client_secret?: string | undefined;
228
+ redirect_uris?: string[] | undefined;
229
+ authorization_flow?: "implicit-consent" | "explicit-consent" | "default-provider-authorization-implicit-consent" | "default-provider-authorization-explicit-consent" | undefined;
230
+ signing_key?: string | undefined;
231
+ include_claims_in_id_token?: boolean | undefined;
232
+ additional_scopes?: string[] | undefined;
233
+ access_token_validity?: string | undefined;
234
+ refresh_token_validity?: string | undefined;
235
+ sub_mode?: string | undefined;
236
+ issue_refresh_tokens?: boolean | undefined;
237
+ }, {
238
+ client_id?: string | undefined;
239
+ client_type?: "confidential" | "public" | undefined;
240
+ client_secret?: string | undefined;
241
+ redirect_uris?: string[] | undefined;
242
+ authorization_flow?: "implicit-consent" | "explicit-consent" | "default-provider-authorization-implicit-consent" | "default-provider-authorization-explicit-consent" | undefined;
243
+ signing_key?: string | undefined;
244
+ include_claims_in_id_token?: boolean | undefined;
245
+ additional_scopes?: string[] | undefined;
246
+ access_token_validity?: string | undefined;
247
+ refresh_token_validity?: string | undefined;
248
+ sub_mode?: string | undefined;
249
+ issue_refresh_tokens?: boolean | undefined;
250
+ }>>;
251
+ /** SAML-specific configuration */
252
+ saml: z.ZodOptional<z.ZodObject<{
253
+ acs_url: z.ZodOptional<z.ZodString>;
254
+ issuer: z.ZodOptional<z.ZodString>;
255
+ sp_binding: z.ZodOptional<z.ZodDefault<z.ZodEnum<["post", "redirect"]>>>;
256
+ audience: z.ZodOptional<z.ZodOptional<z.ZodString>>;
257
+ authorization_flow: z.ZodOptional<z.ZodOptional<z.ZodEnum<["implicit-consent", "explicit-consent", "default-provider-authorization-implicit-consent", "default-provider-authorization-explicit-consent"]>>>;
258
+ signing_kp: z.ZodOptional<z.ZodOptional<z.ZodString>>;
259
+ name_id_policy: z.ZodOptional<z.ZodDefault<z.ZodEnum<["urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", "urn:oasis:names:tc:SAML:2.0:nameid-format:transient", "urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName"]>>>;
260
+ assertion_valid_not_before: z.ZodOptional<z.ZodDefault<z.ZodString>>;
261
+ assertion_valid_not_on_or_after: z.ZodOptional<z.ZodDefault<z.ZodString>>;
262
+ session_valid_not_on_or_after: z.ZodOptional<z.ZodDefault<z.ZodString>>;
263
+ }, "strip", z.ZodTypeAny, {
264
+ authorization_flow?: "implicit-consent" | "explicit-consent" | "default-provider-authorization-implicit-consent" | "default-provider-authorization-explicit-consent" | undefined;
265
+ acs_url?: string | undefined;
266
+ issuer?: string | undefined;
267
+ sp_binding?: "post" | "redirect" | undefined;
268
+ audience?: string | undefined;
269
+ signing_kp?: string | undefined;
270
+ name_id_policy?: "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" | "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" | "urn:oasis:names:tc:SAML:2.0:nameid-format:transient" | "urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName" | undefined;
271
+ assertion_valid_not_before?: string | undefined;
272
+ assertion_valid_not_on_or_after?: string | undefined;
273
+ session_valid_not_on_or_after?: string | undefined;
274
+ }, {
275
+ authorization_flow?: "implicit-consent" | "explicit-consent" | "default-provider-authorization-implicit-consent" | "default-provider-authorization-explicit-consent" | undefined;
276
+ acs_url?: string | undefined;
277
+ issuer?: string | undefined;
278
+ sp_binding?: "post" | "redirect" | undefined;
279
+ audience?: string | undefined;
280
+ signing_kp?: string | undefined;
281
+ name_id_policy?: "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" | "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" | "urn:oasis:names:tc:SAML:2.0:nameid-format:transient" | "urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName" | undefined;
282
+ assertion_valid_not_before?: string | undefined;
283
+ assertion_valid_not_on_or_after?: string | undefined;
284
+ session_valid_not_on_or_after?: string | undefined;
285
+ }>>;
286
+ /** Proxy-specific configuration */
287
+ proxy: z.ZodOptional<z.ZodObject<{
288
+ external_host: z.ZodOptional<z.ZodString>;
289
+ internal_host: z.ZodOptional<z.ZodOptional<z.ZodString>>;
290
+ internal_host_ssl_validation: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
291
+ certificate: z.ZodOptional<z.ZodOptional<z.ZodString>>;
292
+ skip_path_regex: z.ZodOptional<z.ZodOptional<z.ZodString>>;
293
+ basic_auth_enabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
294
+ basic_auth_password_attribute: z.ZodOptional<z.ZodOptional<z.ZodString>>;
295
+ basic_auth_user_attribute: z.ZodOptional<z.ZodOptional<z.ZodString>>;
296
+ mode: z.ZodOptional<z.ZodDefault<z.ZodEnum<["proxy", "forward_single", "forward_domain"]>>>;
297
+ authorization_flow: z.ZodOptional<z.ZodOptional<z.ZodEnum<["implicit-consent", "explicit-consent", "default-provider-authorization-implicit-consent", "default-provider-authorization-explicit-consent"]>>>;
298
+ access_token_validity: z.ZodOptional<z.ZodDefault<z.ZodString>>;
299
+ intercept_header_auth: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
300
+ }, "strip", z.ZodTypeAny, {
301
+ authorization_flow?: "implicit-consent" | "explicit-consent" | "default-provider-authorization-implicit-consent" | "default-provider-authorization-explicit-consent" | undefined;
302
+ access_token_validity?: string | undefined;
303
+ external_host?: string | undefined;
304
+ internal_host?: string | undefined;
305
+ internal_host_ssl_validation?: boolean | undefined;
306
+ certificate?: string | undefined;
307
+ skip_path_regex?: string | undefined;
308
+ basic_auth_enabled?: boolean | undefined;
309
+ basic_auth_password_attribute?: string | undefined;
310
+ basic_auth_user_attribute?: string | undefined;
311
+ mode?: "proxy" | "forward_single" | "forward_domain" | undefined;
312
+ intercept_header_auth?: boolean | undefined;
313
+ }, {
314
+ authorization_flow?: "implicit-consent" | "explicit-consent" | "default-provider-authorization-implicit-consent" | "default-provider-authorization-explicit-consent" | undefined;
315
+ access_token_validity?: string | undefined;
316
+ external_host?: string | undefined;
317
+ internal_host?: string | undefined;
318
+ internal_host_ssl_validation?: boolean | undefined;
319
+ certificate?: string | undefined;
320
+ skip_path_regex?: string | undefined;
321
+ basic_auth_enabled?: boolean | undefined;
322
+ basic_auth_password_attribute?: string | undefined;
323
+ basic_auth_user_attribute?: string | undefined;
324
+ mode?: "proxy" | "forward_single" | "forward_domain" | undefined;
325
+ intercept_header_auth?: boolean | undefined;
326
+ }>>;
327
+ }, "strip", z.ZodTypeAny, {
328
+ provider: "oauth2" | "saml" | "proxy";
329
+ app_name: string;
330
+ oauth2?: {
331
+ client_id?: string | undefined;
332
+ client_type?: "confidential" | "public" | undefined;
333
+ client_secret?: string | undefined;
334
+ redirect_uris?: string[] | undefined;
335
+ authorization_flow?: "implicit-consent" | "explicit-consent" | "default-provider-authorization-implicit-consent" | "default-provider-authorization-explicit-consent" | undefined;
336
+ signing_key?: string | undefined;
337
+ include_claims_in_id_token?: boolean | undefined;
338
+ additional_scopes?: string[] | undefined;
339
+ access_token_validity?: string | undefined;
340
+ refresh_token_validity?: string | undefined;
341
+ sub_mode?: string | undefined;
342
+ issue_refresh_tokens?: boolean | undefined;
343
+ } | undefined;
344
+ saml?: {
345
+ authorization_flow?: "implicit-consent" | "explicit-consent" | "default-provider-authorization-implicit-consent" | "default-provider-authorization-explicit-consent" | undefined;
346
+ acs_url?: string | undefined;
347
+ issuer?: string | undefined;
348
+ sp_binding?: "post" | "redirect" | undefined;
349
+ audience?: string | undefined;
350
+ signing_kp?: string | undefined;
351
+ name_id_policy?: "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" | "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" | "urn:oasis:names:tc:SAML:2.0:nameid-format:transient" | "urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName" | undefined;
352
+ assertion_valid_not_before?: string | undefined;
353
+ assertion_valid_not_on_or_after?: string | undefined;
354
+ session_valid_not_on_or_after?: string | undefined;
355
+ } | undefined;
356
+ proxy?: {
357
+ authorization_flow?: "implicit-consent" | "explicit-consent" | "default-provider-authorization-implicit-consent" | "default-provider-authorization-explicit-consent" | undefined;
358
+ access_token_validity?: string | undefined;
359
+ external_host?: string | undefined;
360
+ internal_host?: string | undefined;
361
+ internal_host_ssl_validation?: boolean | undefined;
362
+ certificate?: string | undefined;
363
+ skip_path_regex?: string | undefined;
364
+ basic_auth_enabled?: boolean | undefined;
365
+ basic_auth_password_attribute?: string | undefined;
366
+ basic_auth_user_attribute?: string | undefined;
367
+ mode?: "proxy" | "forward_single" | "forward_domain" | undefined;
368
+ intercept_header_auth?: boolean | undefined;
369
+ } | undefined;
370
+ app_display_name?: string | undefined;
371
+ app_description?: string | undefined;
372
+ app_icon?: string | undefined;
373
+ app_group?: string | undefined;
374
+ app_launch_url?: string | undefined;
375
+ }, {
376
+ provider: "oauth2" | "saml" | "proxy";
377
+ app_name: string;
378
+ oauth2?: {
379
+ client_id?: string | undefined;
380
+ client_type?: "confidential" | "public" | undefined;
381
+ client_secret?: string | undefined;
382
+ redirect_uris?: string[] | undefined;
383
+ authorization_flow?: "implicit-consent" | "explicit-consent" | "default-provider-authorization-implicit-consent" | "default-provider-authorization-explicit-consent" | undefined;
384
+ signing_key?: string | undefined;
385
+ include_claims_in_id_token?: boolean | undefined;
386
+ additional_scopes?: string[] | undefined;
387
+ access_token_validity?: string | undefined;
388
+ refresh_token_validity?: string | undefined;
389
+ sub_mode?: string | undefined;
390
+ issue_refresh_tokens?: boolean | undefined;
391
+ } | undefined;
392
+ saml?: {
393
+ authorization_flow?: "implicit-consent" | "explicit-consent" | "default-provider-authorization-implicit-consent" | "default-provider-authorization-explicit-consent" | undefined;
394
+ acs_url?: string | undefined;
395
+ issuer?: string | undefined;
396
+ sp_binding?: "post" | "redirect" | undefined;
397
+ audience?: string | undefined;
398
+ signing_kp?: string | undefined;
399
+ name_id_policy?: "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" | "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" | "urn:oasis:names:tc:SAML:2.0:nameid-format:transient" | "urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName" | undefined;
400
+ assertion_valid_not_before?: string | undefined;
401
+ assertion_valid_not_on_or_after?: string | undefined;
402
+ session_valid_not_on_or_after?: string | undefined;
403
+ } | undefined;
404
+ proxy?: {
405
+ authorization_flow?: "implicit-consent" | "explicit-consent" | "default-provider-authorization-implicit-consent" | "default-provider-authorization-explicit-consent" | undefined;
406
+ access_token_validity?: string | undefined;
407
+ external_host?: string | undefined;
408
+ internal_host?: string | undefined;
409
+ internal_host_ssl_validation?: boolean | undefined;
410
+ certificate?: string | undefined;
411
+ skip_path_regex?: string | undefined;
412
+ basic_auth_enabled?: boolean | undefined;
413
+ basic_auth_password_attribute?: string | undefined;
414
+ basic_auth_user_attribute?: string | undefined;
415
+ mode?: "proxy" | "forward_single" | "forward_domain" | undefined;
416
+ intercept_header_auth?: boolean | undefined;
417
+ } | undefined;
418
+ app_display_name?: string | undefined;
419
+ app_description?: string | undefined;
420
+ app_icon?: string | undefined;
421
+ app_group?: string | undefined;
422
+ app_launch_url?: string | undefined;
423
+ }>;
424
+ export type AuthConfigType = z.infer<typeof auth_config_schema>;
425
+ /**
426
+ * Authentik plugin options
427
+ */
428
+ export declare const authentik_plugin_options_schema: z.ZodObject<{
429
+ /** Authentik domain (e.g., authentik.example.com) */
430
+ domain: z.ZodOptional<z.ZodString>;
431
+ /** Default authorization flow */
432
+ default_authorization_flow: z.ZodDefault<z.ZodEnum<["implicit-consent", "explicit-consent", "default-provider-authorization-implicit-consent", "default-provider-authorization-explicit-consent"]>>;
433
+ /** Default proxy outpost name */
434
+ outpost_name: z.ZodDefault<z.ZodString>;
435
+ /** Whether to generate client secrets automatically */
436
+ auto_generate_secrets: z.ZodDefault<z.ZodBoolean>;
437
+ /** Output directory for generated blueprints */
438
+ output_dir: z.ZodDefault<z.ZodString>;
439
+ /** Blueprint version */
440
+ blueprint_version: z.ZodDefault<z.ZodNumber>;
441
+ }, "strip", z.ZodTypeAny, {
442
+ default_authorization_flow: "implicit-consent" | "explicit-consent" | "default-provider-authorization-implicit-consent" | "default-provider-authorization-explicit-consent";
443
+ outpost_name: string;
444
+ auto_generate_secrets: boolean;
445
+ output_dir: string;
446
+ blueprint_version: number;
447
+ domain?: string | undefined;
448
+ }, {
449
+ domain?: string | undefined;
450
+ default_authorization_flow?: "implicit-consent" | "explicit-consent" | "default-provider-authorization-implicit-consent" | "default-provider-authorization-explicit-consent" | undefined;
451
+ outpost_name?: string | undefined;
452
+ auto_generate_secrets?: boolean | undefined;
453
+ output_dir?: string | undefined;
454
+ blueprint_version?: number | undefined;
455
+ }>;
456
+ export type AuthentikPluginOptionsType = z.infer<typeof authentik_plugin_options_schema>;
457
+ /**
458
+ * Authentik application blueprint
459
+ */
460
+ export interface AuthentikApplicationType {
461
+ identifiers: {
462
+ slug: string;
463
+ };
464
+ model: 'authentik_core.application';
465
+ attrs: {
466
+ name: string;
467
+ slug: string;
468
+ provider?: string;
469
+ meta_description?: string;
470
+ meta_icon?: string;
471
+ group?: string;
472
+ meta_launch_url?: string;
473
+ policy_engine_mode?: string;
474
+ };
475
+ }
476
+ /**
477
+ * Authentik provider blueprint (OAuth2)
478
+ */
479
+ export interface AuthentikOAuth2ProviderType {
480
+ identifiers: {
481
+ name: string;
482
+ };
483
+ model: 'authentik_providers_oauth2.oauth2provider';
484
+ attrs: {
485
+ name: string;
486
+ client_id: string;
487
+ client_type: string;
488
+ client_secret?: string;
489
+ redirect_uris: string;
490
+ authorization_flow?: string;
491
+ signing_key?: string;
492
+ include_claims_in_id_token: boolean;
493
+ access_token_validity: string;
494
+ refresh_token_validity: string;
495
+ sub_mode: string;
496
+ issue_refresh_tokens: boolean;
497
+ property_mappings?: string[];
498
+ };
499
+ }
500
+ /**
501
+ * Authentik provider blueprint (SAML)
502
+ */
503
+ export interface AuthentikSAMLProviderType {
504
+ identifiers: {
505
+ name: string;
506
+ };
507
+ model: 'authentik_providers_saml.samlprovider';
508
+ attrs: {
509
+ name: string;
510
+ acs_url: string;
511
+ issuer: string;
512
+ sp_binding: string;
513
+ audience?: string;
514
+ authorization_flow?: string;
515
+ signing_kp?: string;
516
+ name_id_mapping?: string;
517
+ assertion_valid_not_before: string;
518
+ assertion_valid_not_on_or_after: string;
519
+ session_valid_not_on_or_after: string;
520
+ property_mappings?: string[];
521
+ };
522
+ }
523
+ /**
524
+ * Authentik provider blueprint (Proxy)
525
+ */
526
+ export interface AuthentikProxyProviderType {
527
+ identifiers: {
528
+ name: string;
529
+ };
530
+ model: 'authentik_providers_proxy.proxyprovider';
531
+ attrs: {
532
+ name: string;
533
+ external_host: string;
534
+ internal_host?: string;
535
+ internal_host_ssl_validation: boolean;
536
+ certificate?: string;
537
+ skip_path_regex?: string;
538
+ basic_auth_enabled: boolean;
539
+ basic_auth_password_attribute?: string;
540
+ basic_auth_user_attribute?: string;
541
+ mode: string;
542
+ authorization_flow?: string;
543
+ access_token_validity: string;
544
+ intercept_header_auth: boolean;
545
+ property_mappings?: string[];
546
+ };
547
+ }
548
+ /**
549
+ * Authentik blueprint structure
550
+ */
551
+ export interface AuthentikBlueprintType {
552
+ version: number;
553
+ metadata: {
554
+ name: string;
555
+ labels?: Record<string, string>;
556
+ };
557
+ entries: Array<AuthentikApplicationType | AuthentikOAuth2ProviderType | AuthentikSAMLProviderType | AuthentikProxyProviderType>;
558
+ }
559
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,qBAAqB,2JAKhC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,oBAAoB,wCAAsC,CAAC;AACxE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,kBAAkB,uCAAqC,CAAC;AACrE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,iBAAiB,0DAAwD,CAAC;AACvF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,mBAAmB,iCAA+B,CAAC;AAChE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,yBAAyB,8PAKpC,CAAC;AACH,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,IAAI,EAAE,MAAM,CAAC;QACb,aAAa,EAAE,MAAM,CAAC;QACtB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,4BAA4B,EAAE,OAAO,CAAC;QACtC,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,kBAAkB,EAAE,OAAO,CAAC;QAC5B,6BAA6B,CAAC,EAAE,MAAM,CAAC;QACvC,yBAAyB,CAAC,EAAE,MAAM,CAAC;QACnC,IAAI,EAAE,MAAM,CAAC;QACb,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,qBAAqB,EAAE,MAAM,CAAC;QAC9B,qBAAqB,EAAE,OAAO,CAAC;QAC/B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;KAC9B,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACjC,CAAC;IACF,OAAO,EAAE,KAAK,CACV,wBAAwB,GACxB,2BAA2B,GAC3B,yBAAyB,GACzB,0BAA0B,CAC7B,CAAC;CACH"}
package/package.json CHANGED
@@ -1,21 +1,25 @@
1
1
  {
2
2
  "name": "@kustodian/plugin-authentik",
3
- "version": "1.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Authentik authentication provider plugin for Kustodian",
5
5
  "type": "module",
6
- "main": "./src/index.ts",
7
- "types": "./src/index.ts",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
8
  "exports": {
9
9
  ".": {
10
- "types": "./src/index.ts",
11
- "import": "./src/index.ts"
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
12
  }
13
13
  },
14
- "files": ["src"],
14
+ "files": [
15
+ "dist"
16
+ ],
15
17
  "scripts": {
16
18
  "test": "bun test",
17
19
  "test:watch": "bun test --watch",
18
- "typecheck": "bun run tsc --noEmit"
20
+ "typecheck": "bun run tsc --noEmit",
21
+ "build": "bun build src/index.ts --outdir dist --target node --format esm && tsc --emitDeclarationOnly --outDir dist",
22
+ "prepublishOnly": "bun run build"
19
23
  },
20
24
  "keywords": [
21
25
  "kustodian",
@@ -35,16 +39,16 @@
35
39
  "directory": "plugins/authentik"
36
40
  },
37
41
  "publishConfig": {
38
- "registry": "https://npm.pkg.github.com"
42
+ "access": "public",
43
+ "registry": "https://registry.npmjs.org"
39
44
  },
40
45
  "dependencies": {
41
- "@kustodian/core": "^1.1.0",
42
- "@kustodian/plugins": "^1.0.1",
43
- "@kustodian/schema": "^1.2.0",
44
- "js-yaml": "^4.1.1",
45
- "zod": "^4.3.5"
46
+ "@kustodian/core": "2.0.0",
47
+ "@kustodian/plugins": "2.0.0",
48
+ "@kustodian/schema": "2.0.0",
49
+ "js-yaml": "^4.1.0",
50
+ "zod": "^3.25.30"
46
51
  },
47
- "packageManager": "pnpm@10.19.0",
48
52
  "devDependencies": {
49
53
  "@types/js-yaml": "^4.0.9"
50
54
  }