identityscope 0.0.0-stage → 0.28.3

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 (333) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +917 -3
  3. package/SECURITY.md +56 -0
  4. package/dist/core/audit-readiness.d.ts +158 -0
  5. package/dist/core/audit-readiness.js +357 -0
  6. package/dist/core/audit-readiness.js.map +1 -0
  7. package/dist/core/certs.d.ts +68 -0
  8. package/dist/core/certs.js +132 -0
  9. package/dist/core/certs.js.map +1 -0
  10. package/dist/core/checks.d.ts +133 -0
  11. package/dist/core/checks.js +512 -0
  12. package/dist/core/checks.js.map +1 -0
  13. package/dist/core/cloud-rules.d.ts +20 -0
  14. package/dist/core/cloud-rules.js +44 -0
  15. package/dist/core/cloud-rules.js.map +1 -0
  16. package/dist/core/compare.d.ts +45 -0
  17. package/dist/core/compare.js +372 -0
  18. package/dist/core/compare.js.map +1 -0
  19. package/dist/core/conditions.d.ts +10 -0
  20. package/dist/core/conditions.js +201 -0
  21. package/dist/core/conditions.js.map +1 -0
  22. package/dist/core/credentials.d.ts +71 -0
  23. package/dist/core/credentials.js +211 -0
  24. package/dist/core/credentials.js.map +1 -0
  25. package/dist/core/datasets.d.ts +53 -0
  26. package/dist/core/datasets.js +596 -0
  27. package/dist/core/datasets.js.map +1 -0
  28. package/dist/core/definition.d.ts +32 -0
  29. package/dist/core/definition.js +301 -0
  30. package/dist/core/definition.js.map +1 -0
  31. package/dist/core/discover.d.ts +32 -0
  32. package/dist/core/discover.js +105 -0
  33. package/dist/core/discover.js.map +1 -0
  34. package/dist/core/engine.d.ts +18 -0
  35. package/dist/core/engine.js +290 -0
  36. package/dist/core/engine.js.map +1 -0
  37. package/dist/core/fields.d.ts +16 -0
  38. package/dist/core/fields.js +132 -0
  39. package/dist/core/fields.js.map +1 -0
  40. package/dist/core/governance-trail.d.ts +211 -0
  41. package/dist/core/governance-trail.js +557 -0
  42. package/dist/core/governance-trail.js.map +1 -0
  43. package/dist/core/http-transport.d.ts +66 -0
  44. package/dist/core/http-transport.js +247 -0
  45. package/dist/core/http-transport.js.map +1 -0
  46. package/dist/core/index.d.ts +13 -0
  47. package/dist/core/index.js +16 -0
  48. package/dist/core/index.js.map +1 -0
  49. package/dist/core/insights.d.ts +176 -0
  50. package/dist/core/insights.js +417 -0
  51. package/dist/core/insights.js.map +1 -0
  52. package/dist/core/joiner-evidence.d.ts +98 -0
  53. package/dist/core/joiner-evidence.js +254 -0
  54. package/dist/core/joiner-evidence.js.map +1 -0
  55. package/dist/core/lab/credential-map.d.ts +50 -0
  56. package/dist/core/lab/credential-map.js +163 -0
  57. package/dist/core/lab/credential-map.js.map +1 -0
  58. package/dist/core/lab/javadate.d.ts +7 -0
  59. package/dist/core/lab/javadate.js +307 -0
  60. package/dist/core/lab/javadate.js.map +1 -0
  61. package/dist/core/lab/jsonpath.d.ts +11 -0
  62. package/dist/core/lab/jsonpath.js +273 -0
  63. package/dist/core/lab/jsonpath.js.map +1 -0
  64. package/dist/core/lab/policy-preview.d.ts +43 -0
  65. package/dist/core/lab/policy-preview.js +78 -0
  66. package/dist/core/lab/policy-preview.js.map +1 -0
  67. package/dist/core/lab/rfc5646.d.ts +2 -0
  68. package/dist/core/lab/rfc5646.js +421 -0
  69. package/dist/core/lab/rfc5646.js.map +1 -0
  70. package/dist/core/lab/transform-impact.d.ts +63 -0
  71. package/dist/core/lab/transform-impact.js +138 -0
  72. package/dist/core/lab/transform-impact.js.map +1 -0
  73. package/dist/core/lab/transform-people.d.ts +61 -0
  74. package/dist/core/lab/transform-people.js +132 -0
  75. package/dist/core/lab/transform-people.js.map +1 -0
  76. package/dist/core/lab/transforms.d.ts +79 -0
  77. package/dist/core/lab/transforms.js +738 -0
  78. package/dist/core/lab/transforms.js.map +1 -0
  79. package/dist/core/lab/velocity.d.ts +33 -0
  80. package/dist/core/lab/velocity.js +874 -0
  81. package/dist/core/lab/velocity.js.map +1 -0
  82. package/dist/core/lab/workflow-health.d.ts +80 -0
  83. package/dist/core/lab/workflow-health.js +234 -0
  84. package/dist/core/lab/workflow-health.js.map +1 -0
  85. package/dist/core/lab/workflows.d.ts +87 -0
  86. package/dist/core/lab/workflows.js +568 -0
  87. package/dist/core/lab/workflows.js.map +1 -0
  88. package/dist/core/lifecycle-gaps.d.ts +192 -0
  89. package/dist/core/lifecycle-gaps.js +389 -0
  90. package/dist/core/lifecycle-gaps.js.map +1 -0
  91. package/dist/core/logs.d.ts +145 -0
  92. package/dist/core/logs.js +342 -0
  93. package/dist/core/logs.js.map +1 -0
  94. package/dist/core/lookup.d.ts +129 -0
  95. package/dist/core/lookup.js +289 -0
  96. package/dist/core/lookup.js.map +1 -0
  97. package/dist/core/model-insights.d.ts +247 -0
  98. package/dist/core/model-insights.js +474 -0
  99. package/dist/core/model-insights.js.map +1 -0
  100. package/dist/core/narrow.d.ts +23 -0
  101. package/dist/core/narrow.js +137 -0
  102. package/dist/core/narrow.js.map +1 -0
  103. package/dist/core/nerm.d.ts +154 -0
  104. package/dist/core/nerm.js +397 -0
  105. package/dist/core/nerm.js.map +1 -0
  106. package/dist/core/operations-watch.d.ts +232 -0
  107. package/dist/core/operations-watch.js +491 -0
  108. package/dist/core/operations-watch.js.map +1 -0
  109. package/dist/core/output/csv.d.ts +6 -0
  110. package/dist/core/output/csv.js +22 -0
  111. package/dist/core/output/csv.js.map +1 -0
  112. package/dist/core/output/html.d.ts +11 -0
  113. package/dist/core/output/html.js +66 -0
  114. package/dist/core/output/html.js.map +1 -0
  115. package/dist/core/output/xlsx.d.ts +3 -0
  116. package/dist/core/output/xlsx.js +130 -0
  117. package/dist/core/output/xlsx.js.map +1 -0
  118. package/dist/core/output/zip.d.ts +16 -0
  119. package/dist/core/output/zip.js +106 -0
  120. package/dist/core/output/zip.js.map +1 -0
  121. package/dist/core/ownership.d.ts +39 -0
  122. package/dist/core/ownership.js +100 -0
  123. package/dist/core/ownership.js.map +1 -0
  124. package/dist/core/patterns.d.ts +11 -0
  125. package/dist/core/patterns.js +31 -0
  126. package/dist/core/patterns.js.map +1 -0
  127. package/dist/core/preview.d.ts +96 -0
  128. package/dist/core/preview.js +173 -0
  129. package/dist/core/preview.js.map +1 -0
  130. package/dist/core/roles.d.ts +125 -0
  131. package/dist/core/roles.js +420 -0
  132. package/dist/core/roles.js.map +1 -0
  133. package/dist/core/tenant.d.ts +67 -0
  134. package/dist/core/tenant.js +194 -0
  135. package/dist/core/tenant.js.map +1 -0
  136. package/dist/core/threat-signals.d.ts +112 -0
  137. package/dist/core/threat-signals.js +250 -0
  138. package/dist/core/threat-signals.js.map +1 -0
  139. package/dist/core/threat-watch.d.ts +144 -0
  140. package/dist/core/threat-watch.js +282 -0
  141. package/dist/core/threat-watch.js.map +1 -0
  142. package/dist/core/transport.d.ts +82 -0
  143. package/dist/core/transport.js +312 -0
  144. package/dist/core/transport.js.map +1 -0
  145. package/dist/core/types.d.ts +137 -0
  146. package/dist/core/types.js +10 -0
  147. package/dist/core/types.js.map +1 -0
  148. package/dist/core/warnings.d.ts +236 -0
  149. package/dist/core/warnings.js +504 -0
  150. package/dist/core/warnings.js.map +1 -0
  151. package/dist/demo/tenant.d.ts +1572 -0
  152. package/dist/demo/tenant.js +1023 -0
  153. package/dist/demo/tenant.js.map +1 -0
  154. package/dist/node/attribute-history.d.ts +22 -0
  155. package/dist/node/attribute-history.js +86 -0
  156. package/dist/node/attribute-history.js.map +1 -0
  157. package/dist/node/changes.d.ts +20 -0
  158. package/dist/node/changes.js +78 -0
  159. package/dist/node/changes.js.map +1 -0
  160. package/dist/node/cli.d.ts +2 -0
  161. package/dist/node/cli.js +291 -0
  162. package/dist/node/cli.js.map +1 -0
  163. package/dist/node/config.d.ts +72 -0
  164. package/dist/node/config.js +203 -0
  165. package/dist/node/config.js.map +1 -0
  166. package/dist/node/credentials.d.ts +13 -0
  167. package/dist/node/credentials.js +24 -0
  168. package/dist/node/credentials.js.map +1 -0
  169. package/dist/node/delivery.d.ts +10 -0
  170. package/dist/node/delivery.js +105 -0
  171. package/dist/node/delivery.js.map +1 -0
  172. package/dist/node/doctor.d.ts +2 -0
  173. package/dist/node/doctor.js +151 -0
  174. package/dist/node/doctor.js.map +1 -0
  175. package/dist/node/drift.d.ts +31 -0
  176. package/dist/node/drift.js +56 -0
  177. package/dist/node/drift.js.map +1 -0
  178. package/dist/node/evidence.d.ts +42 -0
  179. package/dist/node/evidence.js +129 -0
  180. package/dist/node/evidence.js.map +1 -0
  181. package/dist/node/exceptions.d.ts +30 -0
  182. package/dist/node/exceptions.js +83 -0
  183. package/dist/node/exceptions.js.map +1 -0
  184. package/dist/node/history.d.ts +35 -0
  185. package/dist/node/history.js +74 -0
  186. package/dist/node/history.js.map +1 -0
  187. package/dist/node/index.d.ts +7 -0
  188. package/dist/node/index.js +8 -0
  189. package/dist/node/index.js.map +1 -0
  190. package/dist/node/keep.d.ts +9 -0
  191. package/dist/node/keep.js +39 -0
  192. package/dist/node/keep.js.map +1 -0
  193. package/dist/node/loader.d.ts +7 -0
  194. package/dist/node/loader.js +35 -0
  195. package/dist/node/loader.js.map +1 -0
  196. package/dist/node/log-files.d.ts +16 -0
  197. package/dist/node/log-files.js +93 -0
  198. package/dist/node/log-files.js.map +1 -0
  199. package/dist/node/monthly.d.ts +41 -0
  200. package/dist/node/monthly.js +108 -0
  201. package/dist/node/monthly.js.map +1 -0
  202. package/dist/node/oauth-login.d.ts +45 -0
  203. package/dist/node/oauth-login.js +121 -0
  204. package/dist/node/oauth-login.js.map +1 -0
  205. package/dist/node/packs.d.ts +32 -0
  206. package/dist/node/packs.js +43 -0
  207. package/dist/node/packs.js.map +1 -0
  208. package/dist/node/privileged-seen.d.ts +11 -0
  209. package/dist/node/privileged-seen.js +41 -0
  210. package/dist/node/privileged-seen.js.map +1 -0
  211. package/dist/node/recipients.d.ts +17 -0
  212. package/dist/node/recipients.js +51 -0
  213. package/dist/node/recipients.js.map +1 -0
  214. package/dist/node/runner.d.ts +51 -0
  215. package/dist/node/runner.js +298 -0
  216. package/dist/node/runner.js.map +1 -0
  217. package/dist/node/runtime.d.ts +12 -0
  218. package/dist/node/runtime.js +13 -0
  219. package/dist/node/runtime.js.map +1 -0
  220. package/dist/node/schedules.d.ts +87 -0
  221. package/dist/node/schedules.js +141 -0
  222. package/dist/node/schedules.js.map +1 -0
  223. package/dist/node/secrets.d.ts +37 -0
  224. package/dist/node/secrets.js +219 -0
  225. package/dist/node/secrets.js.map +1 -0
  226. package/dist/node/support.d.ts +14 -0
  227. package/dist/node/support.js +133 -0
  228. package/dist/node/support.js.map +1 -0
  229. package/dist/node/tenants.d.ts +93 -0
  230. package/dist/node/tenants.js +255 -0
  231. package/dist/node/tenants.js.map +1 -0
  232. package/dist/node/ui-page.d.ts +1 -0
  233. package/dist/node/ui-page.js +3 -0
  234. package/dist/node/ui-page.js.map +1 -0
  235. package/dist/node/ui-server.d.ts +48 -0
  236. package/dist/node/ui-server.js +2665 -0
  237. package/dist/node/ui-server.js.map +1 -0
  238. package/dist/node/write.d.ts +9 -0
  239. package/dist/node/write.js +53 -0
  240. package/dist/node/write.js.map +1 -0
  241. package/dist/reports/builtin.generated.d.ts +1 -0
  242. package/dist/reports/builtin.generated.js +49 -0
  243. package/dist/reports/builtin.generated.js.map +1 -0
  244. package/dist/reports/library.d.ts +6 -0
  245. package/dist/reports/library.js +18 -0
  246. package/dist/reports/library.js.map +1 -0
  247. package/launcher/IdentityScope.cmd +11 -0
  248. package/package.json +69 -4
  249. package/reports/access-profile-members.yaml +29 -0
  250. package/reports/access-profile-membership-counts.yaml +17 -0
  251. package/reports/access-profiles-without-owner.yaml +16 -0
  252. package/reports/access-request-audit-trail.yaml +36 -0
  253. package/reports/accounts-by-source.yaml +19 -0
  254. package/reports/active-identities-without-manager.yaml +22 -0
  255. package/reports/aggregation-failures.yaml +29 -0
  256. package/reports/aggregation-history.yaml +27 -0
  257. package/reports/all-sources.yaml +16 -0
  258. package/reports/application-accounts.yaml +32 -0
  259. package/reports/application-entitlements.yaml +31 -0
  260. package/reports/campaign-progress.yaml +23 -0
  261. package/reports/certification-decisions.yaml +31 -0
  262. package/reports/direct-reports-per-manager.yaml +20 -0
  263. package/reports/disabled-accounts-of-active-people.yaml +33 -0
  264. package/reports/duplicate-emails.yaml +16 -0
  265. package/reports/entitlement-holders.yaml +35 -0
  266. package/reports/entitlements-held-by-inactive-identities.yaml +31 -0
  267. package/reports/entitlements-without-owner.yaml +28 -0
  268. package/reports/identities-by-lifecycle-state.yaml +15 -0
  269. package/reports/identities-missing-key-attributes.yaml +27 -0
  270. package/reports/identities-with-processing-errors.yaml +19 -0
  271. package/reports/identity-attribute-mappings.yaml +27 -0
  272. package/reports/machine-accounts.yaml +28 -0
  273. package/reports/managers-and-direct-reports.yaml +23 -0
  274. package/reports/most-access.yaml +18 -0
  275. package/reports/new-identities.yaml +24 -0
  276. package/reports/old-passwords.yaml +35 -0
  277. package/reports/pending-reviews-by-reviewer.yaml +20 -0
  278. package/reports/person-access.yaml +31 -0
  279. package/reports/privileged-access.yaml +29 -0
  280. package/reports/provisioning-error-causes.yaml +27 -0
  281. package/reports/provisioning-errors.yaml +32 -0
  282. package/reports/provisioning-failures.yaml +28 -0
  283. package/reports/recent-access-requests.yaml +22 -0
  284. package/reports/recent-activity.yaml +32 -0
  285. package/reports/recent-leavers.yaml +34 -0
  286. package/reports/role-members.yaml +29 -0
  287. package/reports/role-membership-counts.yaml +18 -0
  288. package/reports/roles-without-owner.yaml +17 -0
  289. package/reports/sources-needing-attention.yaml +23 -0
  290. package/reports/stuck-access-requests.yaml +29 -0
  291. package/reports/team-access.yaml +30 -0
  292. package/reports/terminated-users-with-active-accounts.yaml +46 -0
  293. package/reports/uncorrelated-accounts.yaml +38 -0
  294. package/ui/js/00-setup.js +6 -0
  295. package/ui/js/01-small-helpers.js +143 -0
  296. package/ui/js/02-connection.js +150 -0
  297. package/ui/js/03-health-check.js +17 -0
  298. package/ui/js/04-library.js +135 -0
  299. package/ui/js/05-pickers.js +163 -0
  300. package/ui/js/06-report-view.js +157 -0
  301. package/ui/js/07-fields.js +85 -0
  302. package/ui/js/08-designer.js +360 -0
  303. package/ui/js/09-yaml.js +22 -0
  304. package/ui/js/10-instant-check.js +171 -0
  305. package/ui/js/11-lookup.js +161 -0
  306. package/ui/js/12-tenant.js +115 -0
  307. package/ui/js/13-source-configuration-and-diagnostics.js +64 -0
  308. package/ui/js/14-certifications.js +68 -0
  309. package/ui/js/15-monthly-report.js +24 -0
  310. package/ui/js/16-ownership.js +39 -0
  311. package/ui/js/17-compare-tenants.js +102 -0
  312. package/ui/js/18-audit.js +181 -0
  313. package/ui/js/19-insights.js +108 -0
  314. package/ui/js/20-role-mining.js +35 -0
  315. package/ui/js/21-share-reports.js +45 -0
  316. package/ui/js/22-partner-overview-all-customer-tenants.js +228 -0
  317. package/ui/js/23-in-app-guidance.js +217 -0
  318. package/ui/js/24-role-tools.js +220 -0
  319. package/ui/js/25-schedules.js +264 -0
  320. package/ui/js/26-start.js +7 -0
  321. package/ui/js/27-warnings.js +224 -0
  322. package/ui/js/28-audit-readiness.js +99 -0
  323. package/ui/js/29-lifecycle.js +182 -0
  324. package/ui/js/30-labs.js +265 -0
  325. package/ui/js/31-build.js +203 -0
  326. package/ui/js/32-lab-examples.js +148 -0
  327. package/ui/js/33-finder.js +89 -0
  328. package/ui/js/34-governance.js +129 -0
  329. package/ui/js/35-watch.js +266 -0
  330. package/ui/js/36-model.js +247 -0
  331. package/ui/js/37-logs-and-watch.js +224 -0
  332. package/ui/shell.html +112 -0
  333. package/ui/style.css +350 -0
