identityscope 0.28.5 → 0.28.8

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 (119) hide show
  1. package/README.md +106 -77
  2. package/SECURITY.md +7 -7
  3. package/dist/core/audit-readiness.js +7 -7
  4. package/dist/core/audit-readiness.js.map +1 -1
  5. package/dist/core/checks.js +13 -13
  6. package/dist/core/checks.js.map +1 -1
  7. package/dist/core/datasets.js +1 -1
  8. package/dist/core/datasets.js.map +1 -1
  9. package/dist/core/governance-trail.js +3 -3
  10. package/dist/core/governance-trail.js.map +1 -1
  11. package/dist/core/http-transport.js +1 -1
  12. package/dist/core/http-transport.js.map +1 -1
  13. package/dist/core/insights.d.ts +1 -1
  14. package/dist/core/insights.js +8 -8
  15. package/dist/core/insights.js.map +1 -1
  16. package/dist/core/joiner-evidence.js +5 -5
  17. package/dist/core/joiner-evidence.js.map +1 -1
  18. package/dist/core/lab/policy-preview.js +3 -3
  19. package/dist/core/lab/policy-preview.js.map +1 -1
  20. package/dist/core/lab/transform-impact.js +1 -1
  21. package/dist/core/lab/transform-impact.js.map +1 -1
  22. package/dist/core/lab/transform-people.js +4 -4
  23. package/dist/core/lab/transform-people.js.map +1 -1
  24. package/dist/core/lab/transforms.js +1 -1
  25. package/dist/core/lab/transforms.js.map +1 -1
  26. package/dist/core/lifecycle-gaps.js +6 -6
  27. package/dist/core/lifecycle-gaps.js.map +1 -1
  28. package/dist/core/lookup.js +1 -1
  29. package/dist/core/lookup.js.map +1 -1
  30. package/dist/core/model-insights.js +10 -10
  31. package/dist/core/model-insights.js.map +1 -1
  32. package/dist/core/operations-watch.js +7 -7
  33. package/dist/core/operations-watch.js.map +1 -1
  34. package/dist/core/preview.js +3 -3
  35. package/dist/core/preview.js.map +1 -1
  36. package/dist/core/roles.js +1 -1
  37. package/dist/core/roles.js.map +1 -1
  38. package/dist/core/threat-signals.js +9 -9
  39. package/dist/core/threat-signals.js.map +1 -1
  40. package/dist/core/threat-watch.js +3 -3
  41. package/dist/core/threat-watch.js.map +1 -1
  42. package/dist/core/transport.d.ts +4 -0
  43. package/dist/core/transport.js +23 -3
  44. package/dist/core/transport.js.map +1 -1
  45. package/dist/core/warnings.js +3 -3
  46. package/dist/core/warnings.js.map +1 -1
  47. package/dist/node/attribute-history.js +2 -2
  48. package/dist/node/attribute-history.js.map +1 -1
  49. package/dist/node/cli.js +57 -5
  50. package/dist/node/cli.js.map +1 -1
  51. package/dist/node/evidence.js +7 -7
  52. package/dist/node/evidence.js.map +1 -1
  53. package/dist/node/ui-page.d.ts +1 -1
  54. package/dist/node/ui-page.js +1 -1
  55. package/dist/node/ui-page.js.map +1 -1
  56. package/dist/node/ui-server.js +64 -51
  57. package/dist/node/ui-server.js.map +1 -1
  58. package/dist/reports/builtin.generated.js +35 -35
  59. package/dist/reports/builtin.generated.js.map +1 -1
  60. package/package.json +1 -1
  61. package/reports/access-profile-members.yaml +3 -3
  62. package/reports/access-profile-membership-counts.yaml +2 -2
  63. package/reports/accounts-by-source.yaml +2 -2
  64. package/reports/active-identities-without-manager.yaml +2 -2
  65. package/reports/aggregation-failures.yaml +1 -1
  66. package/reports/aggregation-history.yaml +1 -1
  67. package/reports/all-sources.yaml +1 -1
  68. package/reports/application-accounts.yaml +3 -3
  69. package/reports/application-entitlements.yaml +3 -3
  70. package/reports/certification-decisions.yaml +1 -1
  71. package/reports/direct-reports-per-manager.yaml +3 -3
  72. package/reports/disabled-accounts-of-active-people.yaml +3 -3
  73. package/reports/duplicate-emails.yaml +1 -1
  74. package/reports/entitlement-holders.yaml +2 -2
  75. package/reports/entitlements-held-by-inactive-identities.yaml +3 -3
  76. package/reports/identities-by-lifecycle-state.yaml +3 -3
  77. package/reports/identities-missing-key-attributes.yaml +3 -3
  78. package/reports/identities-with-processing-errors.yaml +2 -2
  79. package/reports/machine-accounts.yaml +1 -1
  80. package/reports/managers-and-direct-reports.yaml +4 -4
  81. package/reports/most-access.yaml +3 -3
  82. package/reports/new-identities.yaml +3 -3
  83. package/reports/old-passwords.yaml +3 -3
  84. package/reports/pending-reviews-by-reviewer.yaml +1 -1
  85. package/reports/person-access.yaml +4 -4
  86. package/reports/privileged-access.yaml +2 -2
  87. package/reports/provisioning-error-causes.yaml +1 -1
  88. package/reports/provisioning-failures.yaml +1 -1
  89. package/reports/recent-activity.yaml +3 -3
  90. package/reports/recent-leavers.yaml +4 -4
  91. package/reports/role-members.yaml +3 -3
  92. package/reports/role-membership-counts.yaml +2 -2
  93. package/reports/team-access.yaml +4 -4
  94. package/reports/terminated-users-with-active-accounts.yaml +4 -4
  95. package/reports/uncorrelated-accounts.yaml +1 -1
  96. package/ui/js/01-small-helpers.js +2 -2
  97. package/ui/js/04-library.js +1 -1
  98. package/ui/js/07-fields.js +1 -1
  99. package/ui/js/08-designer.js +4 -4
  100. package/ui/js/11-lookup.js +4 -4
  101. package/ui/js/16-ownership.js +3 -3
  102. package/ui/js/18-audit.js +5 -5
  103. package/ui/js/19-insights.js +6 -6
  104. package/ui/js/20-role-mining.js +5 -5
  105. package/ui/js/22-partner-overview-all-customer-tenants.js +2 -2
  106. package/ui/js/23-in-app-guidance.js +42 -42
  107. package/ui/js/24-role-tools.js +4 -4
  108. package/ui/js/27-warnings.js +29 -29
  109. package/ui/js/28-audit-readiness.js +12 -12
  110. package/ui/js/29-lifecycle.js +19 -19
  111. package/ui/js/30-labs.js +8 -8
  112. package/ui/js/31-build.js +6 -6
  113. package/ui/js/32-lab-examples.js +2 -2
  114. package/ui/js/33-finder.js +2 -2
  115. package/ui/js/34-governance.js +4 -4
  116. package/ui/js/35-watch.js +13 -13
  117. package/ui/js/36-model.js +21 -21
  118. package/ui/js/37-logs-and-watch.js +11 -11
  119. package/ui/shell.html +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"ui-page.js","sourceRoot":"","sources":["../../src/node/ui-page.ts"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,MAAM,CAAC,MAAM,OAAO,GAAG,gs5iBAAgs5iB,CAAC"}
1
+ {"version":3,"file":"ui-page.js","sourceRoot":"","sources":["../../src/node/ui-page.ts"],"names":[],"mappings":"AAAA,uGAAuG;AACvG,MAAM,CAAC,MAAM,OAAO,GAAG,gq7iBAAgq7iB,CAAC"}
@@ -130,6 +130,13 @@ class HttpProblem extends Error {
130
130
  */
131
131
  export async function startUiServer(opts = {}) {
132
132
  const home = opts.home ?? appHome();
133
+ // A computer that has never run IdentityScope has no folder yet: everything that saves needs it.
134
+ try {
135
+ mkdirSync(home, { recursive: true });
136
+ }
137
+ catch {
138
+ /* read-only place: each save reports its own error */
139
+ }
133
140
  const baseEnv = opts.env ?? process.env;
134
141
  const env = () => mergedEnv(baseEnv, home);
135
142
  const exec = opts.exec ?? realExec;
@@ -159,6 +166,11 @@ export async function startUiServer(opts = {}) {
159
166
  return {};
160
167
  }
161
168
  };
169
+ // The folder does not exist on a computer that has never saved anything: make it first.
170
+ const saveSettings = (all) => {
171
+ mkdirSync(home, { recursive: true });
172
+ writeFileSync(settingsFile, JSON.stringify(all, null, 2));
173
+ };
162
174
  const scheduleRuns = new Map();
163
175
  const jobs = new Map();
164
176
  // A list ISC cut short must never pass silently: it becomes a yellow note on the result.
@@ -187,12 +199,12 @@ export async function startUiServer(opts = {}) {
187
199
  }
188
200
  let doing = '';
189
201
  let lastWritten = '';
190
- const MEMORY_STOP = 'Stopped: this needs more memory than IdentityScope has on this computer. Nothing was changed. Check fewer tenants at once, or tell us which check it was (shown in the progress line).';
202
+ const memoryStopText = (usedMB, limitMB, on) => `Stopped: IdentityScope ran out of memory (${usedMB.toLocaleString('en-US')} of ${limitMB.toLocaleString('en-US')} MB in use)${on ? ` while it was on "${on}"` : ''}. Nothing was changed in ISC. Close other programs and run it again. If it stops at the same place, please report it with the support file from Help; the README says how to give IdentityScope more memory.`;
191
203
  const guard = setInterval(() => {
192
204
  const running = [...jobs.values()].filter((j) => j.state === 'running');
193
205
  for (const j of jobs.values())
194
- if (j.memoryStop && j.state === 'error' && j.error !== MEMORY_STOP)
195
- j.error = MEMORY_STOP;
206
+ if (j.memoryStop && j.state === 'error' && j.error !== j.memoryMessage)
207
+ j.error = j.memoryMessage;
196
208
  if (!running.length) {
197
209
  if (lastWritten) {
198
210
  lastWritten = '';
@@ -222,6 +234,7 @@ export async function startUiServer(opts = {}) {
222
234
  if (h.used_heap_size > (byHand > 0 ? byHand * 1048576 : 0.82 * h.heap_size_limit)) {
223
235
  for (const j of running) {
224
236
  j.memoryStop = true;
237
+ j.memoryMessage = memoryStopText(mb(h.used_heap_size), mb(h.heap_size_limit), (j.progress || doing).slice(0, 160));
225
238
  j.stopped = true;
226
239
  j.abort?.abort();
227
240
  }
@@ -463,7 +476,7 @@ export async function startUiServer(opts = {}) {
463
476
  pendingLogins.delete(k);
464
477
  pendingLogins.set(p.state, p);
465
478
  mkdirSync(home, { recursive: true });
466
- writeFileSync(settingsFile, JSON.stringify({ ...readSettings(), signIn: { baseUrl, clientId } }, null, 2));
479
+ saveSettings({ ...readSettings(), signIn: { baseUrl, clientId } });
467
480
  return send(res, 200, { authorizeUrl: p.authorizeUrl });
468
481
  }
469
482
  if (route === 'POST /api/remember') {
@@ -622,7 +635,7 @@ export async function startUiServer(opts = {}) {
622
635
  }
623
636
  if (problems.length)
624
637
  throw new DefinitionError('Some limits are not valid', problems);
625
- writeFileSync(settingsFile, JSON.stringify({ ...readSettings(), checks: out }, null, 2));
638
+ saveSettings({ ...readSettings(), checks: out });
626
639
  return send(res, 200, { saved: true });
627
640
  }
628
641
  if (route === 'POST /api/checks/run') {
@@ -709,7 +722,7 @@ export async function startUiServer(opts = {}) {
709
722
  const o = await ownershipOverview(t, progress);
710
723
  const rows = o.orphaned.map((x) => [x.type, x.name, x.source ?? null, x.ownerName ?? null, x.ownerStatus === 'not found' ? 'no longer in ISC' : x.ownerStatus, x.lifecycleState ?? null]);
711
724
  const { objects, ...rest } = o;
712
- return { extra: { ...rest, objects }, table: tableResult('Objects owned by people who left', ['Type', 'Object', 'Source', 'Owner', 'Owner status', 'Owner lifecycle state'], rows, Date.now(), o.notes) };
725
+ return { extra: { ...rest, objects }, table: tableResult('Objects owned by identities who left', ['Type', 'Object', 'Source', 'Owner', 'Owner status', 'Owner lifecycle state'], rows, Date.now(), o.notes) };
713
726
  }),
714
727
  });
715
728
  }
@@ -837,7 +850,7 @@ export async function startUiServer(opts = {}) {
837
850
  if (!ids.length)
838
851
  throw new HttpProblem(400, 'Pick at least one check.');
839
852
  const same = ids.length === OVERVIEW_DEFAULT.length && OVERVIEW_DEFAULT.every((x) => ids.includes(x));
840
- writeFileSync(settingsFile, JSON.stringify({ ...readSettings(), overviewChecks: same ? undefined : ids }, null, 2));
853
+ saveSettings({ ...readSettings(), overviewChecks: same ? undefined : ids });
841
854
  return send(res, 200, { checks: readOverviewChecks(home) });
842
855
  }
843
856
  if (route === 'POST /api/tenants') {
@@ -999,7 +1012,7 @@ export async function startUiServer(opts = {}) {
999
1012
  throw new HttpProblem(400, 'The transform must be a JSON object.');
1000
1013
  const attribute = typeof b['attribute'] === 'string' && b['attribute'].trim() ? b['attribute'].trim() : undefined;
1001
1014
  return send(res, 202, {
1002
- job: background('trying a transform on people', async (progress) => {
1015
+ job: background('trying a transform on identities', async (progress) => {
1003
1016
  const o = await runOnPeople(t, {
1004
1017
  transform: transform,
1005
1018
  transforms: [...(await readTransforms(t)), ...labDrafts(b['transforms'])],
@@ -1010,7 +1023,7 @@ export async function startUiServer(opts = {}) {
1010
1023
  onProgress: progress,
1011
1024
  });
1012
1025
  const rows = o.rows.map((r) => [r.person, r.current ?? null, r.result ?? null, r.status === 'ok' ? (attribute ? (r.same ? 'same' : 'different') : 'ok') : r.status, r.error ?? null]);
1013
- const cols = attribute ? ['Person', `In ISC now (${attribute})`, 'Offline result', 'Result', 'Problem'] : ['Person', 'Current', 'Offline result', 'Result', 'Problem'];
1026
+ const cols = attribute ? ['Identity', `In ISC now (${attribute})`, 'Offline result', 'Result', 'Problem'] : ['Identity', 'Current', 'Offline result', 'Result', 'Problem'];
1014
1027
  return { extra: { ...o, rows: o.rows.slice(0, 2000) }, table: tableResult(attribute ? `Transform check: ${attribute}` : 'Transform trial run', cols, rows, Date.now(), [...o.assumptions, ...o.notes]) };
1015
1028
  }),
1016
1029
  });
@@ -1126,7 +1139,7 @@ export async function startUiServer(opts = {}) {
1126
1139
  // Saving an end-date attribute turns on the "Active after end date" tile, unless it was turned off on purpose.
1127
1140
  if (turnOn && checks['past-end-date']?.enabled !== false)
1128
1141
  checks['past-end-date'] = { ...(checks['past-end-date'] ?? {}), enabled: true };
1129
- writeFileSync(settingsFile, JSON.stringify({ ...cur, checks, warnings: out }, null, 2));
1142
+ saveSettings({ ...cur, checks, warnings: out });
1130
1143
  return send(res, 200, { saved: true });
1131
1144
  }
1132
1145
  const wm = /^POST \/api\/warnings\/(access-ending|stuck|reminders|admins|catalog|people|growth|account-expiry|revokes|request-trail|approver-chain)\/run$/.exec(route);
@@ -1149,12 +1162,12 @@ export async function startUiServer(opts = {}) {
1149
1162
  case 'access-ending': {
1150
1163
  const o = await accessEnding(t, { now, days: days(1, 365, 30), onProgress: progress });
1151
1164
  const rows = o.rows.map((x) => [x.person, x.personStatus ?? null, x.access, x.type, x.removeDate.slice(0, 10), x.daysLeft, x.manager ?? null, x.requester ?? null]);
1152
- return { extra: o, table: tableResult('Access ending', ['Person', 'Person status', 'Access', 'Type', 'Ends', 'Days left', 'Manager', 'Requested by'], rows, Date.now(), o.notes) };
1165
+ return { extra: o, table: tableResult('Access ending', ['Identity', 'Identity status', 'Access', 'Type', 'Ends', 'Days left', 'Manager', 'Requested by'], rows, Date.now(), o.notes) };
1153
1166
  }
1154
1167
  case 'stuck': {
1155
1168
  const o = await stuckOnLeavers(t, { now, onProgress: progress });
1156
1169
  const rows = o.rows.map((x) => [x.kind, x.item, x.waitingOn, x.status, x.detail]);
1157
- return { extra: o, table: tableResult('Waiting on people who left', ['What', 'Item', 'Waiting on', 'Status', 'When'], rows, Date.now(), o.notes) };
1170
+ return { extra: o, table: tableResult('Waiting on identities who left', ['What', 'Item', 'Waiting on', 'Status', 'When'], rows, Date.now(), o.notes) };
1158
1171
  }
1159
1172
  case 'reminders': {
1160
1173
  const o = await reviewerReminders(t, { now, days: days(0, 90, 7), onProgress: progress });
@@ -1166,7 +1179,7 @@ export async function startUiServer(opts = {}) {
1166
1179
  const seen = newAdmins(home, key, o.rows.map((r) => r.id), now.toISOString());
1167
1180
  const rows = o.rows.map((x) => ({ ...x, isNew: seen.fresh.has(x.id) }));
1168
1181
  const table = rows.map((x) => [x.person, x.email ?? null, x.levels.map(levelLabel).join(', '), x.status, x.lifecycle ?? null, x.isNew ? 'yes' : null]);
1169
- return { extra: { ...o, rows, since: seen.since }, table: tableResult('ISC user levels', ['Person', 'Email', 'User levels', 'Status', 'Lifecycle state', 'New since last look'], table, Date.now(), o.notes) };
1182
+ return { extra: { ...o, rows, since: seen.since }, table: tableResult('ISC user levels', ['Identity', 'Email', 'User levels', 'Status', 'Lifecycle state', 'New since last look'], table, Date.now(), o.notes) };
1170
1183
  }
1171
1184
  case 'catalog': {
1172
1185
  const o = await catalogQuality(t, { onProgress: progress });
@@ -1176,18 +1189,18 @@ export async function startUiServer(opts = {}) {
1176
1189
  case 'people': {
1177
1190
  const o = await peopleEnding(t, { ...(warnSettings().people ?? {}), now, days: days(1, 365, 30), onProgress: progress });
1178
1191
  const rows = [...o.pastEnd.map((x) => ['Past end date', x.person, x.endDate.slice(0, 10), x.daysLeft, x.manager ?? null, x.lifecycle ?? null]), ...o.endingSoon.map((x) => ['Ending soon', x.person, x.endDate.slice(0, 10), x.daysLeft, x.manager ?? null, x.lifecycle ?? null])];
1179
- return { extra: o, table: tableResult('People at or past their end date', ['Group', 'Person', 'End date', 'Days left', 'Manager', 'Lifecycle state'], rows, Date.now(), o.notes) };
1192
+ return { extra: o, table: tableResult('Identities at or past their end date', ['Group', 'Identity', 'End date', 'Days left', 'Manager', 'Lifecycle state'], rows, Date.now(), o.notes) };
1180
1193
  }
1181
1194
  case 'account-expiry': {
1182
1195
  const { ids, attribute } = expiryInput;
1183
1196
  const o = await accountExpiry(t, { now, days: days(1, 365, 30), sourceIds: ids, attribute, onProgress: progress });
1184
1197
  const rows = o.rows.map((x) => [x.account, x.person ?? null, x.source, x.expires, x.daysLeft, x.disabled ? 'disabled' : 'enabled', x.raw]);
1185
- return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult(`Accounts expiring (${attribute})`, ['Account', 'Person', 'Source', 'Expires', 'Days left', 'Account', 'Value in ISC'], rows, Date.now(), o.notes) };
1198
+ return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult(`Accounts expiring (${attribute})`, ['Account', 'Identity', 'Source', 'Expires', 'Days left', 'Account', 'Value in ISC'], rows, Date.now(), o.notes) };
1186
1199
  }
1187
1200
  case 'revokes': {
1188
1201
  const o = await revokesNotDone(t, { now, days: days(7, 365, 90), onProgress: progress });
1189
1202
  const rows = o.rows.map((x) => [x.person, x.access, x.accessType, x.campaign, x.certification, x.reviewer ?? null, x.signedOff ? x.signedOff.slice(0, 10) : null, x.daysSinceSignOff, x.status, x.alsoFromRole ? 'yes' : null]);
1190
- return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult('Revoked in a certification but still held', ['Person', 'Access', 'Type', 'Campaign', 'Certification', 'Reviewer', 'Signed off', 'Days since sign-off', 'Status', 'Person also has roles or access profiles'], rows, Date.now(), o.notes) };
1203
+ return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult('Revoked in a certification but still held', ['Identity', 'Access', 'Type', 'Campaign', 'Certification', 'Reviewer', 'Signed off', 'Days since sign-off', 'Status', 'Identity also has roles or access profiles'], rows, Date.now(), o.notes) };
1191
1204
  }
1192
1205
  case 'request-trail': {
1193
1206
  const text = (k) => (typeof b[k] === 'string' ? b[k].slice(0, 200) : undefined);
@@ -1280,7 +1293,7 @@ export async function startUiServer(opts = {}) {
1280
1293
  // "Look without remembering" compares again with the same earlier look.
1281
1294
  const findings = b['remember'] === false ? [...o.fresh, ...(before?.findings ?? []).filter((f) => !o.fresh.some((x) => x.key === f.key))] : savePrivileged(home, key, o.taken, o.keys, o.fresh, before?.findings);
1282
1295
  const rows = findings.map((x) => [x.found.slice(0, 10), x.person, x.personState, x.entitlement, x.source, x.via, x.how, x.when ? x.when.slice(0, 16).replace('T', ' ') : null, x.requestedBy ?? null, x.newPerson ? 'new identity' : null]);
1283
- return { extra: { ...o, keys: undefined, fresh: undefined, findings: findings.slice(0, 5000), more: Math.max(0, findings.length - 5000), freshKeys: o.fresh.slice(0, 5000).map((f) => f.key), remembered: b['remember'] !== false }, table: tableResult('Privileged access gained', ['Found on', 'Person', 'State', 'Privileged entitlement', 'Source', 'Held', 'How it got there', 'Provisioned at', 'Requested by', 'Note'], rows, Date.now(), o.notes) };
1296
+ return { extra: { ...o, keys: undefined, fresh: undefined, findings: findings.slice(0, 5000), more: Math.max(0, findings.length - 5000), freshKeys: o.fresh.slice(0, 5000).map((f) => f.key), remembered: b['remember'] !== false }, table: tableResult('Privileged access gained', ['Found on', 'Identity', 'State', 'Privileged entitlement', 'Source', 'Held', 'How it got there', 'Provisioned at', 'Requested by', 'Note'], rows, Date.now(), o.notes) };
1284
1297
  }
1285
1298
  case 'outside-accounts': {
1286
1299
  const o = await accountsOutsideIsc(t, { now, days: num('days', 1, 90, 7), onProgress: progress });
@@ -1316,7 +1329,7 @@ export async function startUiServer(opts = {}) {
1316
1329
  const o = sensitiveChanges(diffSnapshots(base, snap), { from: base.taken, to: snap.taken, credentials: cr?.credentials, events: ev?.events });
1317
1330
  for (const x of o.skipped)
1318
1331
  notes.push(`Not compared: ${x}`);
1319
- notes.push(`Configuration now compared with the snapshot of ${baseDay}. “Who” is the last person ISC's audit log names for an object of the same name in that period; it is empty when the log names nobody.`);
1332
+ notes.push(`Configuration now compared with the snapshot of ${baseDay}. “Who” is the last identity ISC's audit log names for an object of the same name in that period; it is empty when the log names nobody.`);
1320
1333
  notes.push('Every other kind of change (roles, access profiles, forms, email templates) is under Tenant > Change history. New ISC admins are under Warnings > ISC admins.');
1321
1334
  const rows = o.rows.map((x) => [x.severity, x.area, x.object, x.change, x.why, x.who || null, x.when ? x.when.slice(0, 16).replace('T', ' ') : null]);
1322
1335
  return { extra: { baseline: false, from: baseDay, rows: o.rows.slice(0, 3000), more: Math.max(0, o.rows.length - 3000), totals: o.totals, notes }, table: tableResult('Sensitive changes', ['Severity', 'Area', 'Object', 'Change', 'Why it matters', 'Who (from audit events)', 'When'], rows, Date.now(), notes) };
@@ -1365,15 +1378,15 @@ export async function startUiServer(opts = {}) {
1365
1378
  if (!seen)
1366
1379
  notes.push('Privileged access gained has not been run on this computer yet, so it is not part of the score.');
1367
1380
  const all = riskByPerson(sig);
1368
- notes.push(`Signals of the last ${days} days (self-approvals and privileged access: at least 30) from the threat screens, added up per person by display name. A person on several screens comes first. The score orders the list; it is not a measure of guilt, and two people with the same name are counted as one.`);
1381
+ notes.push(`Signals of the last ${days} days (self-approvals and privileged access: at least 30) from the threat screens, added up per identity by display name. An identity on several screens comes first. The score orders the list; it is not a measure of guilt, and two identities with the same name are counted as one.`);
1369
1382
  const rows = all.map((x) => [x.person, x.score, x.screens, x.signals.join(' | ')]);
1370
- return { extra: { days, rows: all.slice(0, 3000), more: Math.max(0, all.length - 3000), totals: { people: all.length, several: all.filter((x) => x.screens > 1).length, signals: sig.length }, notes }, table: tableResult('Risk by person', ['Person', 'Score', 'Screens', 'Signals'], rows, Date.now(), notes) };
1383
+ return { extra: { days, rows: all.slice(0, 3000), more: Math.max(0, all.length - 3000), totals: { people: all.length, several: all.filter((x) => x.screens > 1).length, signals: sig.length }, notes }, table: tableResult('Risk by identity', ['Identity', 'Score', 'Screens', 'Signals'], rows, Date.now(), notes) };
1371
1384
  }
1372
1385
  case 'jml-preview': {
1373
1386
  const a = (k) => (typeof b[k] === 'string' && ATTRIBUTE_NAME.test(String(b[k])) ? String(b[k]) : undefined);
1374
1387
  const o = await jmlPreview(t, { now, days: num('days', 1, 90, 14), startDateAttribute: a('startDateAttribute'), endDateAttribute: a('endDateAttribute'), query, onProgress: progress });
1375
1388
  const rows = o.rows.map((x) => [x.date, x.inDays === 0 ? 'today' : `in ${x.inDays} day${x.inDays === 1 ? '' : 's'}`, x.kind, x.person, x.email ?? null, x.manager ?? null, x.profile, x.lifecycle || null, x.stateNow || null, x.accounts, x.access, x.findings.join('; ') || null]);
1376
- return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult('Joiners and leavers coming up', ['Date', 'When', 'Starts or ends', 'Person', 'Email', 'Manager', 'Identity profile', 'Lifecycle state now', 'What that state does', 'Accounts', 'Access items', 'To check'], rows, Date.now(), o.notes) };
1389
+ return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult('Joiners and leavers coming up', ['Date', 'When', 'Starts or ends', 'Identity', 'Email', 'Manager', 'Identity profile', 'Lifecycle state now', 'What that state does', 'Accounts', 'Access items', 'To check'], rows, Date.now(), o.notes) };
1377
1390
  }
1378
1391
  case 'stuck-requests': {
1379
1392
  const o = await stuckRequests(t, { now, hours: num('hours', 1, 24 * 90, 24), onProgress: progress });
@@ -1389,7 +1402,7 @@ export async function startUiServer(opts = {}) {
1389
1402
  case 'signins': {
1390
1403
  const o = await signInSignals(t, { now, days: num('days', 1, 90, 7), minFailed: num('minFailed', 3, 1000, 10), onProgress: progress });
1391
1404
  const rows = o.rows.map((x) => [x.person, x.username, x.state, x.failed, x.passed, x.worstDay, x.worstDayFailed, x.addresses, x.lastFailed ? x.lastFailed.slice(0, 16).replace('T', ' ') : null, x.signals.join('; ')]);
1392
- return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult('Sign-in signals', ['Person', 'Username', 'State', 'Failed sign-ins', 'Successful sign-ins', 'Worst day', 'Failed that day', 'Network addresses', 'Last failure', 'Signals'], rows, Date.now(), o.notes) };
1405
+ return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult('Sign-in signals', ['Identity', 'Username', 'State', 'Failed sign-ins', 'Successful sign-ins', 'Worst day', 'Failed that day', 'Network addresses', 'Last failure', 'Signals'], rows, Date.now(), o.notes) };
1393
1406
  }
1394
1407
  case 'self-approvals': {
1395
1408
  const o = await selfApprovals(t, { now, days: num('days', 1, 730, 90), onProgress: progress });
@@ -1399,17 +1412,17 @@ export async function startUiServer(opts = {}) {
1399
1412
  case 'admin-activity': {
1400
1413
  const o = await adminActivity(t, { now, days: num('days', 1, 90, 7), onProgress: progress });
1401
1414
  const rows = o.events.map((x) => [x.when.slice(0, 16).replace('T', ' '), x.actor, x.event, x.target, x.type]);
1402
- return { extra: { ...o, events: o.events.slice(0, 3000), more: o.more + Math.max(0, o.events.length - 3000) }, table: tableResult('Administration changes by people', ['When', 'Who', 'Event', 'On', 'Kind'], rows, Date.now(), o.notes) };
1415
+ return { extra: { ...o, events: o.events.slice(0, 3000), more: o.more + Math.max(0, o.events.length - 3000) }, table: tableResult('Administration changes by identities', ['When', 'Who', 'Event', 'On', 'Kind'], rows, Date.now(), o.notes) };
1403
1416
  }
1404
1417
  case 'access-spikes': {
1405
1418
  const o = await accessSpikes(t, { now, days: num('days', 1, 30, 7), min: num('min', 3, 1000, 15), onProgress: progress });
1406
1419
  const rows = o.rows.map((x) => [x.person, x.personState || null, x.day, x.added, x.sources, x.requestedBy, x.examples]);
1407
- return { extra: o, table: tableResult('Access spikes per person', ['Person', 'State', 'Day', 'Access items added', 'Sources', 'Requested by', 'Examples'], rows, Date.now(), o.notes) };
1420
+ return { extra: o, table: tableResult('Access spikes per identity', ['Identity', 'State', 'Day', 'Access items added', 'Sources', 'Requested by', 'Examples'], rows, Date.now(), o.notes) };
1408
1421
  }
1409
1422
  case 'lifecycle-settings': {
1410
1423
  const o = await lifecycleSettings(t, { onProgress: progress });
1411
1424
  const rows = o.rows.map((x) => [x.profile, x.state, x.kind === 'leaver' ? 'leaver state' : 'active state', x.enabled ? 'on' : 'off', x.people, x.accounts, x.removesAccess ? 'yes' : 'no', x.grants, x.findings.join('; ') || null]);
1412
- return { extra: o, table: tableResult('What each lifecycle state does', ['Identity profile', 'Lifecycle state', 'Kind', 'State is', 'People', 'Accounts', 'Removes all access', 'Access profiles granted', 'Findings'], rows, Date.now(), o.notes) };
1425
+ return { extra: o, table: tableResult('What each lifecycle state does', ['Identity profile', 'Lifecycle state', 'Kind', 'State is', 'Identities', 'Accounts', 'Removes all access', 'Access profiles granted', 'Findings'], rows, Date.now(), o.notes) };
1413
1426
  }
1414
1427
  case 'gov-groups': {
1415
1428
  const o = await governanceGroups(t, { onProgress: progress });
@@ -1419,7 +1432,7 @@ export async function startUiServer(opts = {}) {
1419
1432
  case 'outside-model': {
1420
1433
  const o = await accessOutsideModel(t, { query, onProgress: progress });
1421
1434
  const rows = o.people.map((x) => [x.person, x.entitlement, x.source, x.privileged ? 'yes' : null]);
1422
- return { extra: { ...o, people: o.people.slice(0, 5000), entitlements: o.entitlements.slice(0, 5000), morePeople: Math.max(0, o.people.length - 5000) + o.more }, table: tableResult('Access held directly (outside roles and access profiles)', ['Person', 'Entitlement', 'Source', 'Privileged'], rows, Date.now(), o.notes) };
1435
+ return { extra: { ...o, people: o.people.slice(0, 5000), entitlements: o.entitlements.slice(0, 5000), morePeople: Math.max(0, o.people.length - 5000) + o.more }, table: tableResult('Access held directly (outside roles and access profiles)', ['Identity', 'Entitlement', 'Source', 'Privileged'], rows, Date.now(), o.notes) };
1423
1436
  }
1424
1437
  case 'composition': {
1425
1438
  const o = await roleComposition(t, { onProgress: progress });
@@ -1439,12 +1452,12 @@ export async function startUiServer(opts = {}) {
1439
1452
  case 'multi-accounts': {
1440
1453
  const o = await multipleAccounts(t, { activeOnly: b['activeOnly'] !== false, onProgress: progress });
1441
1454
  const rows = o.rows.map((x) => [x.person, x.personState, x.source, x.authoritative ? 'yes' : null, x.accounts, x.enabled, x.names]);
1442
- return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult('People with several accounts on one source', ['Person', 'Lifecycle state', 'Source', 'Authoritative source', 'Accounts', 'Enabled', 'Account names'], rows, Date.now(), o.notes) };
1455
+ return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult('Identities with several accounts on one source', ['Identity', 'Lifecycle state', 'Source', 'Authoritative source', 'Accounts', 'Enabled', 'Account names'], rows, Date.now(), o.notes) };
1443
1456
  }
1444
1457
  case 'password-failures': {
1445
1458
  const o = await passwordFailures(t, { now, days: num('days', 1, 90, 14), onProgress: progress });
1446
1459
  const rows = o.rows.map((x) => [x.when.slice(0, 16).replace('T', ' '), x.person, x.source, x.event, x.by || null, x.error || null]);
1447
- return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult('Password changes and syncs that failed', ['When', 'Person', 'Source', 'Event', 'Started by', 'Error'], rows, Date.now(), o.notes) };
1460
+ return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult('Password changes and syncs that failed', ['When', 'Identity', 'Source', 'Event', 'Started by', 'Error'], rows, Date.now(), o.notes) };
1448
1461
  }
1449
1462
  case 'reassigned': {
1450
1463
  const o = await reassignedReviews(t, { now, days: num('days', 7, 730, 180), onProgress: progress });
@@ -1459,17 +1472,17 @@ export async function startUiServer(opts = {}) {
1459
1472
  case 'loops': {
1460
1473
  const o = await provisioningLoops(t, { now, days: num('days', 1, 30, 7), min: num('min', 3, 1000, 5), onProgress: progress });
1461
1474
  const rows = o.rows.map((x) => [x.person, x.source, x.op, x.change, x.times, x.first.slice(0, 16).replace('T', ' '), x.last.slice(0, 16).replace('T', ' '), x.lastStatus ?? null]);
1462
- return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult('Provisioning loops', ['Person', 'Source', 'Operation', 'Change', 'Times', 'First', 'Last', 'Last result'], rows, Date.now(), o.notes) };
1475
+ return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult('Provisioning loops', ['Identity', 'Source', 'Operation', 'Change', 'Times', 'First', 'Last', 'Last result'], rows, Date.now(), o.notes) };
1463
1476
  }
1464
1477
  case 'outside': {
1465
1478
  const o = await changesOutsideIsc(t, { now, days: num('days', 0, 3650, 0), sourceIds: ids, onProgress: progress });
1466
1479
  const rows = o.rows.map((x) => [x.person, x.personState, x.account, x.source, x.finding, x.lastIsc]);
1467
- return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult('Changes made outside ISC', ['Person', 'Person state', 'Account', 'Source', 'Finding', 'Last disable or enable ISC sent'], rows, Date.now(), o.notes) };
1480
+ return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult('Changes made outside ISC', ['Identity', 'Identity state', 'Account', 'Source', 'Finding', 'Last disable or enable ISC sent'], rows, Date.now(), o.notes) };
1468
1481
  }
1469
1482
  case 'leaver-times': {
1470
1483
  const o = await leaverRemovalTimes(t, { now, days: num('days', 1, 90, 30), limitHours: num('limitHours', 1, 720, 24), onProgress: progress });
1471
1484
  const rows = o.rows.map((x) => [x.person, x.lifecycle ?? null, x.started ? x.started.slice(0, 16).replace('T', ' ') : null, x.startedBy, x.accounts, x.slowestHours, x.stillEnabled.join(', ') || null, x.late ? 'late' : 'on time']);
1472
- return { extra: o, table: tableResult('Leaver removal times', ['Person', 'Lifecycle state', 'Started', 'Started by', 'Accounts', 'Slowest removal (hours)', 'Still enabled on', 'Result'], rows, Date.now(), o.notes) };
1485
+ return { extra: o, table: tableResult('Leaver removal times', ['Identity', 'Lifecycle state', 'Started', 'Started by', 'Accounts', 'Slowest removal (hours)', 'Still enabled on', 'Result'], rows, Date.now(), o.notes) };
1473
1486
  }
1474
1487
  case 'rules': {
1475
1488
  const o = await ruleUsage(t, { cloudRules: b['cloudRules'] === true, onProgress: progress });
@@ -1479,7 +1492,7 @@ export async function startUiServer(opts = {}) {
1479
1492
  case 'sync-drift': {
1480
1493
  const o = await attributeSyncDrift(t, { sourceId: ids[0], now, days: num('days', 1, 90, 14), onProgress: progress });
1481
1494
  const rows = o.rows.map((x) => [x.person, x.account, x.identityAttribute, x.accountAttribute, x.inIsc, x.onAccount]);
1482
- return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult(`Attribute sync drift: ${o.source}`, ['Person', 'Account', 'Identity attribute', 'Account attribute', 'Value in ISC', 'Value on the account'], rows, Date.now(), o.notes) };
1495
+ return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult(`Attribute sync drift: ${o.source}`, ['Identity', 'Account', 'Identity attribute', 'Account attribute', 'Value in ISC', 'Value on the account'], rows, Date.now(), o.notes) };
1483
1496
  }
1484
1497
  case 'group-approvals': {
1485
1498
  const o = await groupApprovals(t, { now, onProgress: progress });
@@ -1494,12 +1507,12 @@ export async function startUiServer(opts = {}) {
1494
1507
  case 'manager-left': {
1495
1508
  const o = await managerLeft(t, { query, onProgress: progress });
1496
1509
  const rows = o.rows.map((x) => [x.person, x.lifecycle ?? null, x.profile ?? null, x.manager, x.managerState]);
1497
- return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult('People whose manager left', ['Person', 'Lifecycle state', 'Identity profile', 'Manager', 'Manager state'], rows, Date.now(), o.notes) };
1510
+ return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult('Identities whose manager left', ['Identity', 'Lifecycle state', 'Identity profile', 'Manager', 'Manager state'], rows, Date.now(), o.notes) };
1498
1511
  }
1499
1512
  default: {
1500
1513
  const o = await attributeChanges(t, home, key, { attributes: attrs, now, onProgress: progress });
1501
1514
  const rows = o.changes.map((x) => [x.at.slice(0, 16).replace('T', ' '), x.person, x.attribute, x.from, x.to]);
1502
- return { extra: { ...o, changes: o.changes.slice(0, 5000), more: Math.max(0, o.changes.length - 5000) }, table: tableResult('Attribute changes', ['Seen at', 'Person', 'Attribute', 'From', 'To'], rows, Date.now(), o.notes) };
1515
+ return { extra: { ...o, changes: o.changes.slice(0, 5000), more: Math.max(0, o.changes.length - 5000) }, table: tableResult('Attribute changes', ['Seen at', 'Identity', 'Attribute', 'From', 'To'], rows, Date.now(), o.notes) };
1503
1516
  }
1504
1517
  }
1505
1518
  };
@@ -1618,7 +1631,7 @@ export async function startUiServer(opts = {}) {
1618
1631
  // Two passes over ISC instead of holding everyone's entitlements in memory.
1619
1632
  const o = await moverLeftoversStreamed(t, { groupBy: attr('groupBy'), maxShare: num('maxShare', 1, 25, 5) / 100, maxHolders: num('maxHolders', 1, 50, 3), onProgress: progress });
1620
1633
  const rows = o.rows.map((x) => [x.person, x.email ?? null, x.group, x.access, x.type, x.source ?? null, `${x.holders} of ${x.groupSize}`, x.privileged ? 'yes' : null]);
1621
- return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult('Unusual access for the group', ['Person', 'Email', `Group (${o.groupBy})`, 'Access', 'Type', 'Source', 'Holders in group', 'Privileged'], rows, Date.now(), o.notes) };
1634
+ return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult('Unusual access for the group', ['Identity', 'Email', `Group (${o.groupBy})`, 'Access', 'Type', 'Source', 'Holders in group', 'Privileged'], rows, Date.now(), o.notes) };
1622
1635
  }
1623
1636
  if (kind === 'leavers') {
1624
1637
  // One person at a time: nobody is kept in memory.
@@ -1627,7 +1640,7 @@ export async function startUiServer(opts = {}) {
1627
1640
  lw.add(p);
1628
1641
  const o = lw.done();
1629
1642
  const rows = o.rows.map((x) => [x.person, x.email ?? null, x.lifecycle ?? null, x.kind, x.detail, x.source ?? null, x.lastChanged ? x.lastChanged.slice(0, 10) : null]);
1630
- return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult('Missed leavers', ['Person', 'Email', 'Lifecycle state', 'Gap', 'Detail', 'Source', 'Identity last changed'], rows, Date.now(), o.notes) };
1643
+ return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult('Missed leavers', ['Identity', 'Email', 'Lifecycle state', 'Gap', 'Detail', 'Source', 'Identity last changed'], rows, Date.now(), o.notes) };
1631
1644
  }
1632
1645
  // Joiners and leavers need accounts, roles and access profiles, and at most one identity attribute.
1633
1646
  const startAttr = attr('startDateAttribute');
@@ -1638,20 +1651,20 @@ export async function startUiServer(opts = {}) {
1638
1651
  const o = missedJoiners(people, { now, share: num('share', 50, 100, 90) / 100, graceDays, startDateAttribute: attr('startDateAttribute') });
1639
1652
  if (b['verify'] === false) {
1640
1653
  const rows = o.rows.map((x) => [x.person, x.email ?? null, x.profile, x.lifecycle ?? null, x.created ? x.created.slice(0, 10) : null, x.reason, x.missing.join(', ') || null]);
1641
- return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult('Missed joiners', ['Person', 'Email', 'Identity profile', 'Lifecycle state', 'Created', 'Why', 'Missing accounts on'], rows, Date.now(), o.notes) };
1654
+ return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult('Missed joiners', ['Identity', 'Email', 'Identity profile', 'Lifecycle state', 'Created', 'Why', 'Missing accounts on'], rows, Date.now(), o.notes) };
1642
1655
  }
1643
1656
  // Check each finding against ISC's own records: lifecycle state configuration, joiner criteria and recorded activity.
1644
1657
  const ev = await joinerEvidence(t, people, { now, graceDays, recentDays: num('recentDays', 1, 365, 30), max: num('maxChecks', 1, 1000, 200), also: o.rows.map((x) => ({ id: x.id, reason: x.reason })), onProgress: progress });
1645
1658
  const rows = ev.rows.map((x) => [x.person, x.email ?? null, x.profile, x.lifecycle ?? null, x.criteria ?? x.criteriaNote ?? null, x.created ? x.created.slice(0, 10) : null, x.verdict, x.why, x.missing.join(', ') || null, x.evidence.map((e) => `${e.when ? e.when.slice(0, 10) + ' ' : ''}${e.what}${e.status ? ` [${e.status}]` : ''}${e.detail ? `: ${e.detail}` : ''}`).join(' | ') || null, x.reason]);
1646
1659
  return {
1647
1660
  extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000), evidence: ev },
1648
- table: tableResult('Joiner check', ['Person', 'Email', 'Identity profile', 'Lifecycle state in ISC', 'Lifecycle state by the criteria', 'Created', 'Verdict', 'Why', 'Missing', 'Recorded by ISC', 'Checked because'], rows, Date.now(), [...ev.notes, ...o.notes]),
1661
+ table: tableResult('Joiner check', ['Identity', 'Email', 'Identity profile', 'Lifecycle state in ISC', 'Lifecycle state by the criteria', 'Created', 'Verdict', 'Why', 'Missing', 'Recorded by ISC', 'Checked because'], rows, Date.now(), [...ev.notes, ...o.notes]),
1649
1662
  };
1650
1663
  }
1651
1664
  const words = Array.isArray(b['words']) ? b['words'].map(String).filter((w) => /^[A-Za-z0-9]{1,20}$/.test(w)).slice(0, 30) : undefined;
1652
1665
  const o = linkedAdminAccounts(people, { words: words?.length ? words : undefined });
1653
1666
  const rows = o.rows.map((x) => [x.person, x.email ?? null, x.left ? 'left' : 'active', x.account, x.source, x.word, x.privileged ? 'yes' : null, x.disabled ? 'disabled' : 'enabled']);
1654
- return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult('Admin and service accounts linked to people', ['Person', 'Email', 'Person status', 'Account', 'Source', 'Matched', 'Privileged', 'Account state'], rows, Date.now(), o.notes) };
1667
+ return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000) }, table: tableResult('Admin and service accounts linked to identities', ['Identity', 'Email', 'Identity status', 'Account', 'Source', 'Matched', 'Privileged', 'Account state'], rows, Date.now(), o.notes) };
1655
1668
  }),
