identityscope 0.28.3 → 0.28.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +914 -917
- package/SECURITY.md +56 -56
- package/dist/node/cli.js +26 -26
- package/dist/node/monthly.js +17 -17
- package/package.json +2 -2
- package/reports/access-profile-members.yaml +29 -29
- package/reports/access-profile-membership-counts.yaml +17 -17
- package/reports/access-profiles-without-owner.yaml +16 -16
- package/reports/access-request-audit-trail.yaml +36 -36
- package/reports/accounts-by-source.yaml +19 -19
- package/reports/active-identities-without-manager.yaml +22 -22
- package/reports/aggregation-failures.yaml +29 -29
- package/reports/aggregation-history.yaml +27 -27
- package/reports/all-sources.yaml +16 -16
- package/reports/application-accounts.yaml +32 -32
- package/reports/application-entitlements.yaml +31 -31
- package/reports/campaign-progress.yaml +23 -23
- package/reports/certification-decisions.yaml +31 -31
- package/reports/direct-reports-per-manager.yaml +20 -20
- package/reports/disabled-accounts-of-active-people.yaml +33 -33
- package/reports/duplicate-emails.yaml +16 -16
- package/reports/entitlement-holders.yaml +35 -35
- package/reports/entitlements-held-by-inactive-identities.yaml +31 -31
- package/reports/entitlements-without-owner.yaml +28 -28
- package/reports/identities-by-lifecycle-state.yaml +15 -15
- package/reports/identities-missing-key-attributes.yaml +27 -27
- package/reports/identities-with-processing-errors.yaml +19 -19
- package/reports/identity-attribute-mappings.yaml +27 -27
- package/reports/machine-accounts.yaml +28 -28
- package/reports/managers-and-direct-reports.yaml +23 -23
- package/reports/most-access.yaml +18 -18
- package/reports/new-identities.yaml +24 -24
- package/reports/old-passwords.yaml +35 -35
- package/reports/pending-reviews-by-reviewer.yaml +20 -20
- package/reports/person-access.yaml +31 -31
- package/reports/privileged-access.yaml +29 -29
- package/reports/provisioning-error-causes.yaml +27 -27
- package/reports/provisioning-errors.yaml +32 -32
- package/reports/provisioning-failures.yaml +28 -28
- package/reports/recent-access-requests.yaml +22 -22
- package/reports/recent-activity.yaml +32 -32
- package/reports/recent-leavers.yaml +34 -34
- package/reports/role-members.yaml +29 -29
- package/reports/role-membership-counts.yaml +18 -18
- package/reports/roles-without-owner.yaml +17 -17
- package/reports/sources-needing-attention.yaml +23 -23
- package/reports/stuck-access-requests.yaml +29 -29
- package/reports/team-access.yaml +30 -30
- package/reports/terminated-users-with-active-accounts.yaml +46 -46
- package/reports/uncorrelated-accounts.yaml +38 -38
- package/ui/js/00-setup.js +6 -6
- package/ui/js/01-small-helpers.js +143 -143
- package/ui/js/02-connection.js +150 -150
- package/ui/js/03-health-check.js +17 -17
- package/ui/js/04-library.js +135 -135
- package/ui/js/05-pickers.js +163 -163
- package/ui/js/06-report-view.js +157 -157
- package/ui/js/07-fields.js +85 -85
- package/ui/js/08-designer.js +360 -360
- package/ui/js/09-yaml.js +22 -22
- package/ui/js/10-instant-check.js +171 -171
- package/ui/js/11-lookup.js +161 -161
- package/ui/js/12-tenant.js +115 -115
- package/ui/js/13-source-configuration-and-diagnostics.js +64 -64
- package/ui/js/14-certifications.js +68 -68
- package/ui/js/15-monthly-report.js +24 -24
- package/ui/js/16-ownership.js +39 -39
- package/ui/js/17-compare-tenants.js +102 -102
- package/ui/js/18-audit.js +181 -181
- package/ui/js/19-insights.js +108 -108
- package/ui/js/20-role-mining.js +35 -35
- package/ui/js/21-share-reports.js +45 -45
- package/ui/js/22-partner-overview-all-customer-tenants.js +228 -228
- package/ui/js/23-in-app-guidance.js +217 -217
- package/ui/js/24-role-tools.js +220 -220
- package/ui/js/25-schedules.js +264 -264
- package/ui/js/26-start.js +7 -7
- package/ui/js/27-warnings.js +224 -224
- package/ui/js/28-audit-readiness.js +99 -99
- package/ui/js/29-lifecycle.js +182 -182
- package/ui/js/30-labs.js +265 -265
- package/ui/js/31-build.js +203 -203
- package/ui/js/32-lab-examples.js +148 -148
- package/ui/js/33-finder.js +89 -89
- package/ui/js/34-governance.js +129 -129
- package/ui/js/35-watch.js +266 -266
- package/ui/js/36-model.js +247 -247
- package/ui/js/37-logs-and-watch.js +224 -224
- package/ui/shell.html +112 -112
- package/ui/style.css +350 -350
package/ui/js/36-model.js
CHANGED
|
@@ -1,247 +1,247 @@
|
|
|
1
|
-
// ---------- 0.24.0: grouped tabs, and the access model, aggregation safety, service accounts, duplicates, passwords, reassigned reviews ----------
|
|
2
|
-
/**
|
|
3
|
-
* Two-level navigation for pages with many tabs: a short row of sections,
|
|
4
|
-
* then only the tabs of the section that is open.
|
|
5
|
-
* groups: [[section label, [tab ids]]]; tabs: [[id, label, icon, ...]].
|
|
6
|
-
*/
|
|
7
|
-
function groupedTabs(w, key, groups, tabs, current, pick) {
|
|
8
|
-
var memo = state.tabMemo || (state.tabMemo = {});
|
|
9
|
-
var gi = 0;
|
|
10
|
-
groups.forEach(function (g, i) { if (g[1].indexOf(current) >= 0) gi = i; });
|
|
11
|
-
memo[key + gi] = current;
|
|
12
|
-
var seg = el('div', { className: 'seg' });
|
|
13
|
-
groups.forEach(function (g, i) {
|
|
14
|
-
seg.appendChild(el('button', { className: 'segbtn' + (i === gi ? ' active' : ''), 'aria-pressed': String(i === gi), onclick: function () {
|
|
15
|
-
var last = memo[key + i];
|
|
16
|
-
pick(last && g[1].indexOf(last) >= 0 ? last : g[1][0]);
|
|
17
|
-
} }, g[0], el('span', { className: 'segn', text: String(g[1].length) })));
|
|
18
|
-
});
|
|
19
|
-
w.appendChild(seg);
|
|
20
|
-
var row = el('div', { className: 'tabs sub' });
|
|
21
|
-
groups[gi][1].forEach(function (id) {
|
|
22
|
-
var t = tabs.filter(function (x) { return x[0] === id; })[0];
|
|
23
|
-
if (t) row.appendChild(el('button', { className: 'tab' + (current === id ? ' active' : ''), onclick: function () { pick(id); } }, icon(t[2]), t[1]));
|
|
24
|
-
});
|
|
25
|
-
w.appendChild(row);
|
|
26
|
-
}
|
|
27
|
-
var WN_GROUPS = [
|
|
28
|
-
['Joiners, movers, leavers', ['upcoming', 'joiners', 'movers', 'leavers', 'mgrleft', 'people', 'expiry']],
|
|
29
|
-
['Accounts', ['outside', 'syncdrift', 'multi', 'svc', 'admins']],
|
|
30
|
-
['Provisioning', ['massch', 'loops', 'aggsafe', 'pwfail']],
|
|
31
|
-
['Requests and reviews', ['ending', 'stuckreq', 'stuck', 'groupappr', 'reminders', 'revokes']],
|
|
32
|
-
['Threat signals', ['risk', 'privgain', 'outacct', 'sensitive', 'signins', 'selfappr', 'adminact', 'spikes']],
|
|
33
|
-
['Tenant health', ['lcset', 'govgroups', 'catalog', 'growth', 'quality']]
|
|
34
|
-
];
|
|
35
|
-
var AU_TABS = [['certs', 'Certifications', 'cert'], ['sod', 'Separation of duties', 'shield'], ['coverage', 'Review coverage', 'eye'], ['reassigned', 'Reassigned reviews', 'people'], ['exceptions', 'Exceptions', 'file'],
|
|
36
|
-
['outliers', 'Access outliers', 'people'], ['outmodel', 'Outside roles', 'eye'], ['composition', 'What is in every role', 'cols'], ['adminaccts', 'Admin accounts', 'shield'], ['owners', 'Entitlement owners', 'people'],
|
|
37
|
-
['trail', 'Request trail', 'file'], ['chain', 'Approver chain', 'people'],
|
|
38
|
-
['speed', 'Provisioning speed', 'pulse'], ['leavertimes', 'Leaver removal times', 'clock'], ['attrhist', 'Attribute changes', 'lifecycle'],
|
|
39
|
-
['changes', 'Change history', 'clock'], ['evidence', 'Evidence pack', 'download']];
|
|
40
|
-
var AU_GROUPS = [
|
|
41
|
-
['Reviews', ['certs', 'coverage', 'reassigned', 'sod', 'exceptions']],
|
|
42
|
-
['Who has what', ['outliers', 'outmodel', 'composition', 'adminaccts', 'owners']],
|
|
43
|
-
['Requests', ['trail', 'chain']],
|
|
44
|
-
['Speed and history', ['speed', 'leavertimes', 'attrhist']],
|
|
45
|
-
['Changes and evidence', ['changes', 'evidence']]
|
|
46
|
-
];
|
|
47
|
-
function mdState() {
|
|
48
|
-
if (!state.md) state.md = { outmodel: { query: '', view: 'ent' }, composition: {}, aggsafe: { days: 14 }, signins: { days: 7, minFailed: 10 }, selfappr: { days: 90 }, adminact: { days: 7 }, spikes: { days: 7, min: 15 }, lcset: {}, govgroups: {}, svc: { unusedDays: 90 }, multi: {}, pwfail: { days: 14 }, reassigned: { days: 180 } };
|
|
49
|
-
return state.md;
|
|
50
|
-
}
|
|
51
|
-
function mdRun(w, H, kind, label, desc, extras, body, rerender) { return owRunBar(w, H, '/api/watch/' + kind + '/run', label, desc, extras, body, rerender); }
|
|
52
|
-
function pct(a, b) { return b ? Math.round(a * 100 / b) : 0; }
|
|
53
|
-
|
|
54
|
-
// Audit > Outside roles
|
|
55
|
-
function renderOutsideModel(w) {
|
|
56
|
-
var H = mdState().outmodel;
|
|
57
|
-
var q = el('input', { className: 'input', value: H.query || '', placeholder: 'e.g. attributes.department:Finance', style: 'max-width:300px', 'aria-label': 'Only people matching (search query, optional)' });
|
|
58
|
-
q.addEventListener('input', function () { H.query = q.value; });
|
|
59
|
-
var extras = el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'Only people matching (optional)' }), q);
|
|
60
|
-
if (!mdRun(w, H, 'outside-model', 'Find direct access', 'Entitlements people hold on their own, not through any role or access profile: the access nobody designed. Shows which entitlements are mostly given directly and who holds them.', extras, function () { return { query: H.query || undefined }; }, renderAudit)) return;
|
|
61
|
-
var d = H.data, T = d.totals;
|
|
62
|
-
w.appendChild(el('div', { className: 'bigstats' }, stat(T.people, 'active people'), stat(T.assignments, 'entitlements held'), stat(T.direct, 'held directly', 'lose'), stat(pct(T.direct, T.assignments), '% held directly'), stat(T.peopleWithDirect, 'people with direct access'), stat(T.entitlementsOnlyDirect, 'entitlements never given by a role')));
|
|
63
|
-
var sw = el('div', { className: 'seg', style: 'margin:0 0 10px' }, [['ent', 'By entitlement'], ['people', 'By person']].map(function (v) {
|
|
64
|
-
return el('button', { className: 'segbtn' + (H.view === v[0] ? ' active' : ''), 'aria-pressed': String(H.view === v[0]), onclick: function () { H.view = v[0]; renderAudit(); } }, v[1]);
|
|
65
|
-
}));
|
|
66
|
-
w.appendChild(sw);
|
|
67
|
-
if (H.view === 'ent') w.appendChild(section('Entitlements given directly', d.entitlements.length, filteredTable(H.e || (H.e = { data: d, job: H.job }), d.entitlements, ['Entitlement', 'Source', 'Privileged', 'Holders', 'Directly', 'Through a role or access profile'], function (r) {
|
|
68
|
-
return [r.entitlement, r.source, r.privileged ? pill('privileged', 'lose') : '', fmtNum(r.holders), el('span', {}, fmtNum(r.direct), el('span', { className: 'muted small', text: ' (' + pct(r.direct, r.holders) + '%)' })), fmtNum(r.viaModel)];
|
|
69
|
-
}, 'Entitlements given directly')));
|
|
70
|
-
else w.appendChild(section('People with direct access', d.people.length + (d.morePeople || 0), filteredTable(H, d.people, ['Person', 'Entitlement', 'Source', 'Privileged'], function (r) { return [r.person, r.entitlement, r.source, r.privileged ? pill('privileged', 'lose') : '']; }, 'Access held directly')));
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// Audit > What is in every role
|
|
74
|
-
function renderComposition(w) {
|
|
75
|
-
var H = mdState().composition;
|
|
76
|
-
if (!mdRun(w, H, 'composition', 'Read every role', 'Every role with its access profiles and the entitlements inside them, as one table to filter and download. Flags empty roles and access profiles.', null, null, renderAudit)) return;
|
|
77
|
-
var d = H.data, T = d.totals;
|
|
78
|
-
w.appendChild(el('div', { className: 'bigstats' }, stat(T.roles, 'roles'), stat(T.accessProfiles, 'access profiles'), stat(T.emptyRoles, 'empty roles', 'lose'), stat(T.emptyProfiles, 'access profiles without entitlements', 'lose'), stat(T.profilesNotInARole, 'access profiles in no role'), stat(T.disabledRoles, 'disabled roles')));
|
|
79
|
-
if (!d.rows.length) return;
|
|
80
|
-
w.appendChild(section('Composition', d.rows.length + (d.more || 0), filteredTable(H, d.rows, ['Role', 'Owner', 'Assigned', 'Access profile', 'Entitlement', 'Source', 'Note'], function (r) {
|
|
81
|
-
return [el('span', {}, r.role, r.roleState === 'disabled' ? el('span', {}, ' ', pill('disabled', 'off')) : null), r.roleOwner, r.assignment, r.accessProfile, r.entitlement, r.source, r.note ? pill(r.note, 'lose') : ''];
|
|
82
|
-
}, 'What is in every role')));
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// Audit > Reassigned reviews
|
|
86
|
-
function renderReassigned(w) {
|
|
87
|
-
var H = mdState().reassigned;
|
|
88
|
-
var extras = el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'Campaigns of the last' }), numSelect(H, 'days', [[90, '90 days'], [180, '180 days'], [365, '365 days']], 'Campaign period'));
|
|
89
|
-
if (!mdRun(w, H, 'reassigned', 'Find reassigned reviews', 'Certifications that were passed on: from whom, to whom, the reason given, and whether the new reviewer is still here.', extras, function () { return { days: H.days }; }, renderAudit)) return;
|
|
90
|
-
var d = H.data, T = d.totals;
|
|
91
|
-
w.appendChild(el('div', { className: 'bigstats' }, stat(d.campaigns, 'campaigns checked'), stat(T.certifications, 'certifications'), stat(T.reassigned, 'reassigned'), stat(T.withoutComment, 'without a reason', 'lose'), stat(T.toSomeoneWhoLeft, 'now with someone who left', 'lose')));
|
|
92
|
-
if (!d.rows.length) { w.appendChild(el('p', { className: 'muted', text: 'No review was reassigned.' })); return; }
|
|
93
|
-
if (d.byReceiver.length > 1) w.appendChild(section('Who received them', d.byReceiver.length, simpleTable(['Reviewer', 'Reviews received'], d.byReceiver.slice(0, 50).map(function (r) { return [r.reviewer, fmtNum(r.received)]; }), 'Reviews received by reviewer')));
|
|
94
|
-
w.appendChild(section('Reassigned reviews', d.rows.length, filteredTable(H, d.rows, ['Campaign', 'Certification', 'From', 'Now with', 'Reason given', 'Decisions', 'Signed off'], function (r) {
|
|
95
|
-
return [r.campaign, r.certification, r.from, el('span', {}, r.to, r.toState && r.toState !== 'active' ? el('span', {}, ' ', pill(r.toState, 'lose')) : null), r.comment || el('span', { className: 'muted', text: 'none' }), r.decisions, r.signed || '—'];
|
|
96
|
-
}, 'Reassigned reviews')));
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// Warnings > Aggregation safety
|
|
100
|
-
function wnAggSafety(w, _H, desc) {
|
|
101
|
-
var H = mdState().aggsafe;
|
|
102
|
-
var extras = el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'Aggregations of the last' }), numSelect(H, 'days', [[7, '7 days'], [14, '14 days'], [30, '30 days']], 'Period'));
|
|
103
|
-
if (!mdRun(w, H, 'agg-safety', 'Check aggregations', desc, extras, function () { return { days: H.days }; }, renderWarnings)) return;
|
|
104
|
-
var d = H.data, T = d.totals;
|
|
105
|
-
w.appendChild(el('div', { className: 'bigstats' }, stat(T.sources, 'sources'), stat(T.flagged, 'with a finding', 'lose'), stat(T.failed, 'with failed aggregations', 'lose'), stat(T.highThreshold, 'with a delete threshold of 50% or more', 'lose'), stat(T.stale, 'did not aggregate')));
|
|
106
|
-
var V = H.view || (H.view = { only: 'flagged' });
|
|
107
|
-
var only = el('select', { className: 'input', style: 'width:auto', 'aria-label': 'Show' }, [['flagged', 'Only with findings'], ['all', 'All sources']].map(function (o) { return el('option', { value: o[0], text: o[1] }); }));
|
|
108
|
-
only.value = V.only;
|
|
109
|
-
only.addEventListener('change', function () { V.only = only.value; renderWarnings(); });
|
|
110
|
-
var rows = d.rows.filter(function (r) { return V.only === 'all' || r.findings.length; });
|
|
111
|
-
w.appendChild(section('Sources', rows.length, filteredTable(H, rows, ['Source', 'Delete threshold', 'Aggregations', 'Failed', 'Last good one', 'Findings'], function (r) {
|
|
112
|
-
return [el('span', {}, r.source, r.authoritative ? el('span', {}, ' ', pill('authoritative', 'blue')) : null, el('div', { className: 'small muted', text: r.type })), r.deleteThreshold === null ? '—' : r.deleteThreshold + '%', r.runs, r.failed ? pill(String(r.failed), 'lose') : '0', when16(r.lastOk) || '—',
|
|
113
|
-
r.findings.length ? el('div', {}, r.findings.map(function (f) { return el('div', { className: 'small', style: 'color:var(--danger)', text: f }); })) : ''];
|
|
114
|
-
}, 'Aggregation safety', only)));
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
// Warnings > Service accounts
|
|
118
|
-
function wnServiceAccounts(w, _H, desc) {
|
|
119
|
-
var H = mdState().svc;
|
|
120
|
-
var extras = el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'Unused after' }), numSelect(H, 'unusedDays', [[30, '30 days'], [90, '90 days'], [180, '180 days'], [365, '365 days']], 'Unused after'));
|
|
121
|
-
if (!mdRun(w, H, 'service-accounts', 'Check service accounts', desc, extras, function () { return { unusedDays: H.unusedDays }; }, renderWarnings)) return;
|
|
122
|
-
var d = H.data, T = d.totals;
|
|
123
|
-
w.appendChild(el('div', { className: 'bigstats' }, stat(T.accounts, 'service and machine accounts'), stat(T.noOwner, 'without an owner', 'lose'), stat(T.enabledNoOwner, 'of them enabled', 'lose'), stat(T.ownerLeft, 'whose owner left', 'lose'), stat(T.unused, 'not used for ' + H.unusedDays + ' days')));
|
|
124
|
-
if (!d.rows.length) return;
|
|
125
|
-
if (d.byOwner.length) w.appendChild(section('Who owns them', d.byOwner.length, simpleTable(['Owner', 'State', 'Accounts owned'], d.byOwner.slice(0, 200).map(function (o) { return [o.owner, o.ownerState === 'active' ? 'active' : pill(o.ownerState, 'lose'), fmtNum(o.accounts)]; }), 'Service account owners')));
|
|
126
|
-
w.appendChild(section('Accounts', d.rows.length + (d.more || 0), filteredTable(H, d.rows, ['Account', 'Source', 'Owner', 'Account', 'Last used', 'Findings'], function (r) {
|
|
127
|
-
return [el('span', {}, r.account, r.subtype ? el('div', { className: 'small muted', text: r.subtype }) : null), r.source, r.owner || el('span', { className: 'muted', text: 'none' }), r.enabled ? 'enabled' : 'disabled', r.lastUsed ? String(r.lastUsed).slice(0, 10) : '—', r.findings.length ? el('div', {}, r.findings.map(function (f) { return el('div', {}, pill(f, 'lose')); })) : ''];
|
|
128
|
-
}, 'Service and machine accounts')));
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// Warnings > Several accounts
|
|
132
|
-
function wnMultiAccounts(w, _H, desc) {
|
|
133
|
-
var H = mdState().multi;
|
|
134
|
-
if (!mdRun(w, H, 'multi-accounts', 'Find people with several accounts', desc, null, null, renderWarnings)) return;
|
|
135
|
-
var d = H.data, T = d.totals;
|
|
136
|
-
w.appendChild(el('div', { className: 'bigstats' }, stat(T.people, 'active people'), stat(T.withDuplicates, 'with several accounts on one source'), stat(T.onAuthoritative, 'on the authoritative source', 'lose')));
|
|
137
|
-
if (!d.rows.length) { w.appendChild(el('p', { className: 'muted', text: 'Nobody has more than one account on the same source.' })); return; }
|
|
138
|
-
w.appendChild(section('By source', d.bySource.length, simpleTable(['Source', 'People with several accounts'], d.bySource.map(function (s) { return [s.source, fmtNum(s.people)]; }), 'Several accounts by source')));
|
|
139
|
-
w.appendChild(section('People', d.rows.length + (d.more || 0), filteredTable(H, d.rows, ['Person', 'Lifecycle state', 'Source', 'Accounts', 'Account names'], function (r) {
|
|
140
|
-
return [r.person, r.personState, el('span', {}, r.source, r.authoritative ? el('span', {}, ' ', pill('authoritative', 'lose')) : null), r.accounts + ' (' + r.enabled + ' enabled)', el('span', { className: 'small', text: r.names })];
|
|
141
|
-
}, 'People with several accounts on one source')));
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
// Warnings > Password failures
|
|
145
|
-
function wnPasswordFailures(w, _H, desc) {
|
|
146
|
-
var H = mdState().pwfail;
|
|
147
|
-
var extras = el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'In the last' }), numSelect(H, 'days', [[7, '7 days'], [14, '14 days'], [30, '30 days'], [90, '90 days']], 'Period'));
|
|
148
|
-
if (!mdRun(w, H, 'password-failures', 'Find failed password changes', desc, extras, function () { return { days: H.days }; }, renderWarnings)) return;
|
|
149
|
-
var d = H.data, T = d.totals;
|
|
150
|
-
w.appendChild(el('div', { className: 'bigstats' }, stat(T.events, 'password events'), stat(T.passed, 'passed'), stat(T.failed, 'failed', 'lose'), stat(T.people, 'people affected', 'lose')));
|
|
151
|
-
if (d.bySource.length > 1) w.appendChild(section('By source', d.bySource.length, simpleTable(['Source', 'Passed', 'Failed'], d.bySource.map(function (s) { return [s.source, fmtNum(s.passed), s.failed ? pill(fmtNum(s.failed), 'lose') : '0']; }), 'Password events by source')));
|
|
152
|
-
if (d.rows.length) w.appendChild(section('Failures', d.rows.length + (d.more || 0), filteredTable(H, d.rows, ['When', 'Person', 'Source', 'Event', 'Error'], function (r) { return [when16(r.when), r.person, r.source, r.event, el('span', { className: 'small', text: r.error })]; }, 'Password failures')));
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
// Warnings > Lifecycle settings
|
|
156
|
-
function wnLifecycleSettings(w, _H, desc) {
|
|
157
|
-
var H = mdState().lcset;
|
|
158
|
-
if (!mdRun(w, H, 'lifecycle-settings', 'Read lifecycle states', desc, null, null, renderWarnings)) return;
|
|
159
|
-
var d = H.data, T = d.totals;
|
|
160
|
-
w.appendChild(el('div', { className: 'bigstats' }, stat(T.profiles, 'identity profiles'), stat(T.states, 'lifecycle states'), stat(T.leaverStates, 'leaver states'), stat(T.flagged, 'with a finding', 'lose')));
|
|
161
|
-
w.appendChild(section('Lifecycle states', d.rows.length, filteredTable(H, d.rows, ['Identity profile', 'State', 'People', 'What it does to accounts', 'Removes all access', 'Findings'], function (r) {
|
|
162
|
-
return [r.profile, el('span', {}, r.state, ' ', pill(r.kind === 'leaver' ? 'leaver' : 'active', r.kind === 'leaver' ? 'off' : 'blue'), r.enabled ? null : el('span', {}, ' ', pill('switched off', 'lose'))), r.people === null ? '—' : fmtNum(r.people), el('span', { className: 'small', text: r.accounts }), r.removesAccess ? 'Yes' : 'No',
|
|
163
|
-
r.findings.length ? el('div', {}, r.findings.map(function (f) { return el('div', { className: 'small', style: 'color:var(--danger)', text: f }); })) : ''];
|
|
164
|
-
}, 'What each lifecycle state does')));
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
// Warnings > Governance groups
|
|
168
|
-
function wnGovGroups(w, _H, desc) {
|
|
169
|
-
var H = mdState().govgroups;
|
|
170
|
-
if (!mdRun(w, H, 'gov-groups', 'Check governance groups', desc, null, null, renderWarnings)) return;
|
|
171
|
-
var d = H.data, T = d.totals;
|
|
172
|
-
w.appendChild(el('div', { className: 'bigstats' }, stat(T.groups, 'governance groups'), stat(T.empty, 'without members', 'lose'), stat(T.nobodyActive, 'where every member left', 'lose'), stat(T.ownerLeft, 'whose owner left', 'lose'), stat(T.unused, 'not used anywhere')));
|
|
173
|
-
if (!d.rows.length) return;
|
|
174
|
-
w.appendChild(section('Groups', d.rows.length, filteredTable(H, d.rows, ['Group', 'Owner', 'Members', 'Members who left', 'Used in', 'Findings'], function (r) {
|
|
175
|
-
return [r.group, el('span', {}, r.owner || '—', r.ownerState !== 'active' && r.owner ? el('span', {}, ' ', pill(r.ownerState, 'lose')) : null), r.activeMembers + ' of ' + r.members + ' active', el('span', { className: 'small', text: r.left.join(', ') }), r.usedIn === null ? '—' : r.usedIn + ' place' + (r.usedIn === 1 ? '' : 's'),
|
|
176
|
-
r.findings.length ? el('div', {}, r.findings.map(function (f) { return el('div', { className: 'small', style: 'color:var(--danger)', text: f }); })) : ''];
|
|
177
|
-
}, 'Governance groups')));
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
// If the program closed by itself last time, say where it was (from the small activity file).
|
|
181
|
-
function showLastCrash() {
|
|
182
|
-
api('/api/last-crash').then(function (r) {
|
|
183
|
-
var c = r && r.crash;
|
|
184
|
-
if (!c || $('crash-note')) return;
|
|
185
|
-
var box = el('div', { id: 'crash-note', className: 'error', style: 'margin:12px auto;max-width:1240px;display:flex;gap:12px;align-items:flex-start' },
|
|
186
|
-
el('div', { style: 'flex:1' }, el('b', { text: 'IdentityScope closed unexpectedly last time. ' }),
|
|
187
|
-
'It was ' + (c.doing || 'working') + ' (' + String(c.at || '').slice(0, 16).replace('T', ' ') + ' UTC). Progress: ' + (c.progress || 'unknown') + '. Memory in use: ' + c.memoryMB + ' of ' + c.limitMB + ' MB. Please send this line when you report it.'),
|
|
188
|
-
el('button', { className: 'btn sm', text: 'Dismiss', onclick: function () { api('/api/last-crash/dismiss', 'POST', {}); box.remove(); } }));
|
|
189
|
-
var host = document.querySelector('header');
|
|
190
|
-
if (host && host.parentNode) host.parentNode.insertBefore(box, host.nextSibling);
|
|
191
|
-
}).catch(function () {});
|
|
192
|
-
}
|
|
193
|
-
setTimeout(showLastCrash, 1200);
|
|
194
|
-
|
|
195
|
-
// ---------- Warnings > Threat signals ----------
|
|
196
|
-
var THREAT_NOTE = 'Signals to look into, not proof of an attack. IdentityScope reads them when you press the button; it does not watch in real time.';
|
|
197
|
-
function threatNote(w) { w.appendChild(el('p', { className: 'muted small', style: 'margin:-6px 0 12px', text: THREAT_NOTE })); }
|
|
198
|
-
function sigList(xs) { return el('div', {}, xs.map(function (f) { return el('div', { className: 'small', style: 'color:var(--danger)', text: f }); })); }
|
|
199
|
-
function wnSignIns(w, _H, desc) {
|
|
200
|
-
var H = mdState().signins;
|
|
201
|
-
var extras = el('div', { className: 'bar' },
|
|
202
|
-
el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'In the last' }), numSelect(H, 'days', [[1, '24 hours'], [7, '7 days'], [14, '14 days'], [30, '30 days']], 'Period')),
|
|
203
|
-
el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'Flag from' }), numSelect(H, 'minFailed', [[5, '5 failures a day'], [10, '10 failures a day'], [25, '25 failures a day'], [50, '50 failures a day']], 'Failures per day')));
|
|
204
|
-
threatNote(w);
|
|
205
|
-
if (!mdRun(w, H, 'signins', 'Read sign-ins', desc, extras, function () { return { days: H.days, minFailed: H.minFailed }; }, renderWarnings)) return;
|
|
206
|
-
var d = H.data, T = d.totals;
|
|
207
|
-
w.appendChild(el('div', { className: 'bigstats' }, stat(T.events, 'sign-in events'), stat(T.failed, 'failed'), stat(T.people, 'people'), stat(T.flagged, 'people with a signal', 'lose'), stat(T.leaversSignedIn, 'leavers who signed in', 'lose')));
|
|
208
|
-
if (d.byAddress.length) w.appendChild(section('One address, many people', d.byAddress.length, simpleTable(['Network address', 'People tried', 'Failed sign-ins'], d.byAddress.map(function (a) { return [a.address, fmtNum(a.people), fmtNum(a.failed)]; }), 'Addresses with failures for many people')));
|
|
209
|
-
if (d.rows.length) w.appendChild(section('People', d.rows.length + (d.more || 0), filteredTable(H, d.rows, ['Person', 'State', 'Failed', 'Successful', 'Worst day', 'Signals'], function (r) {
|
|
210
|
-
return [el('span', {}, r.person, el('div', { className: 'small muted', text: r.username })), r.state === 'active' ? 'active' : pill(r.state, 'lose'), fmtNum(r.failed), fmtNum(r.passed), r.worstDay + ' (' + r.worstDayFailed + ')', sigList(r.signals)];
|
|
211
|
-
}, 'Sign-in signals')));
|
|
212
|
-
else if (T.events) w.appendChild(el('p', { className: 'muted', text: 'No sign-in signal in this period.' }));
|
|
213
|
-
}
|
|
214
|
-
function wnSelfApprovals(w, _H, desc) {
|
|
215
|
-
var H = mdState().selfappr;
|
|
216
|
-
var extras = el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'Requests of the last' }), numSelect(H, 'days', [[30, '30 days'], [90, '90 days'], [180, '180 days'], [365, '365 days']], 'Period'));
|
|
217
|
-
threatNote(w);
|
|
218
|
-
if (!mdRun(w, H, 'self-approvals', 'Find self-approvals', desc, extras, function () { return { days: H.days }; }, renderWarnings)) return;
|
|
219
|
-
var d = H.data, T = d.totals;
|
|
220
|
-
w.appendChild(el('div', { className: 'bigstats' }, stat(T.requests, 'requests'), stat(T.approvedSteps, 'approvals'), stat(T.selfApproved, 'approved their own access', 'lose'), stat(T.requesterApproved, 'approved what they requested for someone', 'lose')));
|
|
221
|
-
if (d.rows.length) w.appendChild(section('Self-approvals', d.rows.length + (d.more || 0), filteredTable(H, d.rows, ['Approved at', 'Access', 'Requested for', 'Requested by', 'Approved by', 'Finding'], function (r) { return [when16(r.when), r.access, r.requestedFor, r.requestedBy, r.approver, pill(r.kind, 'lose')]; }, 'Self-approvals')));
|
|
222
|
-
else if (T.requests) w.appendChild(el('p', { className: 'muted', text: 'Nobody approved their own request.' }));
|
|
223
|
-
}
|
|
224
|
-
function wnAdminActivity(w, _H, desc) {
|
|
225
|
-
var H = mdState().adminact;
|
|
226
|
-
var extras = el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'In the last' }), numSelect(H, 'days', [[1, '24 hours'], [7, '7 days'], [30, '30 days'], [90, '90 days']], 'Period'));
|
|
227
|
-
threatNote(w);
|
|
228
|
-
if (!mdRun(w, H, 'admin-activity', 'Read admin activity', desc, extras, function () { return { days: H.days }; }, renderWarnings)) return;
|
|
229
|
-
var d = H.data, T = d.totals;
|
|
230
|
-
w.appendChild(el('div', { className: 'bigstats' }, stat(T.events, 'changes by people'), stat(T.actors, 'who made them'), stat(T.byLeavers, 'are people who left', 'lose'), stat(T.unknownActors, 'are not a person in ISC')));
|
|
231
|
-
if (d.actors.length) w.appendChild(section('Who made changes', d.actors.length, simpleTable(['Who', 'State', 'Changes', 'To what', 'Last change', 'Signals'], d.actors.slice(0, 300).map(function (a) {
|
|
232
|
-
return [a.actor, a.state === 'active' ? 'active' : pill(a.state, a.state === 'not a person in ISC' ? 'off' : 'lose'), fmtNum(a.changes), a.kinds, when16(a.last), a.signals.length ? sigList(a.signals) : ''];
|
|
233
|
-
}), 'Who made changes')));
|
|
234
|
-
if (d.events.length) w.appendChild(section('Changes', d.events.length + (d.more || 0), filteredTable(H, d.events, ['When', 'Who', 'Event', 'On'], function (r) { return [when16(r.when), r.actor, r.event, r.target]; }, 'Administration changes')));
|
|
235
|
-
}
|
|
236
|
-
function wnAccessSpikes(w, _H, desc) {
|
|
237
|
-
var H = mdState().spikes;
|
|
238
|
-
var extras = el('div', { className: 'bar' },
|
|
239
|
-
el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'In the last' }), numSelect(H, 'days', [[1, '24 hours'], [7, '7 days'], [14, '14 days'], [30, '30 days']], 'Period')),
|
|
240
|
-
el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'Flag from' }), numSelect(H, 'min', [[5, '5 items a day'], [15, '15 items a day'], [30, '30 items a day'], [100, '100 items a day']], 'Items per day')));
|
|
241
|
-
threatNote(w);
|
|
242
|
-
if (!mdRun(w, H, 'access-spikes', 'Find access spikes', desc, extras, function () { return { days: H.days, min: H.min }; }, renderWarnings)) return;
|
|
243
|
-
var d = H.data, T = d.totals;
|
|
244
|
-
w.appendChild(el('div', { className: 'bigstats' }, stat(T.activities, 'provisioning activities read'), stat(T.people, 'people who gained access'), stat(T.flagged, 'with ' + d.min + ' or more in one day', 'lose')));
|
|
245
|
-
if (d.rows.length) w.appendChild(section('Access spikes', d.rows.length, filteredTable(H, d.rows, ['Person', 'State', 'Day', 'Added', 'Sources', 'Requested by', 'Examples'], function (r) { return [r.person, r.personState, r.day, pill(String(r.added), 'lose'), r.sources, r.requestedBy, el('span', { className: 'small', text: r.examples })]; }, 'Access spikes per person')));
|
|
246
|
-
else w.appendChild(el('p', { className: 'muted', text: 'Nobody was given that much access in one day.' }));
|
|
247
|
-
}
|
|
1
|
+
// ---------- 0.24.0: grouped tabs, and the access model, aggregation safety, service accounts, duplicates, passwords, reassigned reviews ----------
|
|
2
|
+
/**
|
|
3
|
+
* Two-level navigation for pages with many tabs: a short row of sections,
|
|
4
|
+
* then only the tabs of the section that is open.
|
|
5
|
+
* groups: [[section label, [tab ids]]]; tabs: [[id, label, icon, ...]].
|
|
6
|
+
*/
|
|
7
|
+
function groupedTabs(w, key, groups, tabs, current, pick) {
|
|
8
|
+
var memo = state.tabMemo || (state.tabMemo = {});
|
|
9
|
+
var gi = 0;
|
|
10
|
+
groups.forEach(function (g, i) { if (g[1].indexOf(current) >= 0) gi = i; });
|
|
11
|
+
memo[key + gi] = current;
|
|
12
|
+
var seg = el('div', { className: 'seg' });
|
|
13
|
+
groups.forEach(function (g, i) {
|
|
14
|
+
seg.appendChild(el('button', { className: 'segbtn' + (i === gi ? ' active' : ''), 'aria-pressed': String(i === gi), onclick: function () {
|
|
15
|
+
var last = memo[key + i];
|
|
16
|
+
pick(last && g[1].indexOf(last) >= 0 ? last : g[1][0]);
|
|
17
|
+
} }, g[0], el('span', { className: 'segn', text: String(g[1].length) })));
|
|
18
|
+
});
|
|
19
|
+
w.appendChild(seg);
|
|
20
|
+
var row = el('div', { className: 'tabs sub' });
|
|
21
|
+
groups[gi][1].forEach(function (id) {
|
|
22
|
+
var t = tabs.filter(function (x) { return x[0] === id; })[0];
|
|
23
|
+
if (t) row.appendChild(el('button', { className: 'tab' + (current === id ? ' active' : ''), onclick: function () { pick(id); } }, icon(t[2]), t[1]));
|
|
24
|
+
});
|
|
25
|
+
w.appendChild(row);
|
|
26
|
+
}
|
|
27
|
+
var WN_GROUPS = [
|
|
28
|
+
['Joiners, movers, leavers', ['upcoming', 'joiners', 'movers', 'leavers', 'mgrleft', 'people', 'expiry']],
|
|
29
|
+
['Accounts', ['outside', 'syncdrift', 'multi', 'svc', 'admins']],
|
|
30
|
+
['Provisioning', ['massch', 'loops', 'aggsafe', 'pwfail']],
|
|
31
|
+
['Requests and reviews', ['ending', 'stuckreq', 'stuck', 'groupappr', 'reminders', 'revokes']],
|
|
32
|
+
['Threat signals', ['risk', 'privgain', 'outacct', 'sensitive', 'signins', 'selfappr', 'adminact', 'spikes']],
|
|
33
|
+
['Tenant health', ['lcset', 'govgroups', 'catalog', 'growth', 'quality']]
|
|
34
|
+
];
|
|
35
|
+
var AU_TABS = [['certs', 'Certifications', 'cert'], ['sod', 'Separation of duties', 'shield'], ['coverage', 'Review coverage', 'eye'], ['reassigned', 'Reassigned reviews', 'people'], ['exceptions', 'Exceptions', 'file'],
|
|
36
|
+
['outliers', 'Access outliers', 'people'], ['outmodel', 'Outside roles', 'eye'], ['composition', 'What is in every role', 'cols'], ['adminaccts', 'Admin accounts', 'shield'], ['owners', 'Entitlement owners', 'people'],
|
|
37
|
+
['trail', 'Request trail', 'file'], ['chain', 'Approver chain', 'people'],
|
|
38
|
+
['speed', 'Provisioning speed', 'pulse'], ['leavertimes', 'Leaver removal times', 'clock'], ['attrhist', 'Attribute changes', 'lifecycle'],
|
|
39
|
+
['changes', 'Change history', 'clock'], ['evidence', 'Evidence pack', 'download']];
|
|
40
|
+
var AU_GROUPS = [
|
|
41
|
+
['Reviews', ['certs', 'coverage', 'reassigned', 'sod', 'exceptions']],
|
|
42
|
+
['Who has what', ['outliers', 'outmodel', 'composition', 'adminaccts', 'owners']],
|
|
43
|
+
['Requests', ['trail', 'chain']],
|
|
44
|
+
['Speed and history', ['speed', 'leavertimes', 'attrhist']],
|
|
45
|
+
['Changes and evidence', ['changes', 'evidence']]
|
|
46
|
+
];
|
|
47
|
+
function mdState() {
|
|
48
|
+
if (!state.md) state.md = { outmodel: { query: '', view: 'ent' }, composition: {}, aggsafe: { days: 14 }, signins: { days: 7, minFailed: 10 }, selfappr: { days: 90 }, adminact: { days: 7 }, spikes: { days: 7, min: 15 }, lcset: {}, govgroups: {}, svc: { unusedDays: 90 }, multi: {}, pwfail: { days: 14 }, reassigned: { days: 180 } };
|
|
49
|
+
return state.md;
|
|
50
|
+
}
|
|
51
|
+
function mdRun(w, H, kind, label, desc, extras, body, rerender) { return owRunBar(w, H, '/api/watch/' + kind + '/run', label, desc, extras, body, rerender); }
|
|
52
|
+
function pct(a, b) { return b ? Math.round(a * 100 / b) : 0; }
|
|
53
|
+
|
|
54
|
+
// Audit > Outside roles
|
|
55
|
+
function renderOutsideModel(w) {
|
|
56
|
+
var H = mdState().outmodel;
|
|
57
|
+
var q = el('input', { className: 'input', value: H.query || '', placeholder: 'e.g. attributes.department:Finance', style: 'max-width:300px', 'aria-label': 'Only people matching (search query, optional)' });
|
|
58
|
+
q.addEventListener('input', function () { H.query = q.value; });
|
|
59
|
+
var extras = el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'Only people matching (optional)' }), q);
|
|
60
|
+
if (!mdRun(w, H, 'outside-model', 'Find direct access', 'Entitlements people hold on their own, not through any role or access profile: the access nobody designed. Shows which entitlements are mostly given directly and who holds them.', extras, function () { return { query: H.query || undefined }; }, renderAudit)) return;
|
|
61
|
+
var d = H.data, T = d.totals;
|
|
62
|
+
w.appendChild(el('div', { className: 'bigstats' }, stat(T.people, 'active people'), stat(T.assignments, 'entitlements held'), stat(T.direct, 'held directly', 'lose'), stat(pct(T.direct, T.assignments), '% held directly'), stat(T.peopleWithDirect, 'people with direct access'), stat(T.entitlementsOnlyDirect, 'entitlements never given by a role')));
|
|
63
|
+
var sw = el('div', { className: 'seg', style: 'margin:0 0 10px' }, [['ent', 'By entitlement'], ['people', 'By person']].map(function (v) {
|
|
64
|
+
return el('button', { className: 'segbtn' + (H.view === v[0] ? ' active' : ''), 'aria-pressed': String(H.view === v[0]), onclick: function () { H.view = v[0]; renderAudit(); } }, v[1]);
|
|
65
|
+
}));
|
|
66
|
+
w.appendChild(sw);
|
|
67
|
+
if (H.view === 'ent') w.appendChild(section('Entitlements given directly', d.entitlements.length, filteredTable(H.e || (H.e = { data: d, job: H.job }), d.entitlements, ['Entitlement', 'Source', 'Privileged', 'Holders', 'Directly', 'Through a role or access profile'], function (r) {
|
|
68
|
+
return [r.entitlement, r.source, r.privileged ? pill('privileged', 'lose') : '', fmtNum(r.holders), el('span', {}, fmtNum(r.direct), el('span', { className: 'muted small', text: ' (' + pct(r.direct, r.holders) + '%)' })), fmtNum(r.viaModel)];
|
|
69
|
+
}, 'Entitlements given directly')));
|
|
70
|
+
else w.appendChild(section('People with direct access', d.people.length + (d.morePeople || 0), filteredTable(H, d.people, ['Person', 'Entitlement', 'Source', 'Privileged'], function (r) { return [r.person, r.entitlement, r.source, r.privileged ? pill('privileged', 'lose') : '']; }, 'Access held directly')));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Audit > What is in every role
|
|
74
|
+
function renderComposition(w) {
|
|
75
|
+
var H = mdState().composition;
|
|
76
|
+
if (!mdRun(w, H, 'composition', 'Read every role', 'Every role with its access profiles and the entitlements inside them, as one table to filter and download. Flags empty roles and access profiles.', null, null, renderAudit)) return;
|
|
77
|
+
var d = H.data, T = d.totals;
|
|
78
|
+
w.appendChild(el('div', { className: 'bigstats' }, stat(T.roles, 'roles'), stat(T.accessProfiles, 'access profiles'), stat(T.emptyRoles, 'empty roles', 'lose'), stat(T.emptyProfiles, 'access profiles without entitlements', 'lose'), stat(T.profilesNotInARole, 'access profiles in no role'), stat(T.disabledRoles, 'disabled roles')));
|
|
79
|
+
if (!d.rows.length) return;
|
|
80
|
+
w.appendChild(section('Composition', d.rows.length + (d.more || 0), filteredTable(H, d.rows, ['Role', 'Owner', 'Assigned', 'Access profile', 'Entitlement', 'Source', 'Note'], function (r) {
|
|
81
|
+
return [el('span', {}, r.role, r.roleState === 'disabled' ? el('span', {}, ' ', pill('disabled', 'off')) : null), r.roleOwner, r.assignment, r.accessProfile, r.entitlement, r.source, r.note ? pill(r.note, 'lose') : ''];
|
|
82
|
+
}, 'What is in every role')));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Audit > Reassigned reviews
|
|
86
|
+
function renderReassigned(w) {
|
|
87
|
+
var H = mdState().reassigned;
|
|
88
|
+
var extras = el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'Campaigns of the last' }), numSelect(H, 'days', [[90, '90 days'], [180, '180 days'], [365, '365 days']], 'Campaign period'));
|
|
89
|
+
if (!mdRun(w, H, 'reassigned', 'Find reassigned reviews', 'Certifications that were passed on: from whom, to whom, the reason given, and whether the new reviewer is still here.', extras, function () { return { days: H.days }; }, renderAudit)) return;
|
|
90
|
+
var d = H.data, T = d.totals;
|
|
91
|
+
w.appendChild(el('div', { className: 'bigstats' }, stat(d.campaigns, 'campaigns checked'), stat(T.certifications, 'certifications'), stat(T.reassigned, 'reassigned'), stat(T.withoutComment, 'without a reason', 'lose'), stat(T.toSomeoneWhoLeft, 'now with someone who left', 'lose')));
|
|
92
|
+
if (!d.rows.length) { w.appendChild(el('p', { className: 'muted', text: 'No review was reassigned.' })); return; }
|
|
93
|
+
if (d.byReceiver.length > 1) w.appendChild(section('Who received them', d.byReceiver.length, simpleTable(['Reviewer', 'Reviews received'], d.byReceiver.slice(0, 50).map(function (r) { return [r.reviewer, fmtNum(r.received)]; }), 'Reviews received by reviewer')));
|
|
94
|
+
w.appendChild(section('Reassigned reviews', d.rows.length, filteredTable(H, d.rows, ['Campaign', 'Certification', 'From', 'Now with', 'Reason given', 'Decisions', 'Signed off'], function (r) {
|
|
95
|
+
return [r.campaign, r.certification, r.from, el('span', {}, r.to, r.toState && r.toState !== 'active' ? el('span', {}, ' ', pill(r.toState, 'lose')) : null), r.comment || el('span', { className: 'muted', text: 'none' }), r.decisions, r.signed || '—'];
|
|
96
|
+
}, 'Reassigned reviews')));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// Warnings > Aggregation safety
|
|
100
|
+
function wnAggSafety(w, _H, desc) {
|
|
101
|
+
var H = mdState().aggsafe;
|
|
102
|
+
var extras = el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'Aggregations of the last' }), numSelect(H, 'days', [[7, '7 days'], [14, '14 days'], [30, '30 days']], 'Period'));
|
|
103
|
+
if (!mdRun(w, H, 'agg-safety', 'Check aggregations', desc, extras, function () { return { days: H.days }; }, renderWarnings)) return;
|
|
104
|
+
var d = H.data, T = d.totals;
|
|
105
|
+
w.appendChild(el('div', { className: 'bigstats' }, stat(T.sources, 'sources'), stat(T.flagged, 'with a finding', 'lose'), stat(T.failed, 'with failed aggregations', 'lose'), stat(T.highThreshold, 'with a delete threshold of 50% or more', 'lose'), stat(T.stale, 'did not aggregate')));
|
|
106
|
+
var V = H.view || (H.view = { only: 'flagged' });
|
|
107
|
+
var only = el('select', { className: 'input', style: 'width:auto', 'aria-label': 'Show' }, [['flagged', 'Only with findings'], ['all', 'All sources']].map(function (o) { return el('option', { value: o[0], text: o[1] }); }));
|
|
108
|
+
only.value = V.only;
|
|
109
|
+
only.addEventListener('change', function () { V.only = only.value; renderWarnings(); });
|
|
110
|
+
var rows = d.rows.filter(function (r) { return V.only === 'all' || r.findings.length; });
|
|
111
|
+
w.appendChild(section('Sources', rows.length, filteredTable(H, rows, ['Source', 'Delete threshold', 'Aggregations', 'Failed', 'Last good one', 'Findings'], function (r) {
|
|
112
|
+
return [el('span', {}, r.source, r.authoritative ? el('span', {}, ' ', pill('authoritative', 'blue')) : null, el('div', { className: 'small muted', text: r.type })), r.deleteThreshold === null ? '—' : r.deleteThreshold + '%', r.runs, r.failed ? pill(String(r.failed), 'lose') : '0', when16(r.lastOk) || '—',
|
|
113
|
+
r.findings.length ? el('div', {}, r.findings.map(function (f) { return el('div', { className: 'small', style: 'color:var(--danger)', text: f }); })) : ''];
|
|
114
|
+
}, 'Aggregation safety', only)));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Warnings > Service accounts
|
|
118
|
+
function wnServiceAccounts(w, _H, desc) {
|
|
119
|
+
var H = mdState().svc;
|
|
120
|
+
var extras = el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'Unused after' }), numSelect(H, 'unusedDays', [[30, '30 days'], [90, '90 days'], [180, '180 days'], [365, '365 days']], 'Unused after'));
|
|
121
|
+
if (!mdRun(w, H, 'service-accounts', 'Check service accounts', desc, extras, function () { return { unusedDays: H.unusedDays }; }, renderWarnings)) return;
|
|
122
|
+
var d = H.data, T = d.totals;
|
|
123
|
+
w.appendChild(el('div', { className: 'bigstats' }, stat(T.accounts, 'service and machine accounts'), stat(T.noOwner, 'without an owner', 'lose'), stat(T.enabledNoOwner, 'of them enabled', 'lose'), stat(T.ownerLeft, 'whose owner left', 'lose'), stat(T.unused, 'not used for ' + H.unusedDays + ' days')));
|
|
124
|
+
if (!d.rows.length) return;
|
|
125
|
+
if (d.byOwner.length) w.appendChild(section('Who owns them', d.byOwner.length, simpleTable(['Owner', 'State', 'Accounts owned'], d.byOwner.slice(0, 200).map(function (o) { return [o.owner, o.ownerState === 'active' ? 'active' : pill(o.ownerState, 'lose'), fmtNum(o.accounts)]; }), 'Service account owners')));
|
|
126
|
+
w.appendChild(section('Accounts', d.rows.length + (d.more || 0), filteredTable(H, d.rows, ['Account', 'Source', 'Owner', 'Account', 'Last used', 'Findings'], function (r) {
|
|
127
|
+
return [el('span', {}, r.account, r.subtype ? el('div', { className: 'small muted', text: r.subtype }) : null), r.source, r.owner || el('span', { className: 'muted', text: 'none' }), r.enabled ? 'enabled' : 'disabled', r.lastUsed ? String(r.lastUsed).slice(0, 10) : '—', r.findings.length ? el('div', {}, r.findings.map(function (f) { return el('div', {}, pill(f, 'lose')); })) : ''];
|
|
128
|
+
}, 'Service and machine accounts')));
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Warnings > Several accounts
|
|
132
|
+
function wnMultiAccounts(w, _H, desc) {
|
|
133
|
+
var H = mdState().multi;
|
|
134
|
+
if (!mdRun(w, H, 'multi-accounts', 'Find people with several accounts', desc, null, null, renderWarnings)) return;
|
|
135
|
+
var d = H.data, T = d.totals;
|
|
136
|
+
w.appendChild(el('div', { className: 'bigstats' }, stat(T.people, 'active people'), stat(T.withDuplicates, 'with several accounts on one source'), stat(T.onAuthoritative, 'on the authoritative source', 'lose')));
|
|
137
|
+
if (!d.rows.length) { w.appendChild(el('p', { className: 'muted', text: 'Nobody has more than one account on the same source.' })); return; }
|
|
138
|
+
w.appendChild(section('By source', d.bySource.length, simpleTable(['Source', 'People with several accounts'], d.bySource.map(function (s) { return [s.source, fmtNum(s.people)]; }), 'Several accounts by source')));
|
|
139
|
+
w.appendChild(section('People', d.rows.length + (d.more || 0), filteredTable(H, d.rows, ['Person', 'Lifecycle state', 'Source', 'Accounts', 'Account names'], function (r) {
|
|
140
|
+
return [r.person, r.personState, el('span', {}, r.source, r.authoritative ? el('span', {}, ' ', pill('authoritative', 'lose')) : null), r.accounts + ' (' + r.enabled + ' enabled)', el('span', { className: 'small', text: r.names })];
|
|
141
|
+
}, 'People with several accounts on one source')));
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Warnings > Password failures
|
|
145
|
+
function wnPasswordFailures(w, _H, desc) {
|
|
146
|
+
var H = mdState().pwfail;
|
|
147
|
+
var extras = el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'In the last' }), numSelect(H, 'days', [[7, '7 days'], [14, '14 days'], [30, '30 days'], [90, '90 days']], 'Period'));
|
|
148
|
+
if (!mdRun(w, H, 'password-failures', 'Find failed password changes', desc, extras, function () { return { days: H.days }; }, renderWarnings)) return;
|
|
149
|
+
var d = H.data, T = d.totals;
|
|
150
|
+
w.appendChild(el('div', { className: 'bigstats' }, stat(T.events, 'password events'), stat(T.passed, 'passed'), stat(T.failed, 'failed', 'lose'), stat(T.people, 'people affected', 'lose')));
|
|
151
|
+
if (d.bySource.length > 1) w.appendChild(section('By source', d.bySource.length, simpleTable(['Source', 'Passed', 'Failed'], d.bySource.map(function (s) { return [s.source, fmtNum(s.passed), s.failed ? pill(fmtNum(s.failed), 'lose') : '0']; }), 'Password events by source')));
|
|
152
|
+
if (d.rows.length) w.appendChild(section('Failures', d.rows.length + (d.more || 0), filteredTable(H, d.rows, ['When', 'Person', 'Source', 'Event', 'Error'], function (r) { return [when16(r.when), r.person, r.source, r.event, el('span', { className: 'small', text: r.error })]; }, 'Password failures')));
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// Warnings > Lifecycle settings
|
|
156
|
+
function wnLifecycleSettings(w, _H, desc) {
|
|
157
|
+
var H = mdState().lcset;
|
|
158
|
+
if (!mdRun(w, H, 'lifecycle-settings', 'Read lifecycle states', desc, null, null, renderWarnings)) return;
|
|
159
|
+
var d = H.data, T = d.totals;
|
|
160
|
+
w.appendChild(el('div', { className: 'bigstats' }, stat(T.profiles, 'identity profiles'), stat(T.states, 'lifecycle states'), stat(T.leaverStates, 'leaver states'), stat(T.flagged, 'with a finding', 'lose')));
|
|
161
|
+
w.appendChild(section('Lifecycle states', d.rows.length, filteredTable(H, d.rows, ['Identity profile', 'State', 'People', 'What it does to accounts', 'Removes all access', 'Findings'], function (r) {
|
|
162
|
+
return [r.profile, el('span', {}, r.state, ' ', pill(r.kind === 'leaver' ? 'leaver' : 'active', r.kind === 'leaver' ? 'off' : 'blue'), r.enabled ? null : el('span', {}, ' ', pill('switched off', 'lose'))), r.people === null ? '—' : fmtNum(r.people), el('span', { className: 'small', text: r.accounts }), r.removesAccess ? 'Yes' : 'No',
|
|
163
|
+
r.findings.length ? el('div', {}, r.findings.map(function (f) { return el('div', { className: 'small', style: 'color:var(--danger)', text: f }); })) : ''];
|
|
164
|
+
}, 'What each lifecycle state does')));
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// Warnings > Governance groups
|
|
168
|
+
function wnGovGroups(w, _H, desc) {
|
|
169
|
+
var H = mdState().govgroups;
|
|
170
|
+
if (!mdRun(w, H, 'gov-groups', 'Check governance groups', desc, null, null, renderWarnings)) return;
|
|
171
|
+
var d = H.data, T = d.totals;
|
|
172
|
+
w.appendChild(el('div', { className: 'bigstats' }, stat(T.groups, 'governance groups'), stat(T.empty, 'without members', 'lose'), stat(T.nobodyActive, 'where every member left', 'lose'), stat(T.ownerLeft, 'whose owner left', 'lose'), stat(T.unused, 'not used anywhere')));
|
|
173
|
+
if (!d.rows.length) return;
|
|
174
|
+
w.appendChild(section('Groups', d.rows.length, filteredTable(H, d.rows, ['Group', 'Owner', 'Members', 'Members who left', 'Used in', 'Findings'], function (r) {
|
|
175
|
+
return [r.group, el('span', {}, r.owner || '—', r.ownerState !== 'active' && r.owner ? el('span', {}, ' ', pill(r.ownerState, 'lose')) : null), r.activeMembers + ' of ' + r.members + ' active', el('span', { className: 'small', text: r.left.join(', ') }), r.usedIn === null ? '—' : r.usedIn + ' place' + (r.usedIn === 1 ? '' : 's'),
|
|
176
|
+
r.findings.length ? el('div', {}, r.findings.map(function (f) { return el('div', { className: 'small', style: 'color:var(--danger)', text: f }); })) : ''];
|
|
177
|
+
}, 'Governance groups')));
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// If the program closed by itself last time, say where it was (from the small activity file).
|
|
181
|
+
function showLastCrash() {
|
|
182
|
+
api('/api/last-crash').then(function (r) {
|
|
183
|
+
var c = r && r.crash;
|
|
184
|
+
if (!c || $('crash-note')) return;
|
|
185
|
+
var box = el('div', { id: 'crash-note', className: 'error', style: 'margin:12px auto;max-width:1240px;display:flex;gap:12px;align-items:flex-start' },
|
|
186
|
+
el('div', { style: 'flex:1' }, el('b', { text: 'IdentityScope closed unexpectedly last time. ' }),
|
|
187
|
+
'It was ' + (c.doing || 'working') + ' (' + String(c.at || '').slice(0, 16).replace('T', ' ') + ' UTC). Progress: ' + (c.progress || 'unknown') + '. Memory in use: ' + c.memoryMB + ' of ' + c.limitMB + ' MB. Please send this line when you report it.'),
|
|
188
|
+
el('button', { className: 'btn sm', text: 'Dismiss', onclick: function () { api('/api/last-crash/dismiss', 'POST', {}); box.remove(); } }));
|
|
189
|
+
var host = document.querySelector('header');
|
|
190
|
+
if (host && host.parentNode) host.parentNode.insertBefore(box, host.nextSibling);
|
|
191
|
+
}).catch(function () {});
|
|
192
|
+
}
|
|
193
|
+
setTimeout(showLastCrash, 1200);
|
|
194
|
+
|
|
195
|
+
// ---------- Warnings > Threat signals ----------
|
|
196
|
+
var THREAT_NOTE = 'Signals to look into, not proof of an attack. IdentityScope reads them when you press the button; it does not watch in real time.';
|
|
197
|
+
function threatNote(w) { w.appendChild(el('p', { className: 'muted small', style: 'margin:-6px 0 12px', text: THREAT_NOTE })); }
|
|
198
|
+
function sigList(xs) { return el('div', {}, xs.map(function (f) { return el('div', { className: 'small', style: 'color:var(--danger)', text: f }); })); }
|
|
199
|
+
function wnSignIns(w, _H, desc) {
|
|
200
|
+
var H = mdState().signins;
|
|
201
|
+
var extras = el('div', { className: 'bar' },
|
|
202
|
+
el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'In the last' }), numSelect(H, 'days', [[1, '24 hours'], [7, '7 days'], [14, '14 days'], [30, '30 days']], 'Period')),
|
|
203
|
+
el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'Flag from' }), numSelect(H, 'minFailed', [[5, '5 failures a day'], [10, '10 failures a day'], [25, '25 failures a day'], [50, '50 failures a day']], 'Failures per day')));
|
|
204
|
+
threatNote(w);
|
|
205
|
+
if (!mdRun(w, H, 'signins', 'Read sign-ins', desc, extras, function () { return { days: H.days, minFailed: H.minFailed }; }, renderWarnings)) return;
|
|
206
|
+
var d = H.data, T = d.totals;
|
|
207
|
+
w.appendChild(el('div', { className: 'bigstats' }, stat(T.events, 'sign-in events'), stat(T.failed, 'failed'), stat(T.people, 'people'), stat(T.flagged, 'people with a signal', 'lose'), stat(T.leaversSignedIn, 'leavers who signed in', 'lose')));
|
|
208
|
+
if (d.byAddress.length) w.appendChild(section('One address, many people', d.byAddress.length, simpleTable(['Network address', 'People tried', 'Failed sign-ins'], d.byAddress.map(function (a) { return [a.address, fmtNum(a.people), fmtNum(a.failed)]; }), 'Addresses with failures for many people')));
|
|
209
|
+
if (d.rows.length) w.appendChild(section('People', d.rows.length + (d.more || 0), filteredTable(H, d.rows, ['Person', 'State', 'Failed', 'Successful', 'Worst day', 'Signals'], function (r) {
|
|
210
|
+
return [el('span', {}, r.person, el('div', { className: 'small muted', text: r.username })), r.state === 'active' ? 'active' : pill(r.state, 'lose'), fmtNum(r.failed), fmtNum(r.passed), r.worstDay + ' (' + r.worstDayFailed + ')', sigList(r.signals)];
|
|
211
|
+
}, 'Sign-in signals')));
|
|
212
|
+
else if (T.events) w.appendChild(el('p', { className: 'muted', text: 'No sign-in signal in this period.' }));
|
|
213
|
+
}
|
|
214
|
+
function wnSelfApprovals(w, _H, desc) {
|
|
215
|
+
var H = mdState().selfappr;
|
|
216
|
+
var extras = el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'Requests of the last' }), numSelect(H, 'days', [[30, '30 days'], [90, '90 days'], [180, '180 days'], [365, '365 days']], 'Period'));
|
|
217
|
+
threatNote(w);
|
|
218
|
+
if (!mdRun(w, H, 'self-approvals', 'Find self-approvals', desc, extras, function () { return { days: H.days }; }, renderWarnings)) return;
|
|
219
|
+
var d = H.data, T = d.totals;
|
|
220
|
+
w.appendChild(el('div', { className: 'bigstats' }, stat(T.requests, 'requests'), stat(T.approvedSteps, 'approvals'), stat(T.selfApproved, 'approved their own access', 'lose'), stat(T.requesterApproved, 'approved what they requested for someone', 'lose')));
|
|
221
|
+
if (d.rows.length) w.appendChild(section('Self-approvals', d.rows.length + (d.more || 0), filteredTable(H, d.rows, ['Approved at', 'Access', 'Requested for', 'Requested by', 'Approved by', 'Finding'], function (r) { return [when16(r.when), r.access, r.requestedFor, r.requestedBy, r.approver, pill(r.kind, 'lose')]; }, 'Self-approvals')));
|
|
222
|
+
else if (T.requests) w.appendChild(el('p', { className: 'muted', text: 'Nobody approved their own request.' }));
|
|
223
|
+
}
|
|
224
|
+
function wnAdminActivity(w, _H, desc) {
|
|
225
|
+
var H = mdState().adminact;
|
|
226
|
+
var extras = el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'In the last' }), numSelect(H, 'days', [[1, '24 hours'], [7, '7 days'], [30, '30 days'], [90, '90 days']], 'Period'));
|
|
227
|
+
threatNote(w);
|
|
228
|
+
if (!mdRun(w, H, 'admin-activity', 'Read admin activity', desc, extras, function () { return { days: H.days }; }, renderWarnings)) return;
|
|
229
|
+
var d = H.data, T = d.totals;
|
|
230
|
+
w.appendChild(el('div', { className: 'bigstats' }, stat(T.events, 'changes by people'), stat(T.actors, 'who made them'), stat(T.byLeavers, 'are people who left', 'lose'), stat(T.unknownActors, 'are not a person in ISC')));
|
|
231
|
+
if (d.actors.length) w.appendChild(section('Who made changes', d.actors.length, simpleTable(['Who', 'State', 'Changes', 'To what', 'Last change', 'Signals'], d.actors.slice(0, 300).map(function (a) {
|
|
232
|
+
return [a.actor, a.state === 'active' ? 'active' : pill(a.state, a.state === 'not a person in ISC' ? 'off' : 'lose'), fmtNum(a.changes), a.kinds, when16(a.last), a.signals.length ? sigList(a.signals) : ''];
|
|
233
|
+
}), 'Who made changes')));
|
|
234
|
+
if (d.events.length) w.appendChild(section('Changes', d.events.length + (d.more || 0), filteredTable(H, d.events, ['When', 'Who', 'Event', 'On'], function (r) { return [when16(r.when), r.actor, r.event, r.target]; }, 'Administration changes')));
|
|
235
|
+
}
|
|
236
|
+
function wnAccessSpikes(w, _H, desc) {
|
|
237
|
+
var H = mdState().spikes;
|
|
238
|
+
var extras = el('div', { className: 'bar' },
|
|
239
|
+
el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'In the last' }), numSelect(H, 'days', [[1, '24 hours'], [7, '7 days'], [14, '14 days'], [30, '30 days']], 'Period')),
|
|
240
|
+
el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'Flag from' }), numSelect(H, 'min', [[5, '5 items a day'], [15, '15 items a day'], [30, '30 items a day'], [100, '100 items a day']], 'Items per day')));
|
|
241
|
+
threatNote(w);
|
|
242
|
+
if (!mdRun(w, H, 'access-spikes', 'Find access spikes', desc, extras, function () { return { days: H.days, min: H.min }; }, renderWarnings)) return;
|
|
243
|
+
var d = H.data, T = d.totals;
|
|
244
|
+
w.appendChild(el('div', { className: 'bigstats' }, stat(T.activities, 'provisioning activities read'), stat(T.people, 'people who gained access'), stat(T.flagged, 'with ' + d.min + ' or more in one day', 'lose')));
|
|
245
|
+
if (d.rows.length) w.appendChild(section('Access spikes', d.rows.length, filteredTable(H, d.rows, ['Person', 'State', 'Day', 'Added', 'Sources', 'Requested by', 'Examples'], function (r) { return [r.person, r.personState, r.day, pill(String(r.added), 'lose'), r.sources, r.requestedBy, el('span', { className: 'small', text: r.examples })]; }, 'Access spikes per person')));
|
|
246
|
+
else w.appendChild(el('p', { className: 'muted', text: 'Nobody was given that much access in one day.' }));
|
|
247
|
+
}
|