@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.
- package/dist/executor.d.ts +15 -0
- package/dist/executor.d.ts.map +1 -0
- package/dist/generator.d.ts +36 -0
- package/dist/generator.d.ts.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7273 -0
- package/dist/plugin.d.ts +11 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/types.d.ts +559 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +18 -14
- package/src/executor.ts +0 -119
- package/src/generator.ts +0 -319
- package/src/index.ts +0 -44
- package/src/plugin.ts +0 -238
- package/src/types.ts +0 -296
package/src/plugin.ts
DELETED
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
import { success } from '@kustodian/core';
|
|
2
|
-
import type {
|
|
3
|
-
CommandType,
|
|
4
|
-
HookContextType,
|
|
5
|
-
HookEventType,
|
|
6
|
-
KustodianPluginType,
|
|
7
|
-
PluginCommandContributionType,
|
|
8
|
-
PluginHookContributionType,
|
|
9
|
-
PluginManifestType,
|
|
10
|
-
} from '@kustodian/plugins';
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
check_authentik_available,
|
|
14
|
-
generate_random_secret,
|
|
15
|
-
validate_blueprint,
|
|
16
|
-
} from './executor.js';
|
|
17
|
-
import { blueprint_to_yaml, generate_authentik_blueprint } from './generator.js';
|
|
18
|
-
import type { AuthConfigType } from './types.js';
|
|
19
|
-
import { authentik_plugin_options_schema } from './types.js';
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Authentik plugin manifest.
|
|
23
|
-
*/
|
|
24
|
-
const manifest: PluginManifestType = {
|
|
25
|
-
name: '@kustodian/plugin-authentik',
|
|
26
|
-
version: '1.0.0',
|
|
27
|
-
description: 'Authentik authentication provider plugin for Kustodian',
|
|
28
|
-
capabilities: ['commands', 'hooks'],
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Creates the Authentik plugin.
|
|
33
|
-
*/
|
|
34
|
-
export function create_authentik_plugin(
|
|
35
|
-
options: Record<string, unknown> = {},
|
|
36
|
-
): KustodianPluginType {
|
|
37
|
-
// Parse options through schema to apply defaults
|
|
38
|
-
const plugin_options = authentik_plugin_options_schema.parse(options);
|
|
39
|
-
|
|
40
|
-
return {
|
|
41
|
-
manifest,
|
|
42
|
-
|
|
43
|
-
async activate() {
|
|
44
|
-
// Verify CLI availability on activation (warning only)
|
|
45
|
-
const check_result = await check_authentik_available();
|
|
46
|
-
if (!check_result.success) {
|
|
47
|
-
console.warn('Authentik CLI not found - some features may be unavailable');
|
|
48
|
-
console.warn('Install from: https://goauthentik.io/docs/installation/');
|
|
49
|
-
}
|
|
50
|
-
return success(undefined);
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
async deactivate() {
|
|
54
|
-
return success(undefined);
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
get_commands(): PluginCommandContributionType[] {
|
|
58
|
-
const authentik_command: CommandType = {
|
|
59
|
-
name: 'authentik',
|
|
60
|
-
description: 'Authentik authentication provider commands',
|
|
61
|
-
subcommands: [
|
|
62
|
-
{
|
|
63
|
-
name: 'check',
|
|
64
|
-
description: 'Check Authentik CLI availability',
|
|
65
|
-
handler: async () => {
|
|
66
|
-
const result = await check_authentik_available();
|
|
67
|
-
if (result.success) {
|
|
68
|
-
console.log(`Authentik CLI: ${result.value}`);
|
|
69
|
-
return success(undefined);
|
|
70
|
-
}
|
|
71
|
-
console.error('Authentik CLI not available');
|
|
72
|
-
return result;
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
name: 'generate-secret',
|
|
77
|
-
description: 'Generate random secret for OAuth2 client',
|
|
78
|
-
arguments: [
|
|
79
|
-
{
|
|
80
|
-
name: 'length',
|
|
81
|
-
description: 'Secret length (default: 64)',
|
|
82
|
-
required: false,
|
|
83
|
-
},
|
|
84
|
-
],
|
|
85
|
-
handler: async (ctx: {
|
|
86
|
-
args: string[];
|
|
87
|
-
options: Record<string, unknown>;
|
|
88
|
-
data: Record<string, unknown>;
|
|
89
|
-
}) => {
|
|
90
|
-
const length = ctx.args[0] ? Number.parseInt(ctx.args[0], 10) : 64;
|
|
91
|
-
|
|
92
|
-
const result = await generate_random_secret(length);
|
|
93
|
-
if (result.success) {
|
|
94
|
-
console.log('Generated secret:');
|
|
95
|
-
console.log(result.value);
|
|
96
|
-
return success(undefined);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
console.error(`Failed to generate secret: ${result.error.message}`);
|
|
100
|
-
return result;
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
name: 'generate-blueprint',
|
|
105
|
-
description: 'Generate Authentik blueprint from auth configuration',
|
|
106
|
-
arguments: [
|
|
107
|
-
{
|
|
108
|
-
name: 'app-name',
|
|
109
|
-
description: 'Application name',
|
|
110
|
-
required: true,
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
name: 'provider',
|
|
114
|
-
description: 'Provider type (oauth2, saml, proxy)',
|
|
115
|
-
required: true,
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
name: 'config-json',
|
|
119
|
-
description: 'JSON configuration for the provider',
|
|
120
|
-
required: true,
|
|
121
|
-
},
|
|
122
|
-
],
|
|
123
|
-
handler: async (ctx: {
|
|
124
|
-
args: string[];
|
|
125
|
-
options: Record<string, unknown>;
|
|
126
|
-
data: Record<string, unknown>;
|
|
127
|
-
}) => {
|
|
128
|
-
const app_name = ctx.args[0];
|
|
129
|
-
const provider = ctx.args[1] as 'oauth2' | 'saml' | 'proxy';
|
|
130
|
-
const config_json = ctx.args[2];
|
|
131
|
-
|
|
132
|
-
if (!app_name || !provider || !config_json) {
|
|
133
|
-
console.error('App name, provider, and config JSON are required');
|
|
134
|
-
return success(undefined);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
try {
|
|
138
|
-
const provider_config = JSON.parse(config_json);
|
|
139
|
-
const auth_config: AuthConfigType = {
|
|
140
|
-
provider,
|
|
141
|
-
app_name,
|
|
142
|
-
[provider]: provider_config,
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
const result = generate_authentik_blueprint(auth_config, plugin_options);
|
|
146
|
-
if (result.success) {
|
|
147
|
-
console.log('Generated blueprint:');
|
|
148
|
-
console.log(blueprint_to_yaml(result.value));
|
|
149
|
-
return success(undefined);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
console.error(`Failed to generate blueprint: ${result.error.message}`);
|
|
153
|
-
return result;
|
|
154
|
-
} catch (error) {
|
|
155
|
-
console.error(
|
|
156
|
-
`Failed to parse config JSON: ${error instanceof Error ? error.message : String(error)}`,
|
|
157
|
-
);
|
|
158
|
-
return success(undefined);
|
|
159
|
-
}
|
|
160
|
-
},
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
name: 'validate-blueprint',
|
|
164
|
-
description: 'Validate Authentik blueprint file',
|
|
165
|
-
arguments: [
|
|
166
|
-
{
|
|
167
|
-
name: 'blueprint-path',
|
|
168
|
-
description: 'Path to blueprint file',
|
|
169
|
-
required: true,
|
|
170
|
-
},
|
|
171
|
-
],
|
|
172
|
-
handler: async (ctx: {
|
|
173
|
-
args: string[];
|
|
174
|
-
options: Record<string, unknown>;
|
|
175
|
-
data: Record<string, unknown>;
|
|
176
|
-
}) => {
|
|
177
|
-
const blueprint_path = ctx.args[0];
|
|
178
|
-
|
|
179
|
-
if (!blueprint_path) {
|
|
180
|
-
console.error('Blueprint path is required');
|
|
181
|
-
return success(undefined);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
const result = await validate_blueprint(blueprint_path);
|
|
185
|
-
if (result.success) {
|
|
186
|
-
console.log('✓ Blueprint is valid');
|
|
187
|
-
return success(undefined);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
console.error(`✗ Blueprint validation failed: ${result.error.message}`);
|
|
191
|
-
return result;
|
|
192
|
-
},
|
|
193
|
-
},
|
|
194
|
-
],
|
|
195
|
-
};
|
|
196
|
-
return [{ command: authentik_command }];
|
|
197
|
-
},
|
|
198
|
-
|
|
199
|
-
get_hooks(): PluginHookContributionType[] {
|
|
200
|
-
return [
|
|
201
|
-
{
|
|
202
|
-
event: 'generator:after_resolve',
|
|
203
|
-
priority: 40, // Run before secret providers to allow auth configs to be processed
|
|
204
|
-
handler: async (_event: HookEventType, ctx: HookContextType) => {
|
|
205
|
-
// TODO: Implement auth config extraction from templates
|
|
206
|
-
// This will:
|
|
207
|
-
// 1. Extract auth configs from kustomizations
|
|
208
|
-
// 2. Generate Authentik blueprints
|
|
209
|
-
// 3. Write blueprints to output directory
|
|
210
|
-
// 4. Generate Kubernetes ConfigMaps with blueprints
|
|
211
|
-
|
|
212
|
-
// For now, just pass through
|
|
213
|
-
return success(ctx);
|
|
214
|
-
},
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
event: 'generator:before',
|
|
218
|
-
priority: 50,
|
|
219
|
-
handler: async (_event: HookEventType, ctx: HookContextType) => {
|
|
220
|
-
// TODO: This hook could be used to:
|
|
221
|
-
// 1. Inject generated Authentik blueprints as ConfigMaps
|
|
222
|
-
// 2. Generate documentation for configured applications
|
|
223
|
-
// 3. Validate auth configuration consistency
|
|
224
|
-
|
|
225
|
-
return success(ctx);
|
|
226
|
-
},
|
|
227
|
-
},
|
|
228
|
-
];
|
|
229
|
-
},
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* Default plugin export.
|
|
235
|
-
*/
|
|
236
|
-
export const plugin = create_authentik_plugin();
|
|
237
|
-
|
|
238
|
-
export default plugin;
|
package/src/types.ts
DELETED
|
@@ -1,296 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Authentik authorization flow types
|
|
5
|
-
*/
|
|
6
|
-
export const authentik_flow_schema = z.enum([
|
|
7
|
-
'implicit-consent',
|
|
8
|
-
'explicit-consent',
|
|
9
|
-
'default-provider-authorization-implicit-consent',
|
|
10
|
-
'default-provider-authorization-explicit-consent',
|
|
11
|
-
]);
|
|
12
|
-
export type AuthentikFlowType = z.infer<typeof authentik_flow_schema>;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Authentik provider types
|
|
16
|
-
*/
|
|
17
|
-
export const auth_provider_schema = z.enum(['oauth2', 'saml', 'proxy']);
|
|
18
|
-
export type AuthProviderType = z.infer<typeof auth_provider_schema>;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* OAuth2/OIDC client types
|
|
22
|
-
*/
|
|
23
|
-
export const client_type_schema = z.enum(['confidential', 'public']);
|
|
24
|
-
export type ClientTypeType = z.infer<typeof client_type_schema>;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Authentik proxy mode types
|
|
28
|
-
*/
|
|
29
|
-
export const proxy_mode_schema = z.enum(['proxy', 'forward_single', 'forward_domain']);
|
|
30
|
-
export type ProxyModeType = z.infer<typeof proxy_mode_schema>;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* SAML SP binding types
|
|
34
|
-
*/
|
|
35
|
-
export const saml_binding_schema = z.enum(['post', 'redirect']);
|
|
36
|
-
export type SAMLBindingType = z.infer<typeof saml_binding_schema>;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* SAML NameID policy types
|
|
40
|
-
*/
|
|
41
|
-
export const saml_nameid_policy_schema = z.enum([
|
|
42
|
-
'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress',
|
|
43
|
-
'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent',
|
|
44
|
-
'urn:oasis:names:tc:SAML:2.0:nameid-format:transient',
|
|
45
|
-
'urn:oasis:names:tc:SAML:2.0:nameid-format:WindowsDomainQualifiedName',
|
|
46
|
-
]);
|
|
47
|
-
export type SAMLNameIDPolicyType = z.infer<typeof saml_nameid_policy_schema>;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* OAuth2/OIDC provider configuration for Authentik
|
|
51
|
-
*/
|
|
52
|
-
export const oauth2_provider_config_schema = z.object({
|
|
53
|
-
/** Unique client identifier */
|
|
54
|
-
client_id: z.string(),
|
|
55
|
-
/** Client type (confidential or public) */
|
|
56
|
-
client_type: client_type_schema.default('confidential'),
|
|
57
|
-
/** Client secret (will be generated if not provided) */
|
|
58
|
-
client_secret: z.string().optional(),
|
|
59
|
-
/** Redirect URIs for OAuth callbacks */
|
|
60
|
-
redirect_uris: z.array(z.string()),
|
|
61
|
-
/** Authorization flow slug */
|
|
62
|
-
authorization_flow: authentik_flow_schema.optional(),
|
|
63
|
-
/** Signing key (optional, for JWT signing) */
|
|
64
|
-
signing_key: z.string().optional(),
|
|
65
|
-
/** Include claims in ID token */
|
|
66
|
-
include_claims_in_id_token: z.boolean().default(true),
|
|
67
|
-
/** Additional scopes beyond openid */
|
|
68
|
-
additional_scopes: z.array(z.string()).optional(),
|
|
69
|
-
/** Access token validity in seconds */
|
|
70
|
-
access_token_validity: z.string().default('minutes=10'),
|
|
71
|
-
/** Refresh token validity in seconds */
|
|
72
|
-
refresh_token_validity: z.string().default('days=30'),
|
|
73
|
-
/** Subject mode: based_on_username, based_on_user_email, based_on_user_uuid, based_on_hashed_user_identifier */
|
|
74
|
-
sub_mode: z.string().default('hashed_user_identifier'),
|
|
75
|
-
/** Issue refresh tokens */
|
|
76
|
-
issue_refresh_tokens: z.boolean().default(true),
|
|
77
|
-
});
|
|
78
|
-
export type OAuth2ProviderConfigType = z.infer<typeof oauth2_provider_config_schema>;
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* SAML provider configuration for Authentik
|
|
82
|
-
*/
|
|
83
|
-
export const saml_provider_config_schema = z.object({
|
|
84
|
-
/** ACS (Assertion Consumer Service) URL */
|
|
85
|
-
acs_url: z.string().url(),
|
|
86
|
-
/** Entity ID / Issuer */
|
|
87
|
-
issuer: z.string(),
|
|
88
|
-
/** SP (Service Provider) binding method */
|
|
89
|
-
sp_binding: saml_binding_schema.default('post'),
|
|
90
|
-
/** Audience for SAML assertions */
|
|
91
|
-
audience: z.string().optional(),
|
|
92
|
-
/** Authorization flow slug */
|
|
93
|
-
authorization_flow: authentik_flow_schema.optional(),
|
|
94
|
-
/** Signing certificate */
|
|
95
|
-
signing_kp: z.string().optional(),
|
|
96
|
-
/** NameID policy */
|
|
97
|
-
name_id_policy: saml_nameid_policy_schema.default(
|
|
98
|
-
'urn:oasis:names:tc:SAML:2.0:nameid-format:persistent',
|
|
99
|
-
),
|
|
100
|
-
/** Assertion validity (not before) in seconds */
|
|
101
|
-
assertion_valid_not_before: z.string().default('minutes=5'),
|
|
102
|
-
/** Assertion validity (not on or after) in seconds */
|
|
103
|
-
assertion_valid_not_on_or_after: z.string().default('minutes=5'),
|
|
104
|
-
/** Session validity (not on or after) in seconds */
|
|
105
|
-
session_valid_not_on_or_after: z.string().default('minutes=86400'),
|
|
106
|
-
});
|
|
107
|
-
export type SAMLProviderConfigType = z.infer<typeof saml_provider_config_schema>;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Proxy provider configuration for Authentik
|
|
111
|
-
*/
|
|
112
|
-
export const proxy_provider_config_schema = z.object({
|
|
113
|
-
/** External host (public URL) */
|
|
114
|
-
external_host: z.string().url(),
|
|
115
|
-
/** Internal host (backend service URL) */
|
|
116
|
-
internal_host: z.string().url().optional(),
|
|
117
|
-
/** Internal host (SSL validation) */
|
|
118
|
-
internal_host_ssl_validation: z.boolean().default(true),
|
|
119
|
-
/** Certificate for internal SSL */
|
|
120
|
-
certificate: z.string().optional(),
|
|
121
|
-
/** Skip path regex (paths to skip authentication) */
|
|
122
|
-
skip_path_regex: z.string().optional(),
|
|
123
|
-
/** Basic auth enabled */
|
|
124
|
-
basic_auth_enabled: z.boolean().default(false),
|
|
125
|
-
/** Basic auth password attribute */
|
|
126
|
-
basic_auth_password_attribute: z.string().optional(),
|
|
127
|
-
/** Basic auth user attribute */
|
|
128
|
-
basic_auth_user_attribute: z.string().optional(),
|
|
129
|
-
/** Mode: proxy, forward_single, or forward_domain */
|
|
130
|
-
mode: proxy_mode_schema.default('forward_single'),
|
|
131
|
-
/** Authorization flow slug */
|
|
132
|
-
authorization_flow: authentik_flow_schema.optional(),
|
|
133
|
-
/** Access token validity in seconds */
|
|
134
|
-
access_token_validity: z.string().default('minutes=10'),
|
|
135
|
-
/** Intercept header auth */
|
|
136
|
-
intercept_header_auth: z.boolean().default(true),
|
|
137
|
-
});
|
|
138
|
-
export type ProxyProviderConfigType = z.infer<typeof proxy_provider_config_schema>;
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Authentication configuration in template kustomizations
|
|
142
|
-
*/
|
|
143
|
-
export const auth_config_schema = z.object({
|
|
144
|
-
/** Authentication provider type */
|
|
145
|
-
provider: auth_provider_schema,
|
|
146
|
-
/** Application name (used as identifier) */
|
|
147
|
-
app_name: z.string(),
|
|
148
|
-
/** Display name for the application */
|
|
149
|
-
app_display_name: z.string().optional(),
|
|
150
|
-
/** Application description */
|
|
151
|
-
app_description: z.string().optional(),
|
|
152
|
-
/** Application icon URL */
|
|
153
|
-
app_icon: z.string().optional(),
|
|
154
|
-
/** Application group/category */
|
|
155
|
-
app_group: z.string().optional(),
|
|
156
|
-
/** Application launch URL */
|
|
157
|
-
app_launch_url: z.string().optional(),
|
|
158
|
-
/** OAuth2/OIDC-specific configuration */
|
|
159
|
-
oauth2: oauth2_provider_config_schema.partial().optional(),
|
|
160
|
-
/** SAML-specific configuration */
|
|
161
|
-
saml: saml_provider_config_schema.partial().optional(),
|
|
162
|
-
/** Proxy-specific configuration */
|
|
163
|
-
proxy: proxy_provider_config_schema.partial().optional(),
|
|
164
|
-
});
|
|
165
|
-
export type AuthConfigType = z.infer<typeof auth_config_schema>;
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Authentik plugin options
|
|
169
|
-
*/
|
|
170
|
-
export const authentik_plugin_options_schema = z.object({
|
|
171
|
-
/** Authentik domain (e.g., authentik.example.com) */
|
|
172
|
-
domain: z.string().optional(),
|
|
173
|
-
/** Default authorization flow */
|
|
174
|
-
default_authorization_flow: authentik_flow_schema.default('implicit-consent'),
|
|
175
|
-
/** Default proxy outpost name */
|
|
176
|
-
outpost_name: z.string().default('default-outpost'),
|
|
177
|
-
/** Whether to generate client secrets automatically */
|
|
178
|
-
auto_generate_secrets: z.boolean().default(true),
|
|
179
|
-
/** Output directory for generated blueprints */
|
|
180
|
-
output_dir: z.string().default('./authentik-blueprints'),
|
|
181
|
-
/** Blueprint version */
|
|
182
|
-
blueprint_version: z.number().default(1),
|
|
183
|
-
});
|
|
184
|
-
export type AuthentikPluginOptionsType = z.infer<typeof authentik_plugin_options_schema>;
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* Authentik application blueprint
|
|
188
|
-
*/
|
|
189
|
-
export interface AuthentikApplicationType {
|
|
190
|
-
identifiers: {
|
|
191
|
-
slug: string;
|
|
192
|
-
};
|
|
193
|
-
model: 'authentik_core.application';
|
|
194
|
-
attrs: {
|
|
195
|
-
name: string;
|
|
196
|
-
slug: string;
|
|
197
|
-
provider?: string;
|
|
198
|
-
meta_description?: string;
|
|
199
|
-
meta_icon?: string;
|
|
200
|
-
group?: string;
|
|
201
|
-
meta_launch_url?: string;
|
|
202
|
-
policy_engine_mode?: string;
|
|
203
|
-
};
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* Authentik provider blueprint (OAuth2)
|
|
208
|
-
*/
|
|
209
|
-
export interface AuthentikOAuth2ProviderType {
|
|
210
|
-
identifiers: {
|
|
211
|
-
name: string;
|
|
212
|
-
};
|
|
213
|
-
model: 'authentik_providers_oauth2.oauth2provider';
|
|
214
|
-
attrs: {
|
|
215
|
-
name: string;
|
|
216
|
-
client_id: string;
|
|
217
|
-
client_type: string;
|
|
218
|
-
client_secret?: string;
|
|
219
|
-
redirect_uris: string;
|
|
220
|
-
authorization_flow?: string;
|
|
221
|
-
signing_key?: string;
|
|
222
|
-
include_claims_in_id_token: boolean;
|
|
223
|
-
access_token_validity: string;
|
|
224
|
-
refresh_token_validity: string;
|
|
225
|
-
sub_mode: string;
|
|
226
|
-
issue_refresh_tokens: boolean;
|
|
227
|
-
property_mappings?: string[];
|
|
228
|
-
};
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* Authentik provider blueprint (SAML)
|
|
233
|
-
*/
|
|
234
|
-
export interface AuthentikSAMLProviderType {
|
|
235
|
-
identifiers: {
|
|
236
|
-
name: string;
|
|
237
|
-
};
|
|
238
|
-
model: 'authentik_providers_saml.samlprovider';
|
|
239
|
-
attrs: {
|
|
240
|
-
name: string;
|
|
241
|
-
acs_url: string;
|
|
242
|
-
issuer: string;
|
|
243
|
-
sp_binding: string;
|
|
244
|
-
audience?: string;
|
|
245
|
-
authorization_flow?: string;
|
|
246
|
-
signing_kp?: string;
|
|
247
|
-
name_id_mapping?: string;
|
|
248
|
-
assertion_valid_not_before: string;
|
|
249
|
-
assertion_valid_not_on_or_after: string;
|
|
250
|
-
session_valid_not_on_or_after: string;
|
|
251
|
-
property_mappings?: string[];
|
|
252
|
-
};
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* Authentik provider blueprint (Proxy)
|
|
257
|
-
*/
|
|
258
|
-
export interface AuthentikProxyProviderType {
|
|
259
|
-
identifiers: {
|
|
260
|
-
name: string;
|
|
261
|
-
};
|
|
262
|
-
model: 'authentik_providers_proxy.proxyprovider';
|
|
263
|
-
attrs: {
|
|
264
|
-
name: string;
|
|
265
|
-
external_host: string;
|
|
266
|
-
internal_host?: string;
|
|
267
|
-
internal_host_ssl_validation: boolean;
|
|
268
|
-
certificate?: string;
|
|
269
|
-
skip_path_regex?: string;
|
|
270
|
-
basic_auth_enabled: boolean;
|
|
271
|
-
basic_auth_password_attribute?: string;
|
|
272
|
-
basic_auth_user_attribute?: string;
|
|
273
|
-
mode: string;
|
|
274
|
-
authorization_flow?: string;
|
|
275
|
-
access_token_validity: string;
|
|
276
|
-
intercept_header_auth: boolean;
|
|
277
|
-
property_mappings?: string[];
|
|
278
|
-
};
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* Authentik blueprint structure
|
|
283
|
-
*/
|
|
284
|
-
export interface AuthentikBlueprintType {
|
|
285
|
-
version: number;
|
|
286
|
-
metadata: {
|
|
287
|
-
name: string;
|
|
288
|
-
labels?: Record<string, string>;
|
|
289
|
-
};
|
|
290
|
-
entries: Array<
|
|
291
|
-
| AuthentikApplicationType
|
|
292
|
-
| AuthentikOAuth2ProviderType
|
|
293
|
-
| AuthentikSAMLProviderType
|
|
294
|
-
| AuthentikProxyProviderType
|
|
295
|
-
>;
|
|
296
|
-
}
|