@@ -0,0 +1,224 @@
1
+ // ---------- 0.27.0: Logs page; privileged access gained, accounts created outside ISC, sensitive changes, risk by person; joiner and leaver preview; stuck requests ----------
2
+ function lgState() {
3
+ if (!state.lg) {
4
+ var saved = '';
5
+ try { saved = localStorage.getItem('identityscope.logpath') || ''; } catch (e) { saved = ''; }
6
+ state.lg = { tab: 'ccg', ccg: { path: saved, level: 'WARN', source: '', text: '', from: '', to: '', open: {} }, isc: { days: 2, source: '', failedOnly: true } };
7
+ }
8
+ return state.lg;
9
+ }
10
+ var LG_TABS = [
11
+ ['ccg', 'Connector log (ccg.log)', 'file', 'Read the connector log of a Virtual Appliance from a copy on this computer: errors grouped and counted, per source, with the full error detail.'],
12
+ ['isc', 'What ISC recorded', 'pulse', 'One timeline per source of what ISC itself recorded: aggregations, source changes, provisioning that ended with an error, and the state of the Virtual Appliances.']
13
+ ];
14
+ function tw() {
15
+ if (!state.tw) state.tw = { priv: { remember: true }, outacct: { days: 7 }, sensitive: { days: 7 }, risk: { days: 7 }, upcoming: { days: 14, startDateAttribute: '', endDateAttribute: '', query: '' }, stuckreq: { hours: 24 } };
16
+ return state.tw;
17
+ }
18
+ function renderLogs() {
19
+ var L = lgState();
20
+ var outer = $('logs');
21
+ outer.textContent = '';
22
+ var w = el('div', { className: 'wrap', style: 'max-width:1240px' });
23
+ outer.appendChild(w);
24
+ w.appendChild(el('div', { className: 'rhead', style: 'margin-bottom:4px' }, el('span', { className: 'cat-ico', style: 'color:#1d4ed8;background:#dbeafe' }, icon('file')),
25
+ el('div', {}, el('h2', { text: 'Logs' }), el('p', { className: 'desc', text: 'Find out why a source failed without signing in to a server. Read-only; nothing from a log is stored or sent anywhere.' }))));
26
+ var tabs = el('div', { className: 'tabs', style: 'flex-wrap:wrap' });
27
+ LG_TABS.forEach(function (t) { tabs.appendChild(el('button', { className: 'tab' + (L.tab === t[0] ? ' active' : ''), onclick: function () { L.tab = t[0]; renderLogs(); } }, icon(t[2]), t[1])); });
28
+ w.appendChild(tabs);
29
+ var spec = LG_TABS.filter(function (t) { return t[0] === L.tab; })[0];
30
+ if (L.tab === 'ccg') lgCcg(w, L.ccg, spec[3]); else lgIsc(w, L.isc, spec[3]);
31
+ }
32
+ function lgField(H, key, label, placeholder, width, type) {
33
+ var i = el('input', { className: 'input', value: H[key] || '', placeholder: placeholder || '', style: 'max-width:' + (width || 200) + 'px', 'aria-label': label, type: type || 'text' });
34
+ i.addEventListener('input', function () { H[key] = i.value; });
35
+ return el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: label }), i);
36
+ }
37
+ function lgFilter(H) { return { level: H.level, source: H.source || undefined, text: H.text || undefined, from: H.from || undefined, to: H.to || undefined }; }
38
+ function lgCcg(w, H, desc) {
39
+ w.appendChild(el('p', { className: 'muted', style: 'margin:0 0 10px', text: desc }));
40
+ w.appendChild(el('div', { className: 'note', text: 'ISC has no way to hand out ccg.log, so IdentityScope reads a copy: copy the file from the Virtual Appliance (/home/sailpoint/log/ccg.log) to this computer or a shared folder once, then give its path here or choose the file. A folder reads every log file in it, rotated and .gz files included.' }));
41
+ var path = el('input', { className: 'input', value: H.path || '', placeholder: 'C:\\logs\\ccg.log or /home/me/va-logs', style: 'min-width:320px;flex:1', 'aria-label': 'Path of ccg.log or its folder on this computer' });
42
+ path.addEventListener('input', function () { H.path = path.value; });
43
+ var picker = el('input', { type: 'file', className: 'hidden', 'aria-label': 'Choose a log file', accept: '.log,.txt,.json,.jsonl,.gz,*/*' });
44
+ var run = function () {
45
+ try { localStorage.setItem('identityscope.logpath', H.path || ''); } catch (e) { /* not kept */ }
46
+ H.open = {};
47
+ runJobInto(H, '/api/logs/ccg/run', Object.assign({ path: H.path }, lgFilter(H)), renderLogs);
48
+ };
49
+ picker.addEventListener('change', function () {
50
+ var f = picker.files && picker.files[0];
51
+ if (!f) return;
52
+ var q = lgFilter(H); q.name = f.name;
53
+ var qs = Object.keys(q).filter(function (k) { return q[k]; }).map(function (k) { return k + '=' + encodeURIComponent(q[k]); }).join('&');
54
+ H.busy = 'Reading ' + f.name + ' (' + fmtNum(Math.round(f.size / 1048576)) + ' MB)...'; H.error = null; H.data = null; H.open = {}; renderLogs();
55
+ fetch('/api/logs/ccg/upload?' + qs, { method: 'POST', headers: { 'x-isc-reports-key': KEY, 'content-type': 'application/octet-stream' }, body: f }).then(function (res) {
56
+ return res.json().then(function (d) { if (!res.ok) throw new Error(d.error || 'The file could not be read.'); return d; });
57
+ }).then(function (r) {
58
+ H.job = r.job;
59
+ pollJob(r.job, function (m) { H.busy = m; renderLogs(); }, function (s) { H.busy = null; H.data = s.extra; renderLogs(); }, function (e) { H.busy = null; H.error = e; renderLogs(); });
60
+ }, function (e) { H.busy = null; H.error = errorText(e); renderLogs(); });
61
+ });
62
+ var level = el('select', { className: 'input', style: 'width:auto', 'aria-label': 'Which lines' }, [['ERROR', 'Errors only'], ['WARN', 'Errors and warnings'], ['INFO', 'Everything but debug'], ['DEBUG', 'Everything']].map(function (o) { return el('option', { value: o[0], text: o[1] }); }));
63
+ level.value = H.level;
64
+ level.addEventListener('change', function () { H.level = level.value; });
65
+ w.appendChild(el('div', { className: 'card', style: 'padding:12px 16px' },
66
+ el('div', { className: 'bar' }, el('label', { className: 'field', style: 'margin:0;flex:1;min-width:320px' }, el('span', { className: 'lbl', text: 'File or folder on this computer' }), path),
67
+ el('button', { className: 'btn primary', disabled: !!H.busy || !(H.path || '').trim(), onclick: run }, icon('play'), H.data ? 'Read again' : 'Read the log'),
68
+ el('span', { className: 'muted small', text: 'or' }),
69
+ el('button', { className: 'btn', disabled: !!H.busy, onclick: function () { picker.click(); } }, icon('file'), 'Choose a file'), picker),
70
+ el('div', { className: 'bar', style: 'margin-top:10px' },
71
+ el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'Lines' }), level),
72
+ lgField(H, 'source', 'Source name contains', 'e.g. Active Directory', 200),
73
+ lgField(H, 'text', 'Message contains', 'e.g. timeout', 180),
74
+ lgField(H, 'from', 'From', '', 200, 'datetime-local'),
75
+ lgField(H, 'to', 'To', '', 200, 'datetime-local'))));
76
+ // The path field must be enabled as soon as something is typed.
77
+ path.addEventListener('input', function () { var b = w.querySelector('button.primary'); if (b) b.disabled = !!H.busy || !path.value.trim(); });
78
+ if (H.busy) { w.appendChild(busyBox(H.busy)); return; }
79
+ if (H.error) { w.appendChild(el('div', { className: 'error', text: H.error })); return; }
80
+ if (!H.data) return;
81
+ var d = H.data, T = d.totals;
82
+ (d.notes || []).forEach(function (n) { w.appendChild(el('div', { className: 'note', text: n })); });
83
+ w.appendChild(el('div', { className: 'bigstats' }, stat(T.lines, 'lines in the file'), stat(T.matched, 'lines kept by the filter'), stat(T.errors, 'errors', 'lose'), stat(T.warnings, 'warnings', 'lose'), stat(T.groups, 'different errors and warnings'), stat(d.bySource.length, 'sources')));
84
+ if (T.first) w.appendChild(el('p', { className: 'muted small', style: 'margin:-4px 0 12px', text: 'From ' + when16(T.first) + ' to ' + when16(T.last) + ' (times as written in the log, UTC). ' + (d.files || []).length + ' file' + ((d.files || []).length === 1 ? '' : 's') + ' read.' }));
85
+ if (d.byHour.length > 1) {
86
+ var max = Math.max.apply(null, d.byHour.map(function (h) { return h.errors + h.warnings; })) || 1;
87
+ var strip = el('div', { style: 'display:flex;align-items:flex-end;gap:2px;height:64px;margin:4px 0 6px', role: 'img', 'aria-label': 'Errors and warnings per hour' });
88
+ d.byHour.forEach(function (h) {
89
+ var n = h.errors + h.warnings;
90
+ strip.appendChild(el('div', { title: h.hour.replace('T', ' ') + ':00 ' + h.errors + ' errors, ' + h.warnings + ' warnings', style: 'flex:1;min-width:2px;max-width:18px;height:' + Math.max(2, Math.round(n * 60 / max)) + 'px;background:' + (h.errors ? '#dc2626' : n ? '#d97706' : '#e5e7eb') }));
91
+ });
92
+ w.appendChild(section('Errors and warnings per hour', d.byHour.length, el('div', {}, strip, el('div', { className: 'muted small', style: 'display:flex;justify-content:space-between' }, el('span', { text: d.byHour[0].hour.replace('T', ' ') + ':00' }), el('span', { text: d.byHour[d.byHour.length - 1].hour.replace('T', ' ') + ':00' })))));
93
+ }
94
+ if (d.bySource.length) w.appendChild(section('Per source', d.bySource.length, simpleTable(['Source', 'Type', 'Lines', 'Errors', 'Warnings', 'Last error', 'At'], d.bySource.map(function (r) {
95
+ return [r.source, r.type, fmtNum(r.lines), r.errors ? pill(fmtNum(r.errors), 'lose') : '0', fmtNum(r.warnings), el('span', { className: 'small', text: r.lastError || '' }), when16(r.lastErrorAt)];
96
+ }), 'Per source')));
97
+ if (d.groups.length) {
98
+ w.appendChild(section('Errors and warnings, repeats counted once', d.groups.length + (d.moreGroups || 0), filteredTable(H, d.groups, ['Level', 'Source', 'Operation', 'Times', 'First', 'Last', 'Message'], function (g) {
99
+ var key = g.level + '|' + g.source + '|' + g.operation + '|' + g.pattern;
100
+ var detail = el('div', { className: H.open[key] ? '' : 'hidden' }, el('pre', { className: 'small', style: 'white-space:pre-wrap;word-break:break-word;margin:6px 0 0;max-height:320px;overflow:auto', text: g.example + (g.exception ? '\n\n' + g.exception : '') }), g.logger ? el('div', { className: 'muted small', text: 'Logger: ' + g.logger }) : null);
101
+ var btn = el('button', { className: 'linkbtn small', 'aria-expanded': String(!!H.open[key]), onclick: function () { H.open[key] = !H.open[key]; detail.classList.toggle('hidden', !H.open[key]); btn.setAttribute('aria-expanded', String(!!H.open[key])); btn.textContent = H.open[key] ? 'Hide detail' : 'Show detail'; } }, H.open[key] ? 'Hide detail' : 'Show detail');
102
+ return [(/ERR|FATAL/.test(g.level) ? pill(g.level, 'lose') : el('span', { style: 'color:#92400e;font-weight:600', text: g.level })), g.source, g.operation, fmtNum(g.count), when16(g.first), when16(g.last), el('div', {}, el('div', { className: 'small', text: g.example.slice(0, 260) + (g.example.length > 260 ? '…' : '') }), btn, detail)];
103
+ }, 'Errors and warnings')));
104
+ } else w.appendChild(el('p', { className: 'muted', text: T.read ? 'No errors or warnings in what the filter kept.' : '' }));
105
+ if (d.latest.length) w.appendChild(section('Latest lines kept by the filter', d.latest.length, simpleTable(['Time', 'Level', 'Source', 'Operation', 'Message'], d.latest.slice(0, 200).map(function (r) {
106
+ return [when16(r.time), r.level, r.source, r.operation, el('span', { className: 'small', text: r.message.slice(0, 400) })];
107
+ }), 'Latest lines')));
108
+ }
109
+ function lgIsc(w, H, desc) {
110
+ var only = el('input', { type: 'checkbox', checked: !!H.failedOnly, 'aria-label': 'Only what failed' });
111
+ only.addEventListener('change', function () { H.failedOnly = only.checked; });
112
+ var extras = el('div', { className: 'bar' },
113
+ el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'In the last' }), numSelect(H, 'days', [[1, '24 hours'], [2, '2 days'], [7, '7 days'], [14, '14 days'], [30, '30 days']], 'Period')),
114
+ lgField(H, 'source', 'Source (exact name, optional)', 'all sources', 220),
115
+ el('label', { style: 'display:flex;gap:6px;align-items:center' }, only, 'Only what failed'));
116
+ if (!owRunBar(w, H, '/api/watch/source-log/run', 'Read what ISC recorded', desc, extras, function () { return { days: H.days, source: H.source || undefined, failedOnly: !!H.failedOnly }; }, renderLogs)) return;
117
+ var d = H.data, T = d.totals;
118
+ w.appendChild(el('div', { className: 'bigstats' }, stat(T.events, 'aggregation and source events'), stat(T.failed, 'failed', 'lose'), stat(T.provisioningErrors, 'provisioning errors', 'lose'), stat(T.appliancesNotNormal, 'Virtual Appliances not normal', 'lose')));
119
+ if (d.appliances.length) w.appendChild(section('Virtual Appliances now', d.appliances.length, simpleTable(['Cluster', 'Appliance', 'Status', 'Alert', 'Last seen', 'Sources on the cluster'], d.appliances.map(function (a) {
120
+ return [a.cluster, a.client, a.status === 'NORMAL' ? a.status : pill(a.status || 'unknown', 'lose'), a.alert, when16(a.lastSeen), fmtNum(a.sources)];
121
+ }), 'Virtual Appliances')));
122
+ if (d.bySource.length) w.appendChild(section('Per source', d.bySource.length, simpleTable(['Source', 'Type', 'Aggregations', 'Failed', 'Last aggregation', 'Provisioning errors', 'Last error', 'Cluster'], d.bySource.map(function (r) {
123
+ return [r.source, r.type, fmtNum(r.aggregations), r.failedAggregations ? pill(String(r.failedAggregations), 'lose') : '0', r.lastAggregation ? el('span', {}, when16(r.lastAggregation), ' ', /fail|error/i.test(r.lastAggregationStatus || '') ? pill(r.lastAggregationStatus, 'lose') : el('span', { className: 'muted small', text: r.lastAggregationStatus || '' })) : '', r.provisioningErrors ? pill(String(r.provisioningErrors), 'lose') : '0', el('span', { className: 'small', text: r.lastError || '' }), r.cluster ? el('span', {}, r.cluster, r.clusterStatus && r.clusterStatus !== 'NORMAL' ? el('div', {}, pill(r.clusterStatus, 'lose')) : null) : ''];
124
+ }), 'Per source')));
125
+ if (d.rows.length) w.appendChild(section('Timeline', d.rows.length + (d.more || 0), filteredTable(H, d.rows, ['When', 'Source', 'Kind', 'Status', 'What', 'Detail', 'Who'], function (r) {
126
+ return [when16(r.when), r.source, r.kind, /fail|error/i.test(r.status) ? pill(r.status, 'lose') : r.status, r.what, el('span', { className: 'small', style: 'word-break:break-word', text: r.detail }), r.who];
127
+ }, 'Timeline')));
128
+ else w.appendChild(el('p', { className: 'muted', text: 'ISC recorded nothing ' + (H.failedOnly ? 'that failed ' : '') + 'in the period.' }));
129
+ }
130
+
131
+ // Warnings > Threat signals > Privileged access gained
132
+ function wnPrivGained(w, _H, desc) {
133
+ var H = tw().priv;
134
+ var keep = el('input', { type: 'checkbox', checked: H.remember !== false, 'aria-label': 'Remember this look' });
135
+ keep.addEventListener('change', function () { H.remember = keep.checked; });
136
+ var extras = el('label', { style: 'display:flex;gap:6px;align-items:center', title: 'Untick to compare again with the same earlier look' }, keep, 'Remember this look for next time');
137
+ threatNote(w);
138
+ if (!mdRun(w, H, 'priv-gained', 'Find new privileged access', desc, extras, function () { return { remember: H.remember !== false }; }, renderWarnings)) return;
139
+ var d = H.data, T = d.totals;
140
+ w.appendChild(el('div', { className: 'bigstats' }, stat(T.holdings, 'privileged entitlements held'), stat(T.people, 'people holding them'), stat(d.baseline ? null : T.fresh, 'gained since the previous look'), stat(d.baseline ? null : T.outside, 'of those with no ISC record', 'lose'), stat(d.baseline ? null : T.lost, 'no longer held')));
141
+ if (d.since) w.appendChild(el('p', { className: 'muted small', style: 'margin:-4px 0 12px', text: 'Compared with the look of ' + when16(d.since) + '. Findings of the last 90 days stay listed while the person still holds the access.' }));
142
+ var fresh = {}; (d.freshKeys || []).forEach(function (k) { fresh[k] = true; });
143
+ if (d.findings && d.findings.length) w.appendChild(section('Privileged access gained', d.findings.length + (d.more || 0), filteredTable(H, d.findings, ['Found', 'Person', 'Privileged entitlement', 'Source', 'Held', 'How it got there', 'Requested by'], function (r) {
144
+ return [el('span', {}, r.found.slice(0, 10), fresh[r.key] ? el('div', {}, pill('new', 'gain')) : null), el('span', {}, r.person, el('div', { className: 'muted small', text: r.personState + (r.newPerson ? ' · new identity' : '') })), r.entitlement, r.source, r.via, r.how === 'No ISC record' ? pill(r.how, 'lose') : el('span', {}, r.how, r.when ? el('div', { className: 'muted small', text: when16(r.when) }) : null), r.requestedBy || ''];
145
+ }, 'Privileged access gained')));
146
+ else if (!d.baseline) w.appendChild(el('p', { className: 'muted', text: 'Nobody gained a privileged entitlement since the previous look.' }));
147
+ }
148
+ // Warnings > Threat signals > Accounts created outside ISC
149
+ function wnOutsideAccounts(w, _H, desc) {
150
+ var H = tw().outacct;
151
+ var extras = el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'Appeared in the last' }), numSelect(H, 'days', [[1, '24 hours'], [7, '7 days'], [14, '14 days'], [30, '30 days'], [90, '90 days']], 'Period'));
152
+ threatNote(w);
153
+ if (!mdRun(w, H, 'outside-accounts', 'Find accounts created outside ISC', desc, extras, function () { return { days: H.days }; }, renderWarnings)) return;
154
+ var d = H.data, T = d.totals;
155
+ w.appendChild(el('div', { className: 'bigstats' }, stat(T.accounts, 'accounts ISC did not create'), stat(T.uncorrelated, 'owned by nobody', 'lose'), stat(T.ownerLeft, 'owner has left', 'lose'), stat(T.withAccess, 'already have access'), stat(T.provisioned, 'new accounts ISC created itself')));
156
+ if (d.bySource.length) w.appendChild(section('Per source', d.bySource.length, simpleTable(['Source', 'New accounts not created by ISC', 'Accounts on the source', 'Note'], d.bySource.map(function (r) { return [r.source, fmtNum(r.fresh), r.total === null ? '—' : fmtNum(r.total), el('span', { className: 'muted small', text: r.note })]; }), 'Per source')));
157
+ if (d.rows.length) w.appendChild(section('Accounts', d.rows.length + (d.more || 0), filteredTable(H, d.rows, ['Appeared', 'Account', 'Source', 'Owner', 'Has access', 'State', 'Signals'], function (r) {
158
+ return [when16(r.created), el('span', {}, r.account, r.nativeIdentity && r.nativeIdentity !== r.account ? el('div', { className: 'muted small', style: 'word-break:break-all', text: r.nativeIdentity }) : null), r.source, el('span', {}, r.owner || '—', el('div', { className: 'muted small', text: r.ownerState })), r.hasEntitlements ? 'yes' : 'no', r.disabled ? 'disabled' : 'enabled', r.signals.length ? (r.signals[0] === 'Source newly connected' ? el('span', { className: 'muted small', text: r.signals[0] }) : sigList(r.signals)) : ''];
159
+ }, 'Accounts created outside ISC')));
160
+ else w.appendChild(el('p', { className: 'muted', text: 'No account appeared in the period that ISC did not create itself.' }));
161
+ }
162
+ // Warnings > Threat signals > Sensitive changes
163
+ function wnSensitive(w, _H, desc) {
164
+ var H = tw().sensitive;
165
+ var extras = el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'Compared with' }), numSelect(H, 'days', [[1, 'yesterday or before'], [7, 'a week ago or before'], [30, 'a month ago or before'], [90, '3 months ago or before']], 'Compared with'));
166
+ threatNote(w);
167
+ if (!mdRun(w, H, 'sensitive', 'Find sensitive changes', desc, extras, function () { return { days: H.days }; }, renderWarnings)) return;
168
+ var d = H.data, T = d.totals;
169
+ if (d.baseline) return;
170
+ w.appendChild(el('div', { className: 'bigstats' }, stat(T.high, 'high', 'lose'), stat(T.medium, 'medium'), stat(T.credentials, 'new API credentials'), stat(T.areas, 'areas touched')));
171
+ if (d.rows.length) w.appendChild(section('Changes since ' + d.from, d.rows.length + (d.more || 0), filteredTable(H, d.rows, ['Severity', 'Area', 'Object', 'Change', 'Why it matters', 'Who', 'When'], function (r) {
172
+ return [r.severity === 'high' ? pill('high', 'lose') : 'medium', r.area, r.object, el('span', { className: 'small', style: 'word-break:break-word', text: r.change }), el('span', { className: 'muted small', text: r.why }), r.who, when16(r.when)];
173
+ }, 'Sensitive changes')));
174
+ else w.appendChild(el('p', { className: 'muted', text: 'Nothing that touches a control changed since ' + d.from + '.' }));
175
+ }
176
+ // Warnings > Threat signals > Risk by person
177
+ function wnRisk(w, _H, desc) {
178
+ var H = tw().risk;
179
+ var extras = el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'Signals of the last' }), numSelect(H, 'days', [[1, '24 hours'], [7, '7 days'], [14, '14 days'], [30, '30 days']], 'Period'));
180
+ threatNote(w);
181
+ if (!mdRun(w, H, 'risk', 'Add up the signals', desc, extras, function () { return { days: H.days }; }, renderWarnings)) return;
182
+ var d = H.data, T = d.totals;
183
+ w.appendChild(el('div', { className: 'bigstats' }, stat(T.people, 'people with a signal'), stat(T.several, 'on more than one screen', 'lose'), stat(T.signals, 'signals in all')));
184
+ if (d.rows.length) w.appendChild(section('People, highest first', d.rows.length + (d.more || 0), filteredTable(H, d.rows, ['Person', 'Score', 'Screens', 'Signals'], function (r) {
185
+ return [r.person, r.screens > 1 ? pill(String(r.score), 'lose') : String(r.score), String(r.screens), el('div', {}, r.signals.map(function (s) { return el('div', { className: 'small', text: s }); }))];
186
+ }, 'Risk by person')));
187
+ else w.appendChild(el('p', { className: 'muted', text: 'No person has a signal in the period.' }));
188
+ }
189
+ // Warnings > Joiners, movers, leavers > Coming up
190
+ function wnUpcoming(w, _H, desc) {
191
+ var H = tw().upcoming;
192
+ var q = el('input', { className: 'input', value: H.query || '', placeholder: 'e.g. attributes.country:US', style: 'max-width:220px', 'aria-label': 'Only people matching (search query, optional)' });
193
+ q.addEventListener('input', function () { H.query = q.value; });
194
+ var extras = el('div', { className: 'bar' },
195
+ el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'Next' }), numSelect(H, 'days', [[3, '3 days'], [7, '7 days'], [14, '14 days'], [30, '30 days'], [90, '90 days']], 'Period')),
196
+ attrInput(H, 'startDateAttribute', 'Start-date attribute', 'startDate'), attrInput(H, 'endDateAttribute', 'End-date attribute', 'endDate'),
197
+ el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'Only people matching (optional)' }), q));
198
+ if (!mdRun(w, H, 'jml-preview', 'Show who is coming up', desc, extras, function () { return { days: H.days, startDateAttribute: H.startDateAttribute || undefined, endDateAttribute: H.endDateAttribute || undefined, query: H.query || undefined }; }, renderWarnings)) return;
199
+ var d = H.data, T = d.totals;
200
+ w.appendChild(el('div', { className: 'bigstats' }, stat(T.starts, 'start in the period'), stat(T.ends, 'end in the period'), stat(T.findings, 'with something to check', 'lose'), stat(T.checked, 'identities read')));
201
+ var busy = d.perDay.filter(function (p) { return p.starts || p.ends; });
202
+ if (busy.length) w.appendChild(section('Per day', busy.length, simpleTable(['Day', 'Start', 'End'], busy.map(function (p) { return [p.day, p.starts ? fmtNum(p.starts) : '', p.ends ? fmtNum(p.ends) : '']; }), 'Per day')));
203
+ if (d.rows.length) w.appendChild(section('People', d.rows.length + (d.more || 0), filteredTable(H, d.rows, ['Date', 'Kind', 'Person', 'Manager', 'Identity profile', 'Lifecycle state now', 'Accounts', 'Access', 'To check'], function (r) {
204
+ return [el('span', {}, r.date, el('div', { className: 'muted small', text: daysText(r.inDays) })), pill(r.kind, r.kind === 'Ends' ? 'lose' : 'gain'), el('span', {}, r.person, r.email ? el('div', { className: 'muted small', text: r.email }) : null), r.manager || '', r.profile, el('span', {}, r.lifecycle, r.stateNow ? el('div', { className: 'muted small', text: r.stateNow }) : null), r.accounts === null ? '' : fmtNum(r.accounts), r.access === null ? '' : fmtNum(r.access), r.findings.length ? sigList(r.findings) : ''];
205
+ }, 'Joiners and leavers coming up')));
206
+ else w.appendChild(el('p', { className: 'muted', text: 'Nobody has a start or end date in the period.' }));
207
+ if (d.states.length) w.appendChild(section('What the lifecycle states of these identity profiles do', d.states.length, simpleTable(['Identity profile', 'Lifecycle state', 'Kind', 'Accounts', 'Removes all access', 'Findings'], d.states.map(function (s) {
208
+ return [s.profile, el('span', {}, s.state, s.enabled ? null : el('span', { className: 'muted small', text: ' (off)' })), s.kind === 'leaver' ? 'leaver state' : 'active state', el('span', { className: 'small', text: s.accounts }), s.removesAccess ? 'yes' : 'no', s.findings.length ? sigList(s.findings) : ''];
209
+ }), 'Lifecycle states')));
210
+ }
211
+ // Warnings > Requests and reviews > Stuck requests
212
+ function wnStuckReq(w, _H, desc) {
213
+ var H = tw().stuckreq;
214
+ var extras = el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'Running for more than' }), numSelect(H, 'hours', [[4, '4 hours'], [24, '1 day'], [72, '3 days'], [168, '7 days'], [720, '30 days']], 'Running for more than'));
215
+ if (!mdRun(w, H, 'stuck-requests', 'Find stuck requests', desc, extras, function () { return { hours: H.hours }; }, renderWarnings)) return;
216
+ var d = H.data, T = d.totals;
217
+ w.appendChild(el('div', { className: 'bigstats' }, stat(T.running, 'requests still running'), stat(T.stuck, 'longer than the limit', 'lose'), stat(T.approval, 'waiting in approval'), stat(T.provisioning, 'waiting in provisioning'), stat(T.churningSources, 'sources ISC keeps re-sending to', 'lose')));
218
+ if (d.byPhase.length) w.appendChild(section('Where they wait', d.byPhase.length, simpleTable(['Phase', 'Requests', 'Oldest'], d.byPhase.map(function (p) { return [p.phase, fmtNum(p.requests), hrs(p.oldestHours)]; }), 'Where they wait')));
219
+ if (d.churn.length) w.appendChild(section('Sources ISC keeps sending the same change to (last 2 days)', d.churn.length, simpleTable(['Source', 'Repeated changes', 'People', 'Example'], d.churn.map(function (c) { return [c.source, pill(fmtNum(c.changes), 'lose'), fmtNum(c.people), el('span', { className: 'small', text: c.example })]; }), 'Churning sources')));
220
+ if (d.rows.length) w.appendChild(section('Stuck requests', d.rows.length + (d.more || 0), filteredTable(H, d.rows, ['Submitted', 'Running', 'Access', 'Requested for', 'Phase', 'Waiting on', 'Why'], function (r) {
221
+ return [when16(r.submitted), hrs(r.hours), el('span', {}, r.access, el('div', { className: 'muted small', text: r.type })), el('span', {}, r.requestedFor, r.requestedBy && r.requestedBy !== r.requestedFor ? el('div', { className: 'muted small', text: 'by ' + r.requestedBy }) : null), el('span', {}, r.phase, r.phaseHours === null ? null : el('div', { className: 'muted small', text: 'for ' + hrs(r.phaseHours) })), r.waitingOn, el('span', {}, r.reason, r.errors ? el('div', { className: 'small', style: 'color:var(--danger)', text: r.errors }) : null)];
222
+ }, 'Stuck requests')));
223
+ else w.appendChild(el('p', { className: 'muted', text: 'No request has been running that long.' }));
224
+ }
package/ui/shell.html ADDED
@@ -0,0 +1,112 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>IdentityScope</title>
7
+ <style>
8
+ /*@style*/
9
+ </style>
10
+ </head>
11
+ <body>
12
+ <a class="skip" href="#content">Skip to content</a>
13
+ <header>
14
+ <h1 class="sr-only">IdentityScope</h1>
15
+ <div class="brand"><div class="logo">IS</div><div style="display:flex;flex-direction:column;line-height:1.1">IdentityScope<span class="tagline">for SailPoint Identity Security Cloud</span></div></div>
16
+ <nav id="nav" class="hidden"><button id="nav-reports" class="navbtn active"></button><button id="nav-checks" class="navbtn"></button><button id="nav-warnings" class="navbtn"></button><button id="nav-nerm" class="navbtn"></button><button id="nav-logs" class="navbtn"></button><button id="nav-lookup" class="navbtn"></button><button id="nav-tenant" class="navbtn"></button><button id="nav-build" class="navbtn"></button><button id="nav-certs" class="navbtn"></button><button id="nav-roles" class="navbtn"></button><button id="nav-monthly" class="navbtn"></button><button id="nav-schedules" class="navbtn"></button></nav>
17
+ <span class="spacer"></span>
18
+ <span class="tenant hidden" id="tenant-chip"><span class="dot"></span><span id="tenant"></span></span>
19
+ <button type="button" class="tokchip hidden" id="token-chip"></button>
20
+ <span class="calls hidden" id="calls-chip" title="Calls this screen made to ISC since it started"><span id="calls">0</span> API calls</span>
21
+ <button id="btn-partner-nav" class="hbtn hidden" title="The instant check of every customer tenant"></button>
22
+ <button id="btn-help" class="hbtn hidden" title="What this page shows and how to use it"></button>
23
+ <button id="btn-doctor" class="hbtn hidden" title="Check permissions and data"></button>
24
+ <button id="btn-disconnect" class="hbtn hidden" title="Disconnect"></button>
25
+ </header>
26
+
27
+ <main id="content" tabindex="-1">
28
+ <div id="connect" class="hidden">
29
+ <div class="connect-hero">
30
+ <div class="logo" style="width:46px;height:46px;border-radius:12px;font-size:16px;margin:0 auto;color:#fff">IS</div>
31
+ <h2>Connect to your tenant</h2>
32
+ <p>Reports only read data. Nothing you enter leaves this computer except to sign in to your tenant.</p>
33
+ </div>
34
+ <div class="saved partner-strip" style="background:#f0fdf4;border-color:#bbf7d0"><span style="flex:1"><b>Just looking?</b> Try every screen on a made-up tenant. No sign-in, nothing leaves this computer.</span><button class="btn" id="btn-demo">Try the demo tenant</button></div>
35
+ <div class="saved partner-strip"><span style="flex:1"><b>More than one tenant?</b> Sandbox, QA and production, or several customers: check them all in one place.</span><button class="btn" id="btn-partner">Open All tenants</button></div>
36
+ <div id="saved-box" class="saved hidden">
37
+ <span class="dot" style="background:var(--accent);box-shadow:0 0 0 3px var(--accent-ring)"></span>
38
+ <span style="flex:1">Saved tenant <b id="saved-url"></b></span>
39
+ <button class="btn primary" id="btn-use-saved">Use saved tenant</button>
40
+ </div>
41
+ <div class="connect-cols">
42
+ <section class="card">
43
+ <h3>Sign in with SailPoint <span class="pill on">recommended</span></h3>
44
+ <p class="lead">Uses your normal ISC sign-in (SSO, MFA). You see only what your own ISC access allows.</p>
45
+ <label class="field"><span class="lbl">Tenant</span><input id="si-base" placeholder="yourtenant, or paste the ISC address from your browser" autocomplete="off"></label>
46
+ <label class="field"><span class="lbl">OAuth client ID</span><input id="si-client" autocomplete="off"><span class="hint">Your ISC admin creates it once for everyone (see below).</span></label>
47
+ <details class="adv" style="margin:-4px 0 16px"><summary>Client secret (only if your admin says so)</summary>
48
+ <input id="si-secret" class="input" type="password" autocomplete="off" style="margin-top:8px">
49
+ </details>
50
+ <button class="btn primary" id="btn-signin" style="width:100%;padding:10px">Sign in with SailPoint</button>
51
+ <div id="signin-wait" class="hidden progress"><span class="spinner"></span><span>Finish signing in on the SailPoint tab that opened. This page continues by itself. <a id="signin-link" target="_blank" rel="noopener">Open sign-in page</a></span></div>
52
+ <div id="signin-error" class="error hidden"></div>
53
+ <details class="help"><summary>Set up once (ISC admin)</summary>
54
+ <ol>
55
+ <li>In ISC: <b>Admin</b> &rarr; <b>Global</b> &rarr; <b>Security Settings</b> &rarr; <b>API Management</b> &rarr; <b>New</b>.</li>
56
+ <li>Description: <i>identityscope</i>. Grant types: <b>Authorization Code</b> and <b>Refresh Token</b>.</li>
57
+ <li>Redirect URL: <code id="redirect-uri">http://localhost:4317/callback</code></li>
58
+ <li>Scopes: the read scopes below. Each user still only gets what their own ISC access allows.<details style="margin-top:6px"><summary>The 26 read scopes</summary><code style="display:block;white-space:pre-wrap;word-break:break-word;margin-top:6px;font-size:12px;line-height:1.6">sp:search:read idn:sources:read idn:accounts:read idn:entitlement:read idn:campaign:read idn:access-request-status:read idn:identity-profile:read idn:identity-profile-lifecycle-state:read idn:role-unchecked:read idn:access-profile:read idn:remote-client:read sp:workflow:read sp:workflow-execution:read idn:transform:read idn:provisioning-policy:read idn:workgroup:read idn:attr-sync-source-config:read idn:mis-account:read idn:rule-management-connector:read idn:identity-profile-attribute:read idn:sod-policy:read idn:password-policy:read sp:trigger-service-subscriptions:read sp:forms:read idn:notification-templates:read idn:segment:read</code><div class="muted small" style="margin-top:6px">To sign in at all: the first two. A missing scope only switches off the screen that needs it, and that screen says which. Optional extras (API credentials, Non-employees) are in the README under Permissions.</div></details></li>
59
+ <li>Share the <b>client ID</b> with report users. Everyone uses the same client ID.</li>
60
+ </ol>
61
+ </details>
62
+ </section>
63
+ <section class="card">
64
+ <h3>Personal access token</h3>
65
+ <p class="lead">Needed for automatic (scheduled) runs. Best with a dedicated read-only reporting identity.</p>
66
+ <label class="field"><span class="lbl">Tenant</span><input id="in-base" placeholder="yourtenant, or paste the ISC address from your browser" autocomplete="off"></label>
67
+ <label class="field"><span class="lbl">Client ID</span><input id="in-id" autocomplete="off"></label>
68
+ <label class="field"><span class="lbl">Client secret</span><input id="in-secret" type="password" autocomplete="off"></label>
69
+ <button class="btn" id="btn-connect" style="width:100%;padding:10px">Connect with token</button>
70
+ <div id="connect-error" class="error hidden"></div>
71
+ <details class="help"><summary>Where do I get one, and which scopes?</summary>In ISC: your name (top right) &rarr; <b>Preferences</b> &rarr; <b>Personal Access Tokens</b> &rarr; <b>New Token</b>. The identity should have the <b>Org admin</b> user level; only read scopes are needed.<details style="margin-top:6px"><summary>The 26 read scopes</summary><code style="display:block;white-space:pre-wrap;word-break:break-word;margin-top:6px;font-size:12px;line-height:1.6">sp:search:read idn:sources:read idn:accounts:read idn:entitlement:read idn:campaign:read idn:access-request-status:read idn:identity-profile:read idn:identity-profile-lifecycle-state:read idn:role-unchecked:read idn:access-profile:read idn:remote-client:read sp:workflow:read sp:workflow-execution:read idn:transform:read idn:provisioning-policy:read idn:workgroup:read idn:attr-sync-source-config:read idn:mis-account:read idn:rule-management-connector:read idn:identity-profile-attribute:read idn:sod-policy:read idn:password-policy:read sp:trigger-service-subscriptions:read sp:forms:read idn:notification-templates:read idn:segment:read</code><div class="muted small" style="margin-top:6px">To sign in at all: the first two. A missing scope only switches off the screen that needs it, and that screen says which. Optional extras (API credentials, Non-employees) are in the README under Permissions.</div></details></details>
72
+ </section>
73
+ </div>
74
+ </div>
75
+
76
+ <div id="demo-bar" class="hidden" role="status" style="background:#fef3c7;border-bottom:1px solid #fcd34d;color:#78350f;padding:7px 18px;font-size:13px;text-align:center"><b>Demo tenant.</b> Every person, account and number here is made up. To use your own tenant, click Disconnect and connect to it.</div>
77
+ <div id="app" class="hidden">
78
+ <aside>
79
+ <div class="aside-top">
80
+ <button class="btn primary" id="btn-new"></button>
81
+ <div class="searchbox"><span id="search-ico"></span><input id="search" class="input" placeholder="Find a report"></div>
82
+ </div>
83
+ <div id="library"></div>
84
+ </aside>
85
+ <div id="main"></div>
86
+ </div>
87
+ <div id="schedules" class="hidden"></div>
88
+ <div id="roles" class="hidden"></div>
89
+ <div id="checks" class="hidden"></div>
90
+ <div id="lookup" class="hidden"></div>
91
+ <div id="tenant-page" class="hidden"></div>
92
+ <div id="build" class="hidden"></div>
93
+ <div id="certs" class="hidden"></div>
94
+ <div id="monthly" class="hidden"></div>
95
+ <div id="warnings" class="hidden"></div>
96
+ <div id="nerm" class="hidden"></div>
97
+ <div id="logs" class="hidden"></div>
98
+ <div id="partner" class="hidden"></div>
99
+ </main>
100
+
101
+ <div id="modal" class="modal hidden" role="dialog" aria-modal="true" aria-labelledby="modal-title">
102
+ <div class="box">
103
+ <div class="head"><h3 id="modal-title"></h3><button class="btn sm" id="modal-copy">Copy</button><button class="btn sm" id="modal-close">Close</button></div>
104
+ <pre id="modal-text"></pre>
105
+ </div>
106
+ </div>
107
+ <div id="toast" class="hidden" role="status" aria-live="polite"></div>
108
+ <script>
109
+ /*@script*/
110
+ </script>
111
+ </body>
112
+ </html>