1656
1669
  });
1657
1670
  }
@@ -1695,7 +1708,7 @@ export async function startUiServer(opts = {}) {
1695
1708
  case 'outliers': {
1696
1709
  const o = await accessOutliers(t, { groupBy: attr('groupBy'), factor: num('factor', 1.5, 20, 3), minExtra: num('minExtra', 0, 10_000, 10), minGroup: num('minGroup', 3, 1000, 5), onProgress: progress });
1697
1710
  const rows = o.rows.map((x) => [x.person, x.email ?? null, x.group, x.access, x.groupMedian, x.times, x.entitlements, x.roles]);
1698
- return { extra: o, table: tableResult('Access outliers', ['Person', 'Email', `Group (${o.groupBy})`, 'Access items', 'Group median', 'Times the median', 'Entitlements', 'Roles'], rows, Date.now(), o.notes) };
1711
+ return { extra: o, table: tableResult('Access outliers', ['Identity', 'Email', `Group (${o.groupBy})`, 'Access items', 'Group median', 'Times the median', 'Entitlements', 'Roles'], rows, Date.now(), o.notes) };
1699
1712
  }
1700
1713
  case 'coverage': {
1701
1714
  const o = await reviewCoverage(t, { now, months: num('months', 1, 36, 12), onProgress: progress });
@@ -1709,12 +1722,12 @@ export async function startUiServer(opts = {}) {
1709
1722
  case 'speed': {
1710
1723
  const o = await provisioningSpeed(t, { now, days: num('days', 1, 90, 30), removalLimitHours: num('removalLimitHours', 1, 720, 24), otherLimitHours: num('otherLimitHours', 1, 720, 72), onProgress: progress });
1711
1724
  const rows = o.slow.map((x) => [x.person, x.source, x.op, x.started.slice(0, 16).replace('T', ' '), x.state, x.hours, x.status ?? null]);
1712
- return { extra: o, table: tableResult('Slow or open access removals', ['Person', 'Source', 'Change', 'Started (UTC)', 'State', 'Hours', 'Status'], rows, Date.now(), o.notes) };
1725
+ return { extra: o, table: tableResult('Slow or open access removals', ['Identity', 'Source', 'Change', 'Started (UTC)', 'State', 'Hours', 'Status'], rows, Date.now(), o.notes) };
1713
1726
  }
1714
1727
  default: {
1715
1728
  const o = await identityDataQuality(t, { attribute: attr('attribute'), onProgress: progress });
1716
1729
  const rows = o.rows.map((x) => [x.person, x.email ?? null, x.lifecycle ?? null, x.issue]);
1717
- return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000), sharedEmails: o.sharedEmails.slice(0, 500) }, table: tableResult('Identity data quality', ['Person', 'Email', 'Lifecycle state', 'Issue'], rows, Date.now(), o.notes) };
1730
+ return { extra: { ...o, rows: o.rows.slice(0, 5000), more: Math.max(0, o.rows.length - 5000), sharedEmails: o.sharedEmails.slice(0, 500) }, table: tableResult('Identity data quality', ['Identity', 'Email', 'Lifecycle state', 'Issue'], rows, Date.now(), o.notes) };
1718
1731
  }
