@villedemontreal/jwt-validator 5.9.3 → 5.10.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 (39) hide show
  1. package/dist/scripts/showCoverage.js.map +1 -1
  2. package/dist/scripts/testUnits.js.map +1 -1
  3. package/dist/scripts/watch.js.map +1 -1
  4. package/dist/src/config/configs.js.map +1 -1
  5. package/dist/src/config/init.js +2 -3
  6. package/dist/src/config/init.js.map +1 -1
  7. package/dist/src/jwtValidator.js.map +1 -1
  8. package/dist/src/jwtValidator.test.js.map +1 -1
  9. package/dist/src/middleware/jwtMiddleware.js.map +1 -1
  10. package/dist/src/middleware/tokenTransformationMiddleware.js.map +1 -1
  11. package/dist/src/models/customError.js +2 -3
  12. package/dist/src/models/customError.js.map +1 -1
  13. package/dist/src/models/gluuUserType.js +1 -1
  14. package/dist/src/models/gluuUserType.js.map +1 -1
  15. package/dist/src/models/identities.d.ts +523 -0
  16. package/dist/src/models/identities.js +57 -0
  17. package/dist/src/models/identities.js.map +1 -0
  18. package/dist/src/models/publicKey.d.ts +0 -1
  19. package/dist/src/models/publicKey.js +1 -1
  20. package/dist/src/models/publicKey.js.map +1 -1
  21. package/dist/src/repositories/cachedPublicKeyRepository.js.map +1 -1
  22. package/dist/src/repositories/publicKeyRepository.js.map +1 -1
  23. package/dist/src/userValidator.js.map +1 -1
  24. package/dist/src/userValidator.test.js.map +1 -1
  25. package/dist/src/utils/createIdentityFromJwt.d.ts +39 -0
  26. package/dist/src/utils/createIdentityFromJwt.js +464 -0
  27. package/dist/src/utils/createIdentityFromJwt.js.map +1 -0
  28. package/dist/src/utils/createIdentityFromJwt.test.d.ts +1 -0
  29. package/dist/src/utils/createIdentityFromJwt.test.js +1433 -0
  30. package/dist/src/utils/createIdentityFromJwt.test.js.map +1 -0
  31. package/dist/src/utils/jwtMock.js.map +1 -1
  32. package/dist/src/utils/logger.js +2 -3
  33. package/dist/src/utils/logger.js.map +1 -1
  34. package/dist/src/utils/testingConfigurations.js +1 -2
  35. package/dist/src/utils/testingConfigurations.js.map +1 -1
  36. package/package.json +30 -30
  37. package/src/models/identities.ts +621 -0
  38. package/src/utils/createIdentityFromJwt.test.ts +1595 -0
  39. package/src/utils/createIdentityFromJwt.ts +540 -0
