@syndew/oluso-plugin-saml 0.0.0-stage → 0.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,404 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import * as _angular_core from '@angular/core';
|
|
3
|
+
import { OnInit } from '@angular/core';
|
|
4
|
+
import { Routes } from '@angular/router';
|
|
5
|
+
import { AdminPlugin, NavItem } from '@syndew/oluso-ui-core';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* SAML Service Provider model
|
|
9
|
+
*/
|
|
10
|
+
interface SamlServiceProvider {
|
|
11
|
+
id: number;
|
|
12
|
+
entityId: string;
|
|
13
|
+
displayName?: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
metadataUrl?: string;
|
|
17
|
+
assertionConsumerServiceUrl?: string;
|
|
18
|
+
singleLogoutServiceUrl?: string;
|
|
19
|
+
hasSigningCertificate: boolean;
|
|
20
|
+
hasEncryptionCertificate: boolean;
|
|
21
|
+
encryptAssertions: boolean;
|
|
22
|
+
nameIdFormat?: string;
|
|
23
|
+
requireVerifiedEmail: boolean;
|
|
24
|
+
allowedClaims?: string[];
|
|
25
|
+
claimMappings?: Record<string, string>;
|
|
26
|
+
ssoBinding: string;
|
|
27
|
+
signResponses: boolean;
|
|
28
|
+
signAssertions: boolean;
|
|
29
|
+
requireSignedAuthnRequests: boolean;
|
|
30
|
+
defaultRelayState?: string;
|
|
31
|
+
nonEditable: boolean;
|
|
32
|
+
created: string;
|
|
33
|
+
updated?: string;
|
|
34
|
+
lastAccessed?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* SAML Service Provider for editing (includes certificates)
|
|
38
|
+
*/
|
|
39
|
+
interface SamlServiceProviderEdit {
|
|
40
|
+
id: number;
|
|
41
|
+
entityId: string;
|
|
42
|
+
displayName?: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
enabled: boolean;
|
|
45
|
+
metadataUrl?: string;
|
|
46
|
+
assertionConsumerServiceUrl?: string;
|
|
47
|
+
singleLogoutServiceUrl?: string;
|
|
48
|
+
signingCertificate?: string;
|
|
49
|
+
encryptionCertificate?: string;
|
|
50
|
+
encryptAssertions: boolean;
|
|
51
|
+
nameIdFormat?: string;
|
|
52
|
+
requireVerifiedEmail: boolean;
|
|
53
|
+
allowedClaims?: string[];
|
|
54
|
+
claimMappings?: Record<string, string>;
|
|
55
|
+
ssoBinding: string;
|
|
56
|
+
signResponses: boolean;
|
|
57
|
+
signAssertions: boolean;
|
|
58
|
+
requireSignedAuthnRequests: boolean;
|
|
59
|
+
defaultRelayState?: string;
|
|
60
|
+
nonEditable: boolean;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* SAML Identity Provider info
|
|
64
|
+
*/
|
|
65
|
+
interface SamlIdpInfo {
|
|
66
|
+
enabled: boolean;
|
|
67
|
+
entityId: string;
|
|
68
|
+
singleSignOnServiceUrl: string;
|
|
69
|
+
singleLogoutServiceUrl: string;
|
|
70
|
+
metadataUrl: string;
|
|
71
|
+
supportedNameIdFormats: string[];
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Request to create a SAML Service Provider
|
|
75
|
+
*/
|
|
76
|
+
interface CreateSamlServiceProviderRequest {
|
|
77
|
+
entityId: string;
|
|
78
|
+
displayName?: string;
|
|
79
|
+
description?: string;
|
|
80
|
+
enabled?: boolean;
|
|
81
|
+
metadataUrl?: string;
|
|
82
|
+
assertionConsumerServiceUrl?: string;
|
|
83
|
+
singleLogoutServiceUrl?: string;
|
|
84
|
+
signingCertificate?: string;
|
|
85
|
+
encryptionCertificate?: string;
|
|
86
|
+
encryptAssertions?: boolean;
|
|
87
|
+
nameIdFormat?: string;
|
|
88
|
+
requireVerifiedEmail?: boolean;
|
|
89
|
+
allowedClaims?: string[];
|
|
90
|
+
claimMappings?: Record<string, string>;
|
|
91
|
+
ssoBinding?: string;
|
|
92
|
+
signResponses?: boolean;
|
|
93
|
+
signAssertions?: boolean;
|
|
94
|
+
requireSignedAuthnRequests?: boolean;
|
|
95
|
+
defaultRelayState?: string;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Test result for SAML configuration
|
|
99
|
+
*/
|
|
100
|
+
interface SamlTestResult {
|
|
101
|
+
success: boolean;
|
|
102
|
+
message: string;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* SAML IdP Configuration
|
|
106
|
+
*/
|
|
107
|
+
interface SamlIdpConfiguration {
|
|
108
|
+
enabled: boolean;
|
|
109
|
+
loginJourneyName?: string;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* SAML Certificate info
|
|
113
|
+
*/
|
|
114
|
+
interface SamlCertificateInfo {
|
|
115
|
+
source: 'Global' | 'Auto' | 'Uploaded';
|
|
116
|
+
certificateId?: string;
|
|
117
|
+
subject?: string;
|
|
118
|
+
issuer?: string;
|
|
119
|
+
notBefore?: string;
|
|
120
|
+
notAfter?: string;
|
|
121
|
+
thumbprint?: string;
|
|
122
|
+
status: string;
|
|
123
|
+
isRevoked: boolean;
|
|
124
|
+
isExpired: boolean;
|
|
125
|
+
isExpiringSoon: boolean;
|
|
126
|
+
hasCertificate: boolean;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Request to upload a certificate
|
|
130
|
+
*/
|
|
131
|
+
interface UploadCertificateRequest {
|
|
132
|
+
base64Pfx: string;
|
|
133
|
+
password?: string;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Entity ID availability check result
|
|
137
|
+
*/
|
|
138
|
+
interface EntityIdAvailability {
|
|
139
|
+
available: boolean;
|
|
140
|
+
message?: string;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Name ID format options
|
|
144
|
+
*/
|
|
145
|
+
declare const NAME_ID_FORMATS: {
|
|
146
|
+
value: string;
|
|
147
|
+
label: string;
|
|
148
|
+
}[];
|
|
149
|
+
/**
|
|
150
|
+
* SSO Binding options
|
|
151
|
+
*/
|
|
152
|
+
declare const SSO_BINDINGS: {
|
|
153
|
+
value: string;
|
|
154
|
+
label: string;
|
|
155
|
+
}[];
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* SAML Service
|
|
159
|
+
*
|
|
160
|
+
* Provides HTTP methods for managing SAML Service Providers and IdP configuration.
|
|
161
|
+
*/
|
|
162
|
+
declare class SamlService {
|
|
163
|
+
private readonly api;
|
|
164
|
+
private readonly basePath;
|
|
165
|
+
/**
|
|
166
|
+
* Get IdP info
|
|
167
|
+
*/
|
|
168
|
+
getIdpInfo(): Observable<SamlIdpInfo>;
|
|
169
|
+
/**
|
|
170
|
+
* Check if an entity ID is available
|
|
171
|
+
*/
|
|
172
|
+
checkEntityIdAvailability(entityId: string, excludeId?: number): Observable<EntityIdAvailability>;
|
|
173
|
+
/**
|
|
174
|
+
* Get all service providers
|
|
175
|
+
*/
|
|
176
|
+
getAll(includeDisabled?: boolean): Observable<SamlServiceProvider[]>;
|
|
177
|
+
/**
|
|
178
|
+
* Get a service provider by ID
|
|
179
|
+
*/
|
|
180
|
+
getById(id: number): Observable<SamlServiceProvider>;
|
|
181
|
+
/**
|
|
182
|
+
* Get a service provider for editing (includes certificates)
|
|
183
|
+
*/
|
|
184
|
+
getForEdit(id: number): Observable<SamlServiceProviderEdit>;
|
|
185
|
+
/**
|
|
186
|
+
* Create a new service provider
|
|
187
|
+
*/
|
|
188
|
+
create(data: CreateSamlServiceProviderRequest): Observable<SamlServiceProvider>;
|
|
189
|
+
/**
|
|
190
|
+
* Update a service provider
|
|
191
|
+
*/
|
|
192
|
+
update(id: number, data: SamlServiceProviderEdit): Observable<SamlServiceProvider>;
|
|
193
|
+
/**
|
|
194
|
+
* Delete a service provider
|
|
195
|
+
*/
|
|
196
|
+
delete(id: number): Observable<void>;
|
|
197
|
+
/**
|
|
198
|
+
* Toggle a service provider's enabled status
|
|
199
|
+
*/
|
|
200
|
+
toggle(id: number): Observable<SamlServiceProvider>;
|
|
201
|
+
/**
|
|
202
|
+
* Test a service provider configuration
|
|
203
|
+
*/
|
|
204
|
+
test(id: number): Observable<SamlTestResult>;
|
|
205
|
+
/**
|
|
206
|
+
* Get IdP configuration
|
|
207
|
+
*/
|
|
208
|
+
getIdpConfiguration(): Observable<SamlIdpConfiguration>;
|
|
209
|
+
/**
|
|
210
|
+
* Update IdP configuration
|
|
211
|
+
*/
|
|
212
|
+
updateIdpConfiguration(data: SamlIdpConfiguration): Observable<SamlIdpConfiguration>;
|
|
213
|
+
/**
|
|
214
|
+
* Get signing certificate info
|
|
215
|
+
*/
|
|
216
|
+
getSigningCertificate(): Observable<SamlCertificateInfo>;
|
|
217
|
+
/**
|
|
218
|
+
* Get encryption certificate info
|
|
219
|
+
*/
|
|
220
|
+
getEncryptionCertificate(): Observable<SamlCertificateInfo>;
|
|
221
|
+
/**
|
|
222
|
+
* Generate a new signing certificate
|
|
223
|
+
*/
|
|
224
|
+
generateSigningCertificate(): Observable<SamlCertificateInfo>;
|
|
225
|
+
/**
|
|
226
|
+
* Generate a new encryption certificate
|
|
227
|
+
*/
|
|
228
|
+
generateEncryptionCertificate(): Observable<SamlCertificateInfo>;
|
|
229
|
+
/**
|
|
230
|
+
* Upload a signing certificate
|
|
231
|
+
*/
|
|
232
|
+
uploadSigningCertificate(data: UploadCertificateRequest): Observable<SamlCertificateInfo>;
|
|
233
|
+
/**
|
|
234
|
+
* Upload an encryption certificate
|
|
235
|
+
*/
|
|
236
|
+
uploadEncryptionCertificate(data: UploadCertificateRequest): Observable<SamlCertificateInfo>;
|
|
237
|
+
/**
|
|
238
|
+
* Reset signing certificate to global
|
|
239
|
+
*/
|
|
240
|
+
resetSigningCertificate(): Observable<void>;
|
|
241
|
+
/**
|
|
242
|
+
* Reset encryption certificate to global
|
|
243
|
+
*/
|
|
244
|
+
resetEncryptionCertificate(): Observable<void>;
|
|
245
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SamlService, never>;
|
|
246
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SamlService>;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
declare class SamlDashboardComponent implements OnInit {
|
|
250
|
+
private readonly samlService;
|
|
251
|
+
readonly loading: _angular_core.WritableSignal<boolean>;
|
|
252
|
+
readonly error: _angular_core.WritableSignal<string | null>;
|
|
253
|
+
readonly idpInfo: _angular_core.WritableSignal<SamlIdpInfo | null>;
|
|
254
|
+
readonly serviceProviders: _angular_core.WritableSignal<SamlServiceProvider[]>;
|
|
255
|
+
readonly copied: _angular_core.WritableSignal<string | null>;
|
|
256
|
+
readonly enabledCount: () => number;
|
|
257
|
+
readonly disabledCount: () => number;
|
|
258
|
+
ngOnInit(): void;
|
|
259
|
+
loadData(): void;
|
|
260
|
+
copyToClipboard(value: string, label: string): void;
|
|
261
|
+
getFormatName(format: string): string;
|
|
262
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SamlDashboardComponent, never>;
|
|
263
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SamlDashboardComponent, "saml-dashboard", never, {}, {}, never, never, true, never>;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
declare class ServiceProvidersPageComponent implements OnInit {
|
|
267
|
+
private readonly samlService;
|
|
268
|
+
readonly loading: _angular_core.WritableSignal<boolean>;
|
|
269
|
+
readonly error: _angular_core.WritableSignal<string | null>;
|
|
270
|
+
readonly serviceProviders: _angular_core.WritableSignal<SamlServiceProvider[]>;
|
|
271
|
+
readonly actionLoading: _angular_core.WritableSignal<number | null>;
|
|
272
|
+
readonly testResult: _angular_core.WritableSignal<SamlTestResult | null>;
|
|
273
|
+
readonly showDeleteModal: _angular_core.WritableSignal<boolean>;
|
|
274
|
+
readonly deleteTarget: _angular_core.WritableSignal<SamlServiceProvider | null>;
|
|
275
|
+
search: string;
|
|
276
|
+
showDisabled: boolean;
|
|
277
|
+
readonly filteredProviders: () => SamlServiceProvider[];
|
|
278
|
+
ngOnInit(): void;
|
|
279
|
+
loadServiceProviders(): void;
|
|
280
|
+
onSearchChange(): void;
|
|
281
|
+
handleToggle(sp: SamlServiceProvider): void;
|
|
282
|
+
confirmDelete(sp: SamlServiceProvider): void;
|
|
283
|
+
handleDelete(): void;
|
|
284
|
+
handleTest(sp: SamlServiceProvider): void;
|
|
285
|
+
formatDate(dateStr: string): string;
|
|
286
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ServiceProvidersPageComponent, never>;
|
|
287
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ServiceProvidersPageComponent, "saml-service-providers-page", never, {}, {}, never, never, true, never>;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
interface FormData {
|
|
291
|
+
entityId: string;
|
|
292
|
+
displayName: string;
|
|
293
|
+
description: string;
|
|
294
|
+
enabled: boolean;
|
|
295
|
+
metadataUrl: string;
|
|
296
|
+
assertionConsumerServiceUrl: string;
|
|
297
|
+
singleLogoutServiceUrl: string;
|
|
298
|
+
signingCertificate: string;
|
|
299
|
+
encryptionCertificate: string;
|
|
300
|
+
encryptAssertions: boolean;
|
|
301
|
+
nameIdFormat: string;
|
|
302
|
+
requireVerifiedEmail: boolean;
|
|
303
|
+
allowedClaims: string;
|
|
304
|
+
claimMappings: string;
|
|
305
|
+
ssoBinding: string;
|
|
306
|
+
signResponses: boolean;
|
|
307
|
+
signAssertions: boolean;
|
|
308
|
+
requireSignedAuthnRequests: boolean;
|
|
309
|
+
defaultRelayState: string;
|
|
310
|
+
}
|
|
311
|
+
declare class ServiceProviderDetailsPageComponent implements OnInit {
|
|
312
|
+
private readonly samlService;
|
|
313
|
+
private readonly route;
|
|
314
|
+
private readonly router;
|
|
315
|
+
private readonly entityIdCheck$;
|
|
316
|
+
readonly loading: _angular_core.WritableSignal<boolean>;
|
|
317
|
+
readonly saving: _angular_core.WritableSignal<boolean>;
|
|
318
|
+
readonly error: _angular_core.WritableSignal<string | null>;
|
|
319
|
+
readonly entityIdError: _angular_core.WritableSignal<string | null>;
|
|
320
|
+
readonly checkingEntityId: _angular_core.WritableSignal<boolean>;
|
|
321
|
+
readonly testResult: _angular_core.WritableSignal<SamlTestResult | null>;
|
|
322
|
+
readonly nonEditable: _angular_core.WritableSignal<boolean>;
|
|
323
|
+
formData: FormData;
|
|
324
|
+
isNew: boolean;
|
|
325
|
+
private id;
|
|
326
|
+
readonly nameIdFormats: {
|
|
327
|
+
value: string;
|
|
328
|
+
label: string;
|
|
329
|
+
}[];
|
|
330
|
+
readonly ssoBindings: {
|
|
331
|
+
value: string;
|
|
332
|
+
label: string;
|
|
333
|
+
}[];
|
|
334
|
+
ngOnInit(): void;
|
|
335
|
+
loadServiceProvider(): void;
|
|
336
|
+
onEntityIdChange(entityId: string): void;
|
|
337
|
+
checkEntityIdAvailability(entityId: string): void;
|
|
338
|
+
parseAllowedClaims(value: string): string[] | undefined;
|
|
339
|
+
parseClaimMappings(value: string): Record<string, string> | undefined;
|
|
340
|
+
handleSubmit(): void;
|
|
341
|
+
handleTest(): void;
|
|
342
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ServiceProviderDetailsPageComponent, never>;
|
|
343
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ServiceProviderDetailsPageComponent, "saml-service-provider-details-page", never, {}, {}, never, never, true, never>;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
declare class SamlIdpSettingsTabComponent implements OnInit {
|
|
347
|
+
private readonly samlService;
|
|
348
|
+
private readonly tabContext;
|
|
349
|
+
readonly loading: _angular_core.WritableSignal<boolean>;
|
|
350
|
+
readonly saving: _angular_core.WritableSignal<boolean>;
|
|
351
|
+
readonly error: _angular_core.WritableSignal<string | null>;
|
|
352
|
+
readonly success: _angular_core.WritableSignal<string | null>;
|
|
353
|
+
readonly hasChanges: _angular_core.WritableSignal<boolean>;
|
|
354
|
+
readonly idpInfo: _angular_core.WritableSignal<SamlIdpInfo | null>;
|
|
355
|
+
readonly signingCert: _angular_core.WritableSignal<SamlCertificateInfo | null>;
|
|
356
|
+
readonly encryptionCert: _angular_core.WritableSignal<SamlCertificateInfo | null>;
|
|
357
|
+
readonly certLoading: _angular_core.WritableSignal<"signing" | "encryption" | null>;
|
|
358
|
+
readonly copied: _angular_core.WritableSignal<string | null>;
|
|
359
|
+
readonly showSigningUpload: _angular_core.WritableSignal<boolean>;
|
|
360
|
+
readonly showEncryptionUpload: _angular_core.WritableSignal<boolean>;
|
|
361
|
+
config: SamlIdpConfiguration;
|
|
362
|
+
signingPassword: string;
|
|
363
|
+
encryptionPassword: string;
|
|
364
|
+
ngOnInit(): void;
|
|
365
|
+
loadData(): void;
|
|
366
|
+
toggleEnabled(): void;
|
|
367
|
+
onConfigChange(): void;
|
|
368
|
+
handleSave(): void;
|
|
369
|
+
generateSigningCert(): void;
|
|
370
|
+
resetSigningCert(): void;
|
|
371
|
+
toggleSigningUpload(): void;
|
|
372
|
+
onSigningFileSelect(event: Event): void;
|
|
373
|
+
generateEncryptionCert(): void;
|
|
374
|
+
resetEncryptionCert(): void;
|
|
375
|
+
toggleEncryptionUpload(): void;
|
|
376
|
+
onEncryptionFileSelect(event: Event): void;
|
|
377
|
+
private loadCertificates;
|
|
378
|
+
copyToClipboard(value: string, key?: string): void;
|
|
379
|
+
formatDate(dateStr?: string): string;
|
|
380
|
+
truncateThumbprint(thumbprint?: string): string;
|
|
381
|
+
getSourceBadgeClass(source: string): string;
|
|
382
|
+
getSourceBadgeText(source: string): string;
|
|
383
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SamlIdpSettingsTabComponent, never>;
|
|
384
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SamlIdpSettingsTabComponent, "saml-idp-settings-tab", never, {}, {}, never, never, true, never>;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
declare const SAML_ROUTES: Routes;
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* SAML Admin Plugin
|
|
391
|
+
*
|
|
392
|
+
* Provides SAML Identity Provider management functionality:
|
|
393
|
+
* - Dashboard with IdP info and stats
|
|
394
|
+
* - Service Provider management (CRUD)
|
|
395
|
+
* - Settings tab for IdP configuration
|
|
396
|
+
*/
|
|
397
|
+
declare const SAML_PLUGIN: AdminPlugin;
|
|
398
|
+
/**
|
|
399
|
+
* Helper function to get SAML navigation items
|
|
400
|
+
*/
|
|
401
|
+
declare function getSamlNavItems(): NavItem[];
|
|
402
|
+
|
|
403
|
+
export { NAME_ID_FORMATS, SAML_PLUGIN, SAML_ROUTES, SSO_BINDINGS, SamlDashboardComponent, SamlIdpSettingsTabComponent, SamlService, ServiceProviderDetailsPageComponent, ServiceProvidersPageComponent, getSamlNavItems };
|
|
404
|
+
export type { CreateSamlServiceProviderRequest, EntityIdAvailability, SamlCertificateInfo, SamlIdpConfiguration, SamlIdpInfo, SamlServiceProvider, SamlServiceProviderEdit, SamlTestResult, UploadCertificateRequest };
|