1719
1732
  }
1720
1733
  };
@@ -1782,7 +1795,7 @@ export async function startUiServer(opts = {}) {
1782
1795
  }
1783
1796
  if (problems.length)
1784
1797
  throw new DefinitionError('Some settings are not valid', problems);
1785
- writeFileSync(settingsFile, JSON.stringify({ ...readSettings(), reclaim: out }, null, 2));
1798
+ saveSettings({ ...readSettings(), reclaim: out });
1786
1799
  return send(res, 200, { saved: true });
1787
1800
  }
1788
1801
  if (route === 'POST /api/reclaim/run') {
@@ -1792,7 +1805,7 @@ export async function startUiServer(opts = {}) {
1792
1805
  job: background('looking for licenses to reclaim', async (progress) => {
1793
1806
  const o = await reclaimOverview(t, st, { onProgress: progress });
1794
1807
  const rows = o.rows.map((r) => [r.source, r.account, r.person ?? null, r.lifecycleState ?? null, r.reason, r.lastLogin ? r.lastLogin.slice(0, 10) : null, r.daysSince, r.privileged, r.monthlyCost]);
1795
- return { extra: o, table: tableResult('Accounts to reclaim', ['Source', 'Account', 'Person', 'Lifecycle state', 'Why', 'Last sign-in', 'Days since sign-in', 'Privileged', 'Monthly cost'], rows, Date.now(), o.notes) };
1808
+ return { extra: o, table: tableResult('Accounts to reclaim', ['Source', 'Account', 'Identity', 'Lifecycle state', 'Why', 'Last sign-in', 'Days since sign-in', 'Privileged', 'Monthly cost'], rows, Date.now(), o.notes) };
1796
1809
  }),
1797
1810
  });