@@ -0,0 +1,523 @@
1
+ /************************************************************************************************
2
+ * User attributes
3
+ * ---------------
4
+ * All user attributes extend the CommonUserAttributes type, which defines a couple of common but optional attributes.
5
+ * All user attributes have at least a username or an email to qualify.
6
+ *
7
+ * We have identified the following types of user:
8
+ * - CitizenAttributes
9
+ * - EmployeeAttributes
10
+ * - ExternalUserAttributes
11
+ * - GenericUserAttributes
12
+ * - GuestUserAttributes
13
+ *
14
+ * If the subtype of user is not recognized, it will default to UnknownUserAttributes.
15
+ *
16
+ * The UserAttributes type is a union of all those types. It provides access to the
17
+ * common optional attributes through the CommonUserAttributes type,
18
+ * but it is better to test the 'type' of the attributes to access the strongly types attributes
19
+ * with additional guarantees.
20
+ *
21
+ * Since some users might have multiple profiles and thus multiple emails (like @montreal.ca, .adm@montreal.ca or @spvm.qc.ca)
22
+ * that they can select at login time, you might want to consider the "accountProfile" attribute which categorizes them.
23
+ * The ID will correctly identify the physical person but not the selected role.
24
+ * So, you could combine ID+accountProfile or prefer the email in some cases, like when you need to evaluate the permissions.
25
+ *
26
+ ************************************************************************************************/
27
+ /**
28
+ * The type of profile selected by the user at login time, when a user has multiple identities
29
+ * such as a VDM employee with a SPVM email.
30
+ * 'vdm-admin' whould be selected when the authenticated user is a sysadmin who selected his superadmin profile,
31
+ * instead of the regular one.
32
+ * Usually defaults to 'vdm'.
33
+ */
34
+ export type AccountProfile = 'vdm' | 'vdm-admin' | 'spvm';
35
+ /**
36
+ * Common attributes optionally shared by all types of users.
37
+ * You should test the 'type' attribute in order to strongly type the allowed attributes.
38
+ */
39
+ export type CommonUserAttributes = {
40
+ /**
41
+ * The type of user that will specify which attributes are allowed.
42
+ */
43
+ type: string;
44
+ /**
45
+ * The username of the user, which could be an email, a UPN or a short code depending on the 'type'.
46
+ */
47
+ username: string;
48
+ /**
49
+ * The email of the user.
50
+ */
51
+ email?: string;
52
+ /**
53
+ * The first name of the user.
54
+ */
55
+ firstName?: string;
56
+ /**
57
+ * The last name of the user.
58
+ */
59
+ lastName?: string;
60
+ /**
61
+ * The registration number of the employee as part of the HR process.
62
+ * For instance: 100375065
63
+ */
64
+ registrationNumber?: string;
65
+ /**
66
+ * The department of the user. This is the primary organization unit that the user has been assigned to.
67
+ * Note that a user could belong to multiple organization units.
68
+ * Note that the department can be a 12 chars long string containing a number such as '040403040000'
69
+ * or a text description such as 'DIV. PREVENTION ET SECURITE URBAINE'.
70
+ */
71
+ department?: string;
72
+ /**
73
+ * The account profile that was selected upon logon.
74
+ */
75
+ accountProfile?: AccountProfile;
76
+ };
77
+ /**
78
+ * The attributes of a citizen: a user consuming Montreal digital services.
79
+ * There are regular citizen accounts for families as well as citizens acting on behalf of their organization.
80
+ *
81
+ * The ID of the citizen is managed by the DCI (Dossier Citoyen Intégré) and is known as mtlIdentityId.
82
+ */
83
+ export type CitizenAttributes = CommonUserAttributes & {
84
+ /**
85
+ * The type of user that will specify which attributes are allowed.
86
+ */
87
+ type: 'citizen';
88
+ /**
89
+ * The username of the citizen which should be the email.
90
+ */
91
+ username: string;
92
+ /**
93
+ * The email of the citizen.
94
+ * This is his own mail used for registering to Montreal digital services.
95
+ */
96
+ email: string;
97
+ /**
98
+ * The first name of the citizen.
99
+ * For instance: John
100
+ */
101
+ firstName: string;
102
+ /**
103
+ * The last name of the citizen.
104
+ * For instance: DOE
105
+ */
106
+ lastName: string;
107
+ };
108
+ /**
109
+ * The attributes of an employee: a user on the payroll of the city of Montreal.
110
+ *
111
+ * The ID is mapped to the username.
112
+ */
113
+ export type EmployeeAttributes = CommonUserAttributes & {
114
+ /**
115
+ * The type of user that will specify which attributes are allowed.
116
+ */
117
+ type: 'employee';
118
+ /**
119
+ * The username of the employee which should be a short code starting with the letter 'u'.
120
+ * For instance: uzartw1
121
+ */
122
+ username: string;
123
+ /**
124
+ * The email of the employee.
125
+ * There are multiple domains such as montreal.ca or spvm.qc.ca
126
+ */
127
+ email: string;
128
+ /**
129
+ * The first name of the employee.
130
+ * For instance: John
131
+ */
132
+ firstName: string;
133
+ /**
134
+ * The last name of the employee.
135
+ * For instance: DOE
136
+ */
137
+ lastName: string;
138
+ /**
139
+ * The registration number of the employee as part of the HR process.
140
+ * For instance: 100375065
141
+ */
142
+ registrationNumber: string;
143
+ /**
144
+ * The department of the employee. This is the primary organization unit that the employee has been assigned to.
145
+ * Note that an employee could belong to multiple organization units.
146
+ * Note that the department can be a 12 chars long string containing a number such as '040403040000'
147
+ * or a text description such as 'DIV. PREVENTION ET SECURITE URBAINE'.
148
+ */
149
+ department: string;
150
+ /**
151
+ * The account profile that was selected upon logon.
152
+ */
153
+ accountProfile: AccountProfile;
154
+ };
155
+ /**
156
+ * The attributes of an external user: a user that is not on the payroll of the city of Montreal but actively collaborates
157
+ * with the city and has his own internal email and short code (starting with the letter x).
158
+
159
+ * The ID is mapped to the username.
160
+ */
161
+ export type ExternalUserAttributes = CommonUserAttributes & {
162
+ type: 'external';
163
+ /**
164
+ * The username of the external user which should be a short code starting with the letter 'x'.
165
+ * For instance: xzartw1
166
+ */
167
+ username: string;
168
+ /**
169
+ * The email of the external user.
170
+ * The name part of the email should end with ".ext", like john.doe.ext@montreal.ca
171
+ */
172
+ email?: string;
173
+ /**
174
+ * The first name of the user.
175
+ * For instance: John
176
+ */
177
+ firstName: string;
178
+ /**
179
+ * The last name of the user.
180
+ * For instance: DOE
181
+ */
182
+ lastName: string;
183
+ /**
184
+ * The department of the user. This is the primary organization unit that the user has been assigned to.
185
+ * Note that a user could belong to multiple organization units.
186
+ * Note that the department can be a 12 chars long string containing a number such as '040403040000'
187
+ * or a text description such as 'DIV. PREVENTION ET SECURITE URBAINE'.
188
+ */
189
+ department?: string;
190
+ /**
191
+ * The account profile that was selected upon logon.
192
+ */
193
+ accountProfile: AccountProfile;
194
+ };
195
+ /**
196
+ * The attributes of a generic user: a fake user used for testing only, that has the right profile or role to perform specific tasks.
197
+
198
+ * The ID is mapped to the username.
199
+ */
200
+ export type GenericUserAttributes = CommonUserAttributes & {
201
+ type: 'generic';
202
+ /**
203
+ * The username of the user which should be a short code starting with the letters 'cg'.
204
+ * For instance: cgdsecdev2
205
+ */
206
+ username: string;
207
+ /**
208
+ * The first name of the user.
209
+ * For instance: John
210
+ */
211
+ firstName: string;
212
+ /**
213
+ * The last name of the user.
214
+ * For instance: DOE
215
+ */
216
+ lastName: string;
217
+ /**
218
+ * The account profile that was selected upon logon.
219
+ */
220
+ accountProfile: AccountProfile;
221
+ };
222
+ /**
223
+ * The attributes of a guest: a user who is invited in the city of Montreal tenant in order to collaborate with some specific services.
224
+
225
+ * The ID is mapped to the username.
226
+ */
227
+ export type GuestUserAttributes = CommonUserAttributes & {
228
+ type: 'guest';
229
+ /**
230
+ * The username of the guest user which should contain the '#EXT#' suffix and belong to the "lavilledemontreal.onmicrosoft.com" domain.
231
+ * For instance: john.doe_hydro.qc.ca#EXT#@lavilledemontreal.onmicrosoft.com
232
+ */
233
+ username: string;
234
+ /**
235
+ * The email of the guest user.
236
+ * The domain of the email should not belong to the City of Montreal, such as montreal.ca or spvm.qc.ca.
237
+ * For instance: john.doe@hydro.qc.ca
238
+ */
239
+ email: string;
240
+ };
241
+ /**
242
+ * An unknown user has no guaranteed attributes and defaults to optional common user attributes.
243
+ * However, since it is a user, we know that it has at least a username or an email.
244
+ *
245
+ * The ID is mapped to the username or the email.
246
+ */
247
+ export type UnknownUserAttributes = CommonUserAttributes & {
248
+ type: 'unknown';
249
+ };
250
+ /**
251
+ * The different sets of user attributes based on the user subtype.
252
+ */
253
+ export type UserAttributes = CitizenAttributes | EmployeeAttributes | ExternalUserAttributes | GenericUserAttributes | GuestUserAttributes | UnknownUserAttributes;
254
+ /************************************************************************************************
255
+ * Anonymous attributes
256
+ * --------------------
257
+ * There is a single type of attributes for the anonymous identity.
258
+ *
259
+ ************************************************************************************************/
260
+ /**
261
+ * The specific attributes for an anonymous identity.
262
+ */
263
+ export type AnonymousAttributes = {
264
+ type: 'anonymous';
265
+ /**
266
+ * The username of the anonymous user.
267
+ * For instance: srvAccAnonymous
268
+ */
269
+ username: string;
270
+ };
271
+ /************************************************************************************************
272
+ * Service account attributes
273
+ * --------------------------
274
+ * There are 2 types of service accounts:
275
+ * - client: this is a non-interactive client that used the OAuth2 client_credentials flow.
276
+ * This is the only flow for Azure AD B2C and Entra ID.
277
+ * - user: this is a specific user that used the OAuth2 password flow.
278
+ * This flow is deprecated.
279
+ *
280
+ ************************************************************************************************/
281
+ /**
282
+ * The specific attributes for a service account of subtype 'client'.
283
+ * Note that 'client' means that the service authenticated using the OAuth2 client_credentials flow.
284
+ */
285
+ export type ClientServiceAccountAttributes = {
286
+ type: 'client';
287
+ };
288
+ /**
289
+ * The specific attributes for a service account of subtype 'user'.
290
+ * Note that 'user' means that the service authenticated using the OAuth2 password flow. (Deprecated)
291
+ */
292
+ export type UserServiceAccountAttributes = {
293
+ type: 'user';
294
+ /**
295
+ * The username of the user service account.
296
+ * For instance: SrvAccDiagCanary
297
+ */
298
+ username: string;
299
+ };
300
+ /**
301
+ * The different sets of service account attributes based on the account subtype.
302
+ */
303
+ export type ServiceAccountAttributes = ClientServiceAccountAttributes | UserServiceAccountAttributes;
304
+ /***********************************************************************************************************************
305
+ * Identities:
306
+ * -----------
307
+ * Each type of identity has some required properties, such as:
308
+ * - the ID
309
+ * - the display name
310
+ * - the source of this identity
311
+ * - the attributes specific to the subtype of identity
312
+ * - a toString() helper method that can format the identity for auditing or logging
313
+ *
314
+ * We have 3 types of identity:
315
+ * - user (employee, citizen, external user, generic user, guest user, unknown user...)
316
+ * - service account (client, user)
317
+ * - anonymous
318
+ *
319
+ * If we don't recognize one of those types of identity, we will default to UnknownIdentity.
320
+ *
321
+ * You'll have to test the type of identity before accessing the attributes, then you'll have to test the type of attributes.
322
+ *
323
+ * Note that a UserIdentity will default to the CommonUserAttributes type for its attributes, in order to provide
324
+ * a quick access to some common user attributes. But those attributes will be optional and should be checked,
325
+ * whereas the typed attributes will provide strong guarantees.
326
+ *
327
+ ***********************************************************************************************************************/
328
+ /**
329
+ * Contains some common attributes that provide some traceability for understanding which claim we have selected for the ID of the identity,
330
+ * where does the token come from and which was the internal ID of the user in the IDP.
331
+ */
332
+ export type IdentitySource = {
333
+ /**
334
+ * The audience of the JWT, which is usually the clientID our appId.
335
+ */
336
+ aud: string;
337
+ /**
338
+ * Which service issued the JWT that we parsed into an identity.
339
+ * Usually, this would be 'security-identity-token-api'.
340
+ */
341
+ issuer: string;
342
+ /**
343
+ * Which IDP produced the access token that was submitted to TokenAPI.
344
+ * For EntraID, this would be https://login.microsoftonline.com/9f15d2dc-8753-4f83-aac2-a58288d3a4bc/v2.0,
345
+ * for Azure AD B2C https://connexion.montreal.ca,
346
+ * for Gluu employee https://idp.montreal.ca,
347
+ * for Gluu citizens https://auth.montreal.ca,
348
+ * for anonymous tokens security-identity-anonymous-token-api
349
+ */
350
+ accessTokenIssuer?: string;
351
+ /**
352
+ * Which claim was used for the unique ID of the identity.
353
+ * This could be: userName, email, mtlIdentityId, aud, sub
354
+ */
355
+ claim: string;
356
+ /**
357
+ * The internal ID that would provide access to the user object in the IDP itself.
358
+ * For Azure, this would be the 'oid' (or objectID) and for Gluu this would be the inum (or sub).
359
+ */
360
+ internalId: string;
361
+ /**
362
+ * The realm that produced the access token.
363
+ * This could be: employees, citizens, anonymous
364
+ */
365
+ realm: string;
366
+ /**
367
+ * The name of the environment that produced the JWT.
368
+ * This could be: lab, dev, accept, prod
369
+ */
370
+ env?: string;
371
+ };
372
+ /**
373
+ * A BaseIdentity contains attributes shared by all types of Identity.
374
+ * They also have a strongly typed 'attributes' property that is specific
375
+ * to each kind of identity and its variants.
376
+ */
377
+ export type BaseIdentity<TAttributes> = {
378
+ /**
379
+ * A stable unique ID for the authenticated user.
380
+ * An ID can be mapped to a username, email, appId according to the type of user.
381
+ * The name of the selected attribute will be specified in the source object, in the 'claim' attribute.
382
+ */
383
+ id: string;
384
+ /**
385
+ * A display name for the authenticated user
386
+ */
387
+ displayName: string;
388
+ /**
389
+ * The information about the source of the JWT and its associated access token.
390
+ * It would also specify which claim has been selected for the unique ID of the identity.
391
+ */
392
+ source: IdentitySource;
393
+ /**
394
+ * The attributes specific to the subtype of identity.
395
+ */
396
+ attributes: TAttributes;
397
+ /**
398
+ * A helper function for formatting the Identity in order to log it or audit it.
399
+ * This is for diagnostics only.
400
+ */
401
+ toString(): string;
402
+ };
403
+ /**
404
+ * This is a user that can interact with the systems of the city of Montreal.
405
+ * The attributes will vary according to the type of user (citizen, employee, external user...).
406
+ *
407
+ * Since some users might have multiple profiles and thus multiple emails (like @montreal.ca, .adm@montreal.ca or @spvm.qc.ca)
408
+ * that they can select at login time, you might want to consider the "accountProfile" attribute which categorizes them.
409
+ * The ID will correctly identify the physical person but not the selected role.
410
+ * So, you could combine ID+accountProfile or prefer the email in some cases, like when you need to evaluate the permissions.
411
+ */
412
+ export type UserIdentity<TAttributes extends UserAttributes = UserAttributes> = BaseIdentity<TAttributes> & {
413
+ /** The type of identity
414
+ */
415
+ type: 'user';
416
+ };
417
+ /**
418
+ * This is an employee, on the payroll of the city of Montreal.
419
+ *
420
+ * The ID is mapped to the username.
421
+ */
422
+ export type EmployeeIdentity = UserIdentity<EmployeeAttributes>;
423
+ /**
424
+ * This is an external user: an external collaborator or consultant that is not on the payroll of the city of Montreal,
425
+ * but can access all internal services and has an email in the domain of Montreal (or SPVM).
426
+ *
427
+ * The ID is mapped to the username.
428
+ */
429
+ export type ExternalUserIdentity = UserIdentity<ExternalUserAttributes>;
430
+ /**
431
+ * This is a generic user: a user shared by employees or external users in order to perform QA tests in a non production environment.
432
+ * Each generic user would have its own role or profile in the tested application, allowing one to perform the tasks required by the test.
433
+ *
434
+ * The ID is mapped to the username.
435
+ */
436
+ export type GenericUserIdentity = UserIdentity<GenericUserAttributes>;
437
+ /**
438
+ * This is a guest user: a user who doesn't work for the city of Montreal but needs to colloborate with a set of limited and specific services.
439
+ * Note that, in theory, we could have guest users in other realms such as citizens (like sysadmins), but they cannot login at the moment and thus
440
+ * we should only have tokens from the 'employees' realm.
441
+ * Note that this kind of user might not have a firstName and lastName.
442
+ *
443
+ * The ID is mapped to the username.
444
+ */
445
+ export type GuestUserIdentity = UserIdentity<GuestUserAttributes>;
446
+ /**
447
+ * This is a citizen: a user consuming Montreal digital services.
448
+ * There are regular citizen accounts for families as well as citizens acting on behalf of their organization.
449
+ *
450
+ * The ID of the citizen is managed by the DCI (Dossier Citoyen Intégré) and is known as mtlIdentityId.
451
+ */
452
+ export type CitizenIdentity = UserIdentity<CitizenAttributes>;
453
+ /**
454
+ * This is a user but we could not detect its type (employee, citizen...).
455
+ * In this case, it means that the user has at least a username or an email.
456
+ * All other common attributes might be defined but are not guaranteed.
457
+ *
458
+ * The ID of the unknown user will be mapped to the username when available, otherwise to the email.
459
+ */
460
+ export type UnknownUserIdentity = UserIdentity<UnknownUserAttributes>;
461
+ /**
462
+ * This is an anonymous user: a user consuming some basic digitital services that don't require to be identified,
463
+ * such as reporting a pot hole in the street.
464
+ *
465
+ * The ID is mapped to the username.
466
+ */
467
+ export type AnonymousIdentity = BaseIdentity<AnonymousAttributes> & {
468
+ /** The type of identity */
469
+ type: 'anonymous';
470
+ };
471
+ /**
472
+ * This is a service account, without interactive logon, that allows a backend service or an automation to perform some tasks
473
+ * with the required privileges (least privilege).
474
+ * A service account has an ID, a display name and a secret (that expires after a few months).
475
+ *
476
+ * The ID is mapped to the 'aud' or the 'username', depending on the subtype.
477
+ */
478
+ export type ServiceAccountIdentity<TAttributes extends ServiceAccountAttributes = ServiceAccountAttributes> = BaseIdentity<TAttributes> & {
479
+ /**
480
+ * The type of identity
481
+ */
482
+ type: 'service-account';
483
+ };
484
+ /**
485
+ * This is a service account, without interactive logon, that allows a backend service or an automation to perform some tasks
486
+ * with the required privileges (least privilege).
487
+ * A service account has an ID, a display name and a secret (that expires after a few months).
488
+ *
489
+ * The ID is mapped to the 'aud' which contains the appId in Azure or the inum in Gluu.
490
+ */
491
+ export type ClientServiceAccountIdentity = ServiceAccountIdentity<ClientServiceAccountAttributes>;
492
+ /**
493
+ * This is the old way of managing service accounts, with a real user provisioned (that's why there is a username property).
494
+ * This kind of account as been deprecated (hence the legacy part) in favor of real service accounts that don't allow interactive logon.
495
+ *
496
+ * The id is mapped to the username.
497
+ */
498
+ export type UserServiceAccountIdentity = ServiceAccountIdentity<UserServiceAccountAttributes>;
499
+ /**
500
+ * An unknown identity has no specific attributes and defaults to this empty definition.
501
+ */
502
+ export type UnknownAttributes = {
503
+ type: 'unknown';
504
+ };
505
+ /**
506
+ * This is the default identity when we could not match the proper one from the submitted JWT.
507
+ * This might happen when we introduce a new type and this lib has not been updated in the client application,
508
+ * but it should be very rare.
509
+ *
510
+ * The ID is mapped to the sub.
511
+ */
512
+ export type UnknownIdentity = BaseIdentity<UnknownAttributes> & {
513
+ /**
514
+ * The type of identity
515
+ */
516
+ type: 'unknown';
517
+ };
518
+ /**
519
+ * This is the Identity of the agent performing a request.
520
+ * You would have to discriminate the right identity based on the 'type' property.
521
+ * All identities will have a unique ID, a display name, a source, an attributes struct and a toString() function for formatting the values.
522
+ */
523
+ export type Identity = AnonymousIdentity | UserIdentity | ServiceAccountIdentity | UnknownIdentity;
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ /*
3
+ Type summary:
4
+
5
+ Identity
6
+ |_ UnknownIdentity <-> UnknownAttributes
7
+ |
8
+ |_ AnonymousIdentity <-> AnonymousAttributes
9
+ |
10
+ |_ ServiceAccountIdentity <-> ServiceAccountAttributes
11
+ | |_ ClientServiceAccountIdentity <-> ClientServiceAccountAttributes
12
+ | |_ UserServiceAccountIdentity <-> UserServiceAccountAttributes
13
+ |
14
+ |_ UserIdentity <-> UserAttributes
15
+ |_ CitizenIdentity <-> CitizenAttributes
16
+ |_ EmployeeIdentity <-> EmployeeAttributes
17
+ |_ ExternalUserIdentity <-> ExternalUserAttributes
18
+ |_ GenericUserIdentity <-> GenericUserAttributes
19
+ |_ GuestUserIdentity <-> GuestUserAttributes
20
+ |_ UnknownUserIdentity <-> UnknownUserAttributes
21
+
22
+ Existing ID mappings:
23
+
24
+ | ---------------------------- | -------------------- | -------------------------------------------------------------- |
25
+ | Entity | ID | Example |
26
+ | ---------------------------- | -------------------- | -------------------------------------------------------------- |
27
+ | UnknownIdentity | sub | foo1234 |
28
+ | AnonymousIdentity | username | srvAccAnonymous |
29
+ | UserServiceAccountAttributes | username | srvAccDiagCanary |
30
+ | ClientServiceAccountIdentity | aud (appId/clientId) | e5dd632b-cb97-48d7-a310-cde5147be717 |
31
+ | CitizenIdentity | mtlIdentityId | @!4025.CA62.9BB6.16C5!0001!2212.0010!0000!3F39.BEDB.4ADB.F74D |
32
+ | EmployeeIdentity | username | umartw8 |
33
+ | ExternalUserIdentity | username | xdoejo3 |
34
+ | GenericUserIdentity | username | cgdsecdev2 |
35
+ | GuestUserIdentity | username | doe.daniel_hydro.qc.ca#EXT#@lavilledemontreal.omnicrosoft.com |
36
+ | ---------------------------- | -------------------- | -------------------------------------------------------------- |
37
+
38
+ Identity.toString() examples:
39
+
40
+ | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
41
+ | Identity | Example |
42
+ | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
43
+ | UnknownIdentity | unknown:12345:John Doe |
44
+ | AnonymousIdentity | anonymous:srvAccAnonymous:srvAcc Anonymous |
45
+ | UserServiceAccountAttributes | service-account:user:srvAccDiagCanary:srvAcc Diagnostics Canary |
46
+ | ClientServiceAccountIdentity | service-account:client:e5dd632b-cb97-48d7-a310-cde5147be717:infra-auth-auth-playground-dev |
47
+ | CitizenIdentity | user:citizen:@!4025.CA62.9BB6.16C5!0001!2212.0010!0000!3F39.BEDB.4ADB.F74D:John Doe:john.doe@mailinator.com |
48
+ | EmployeeIdentity | user:employee:udoejo3:John DOE:john.doe@montreal.ca:100674051:421408000000:vdm |
49
+ | ExternalUserIdentity | user:external:xdoejo3:John DOE:john.doe@montreal.ca::vdm |
50
+ | GenericUserIdentity | user:generic:cgdsecdev2:C.Generique dsec developpeur2::4211:vdm |
51
+ | GuestUserIdentity | user:guest:employees:doe.daniel_hydro.qc.ca#EXT#@lavilledemontreal.omnicrosoft.com:doe.daniel@hydro.qc.ca:doe.daniel@hydro.qc.ca |
52
+ | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
53
+
54
+
55
+ */
56
+ Object.defineProperty(exports, "__esModule", { value: true });
57
+ //# sourceMappingURL=identities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identities.js","sourceRoot":"","sources":["../../../src/models/identities.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqDE"}
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import * as crypto from 'crypto';
3
2
  /**
4
3
  * The content of public key
@@ -9,5 +9,5 @@ var PublicKeyState;
9
9
  PublicKeyState["ACTIVE"] = "active";
10
10
  PublicKeyState["EXPIRED"] = "expired";
11
11
  PublicKeyState["REVOKED"] = "revoked";
12
- })(PublicKeyState = exports.PublicKeyState || (exports.PublicKeyState = {}));
12
+ })(PublicKeyState || (exports.PublicKeyState = PublicKeyState = {}));
13
13
  //# sourceMappingURL=publicKey.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"publicKey.js","sourceRoot":"","sources":["../../../src/models/publicKey.ts"],"names":[],"mappings":";;;AA4BA;;GAEG;AACH,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,qCAAmB,CAAA;IACnB,qCAAmB,CAAA;AACrB,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB"}
1
+ {"version":3,"file":"publicKey.js","sourceRoot":"","sources":["../../../src/models/publicKey.ts"],"names":[],"mappings":";;;AA4BA;;GAEG;AACH,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,qCAAmB,CAAA;IACnB,qCAAmB,CAAA;AACrB,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"cachedPublicKeyRepository.js","sourceRoot":"","sources":["../../../src/repositories/cachedPublicKeyRepository.ts"],"names":[],"mappings":";;;AAAA,iEAA0E;AAC1E,mCAAgC;AAChC,iCAAiC;AACjC,+CAA4C;AAE5C,4CAA+C;AAC/C,+DAAkF;AAClF,MAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,2BAA2B,CAAC,CAAC;AAYzD,MAAa,yBAAyB;IAAtC;QAME;;WAEG;QACK,gBAAW,GAAgB,EAAE,CAAC;IAyFxC,CAAC;IAvFC;;OAEG;IACI,UAAU;QACf,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,GAAG,EAAE,CAAC;IAClC,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,MAAM;QACjB,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE;YACxB,MAAM,QAAQ,GAAgB,MAAM,yCAAmB,CAAC,MAAM,EAAE,CAAC;YAEjE,IAAI,QAAQ,EAAE;gBACZ,IAAI,CAAC,qBAAqB,EAAE,CAAC;gBAC7B,IAAI,CAAC,WAAW,GAAG,IAAA,eAAM,EAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;aACvD;SACF;QACD,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,MAAM,CAAC,KAAa;QAC/B,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE;YACpD,oEAAoE;YACpE,IAAI;gBACF,MAAM,GAAG,GAAe,MAAM,yCAAm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I,CAAC,WAAW,GAAG,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,iBAAO,CAAC,gBAAgB,EAAE,EAAE,SAAS,CAAC,CAAC;IAC7E,CAAC;CACF;AAlGD,8DAkGC;AAEY,QAAA,yBAAyB,GACpC,IAAI,yBAAyB,EAAE,CAAC"}
1
+ {"version":3,"file":"cachedPublicKeyRepository.js","sourceRoot":"","sources":["../../../src/repositories/cachedPublicKeyRepository.ts"],"names":[],"mappings":";;;AAAA,iEAA0E;AAC1E,mCAAgC;AAChC,iCAAiC;AACjC,+CAA4C;AAE5C,4CAA+C;AAC/C,+DAAkF;AAClF,MAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,2BAA2B,CAAC,CAAC;AAYzD,MAAa,yBAAyB;IAAtC;QAME;;WAEG;QACK,gBAAW,GAAgB,EAAE,CAAC;IAyFxC,CAAC;IAvFC;;OAEG;IACI,UAAU;QACf,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,GAAG,EAAE,CAAC;IAClC,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,MAAM;QACjB,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,CAAC;YACzB,MAAM,QAAQ,GAAgB,MAAM,yCAAmB,CAAC,MAAM,EAAE,CAAC;YAEjE,IAAI,QAAQ,EAAE,CAAC;gBACb,IAAI,CAAC,qBAAqB,EAAE,CAAC;gBAC7B,IAAI,CAAC,WAAW,GAAG,IAAA,eAAM,EAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;YACxD,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,MAAM,CAAC,KAAa;QAC/B,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,CAAC;YACrD,oE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