1798
1811
  }
@@ -1801,7 +1814,7 @@ export async function startUiServer(opts = {}) {
1801
1814
  const { rules, problems } = validateSodRules(b['rules']);
1802
1815
  if (problems.length)
1803
1816
  throw new DefinitionError('Some rules are not valid', problems);
1804
- writeFileSync(settingsFile, JSON.stringify({ ...readSettings(), sod: rules }, null, 2));
1817
+ saveSettings({ ...readSettings(), sod: rules });
1805
1818
  return send(res, 200, { saved: rules.length });
1806
1819
  }
1807
1820
  if (route === 'POST /api/sod/run') {
@@ -1813,7 +1826,7 @@ export async function startUiServer(opts = {}) {
1813
1826
  job: background('checking separation of duties', async (progress) => {
1814
1827
  const o = await sodOverview(t, rules, { onProgress: progress });
1815
1828
  const rows = o.violations.map((v) => [v.rule, v.person, v.username ?? null, v.email ?? null, v.lifecycleState ?? null, v.heldA.join('; '), v.heldB.join('; ')]);
1816
- return { extra: o, table: tableResult('Separation of duties violations', ['Rule', 'Person', 'Username', 'Email', 'Lifecycle state', 'Holds (side A)', 'Holds (side B)'], rows, Date.now()) };
1829
+ return { extra: o, table: tableResult('Separation of duties violations', ['Rule', 'Identity', 'Username', 'Email', 'Lifecycle state', 'Holds (side A)', 'Holds (side B)'], rows, Date.now()) };
1817
1830
  }),
1818
1831
  });
1819
1832
  }
@@ -1844,7 +1857,7 @@ export async function startUiServer(opts = {}) {
1844
1857
  for (const c of o.candidates)
1845
1858
  for (const i of c.items)
1846
1859
  rows.push([c.value, c.members, i.name, i.source ?? null, i.holders, i.share, i.covered]);
1847
- return { extra: o, table: tableResult(`Candidate roles by ${attribute}`, [attribute, 'People in group', 'Entitlement', 'Source', 'Holders', 'Share %', 'Already in a role'], rows, Date.now(), o.notes) };
1860
+ return { extra: o, table: tableResult(`Candidate roles by ${attribute}`, [attribute, 'Identities in group', 'Entitlement', 'Source', 'Holders', 'Share %', 'Already in a role'], rows, Date.now(), o.notes) };
1848
1861
  }),
1849
1862
  });
1850
1863
  }
@@ -1905,7 +1918,7 @@ export async function startUiServer(opts = {}) {
1905
1918
  if (!/^[A-Za-z0-9-]+$/.test(sourceId))
1906
1919
  throw new HttpProblem(400, 'Pick a source.');
1907
1920
  if (!person)
1908
- throw new HttpProblem(400, 'Name the person (username, email or display name).');
1921
+ throw new HttpProblem(400, 'Name the identity (username, email or display name).');
1909
1922
  const usageType = /^[A-Z_]{2,40}$/.test(String(b['usageType'] ?? '')) ? String(b['usageType']) : 'CREATE';
1910
1923
  return send(res, 202, {
1911
1924
  job: background('previewing an account', async (progress) => {
@@ -2103,7 +2116,7 @@ export async function startUiServer(opts = {}) {
2103
2116
  }
2104
2117
  if (route === 'PUT /api/settings/diagnostics') {
2105
2118
  const b = await readJson(req);
2106
- writeFileSync(settingsFile, JSON.stringify({ ...readSettings(), diagnostics: b['enabled'] === true }, null, 2));
2119
+ saveSettings({ ...readSettings(), diagnostics: b['enabled'] === true });
2107
2120
  log(`connector diagnostics turned ${b['enabled'] === true ? 'on' : 'off'}`);
2108
2121
  return send(res, 200, { diagnostics: diagnosticsOn() });
2109
2122
  }
@@ -2254,7 +2267,7 @@ export async function startUiServer(opts = {}) {
2254
2267
  }
2255
2268
  if (route === 'PUT /api/updates') {
2256
2269
  const b = await readJson(req);
2257
- writeFileSync(settingsFile, JSON.stringify({ ...readSettings(), updateCheck: b['enabled'] === true }, null, 2));
2270
+ saveSettings({ ...readSettings(), updateCheck: b['enabled'] === true });
2258
2271
  return send(res, 200, { enabled: b['enabled'] === true });
2259
2272
  }
2260
2273
  const stopRoute = /^POST \/api\/jobs\/([a-f0-9]+)\/stop$/.exec(route);
@@ -2283,7 +2296,7 @@ export async function startUiServer(opts = {}) {
2283
2296
  return send(res, 200, {
2284
2297
  state: job.state,
2285
2298
  progress: job.progress,
2286
- error: job.memoryStop && job.state === "error" ? MEMORY_STOP : job.error,
2299
+ error: job.memoryStop && job.state === "error" ? job.memoryMessage : job.error,
2287
2300
  seconds: Math.round((Date.now() - job.started) / 100) / 10,
2288
2301
  extra: job.state === 'done' ? job.extra : undefined,
2289
2302
  warnings: job.warnings,