identityscope 0.0.0-stage → 0.28.4
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 -0
- package/README.md +916 -2
- package/SECURITY.md +56 -0
- package/dist/core/audit-readiness.d.ts +158 -0
- package/dist/core/audit-readiness.js +357 -0
- package/dist/core/audit-readiness.js.map +1 -0
- package/dist/core/certs.d.ts +68 -0
- package/dist/core/certs.js +132 -0
- package/dist/core/certs.js.map +1 -0
- package/dist/core/checks.d.ts +133 -0
- package/dist/core/checks.js +512 -0
- package/dist/core/checks.js.map +1 -0
- package/dist/core/cloud-rules.d.ts +20 -0
- package/dist/core/cloud-rules.js +44 -0
- package/dist/core/cloud-rules.js.map +1 -0
- package/dist/core/compare.d.ts +45 -0
- package/dist/core/compare.js +372 -0
- package/dist/core/compare.js.map +1 -0
- package/dist/core/conditions.d.ts +10 -0
- package/dist/core/conditions.js +201 -0
- package/dist/core/conditions.js.map +1 -0
- package/dist/core/credentials.d.ts +71 -0
- package/dist/core/credentials.js +211 -0
- package/dist/core/credentials.js.map +1 -0
- package/dist/core/datasets.d.ts +53 -0
- package/dist/core/datasets.js +596 -0
- package/dist/core/datasets.js.map +1 -0
- package/dist/core/definition.d.ts +32 -0
- package/dist/core/definition.js +301 -0
- package/dist/core/definition.js.map +1 -0
- package/dist/core/discover.d.ts +32 -0
- package/dist/core/discover.js +105 -0
- package/dist/core/discover.js.map +1 -0
- package/dist/core/engine.d.ts +18 -0
- package/dist/core/engine.js +290 -0
- package/dist/core/engine.js.map +1 -0
- package/dist/core/fields.d.ts +16 -0
- package/dist/core/fields.js +132 -0
- package/dist/core/fields.js.map +1 -0
- package/dist/core/governance-trail.d.ts +211 -0
- package/dist/core/governance-trail.js +557 -0
- package/dist/core/governance-trail.js.map +1 -0
- package/dist/core/http-transport.d.ts +66 -0
- package/dist/core/http-transport.js +247 -0
- package/dist/core/http-transport.js.map +1 -0
- package/dist/core/index.d.ts +13 -0
- package/dist/core/index.js +16 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/insights.d.ts +176 -0
- package/dist/core/insights.js +417 -0
- package/dist/core/insights.js.map +1 -0
- package/dist/core/joiner-evidence.d.ts +98 -0
- package/dist/core/joiner-evidence.js +254 -0
- package/dist/core/joiner-evidence.js.map +1 -0
- package/dist/core/lab/credential-map.d.ts +50 -0
- package/dist/core/lab/credential-map.js +163 -0
- package/dist/core/lab/credential-map.js.map +1 -0
- package/dist/core/lab/javadate.d.ts +7 -0
- package/dist/core/lab/javadate.js +307 -0
- package/dist/core/lab/javadate.js.map +1 -0
- package/dist/core/lab/jsonpath.d.ts +11 -0
- package/dist/core/lab/jsonpath.js +273 -0
- package/dist/core/lab/jsonpath.js.map +1 -0
- package/dist/core/lab/policy-preview.d.ts +43 -0
- package/dist/core/lab/policy-preview.js +78 -0
- package/dist/core/lab/policy-preview.js.map +1 -0
- package/dist/core/lab/rfc5646.d.ts +2 -0
- package/dist/core/lab/rfc5646.js +421 -0
- package/dist/core/lab/rfc5646.js.map +1 -0
- package/dist/core/lab/transform-impact.d.ts +63 -0
- package/dist/core/lab/transform-impact.js +138 -0
- package/dist/core/lab/transform-impact.js.map +1 -0
- package/dist/core/lab/transform-people.d.ts +61 -0
- package/dist/core/lab/transform-people.js +132 -0
- package/dist/core/lab/transform-people.js.map +1 -0
- package/dist/core/lab/transforms.d.ts +79 -0
- package/dist/core/lab/transforms.js +738 -0
- package/dist/core/lab/transforms.js.map +1 -0
- package/dist/core/lab/velocity.d.ts +33 -0
- package/dist/core/lab/velocity.js +874 -0
- package/dist/core/lab/velocity.js.map +1 -0
- package/dist/core/lab/workflow-health.d.ts +80 -0
- package/dist/core/lab/workflow-health.js +234 -0
- package/dist/core/lab/workflow-health.js.map +1 -0
- package/dist/core/lab/workflows.d.ts +87 -0
- package/dist/core/lab/workflows.js +568 -0
- package/dist/core/lab/workflows.js.map +1 -0
- package/dist/core/lifecycle-gaps.d.ts +192 -0
- package/dist/core/lifecycle-gaps.js +389 -0
- package/dist/core/lifecycle-gaps.js.map +1 -0
- package/dist/core/logs.d.ts +145 -0
- package/dist/core/logs.js +342 -0
- package/dist/core/logs.js.map +1 -0
- package/dist/core/lookup.d.ts +129 -0
- package/dist/core/lookup.js +289 -0
- package/dist/core/lookup.js.map +1 -0
- package/dist/core/model-insights.d.ts +247 -0
- package/dist/core/model-insights.js +474 -0
- package/dist/core/model-insights.js.map +1 -0
- package/dist/core/narrow.d.ts +23 -0
- package/dist/core/narrow.js +137 -0
- package/dist/core/narrow.js.map +1 -0
- package/dist/core/nerm.d.ts +154 -0
- package/dist/core/nerm.js +397 -0
- package/dist/core/nerm.js.map +1 -0
- package/dist/core/operations-watch.d.ts +232 -0
- package/dist/core/operations-watch.js +491 -0
- package/dist/core/operations-watch.js.map +1 -0
- package/dist/core/output/csv.d.ts +6 -0
- package/dist/core/output/csv.js +22 -0
- package/dist/core/output/csv.js.map +1 -0
- package/dist/core/output/html.d.ts +11 -0
- package/dist/core/output/html.js +66 -0
- package/dist/core/output/html.js.map +1 -0
- package/dist/core/output/xlsx.d.ts +3 -0
- package/dist/core/output/xlsx.js +130 -0
- package/dist/core/output/xlsx.js.map +1 -0
- package/dist/core/output/zip.d.ts +16 -0
- package/dist/core/output/zip.js +106 -0
- package/dist/core/output/zip.js.map +1 -0
- package/dist/core/ownership.d.ts +39 -0
- package/dist/core/ownership.js +100 -0
- package/dist/core/ownership.js.map +1 -0
- package/dist/core/patterns.d.ts +11 -0
- package/dist/core/patterns.js +31 -0
- package/dist/core/patterns.js.map +1 -0
- package/dist/core/preview.d.ts +96 -0
- package/dist/core/preview.js +173 -0
- package/dist/core/preview.js.map +1 -0
- package/dist/core/roles.d.ts +125 -0
- package/dist/core/roles.js +420 -0
- package/dist/core/roles.js.map +1 -0
- package/dist/core/tenant.d.ts +67 -0
- package/dist/core/tenant.js +194 -0
- package/dist/core/tenant.js.map +1 -0
- package/dist/core/threat-signals.d.ts +112 -0
- package/dist/core/threat-signals.js +250 -0
- package/dist/core/threat-signals.js.map +1 -0
- package/dist/core/threat-watch.d.ts +144 -0
- package/dist/core/threat-watch.js +282 -0
- package/dist/core/threat-watch.js.map +1 -0
- package/dist/core/transport.d.ts +82 -0
- package/dist/core/transport.js +312 -0
- package/dist/core/transport.js.map +1 -0
- package/dist/core/types.d.ts +137 -0
- package/dist/core/types.js +10 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/warnings.d.ts +236 -0
- package/dist/core/warnings.js +504 -0
- package/dist/core/warnings.js.map +1 -0
- package/dist/demo/tenant.d.ts +1572 -0
- package/dist/demo/tenant.js +1023 -0
- package/dist/demo/tenant.js.map +1 -0
- package/dist/node/attribute-history.d.ts +22 -0
- package/dist/node/attribute-history.js +86 -0
- package/dist/node/attribute-history.js.map +1 -0
- package/dist/node/changes.d.ts +20 -0
- package/dist/node/changes.js +78 -0
- package/dist/node/changes.js.map +1 -0
- package/dist/node/cli.d.ts +2 -0
- package/dist/node/cli.js +291 -0
- package/dist/node/cli.js.map +1 -0
- package/dist/node/config.d.ts +72 -0
- package/dist/node/config.js +203 -0
- package/dist/node/config.js.map +1 -0
- package/dist/node/credentials.d.ts +13 -0
- package/dist/node/credentials.js +24 -0
- package/dist/node/credentials.js.map +1 -0
- package/dist/node/delivery.d.ts +10 -0
- package/dist/node/delivery.js +105 -0
- package/dist/node/delivery.js.map +1 -0
- package/dist/node/doctor.d.ts +2 -0
- package/dist/node/doctor.js +151 -0
- package/dist/node/doctor.js.map +1 -0
- package/dist/node/drift.d.ts +31 -0
- package/dist/node/drift.js +56 -0
- package/dist/node/drift.js.map +1 -0
- package/dist/node/evidence.d.ts +42 -0
- package/dist/node/evidence.js +129 -0
- package/dist/node/evidence.js.map +1 -0
- package/dist/node/exceptions.d.ts +30 -0
- package/dist/node/exceptions.js +83 -0
- package/dist/node/exceptions.js.map +1 -0
- package/dist/node/history.d.ts +35 -0
- package/dist/node/history.js +74 -0
- package/dist/node/history.js.map +1 -0
- package/dist/node/index.d.ts +7 -0
- package/dist/node/index.js +8 -0
- package/dist/node/index.js.map +1 -0
- package/dist/node/keep.d.ts +9 -0
- package/dist/node/keep.js +39 -0
- package/dist/node/keep.js.map +1 -0
- package/dist/node/loader.d.ts +7 -0
- package/dist/node/loader.js +35 -0
- package/dist/node/loader.js.map +1 -0
- package/dist/node/log-files.d.ts +16 -0
- package/dist/node/log-files.js +93 -0
- package/dist/node/log-files.js.map +1 -0
- package/dist/node/monthly.d.ts +41 -0
- package/dist/node/monthly.js +108 -0
- package/dist/node/monthly.js.map +1 -0
- package/dist/node/oauth-login.d.ts +45 -0
- package/dist/node/oauth-login.js +121 -0
- package/dist/node/oauth-login.js.map +1 -0
- package/dist/node/packs.d.ts +32 -0
- package/dist/node/packs.js +43 -0
- package/dist/node/packs.js.map +1 -0
- package/dist/node/privileged-seen.d.ts +11 -0
- package/dist/node/privileged-seen.js +41 -0
- package/dist/node/privileged-seen.js.map +1 -0
- package/dist/node/recipients.d.ts +17 -0
- package/dist/node/recipients.js +51 -0
- package/dist/node/recipients.js.map +1 -0
- package/dist/node/runner.d.ts +51 -0
- package/dist/node/runner.js +298 -0
- package/dist/node/runner.js.map +1 -0
- package/dist/node/runtime.d.ts +12 -0
- package/dist/node/runtime.js +13 -0
- package/dist/node/runtime.js.map +1 -0
- package/dist/node/schedules.d.ts +87 -0
- package/dist/node/schedules.js +141 -0
- package/dist/node/schedules.js.map +1 -0
- package/dist/node/secrets.d.ts +37 -0
- package/dist/node/secrets.js +219 -0
- package/dist/node/secrets.js.map +1 -0
- package/dist/node/support.d.ts +14 -0
- package/dist/node/support.js +133 -0
- package/dist/node/support.js.map +1 -0
- package/dist/node/tenants.d.ts +93 -0
- package/dist/node/tenants.js +255 -0
- package/dist/node/tenants.js.map +1 -0
- package/dist/node/ui-page.d.ts +1 -0
- package/dist/node/ui-page.js +3 -0
- package/dist/node/ui-page.js.map +1 -0
- package/dist/node/ui-server.d.ts +48 -0
- package/dist/node/ui-server.js +2665 -0
- package/dist/node/ui-server.js.map +1 -0
- package/dist/node/write.d.ts +9 -0
- package/dist/node/write.js +53 -0
- package/dist/node/write.js.map +1 -0
- package/dist/reports/builtin.generated.d.ts +1 -0
- package/dist/reports/builtin.generated.js +49 -0
- package/dist/reports/builtin.generated.js.map +1 -0
- package/dist/reports/library.d.ts +6 -0
- package/dist/reports/library.js +18 -0
- package/dist/reports/library.js.map +1 -0
- package/launcher/IdentityScope.cmd +11 -0
- package/package.json +69 -4
- package/reports/access-profile-members.yaml +29 -0
- package/reports/access-profile-membership-counts.yaml +17 -0
- package/reports/access-profiles-without-owner.yaml +16 -0
- package/reports/access-request-audit-trail.yaml +36 -0
- package/reports/accounts-by-source.yaml +19 -0
- package/reports/active-identities-without-manager.yaml +22 -0
- package/reports/aggregation-failures.yaml +29 -0
- package/reports/aggregation-history.yaml +27 -0
- package/reports/all-sources.yaml +16 -0
- package/reports/application-accounts.yaml +32 -0
- package/reports/application-entitlements.yaml +31 -0
- package/reports/campaign-progress.yaml +23 -0
- package/reports/certification-decisions.yaml +31 -0
- package/reports/direct-reports-per-manager.yaml +20 -0
- package/reports/disabled-accounts-of-active-people.yaml +33 -0
- package/reports/duplicate-emails.yaml +16 -0
- package/reports/entitlement-holders.yaml +35 -0
- package/reports/entitlements-held-by-inactive-identities.yaml +31 -0
- package/reports/entitlements-without-owner.yaml +28 -0
- package/reports/identities-by-lifecycle-state.yaml +15 -0
- package/reports/identities-missing-key-attributes.yaml +27 -0
- package/reports/identities-with-processing-errors.yaml +19 -0
- package/reports/identity-attribute-mappings.yaml +27 -0
- package/reports/machine-accounts.yaml +28 -0
- package/reports/managers-and-direct-reports.yaml +23 -0
- package/reports/most-access.yaml +18 -0
- package/reports/new-identities.yaml +24 -0
- package/reports/old-passwords.yaml +35 -0
- package/reports/pending-reviews-by-reviewer.yaml +20 -0
- package/reports/person-access.yaml +31 -0
- package/reports/privileged-access.yaml +29 -0
- package/reports/provisioning-error-causes.yaml +27 -0
- package/reports/provisioning-errors.yaml +32 -0
- package/reports/provisioning-failures.yaml +28 -0
- package/reports/recent-access-requests.yaml +22 -0
- package/reports/recent-activity.yaml +32 -0
- package/reports/recent-leavers.yaml +34 -0
- package/reports/role-members.yaml +29 -0
- package/reports/role-membership-counts.yaml +18 -0
- package/reports/roles-without-owner.yaml +17 -0
- package/reports/sources-needing-attention.yaml +23 -0
- package/reports/stuck-access-requests.yaml +29 -0
- package/reports/team-access.yaml +30 -0
- package/reports/terminated-users-with-active-accounts.yaml +46 -0
- package/reports/uncorrelated-accounts.yaml +38 -0
- package/ui/js/00-setup.js +6 -0
- package/ui/js/01-small-helpers.js +143 -0
- package/ui/js/02-connection.js +150 -0
- package/ui/js/03-health-check.js +17 -0
- package/ui/js/04-library.js +135 -0
- package/ui/js/05-pickers.js +163 -0
- package/ui/js/06-report-view.js +157 -0
- package/ui/js/07-fields.js +85 -0
- package/ui/js/08-designer.js +360 -0
- package/ui/js/09-yaml.js +22 -0
- package/ui/js/10-instant-check.js +171 -0
- package/ui/js/11-lookup.js +161 -0
- package/ui/js/12-tenant.js +115 -0
- package/ui/js/13-source-configuration-and-diagnostics.js +64 -0
- package/ui/js/14-certifications.js +68 -0
- package/ui/js/15-monthly-report.js +24 -0
- package/ui/js/16-ownership.js +39 -0
- package/ui/js/17-compare-tenants.js +102 -0
- package/ui/js/18-audit.js +181 -0
- package/ui/js/19-insights.js +108 -0
- package/ui/js/20-role-mining.js +35 -0
- package/ui/js/21-share-reports.js +45 -0
- package/ui/js/22-partner-overview-all-customer-tenants.js +228 -0
- package/ui/js/23-in-app-guidance.js +217 -0
- package/ui/js/24-role-tools.js +220 -0
- package/ui/js/25-schedules.js +264 -0
- package/ui/js/26-start.js +7 -0
- package/ui/js/27-warnings.js +224 -0
- package/ui/js/28-audit-readiness.js +99 -0
- package/ui/js/29-lifecycle.js +182 -0
- package/ui/js/30-labs.js +265 -0
- package/ui/js/31-build.js +203 -0
- package/ui/js/32-lab-examples.js +148 -0
- package/ui/js/33-finder.js +89 -0
- package/ui/js/34-governance.js +129 -0
- package/ui/js/35-watch.js +266 -0
- package/ui/js/36-model.js +247 -0
- package/ui/js/37-logs-and-watch.js +224 -0
- package/ui/shell.html +112 -0
- package/ui/style.css +350 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
// ---------- Worked examples for the Transform lab and the Workflow lab ----------
|
|
2
|
+
// Each transform example fills every box: the transform, the input value, identity attributes,
|
|
3
|
+
// accounts and, for references, the other transforms it uses. Values are made up.
|
|
4
|
+
var LAB_HR_ACCOUNT = { source: 'Workday', nativeIdentity: '100234', created: '2024-03-01T09:00:00Z', attributes: { firstName: 'José', lastName: 'García Núñez', department: 'FIN', workerType: 'Employee', startDate: '2025-01-06', email: 'jose.garcia@acme.com' } };
|
|
5
|
+
var LAB_AD_ACCOUNTS = [
|
|
6
|
+
{ source: 'Active Directory', nativeIdentity: 'CN=adm_jgarcia,OU=Admins,DC=acme,DC=com', name: 'adm_jgarcia', created: '2024-02-01T09:00:00Z', attributes: { sAMAccountName: 'adm_jgarcia', mail: 'adm_jgarcia@acme.com' } },
|
|
7
|
+
{ source: 'Active Directory', nativeIdentity: 'CN=jgarcia,OU=Users,DC=acme,DC=com', name: 'jgarcia', created: '2024-03-02T09:00:00Z', attributes: { sAMAccountName: 'jgarcia', mail: 'jose.garcia@acme.com' } },
|
|
8
|
+
];
|
|
9
|
+
var LAB_IDENTITY = { firstname: 'José', lastname: 'García Núñez', department: 'Finance', email: 'jose.garcia@acme.com' };
|
|
10
|
+
var CLEAN_NAME = { name: 'Clean Name', type: 'lower', attributes: { input: { type: 'replace', attributes: { regex: '[^A-Za-z]', replacement: '', input: { type: 'decomposeDiacriticalMarks', attributes: {} } } } } };
|
|
11
|
+
var TRANSFORM_EXAMPLES = [
|
|
12
|
+
{
|
|
13
|
+
title: 'Account attribute from one source',
|
|
14
|
+
help: 'accountAttribute reads a value from the person\'s account on a source. Put the account in the Accounts box: "source" is the source name the transform asks for, "attributes" are the account\'s attributes.',
|
|
15
|
+
transform: { type: 'accountAttribute', attributes: { sourceName: 'Workday', attributeName: 'department' } },
|
|
16
|
+
accounts: [LAB_HR_ACCOUNT],
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
title: 'Pick one of several accounts',
|
|
20
|
+
help: 'With more than one account on a source, ISC takes the oldest unless you filter or sort. Here accountFilter skips the admin account. Remove the filter and run again to see the admin account picked instead.',
|
|
21
|
+
transform: { type: 'accountAttribute', attributes: { sourceName: 'Active Directory', attributeName: 'mail', accountFilter: '!(nativeIdentity.startsWith("CN=adm_"))' } },
|
|
22
|
+
accounts: LAB_AD_ACCOUNTS,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
title: 'Use another transform (reference)',
|
|
26
|
+
help: 'A reference runs another transform by name. IdentityScope looks for it first in Other transforms (your drafts), then in the tenant\'s saved transforms, so you can test a change to "Clean Name" before saving it. The trace shows the referenced steps indented.',
|
|
27
|
+
transform: { type: 'reference', attributes: { id: 'Clean Name', input: { type: 'accountAttribute', attributes: { sourceName: 'Workday', attributeName: 'lastName' } } } },
|
|
28
|
+
accounts: [LAB_HR_ACCOUNT],
|
|
29
|
+
drafts: [CLEAN_NAME],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
title: 'Chain of transforms: email from names',
|
|
33
|
+
help: 'Builds an email from first and last name, each cleaned by the "Clean Name" transform, with the domain picked from the department by a second transform, "Email Domain". Change "Clean Name" under Other transforms and run again: every transform that uses it changes too.',
|
|
34
|
+
transform: {
|
|
35
|
+
type: 'static',
|
|
36
|
+
attributes: {
|
|
37
|
+
fn: { type: 'reference', attributes: { id: 'Clean Name', input: { type: 'identityAttribute', attributes: { name: 'firstname' } } } },
|
|
38
|
+
ln: { type: 'reference', attributes: { id: 'Clean Name', input: { type: 'identityAttribute', attributes: { name: 'lastname' } } } },
|
|
39
|
+
domain: { type: 'reference', attributes: { id: 'Email Domain', input: { type: 'identityAttribute', attributes: { name: 'department' } } } },
|
|
40
|
+
value: '$fn.$ln@$domain',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
identity: LAB_IDENTITY,
|
|
44
|
+
drafts: [CLEAN_NAME, { name: 'Email Domain', type: 'lookup', attributes: { table: { Finance: 'acme.com', Research: 'labs.acme.com', default: 'acme.com' } } }],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
title: 'Lifecycle state from HR dates',
|
|
48
|
+
help: 'The classic joiner criteria: "active" from the start date on, "prehire" before. Change startDate in the account to a future date and run again. Dates are compared in GMT, as ISC does.',
|
|
49
|
+
transform: {
|
|
50
|
+
type: 'dateCompare',
|
|
51
|
+
attributes: {
|
|
52
|
+
firstDate: { type: 'dateFormat', attributes: { inputFormat: 'yyyy-MM-dd', outputFormat: 'ISO8601', input: { type: 'accountAttribute', attributes: { sourceName: 'Workday', attributeName: 'startDate' } } } },
|
|
53
|
+
secondDate: 'now',
|
|
54
|
+
operator: 'LTE',
|
|
55
|
+
positiveCondition: 'active',
|
|
56
|
+
negativeCondition: 'prehire',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
accounts: [LAB_HR_ACCOUNT],
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
title: 'Lookup table with a default',
|
|
63
|
+
help: 'lookup turns a code into a name. The input value box is what the identity profile mapping passes in; try "RND" and then a code that is not in the table to see the default.',
|
|
64
|
+
transform: { type: 'lookup', attributes: { table: { FIN: 'Finance', RND: 'Research', OPS: 'Operations', default: 'Unknown department' } } },
|
|
65
|
+
implicit: 'FIN',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
title: 'Conditional on an account value',
|
|
69
|
+
help: 'conditional compares two values with "eq" and returns one of two results. The variable $type is defined in the attributes from the HR account.',
|
|
70
|
+
transform: { type: 'conditional', attributes: { type: { type: 'accountAttribute', attributes: { sourceName: 'Workday', attributeName: 'workerType' } }, expression: '$type eq Employee', positiveCondition: 'E', negativeCondition: 'C' } },
|
|
71
|
+
accounts: [LAB_HR_ACCOUNT],
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
title: 'First value that exists',
|
|
75
|
+
help: 'firstValid returns the first value that is not empty: here the AD mail, then the HR email, then a fixed text. Empty the Accounts box to see the fallback.',
|
|
76
|
+
transform: { type: 'firstValid', attributes: { values: [
|
|
77
|
+
{ type: 'accountAttribute', attributes: { sourceName: 'Active Directory', attributeName: 'mail', accountFilter: '!(nativeIdentity.startsWith("CN=adm_"))' } },
|
|
78
|
+
{ type: 'accountAttribute', attributes: { sourceName: 'Workday', attributeName: 'email' } },
|
|
79
|
+
'no-email@acme.com',
|
|
80
|
+
], ignoreErrors: true } },
|
|
81
|
+
accounts: [LAB_HR_ACCOUNT].concat(LAB_AD_ACCOUNTS),
|
|
82
|
+
},
|
|
83
|
+
];
|
|
84
|
+
|
|
85
|
+
// Workflow examples: a definition, a trigger input in the shape SailPoint documents for that trigger,
|
|
86
|
+
// and outputs to pretend for steps that would call ISC or another system.
|
|
87
|
+
var TRIGGER_SAMPLES = [
|
|
88
|
+
{ title: 'Identity Attributes Changed', input: { identity: { type: 'IDENTITY', id: '2c91808568c529c60168cca6f90c1313', name: 'william.wilson' }, changes: [{ attribute: 'cloudLifecycleState', oldValue: 'active', newValue: 'inactive' }, { attribute: 'department', oldValue: 'Sales', newValue: 'Marketing' }] } },
|
|
89
|
+
{ title: 'Identity Created', input: { identity: { type: 'IDENTITY', id: '2c91808568c529c60168cca6f90c1313', name: 'william.wilson' }, attributes: { firstname: 'William', lastname: 'Wilson', email: 'william.wilson@acme.com', department: 'Sales', cloudLifecycleState: 'prehire' } } },
|
|
90
|
+
{ title: 'Access Request Submitted', input: { accessRequestId: '2c91808b6ef1d43e016efba0ce470904', requestedFor: { type: 'IDENTITY', id: '2c91808568c529c60168cca6f90c1313', name: 'William Wilson' }, requestedItems: [{ id: '2c91808b6ef1d43e016efba0ce470905', name: 'Engineering Access', description: 'Access to engineering database', type: 'ACCESS_PROFILE', operation: 'Add', comment: 'Needed for the project.' }], requestedBy: { type: 'IDENTITY', id: '2c91808568c529c60168cca6f90c1314', name: 'Rob Robertson' } } },
|
|
91
|
+
{ title: 'Account Aggregation Completed', input: { source: { type: 'SOURCE', id: '2c9180835d191a86015d28455b4b232a', name: 'HR Source' }, status: 'Error', started: '2026-11-20T22:01:50.474Z', completed: '2026-11-20T22:02:04.090Z', errors: ['Accounts unable to be aggregated.'], warnings: ['Account Skipped'], stats: { scanned: 200, unchanged: 190, changed: 6, added: 4, removed: 3 } } },
|
|
92
|
+
{ title: 'Scheduled or external (empty)', input: {} },
|
|
93
|
+
];
|
|
94
|
+
var WORKFLOW_EXAMPLES = [
|
|
95
|
+
{
|
|
96
|
+
title: 'Leaver: open a ticket when someone becomes inactive',
|
|
97
|
+
help: 'The comparison reads the changed lifecycle state with a JSONPath filter. Change "newValue" in the trigger to "active" and simulate again: the workflow takes the other branch and ends without the ticket.',
|
|
98
|
+
trigger: 0,
|
|
99
|
+
definition: { start: 'Is Leaver', steps: {
|
|
100
|
+
'Is Leaver': { type: 'choice', choiceList: [{ comparator: 'StringEquals', 'variableA.$': '$.trigger.changes[?(@.attribute == "cloudLifecycleState")].newValue', variableB: 'inactive', nextStep: 'Get Identity' }], defaultStep: 'End - Not a leaver' },
|
|
101
|
+
'Get Identity': { actionId: 'sp:get-identity', attributes: { 'id.$': '$.trigger.identity.id' }, nextStep: 'Open Ticket', type: 'action', versionNumber: 2 },
|
|
102
|
+
'Open Ticket': { actionId: 'sp:http', attributes: { method: 'post', url: 'https://acme.service-now.com/api/now/table/incident', authenticationType: 'OAuth', jsonRequestBody: { short_description: 'Leaver: {{$.getIdentity.attributes.displayName}}', manager: '{{$.getIdentity.attributes.manager.name}}' } }, nextStep: 'End - Ticket opened', type: 'action', versionNumber: 3 },
|
|
103
|
+
'End - Ticket opened': { type: 'success' },
|
|
104
|
+
'End - Not a leaver': { type: 'success' },
|
|
105
|
+
} },
|
|
106
|
+
mocks: { 'Get Identity': { id: '2c91808568c529c60168cca6f90c1313', attributes: { displayName: 'William Wilson', manager: { name: 'Rob Robertson' } } } },
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
title: 'Joiner: welcome email with a built variable',
|
|
110
|
+
help: 'Define Variable builds a value from the trigger (here the first letter of the first name and the last name). Steps that read ISC, like Get Identity, are pretended with the output in the third box: edit it to try another person.',
|
|
111
|
+
trigger: 1,
|
|
112
|
+
definition: { start: 'Get Identity', steps: {
|
|
113
|
+
'Get Identity': { actionId: 'sp:get-identity', attributes: { 'id.$': '$.trigger.identity.id' }, nextStep: 'Define Variable', type: 'action', versionNumber: 2 },
|
|
114
|
+
'Define Variable': { actionId: 'sp:define-variable', attributes: { id: 'sp:define-variable', variables: [{ name: 'Login', 'variableA.$': '$.trigger.attributes.firstname', transforms: [{ id: 'sp:transform:substring:string', input: { start: 0, length: 1 } }, { id: 'sp:transform:concatenate:string', input: { 'variableB.$': '$.trigger.attributes.lastname' } }, { id: 'sp:transform:lower:string', input: {} }] }] }, nextStep: 'Has Manager', type: 'Mutation' },
|
|
115
|
+
'Has Manager': { type: 'choice', choiceList: [{ comparator: 'StringEquals', 'variableA.$': '$.getIdentity.attributes.manager.email', variableB: '', nextStep: 'End - No manager' }], defaultStep: 'Send Email' },
|
|
116
|
+
'Send Email': { actionId: 'sp:send-email', attributes: { 'recipientEmailList.$': '$.getIdentity.attributes.manager.email', subject: 'Welcome {{$.trigger.attributes.firstname}}', body: 'Login: {{$.defineVariable.login}}' }, nextStep: 'End', type: 'action', versionNumber: 2 },
|
|
117
|
+
'End': { type: 'success' },
|
|
118
|
+
'End - No manager': { type: 'failure' },
|
|
119
|
+
} },
|
|
120
|
+
mocks: { 'Get Identity': { id: '2c91808568c529c60168cca6f90c1313', attributes: { displayName: 'William Wilson', manager: { name: 'Rob Robertson', email: 'rob.robertson@acme.com' } } } },
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
title: 'Loop over every changed attribute',
|
|
124
|
+
help: 'A loop runs its own steps once per item; inside it, the item is $.loop.loopInput. The simulator runs the first five items and shows each one.',
|
|
125
|
+
trigger: 0,
|
|
126
|
+
definition: { start: 'For Each Change', steps: {
|
|
127
|
+
'For Each Change': { actionId: 'sp:loop:iterator', attributes: { 'input.$': '$.trigger.changes', start: 'Is Department', steps: {
|
|
128
|
+
'Is Department': { type: 'choice', choiceList: [{ comparator: 'StringEquals', 'variableA.$': '$.loop.loopInput.attribute', variableB: 'department', nextStep: 'Notify' }], defaultStep: 'Skip' },
|
|
129
|
+
'Notify': { actionId: 'sp:send-email', attributes: { recipientEmailList: ['iam-team@acme.com'], subject: 'Department changed to {{$.loop.loopInput.newValue}}' }, nextStep: 'Done', type: 'action', versionNumber: 2 },
|
|
130
|
+
'Done': { type: 'success' },
|
|
131
|
+
'Skip': { type: 'success' },
|
|
132
|
+
} }, nextStep: 'End', type: 'action', versionNumber: 1 },
|
|
133
|
+
'End': { type: 'success' },
|
|
134
|
+
} },
|
|
135
|
+
mocks: {},
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
title: 'Alert when an aggregation fails',
|
|
139
|
+
help: 'Uses the Account Aggregation Completed trigger. Set "status" in the trigger to "Success" and simulate again: no email.',
|
|
140
|
+
trigger: 3,
|
|
141
|
+
definition: { start: 'Failed?', steps: {
|
|
142
|
+
'Failed?': { type: 'choice', choiceList: [{ comparator: 'StringEquals', 'variableA.$': '$.trigger.status', variableB: 'Error', nextStep: 'Alert' }], defaultStep: 'End' },
|
|
143
|
+
'Alert': { actionId: 'sp:send-email', attributes: { recipientEmailList: ['iam-team@acme.com'], subject: 'Aggregation of {{$.trigger.source.name}} failed', body: '{{$.trigger.errors}}' }, nextStep: 'End', type: 'action', versionNumber: 2 },
|
|
144
|
+
'End': { type: 'success' },
|
|
145
|
+
} },
|
|
146
|
+
mocks: {},
|
|
147
|
+
},
|
|
148
|
+
];
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// ---------- Quick finder: every page, tab and report in one search (Ctrl+K) ----------
|
|
2
|
+
// Each entry: [label, where it is, extra words people search for, how to go there].
|
|
3
|
+
function finderEntries() {
|
|
4
|
+
var go = function (page, set) { return function () { if (set) set(); showPage(page); }; };
|
|
5
|
+
var tab = function (obj, key, id) { return function () { obj()[key] = id; }; };
|
|
6
|
+
var list = [
|
|
7
|
+
['Reports', 'All reports, by category', 'library run schedule export', go('reports')],
|
|
8
|
+
['Instant check', 'Health tiles for the whole tenant', 'dashboard tiles health status overview', go('checks')],
|
|
9
|
+
['Schedules', 'Reports sent by email or chat on a schedule', 'email teams slack webhook daily weekly', go('schedules')],
|
|
10
|
+
];
|
|
11
|
+
var add = function (page, pageLabel, holder, key, tabs) {
|
|
12
|
+
tabs.forEach(function (t) { list.push([t[1], pageLabel + ' > ' + t[1], (t[2] || '') + ' ' + pageLabel, go(page, tab(holder, key, t[0]))]); });
|
|
13
|
+
};
|
|
14
|
+
add('warnings', 'Warnings', wnState, 'tab', WN_TABS.map(function (t) { return [t[0], t[1], t[3]]; }));
|
|
15
|
+
add('lookup', 'Lookup', function () { return state.lk; }, 'tab', [['person', 'Person', 'user identity everything one person has accounts access requests events'], ['source', 'Source', 'application connector errors aggregation'], ['ownership', 'Ownership', 'owners owner left without owner']]);
|
|
16
|
+
add('tenant', 'Tenant', function () { return state.tn; }, 'tab', [
|
|
17
|
+
['overview', 'Overview', 'counts sources identities size'], ['clusters', 'Virtual Appliances', 'va cluster health'],
|
|
18
|
+
['workflows', 'Workflows', 'workflow health runs failures failed causes errors trends'], ['transforms', 'Transforms', 'transform impact where used unused references provisioning policies'],
|
|
19
|
+
['credentials', 'API credentials', 'pat personal access token oauth client expiry expiring'], ['cmap', 'Credential map', 'client id secret rotate promote parameter storage servicenow http'],
|
|
20
|
+
['compare', 'Compare tenants', 'sandbox production diff rules cloud rules connector rules promote'], ['rules', 'Rule usage', 'unused rules cleanup connector rule cloud rule where used missing']]);
|
|
21
|
+
add('logs', 'Logs', lgState, 'tab', LG_TABS.map(function (t) { return [t[0], t[1], t[3] + ' log ccg virtual appliance va connector error aggregation']; }));
|
|
22
|
+
add('nerm', 'Non-employees', nmState, 'tab', NM_TABS.map(function (t) { return [t[0], t[1], t[3] + ' nerm contractor vendor sponsor non-employee risk management']; }));
|
|
23
|
+
add('build', 'Build & test', function () { return state.bt; }, 'tab', BUILD_TABS.map(function (t) {
|
|
24
|
+
return [t[0], t[1], { tlab: 'transform test velocity offline try draft reference account attribute', policy: 'provisioning policy create account preview joiner fields', wlab: 'workflow simulate trigger replay test without disabling' }[t[0]]];
|
|
25
|
+
}));
|
|
26
|
+
add('certs', 'Audit', function () { return state.au; }, 'tab', [
|
|
27
|
+
['certs', 'Certifications', 'campaigns reviewers progress rubber stamp'], ['outmodel', 'Outside roles', 'entitlements not assigned via roles direct access standalone birthright outside the model'], ['composition', 'What is in every role', 'role composition entitlements by role access profiles breakdown export'], ['reassigned', 'Reassigned reviews', 'certification reassignment forwarded delegated reviewer'], ['sod', 'Separation of duties', 'sod toxic conflicts rules'],
|
|
28
|
+
['coverage', 'Review coverage', 'certified access never reviewed'], ['outliers', 'Access outliers', 'peer unusual compared with peers'],
|
|
29
|
+
['speed', 'Provisioning speed', 'slow removals how long'], ['adminaccts', 'Admin accounts', 'privileged admin service test accounts linked'],
|
|
30
|
+
['exceptions', 'Exceptions', 'accepted risk exception register'], ['trail', 'Request trail', 'access request approvals approver comment decision audit history who approved'], ['chain', 'Approver chain', 'approval schemes who approves governance group revoke approval'], ['leavertimes', 'Leaver removal times', 'termination leaver sla disabled how long per person'], ['attrhist', 'Attribute changes', 'manager change department title history who changed'], ['owners', 'Entitlement owners', 'owner review holders who has my entitlement'], ['changes', 'Change history', 'snapshot drift baseline approved release what changed'],
|
|
31
|
+
['evidence', 'Evidence pack', 'auditor zip excel evidence']]);
|
|
32
|
+
add('roles', 'Role tools', function () { return state; }, 'roleTab', [['compare', 'Compare roles', 'role differences'], ['impact', 'Preview a role change', 'criteria membership who gains loses simulate'], ['mining', 'Find candidate roles', 'role mining common access']]);
|
|
33
|
+
add('monthly', 'Insights', function () { return state.inz; }, 'tab', [['monthly', 'Monthly report', 'management summary trend'], ['reclaim', 'License reclaim', 'cost dormant licenses save money'], ['requests', 'Access requests', 'approvers requested reject rate']]);
|
|
34
|
+
(state.reports || []).forEach(function (r) {
|
|
35
|
+
var d = r.definition || r;
|
|
36
|
+
if (!d || !d.name) return;
|
|
37
|
+
list.push([d.name, 'Report · ' + (d.category || ''), (d.description || '') + ' ' + (d.tags || []).join(' '), function () { showPage('reports'); loadLibrary(d.id); }]);
|
|
38
|
+
});
|
|
39
|
+
return list;
|
|
40
|
+
}
|
|
41
|
+
function finderScore(e, words) {
|
|
42
|
+
var name = String(e[0]).toLowerCase(), hay = (e[0] + ' ' + e[1] + ' ' + (e[2] || '')).toLowerCase(), score = 0;
|
|
43
|
+
for (var i = 0; i < words.length; i++) {
|
|
44
|
+
var w = words[i];
|
|
45
|
+
if (hay.indexOf(w) < 0) return -1;
|
|
46
|
+
score += name.indexOf(w) === 0 ? 6 : name.indexOf(w) >= 0 ? 4 : String(e[1]).toLowerCase().indexOf(w) >= 0 ? 2 : 1;
|
|
47
|
+
}
|
|
48
|
+
return score;
|
|
49
|
+
}
|
|
50
|
+
function openFinder() {
|
|
51
|
+
if ($('btn-help').classList.contains('hidden') || document.querySelector('.finder')) return;
|
|
52
|
+
var entries = finderEntries(), sel = 0, shown = [];
|
|
53
|
+
var before = document.activeElement;
|
|
54
|
+
var input = el('input', { className: 'input', placeholder: 'Find a page, tab or report...', 'aria-label': 'Find a page, tab or report', role: 'combobox', 'aria-expanded': 'true', 'aria-controls': 'finder-list', autocomplete: 'off' });
|
|
55
|
+
var listBox = el('ul', { id: 'finder-list', role: 'listbox', className: 'finder-list', 'aria-label': 'Matches' });
|
|
56
|
+
var back = el('div', { className: 'finder-back' });
|
|
57
|
+
var box = el('div', { className: 'finder', role: 'dialog', 'aria-modal': 'true', 'aria-label': 'Find' }, input, listBox,
|
|
58
|
+
el('div', { className: 'muted small', style: 'padding:8px 12px', text: '↑ ↓ to move, Enter to open, Esc to close' }));
|
|
59
|
+
back.appendChild(box);
|
|
60
|
+
var close = function () { back.remove(); if (before && before.focus) before.focus(); };
|
|
61
|
+
var pick = function (e) { close(); e[3](); };
|
|
62
|
+
var draw = function () {
|
|
63
|
+
var words = input.value.toLowerCase().split(/\s+/).filter(Boolean);
|
|
64
|
+
shown = words.length ? entries.map(function (e) { return [finderScore(e, words), e]; }).filter(function (x) { return x[0] >= 0; }).sort(function (a, b) { return b[0] - a[0] || String(a[1][0]).length - String(b[1][0]).length; }).slice(0, 12).map(function (x) { return x[1]; }) : entries.slice(0, 12);
|
|
65
|
+
sel = Math.min(sel, Math.max(0, shown.length - 1));
|
|
66
|
+
listBox.textContent = '';
|
|
67
|
+
shown.forEach(function (e, i) {
|
|
68
|
+
var li = el('li', { id: 'finder-opt-' + i, role: 'option', className: 'finder-opt' + (i === sel ? ' active' : ''), 'aria-selected': i === sel ? 'true' : 'false' }, el('b', { text: e[0] }), el('span', { className: 'muted small', text: e[1] }));
|
|
69
|
+
li.addEventListener('mousedown', function (ev) { ev.preventDefault(); pick(e); });
|
|
70
|
+
listBox.appendChild(li);
|
|
71
|
+
});
|
|
72
|
+
if (!shown.length) listBox.appendChild(el('li', { className: 'muted', style: 'padding:10px 12px', text: 'Nothing matches.' }));
|
|
73
|
+
input.setAttribute('aria-activedescendant', shown.length ? 'finder-opt-' + sel : '');
|
|
74
|
+
};
|
|
75
|
+
input.addEventListener('input', function () { sel = 0; draw(); });
|
|
76
|
+
input.addEventListener('keydown', function (ev) {
|
|
77
|
+
if (ev.key === 'ArrowDown') { sel = Math.min(sel + 1, shown.length - 1); draw(); ev.preventDefault(); }
|
|
78
|
+
else if (ev.key === 'ArrowUp') { sel = Math.max(sel - 1, 0); draw(); ev.preventDefault(); }
|
|
79
|
+
else if (ev.key === 'Enter' && shown[sel]) { pick(shown[sel]); ev.preventDefault(); }
|
|
80
|
+
else if (ev.key === 'Escape') { close(); ev.preventDefault(); }
|
|
81
|
+
});
|
|
82
|
+
back.addEventListener('mousedown', function (ev) { if (ev.target === back) close(); });
|
|
83
|
+
document.body.appendChild(back);
|
|
84
|
+
draw();
|
|
85
|
+
input.focus();
|
|
86
|
+
}
|
|
87
|
+
document.addEventListener('keydown', function (ev) {
|
|
88
|
+
if ((ev.ctrlKey || ev.metaKey) && !ev.altKey && (ev.key === 'k' || ev.key === 'K')) { ev.preventDefault(); openFinder(); }
|
|
89
|
+
});
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
// ---------- 0.22.0: access request audit trail, approver chain, accounts expiring, revokes not done, person timeline ----------
|
|
2
|
+
function gvState() {
|
|
3
|
+
if (!state.gv) state.gv = { trail: { days: 30, item: '', person: '' }, chain: {}, expiry: { days: 30, attribute: 'accountExpires', sourceIds: [] }, revokes: { days: 90 } };
|
|
4
|
+
return state.gv;
|
|
5
|
+
}
|
|
6
|
+
function gvRunBar(w, H, path, label, desc, extras, body, rerender) {
|
|
7
|
+
w.appendChild(el('div', { className: 'bar', style: 'margin-bottom:14px' }, el('span', { className: 'muted', style: 'flex:1;min-width:260px', text: desc }), extras || null,
|
|
8
|
+
el('button', { className: 'btn primary', disabled: !!H.busy, onclick: function () { runJobInto(H, '/api/warnings/' + path + '/run', body ? body() : {}, rerender); } }, icon('play'), H.data ? 'Read again' : label)));
|
|
9
|
+
if (H.busy) { w.appendChild(busyBox(H.busy)); return false; }
|
|
10
|
+
if (H.error) { w.appendChild(el('div', { className: 'error', text: H.error })); return false; }
|
|
11
|
+
if (!H.data) return false;
|
|
12
|
+
(H.data.notes || []).forEach(function (n) { w.appendChild(el('div', { className: 'note', text: n })); });
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
function gvText(H, key, label, placeholder) {
|
|
16
|
+
var i = el('input', { className: 'input', value: H[key] || '', placeholder: placeholder, style: 'max-width:200px', 'aria-label': label });
|
|
17
|
+
i.addEventListener('input', function () { H[key] = i.value; });
|
|
18
|
+
return el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: label }), i);
|
|
19
|
+
}
|
|
20
|
+
function gvTime(s) { return s ? String(s).slice(0, 16).replace('T', ' ') : ''; }
|
|
21
|
+
var GV_DECISION = { APPROVED: 'win', REJECTED: 'lose', PENDING: 'off', EXPIRED: 'lose', CANCELLED: 'off' };
|
|
22
|
+
var GV_OUTCOME = { completed: ['completed', 'win'], rejected: ['rejected', 'lose'], cancelled: ['cancelled', 'off'], failed: ['failed', 'lose'], open: ['in progress', 'off'] };
|
|
23
|
+
|
|
24
|
+
// Audit > Request trail
|
|
25
|
+
function renderRequestTrail(w) {
|
|
26
|
+
var H = gvState().trail;
|
|
27
|
+
var extras = el('div', { className: 'bar' },
|
|
28
|
+
el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'Submitted in the last' }), numSelect(H, 'days', [[7, '7 days'], [30, '30 days'], [90, '90 days'], [180, '180 days'], [365, '365 days']], 'Period')),
|
|
29
|
+
gvText(H, 'item', 'Access item contains', 'e.g. VPN'), gvText(H, 'person', 'Person contains', 'requester or recipient'));
|
|
30
|
+
if (!gvRunBar(w, H, 'request-trail', 'Build the trail', 'Every access request with each approval step: who decided, the decision, their comment and when, and how provisioning ended. One row per step in the download, ready for auditors.', extras,
|
|
31
|
+
function () { return { days: H.days, item: H.item || undefined, person: H.person || undefined }; }, renderAudit)) return;
|
|
32
|
+
var d = H.data, T = d.totals;
|
|
33
|
+
w.appendChild(el('div', { className: 'bigstats' }, stat(T.requests, 'requests'), stat(T.completed, 'completed'), stat(T.rejected, 'rejected', 'lose'), stat(T.failed, 'failed', 'lose'), stat(T.open, 'in progress'), stat(T.withoutApproval, 'without an approval step'),
|
|
34
|
+
stat(T.decisions ? Math.round(T.decisionsWithComment * 100 / T.decisions) : 0, '% of decisions with a comment')));
|
|
35
|
+
if (!d.requests.length) return;
|
|
36
|
+
if ((d.approvers || []).length) w.appendChild(section('How fast approvers decide', d.approvers.length, simpleTable(['Approver', 'Decisions', 'Usual time', 'Slowest', 'Waiting now', 'Oldest waiting'], d.approvers.slice(0, 200).map(function (a) {
|
|
37
|
+
return [a.approver, fmtNum(a.decided), hrs(a.medianHours), hrs(a.slowestHours), a.waiting ? pill(String(a.waiting), 'lose') : '0', a.oldestWaitingDays === null ? '—' : a.oldestWaitingDays + ' days'];
|
|
38
|
+
}), 'How fast approvers decide')));
|
|
39
|
+
var rows = d.requests.map(function (r) {
|
|
40
|
+
var o = GV_OUTCOME[r.outcome] || [r.outcome, 'off'];
|
|
41
|
+
var steps = r.steps.length ? el('div', {}, r.steps.map(function (s) {
|
|
42
|
+
return el('div', { style: 'margin:2px 0' }, el('b', { text: s.step + '. ' }), s.approver || '?', s.originalApprover ? el('span', { className: 'muted', text: ' (was ' + s.originalApprover + ')' }) : null, ' ',
|
|
43
|
+
pill(s.decision.toLowerCase(), GV_DECISION[s.decision] || 'off'), s.decided ? el('span', { className: 'muted small', text: ' ' + gvTime(s.decided) }) : null,
|
|
44
|
+
s.comment ? el('div', { className: 'small', style: 'margin-left:16px;font-style:italic', text: '“' + s.comment + '”' }) : null);
|
|
45
|
+
})) : el('span', { className: 'muted', text: 'No approval step' });
|
|
46
|
+
return { r: r, cells: [gvTime(r.submitted), r.requestedFor, r.requestedBy, el('span', {}, r.access, r.accessType ? el('span', { className: 'muted small', text: ' ' + r.accessType.toLowerCase().replace('_', ' ') }) : null, r.requestType === 'REVOKE_ACCESS' ? el('span', {}, ' ', pill('revoke', 'lose')) : null),
|
|
47
|
+
r.requesterComment ? el('span', { className: 'small', style: 'font-style:italic', text: '“' + r.requesterComment + '”' }) : '', steps, el('span', {}, pill(o[0], o[1]), r.errors.length ? el('div', { className: 'small', style: 'color:var(--bad)', text: r.errors.join('; ') }) : null)] };
|
|
48
|
+
});
|
|
49
|
+
w.appendChild(section('Requests', d.requests.length + (d.more || 0), filteredTable(H, rows, ['Submitted', 'Requested for', 'Requested by', 'Access', 'Requester comment', 'Approvals', 'Outcome'], function (x) { return x.cells; }, 'Access request audit trail')));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Audit > Approver chain
|
|
53
|
+
function renderApproverChain(w) {
|
|
54
|
+
var H = gvState().chain;
|
|
55
|
+
if (!gvRunBar(w, H, 'approver-chain', 'Read approval settings', 'Who approves a request, in what order, and who approves a revoke, for every access profile, role and requestable entitlement. Flags requestable access that needs no approval or whose approver cannot be reached.', null, null, renderAudit)) return;
|
|
56
|
+
var d = H.data, T = d.totals;
|
|
57
|
+
w.appendChild(el('div', { className: 'bigstats' }, stat(T.accessProfiles, 'access profiles'), stat(T.roles, 'roles'), stat(T.entitlements, 'requestable entitlements'), stat(T.noApproval, 'requestable without approval', 'lose'), stat(T.flagged, 'with a problem', 'lose')));
|
|
58
|
+
var list = function (xs) { return xs.length ? el('div', {}, xs.map(function (x) { return el('div', { text: x }); })) : el('span', { className: 'muted', text: 'none' }); };
|
|
59
|
+
var H2 = H.view || (H.view = { only: 'requestable' });
|
|
60
|
+
var only = el('select', { className: 'input', style: 'width:auto', 'aria-label': 'Show' }, [['requestable', 'Requestable only'], ['problems', 'Only with problems'], ['all', 'Everything']].map(function (o) { return el('option', { value: o[0], text: o[1] }); }));
|
|
61
|
+
only.value = H2.only;
|
|
62
|
+
only.addEventListener('change', function () { H2.only = only.value; renderAudit(); });
|
|
63
|
+
var rows = d.rows.filter(function (r) { return H2.only === 'all' || (H2.only === 'problems' ? r.flags.length : r.requestable); });
|
|
64
|
+
w.appendChild(section('Approval settings', rows.length, filteredTable(H, rows, ['Type', 'Name', 'Source', 'Owner', 'Request approvals', 'Revoke approvals', 'Comment required', 'Problems'], function (r) {
|
|
65
|
+
return [r.type, r.name, r.source, r.owner, list(r.request), list(r.revoke), r.commentsRequired ? 'Yes' : 'No', r.flags.length ? el('div', {}, r.flags.map(function (f) { return el('div', { className: 'small', style: 'color:var(--bad)', text: f }); })) : ''];
|
|
66
|
+
}, 'Approver chain', only)));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Warnings > Accounts expiring
|
|
70
|
+
function wnExpiry(w, _H, desc) {
|
|
71
|
+
var H = gvState().expiry;
|
|
72
|
+
if (!H.sources) {
|
|
73
|
+
H.sources = 'loading';
|
|
74
|
+
api('/api/sources').then(function (r) { H.sources = (r.sources || []).slice().sort(function (a, b) { return String(a.name).localeCompare(String(b.name)); }); }, function () { H.sources = []; }).then(function () { if (state.page === 'warnings') renderWarnings(); });
|
|
75
|
+
}
|
|
76
|
+
var pick = el('select', { className: 'input', multiple: true, size: 4, style: 'min-width:220px', 'aria-label': 'Sources to check' }, (Array.isArray(H.sources) ? H.sources : []).map(function (s) {
|
|
77
|
+
return el('option', { value: s.id, text: s.name, selected: H.sourceIds.indexOf(s.id) >= 0 });
|
|
78
|
+
}));
|
|
79
|
+
if (!H.sourceIds.length && Array.isArray(H.sources)) {
|
|
80
|
+
var ad = H.sources.filter(function (s) { return /active directory|\bad\b/i.test(s.name + ' ' + (s.type || '')); })[0];
|
|
81
|
+
if (ad) { H.sourceIds = [ad.id]; Array.prototype.forEach.call(pick.options, function (o) { o.selected = o.value === ad.id; }); }
|
|
82
|
+
}
|
|
83
|
+
pick.addEventListener('change', function () { H.sourceIds = Array.prototype.filter.call(pick.options, function (o) { return o.selected; }).map(function (o) { return o.value; }); });
|
|
84
|
+
var extras = el('div', { className: 'bar' },
|
|
85
|
+
el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'Sources (Ctrl+click for more)' }), pick),
|
|
86
|
+
attrInput(H, 'attribute', 'Expiry attribute', 'accountExpires'),
|
|
87
|
+
el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'Expiring within' }), numSelect(H, 'days', [[7, '7 days'], [14, '14 days'], [30, '30 days'], [60, '60 days'], [90, '90 days']], 'Expiring within')));
|
|
88
|
+
if (!gvRunBar(w, H, 'account-expiry', 'Find expiring accounts', desc, extras, function () { return { days: H.days, attribute: H.attribute || 'accountExpires', sourceIds: H.sourceIds }; }, renderWarnings)) return;
|
|
89
|
+
var d = H.data, T = d.totals;
|
|
90
|
+
w.appendChild(el('div', { className: 'bigstats' }, stat(T.accounts, 'accounts read'), stat(T.withDate, 'with an expiry date'), stat(T.never, 'set to never expire'), stat(T.missing, 'without a value'), stat(T.expiring, 'expire in the next ' + d.days + ' days', 'lose'), stat(T.expiredEnabled, 'expired but still enabled', 'lose'), stat(T.unreadable, 'values not readable as a date')));
|
|
91
|
+
if (!d.rows.length) { w.appendChild(el('p', { className: 'muted', text: 'No account expires in this period.' })); return; }
|
|
92
|
+
w.appendChild(section('Accounts', d.rows.length + (d.more || 0), filteredTable(H, d.rows, ['Account', 'Person', 'Source', 'Expires', 'When', 'Account'], function (r) {
|
|
93
|
+
return [r.account, r.person || el('span', { className: 'muted', text: 'not linked to a person' }), r.source, r.expires, pill(daysText(r.daysLeft), r.daysLeft <= 7 ? 'lose' : 'off'), r.disabled ? 'disabled' : 'enabled'];
|
|
94
|
+
}, 'Accounts expiring')));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Warnings > Revokes not done
|
|
98
|
+
function wnRevokes(w, _H, desc) {
|
|
99
|
+
var H = gvState().revokes;
|
|
100
|
+
var extras = el('label', { className: 'field', style: 'margin:0' }, el('span', { className: 'lbl', text: 'Campaigns created in the last' }), numSelect(H, 'days', [[30, '30 days'], [90, '90 days'], [180, '180 days'], [365, '365 days']], 'Campaign period'));
|
|
101
|
+
if (!gvRunBar(w, H, 'revokes', 'Check revokes', desc, extras, function () { return { days: H.days }; }, renderWarnings)) return;
|
|
102
|
+
var d = H.data, T = d.totals;
|
|
103
|
+
w.appendChild(el('div', { className: 'bigstats' }, stat(d.campaigns, 'campaigns checked'), stat(T.revokes, 'revoke decisions'), stat(T.removed, 'removed'), stat(T.stillHeld, 'signed off but still held', 'lose'), stat(T.notSignedOff, 'waiting for sign-off')));
|
|
104
|
+
if (!d.rows.length) { w.appendChild(el('p', { className: 'muted', text: 'Every revoked item has been removed.' })); return; }
|
|
105
|
+
w.appendChild(section('Revoked but still there', d.rows.length + (d.more || 0), filteredTable(H, d.rows, ['Person', 'Access', 'Type', 'Campaign', 'Reviewer', 'Signed off', 'Status'], function (r) {
|
|
106
|
+
return [r.person, r.access, r.accessType, r.campaign, r.reviewer, r.signedOff ? r.signedOff.slice(0, 10) + (r.daysSinceSignOff !== null ? ' (' + r.daysSinceSignOff + ' days ago)' : '') : '—',
|
|
107
|
+
el('span', {}, pill(r.status, r.status === 'still held' ? 'lose' : 'off'), r.alsoFromRole ? el('div', { className: 'small muted', text: 'May also come from a role or access profile' }) : null)];
|
|
108
|
+
}, 'Revoked but still held')));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Person lookup > Timeline
|
|
112
|
+
function timelineSection(p) {
|
|
113
|
+
var items = p.timeline || [];
|
|
114
|
+
var L = state.tl || (state.tl = { kind: '' });
|
|
115
|
+
var kinds = ['Identity', 'Lifecycle', 'Audit event', 'Account change', 'Access request'];
|
|
116
|
+
var sel = el('select', { className: 'input', style: 'width:auto', 'aria-label': 'Show in timeline' }, [el('option', { value: '', text: 'Everything' })].concat(kinds.map(function (k) { return el('option', { value: k, text: k }); })));
|
|
117
|
+
sel.value = L.kind;
|
|
118
|
+
var box = el('div');
|
|
119
|
+
var draw = function () {
|
|
120
|
+
box.textContent = '';
|
|
121
|
+
var list = items.filter(function (x) { return !L.kind || x.kind === L.kind; });
|
|
122
|
+
box.appendChild(simpleTable(['When', 'Kind', 'What', 'Detail', 'Status'], list.slice(0, 500).map(function (x) {
|
|
123
|
+
return [gvTime(x.when), x.kind, x.what, x.detail, x.status ? pill(String(x.status).toLowerCase(), x.failed ? 'lose' : 'off') : ''];
|
|
124
|
+
}), 'Timeline'));
|
|
125
|
+
};
|
|
126
|
+
sel.addEventListener('change', function () { L.kind = sel.value; draw(); });
|
|
127
|
+
draw();
|
|
128
|
+
return section('Timeline (30 days, newest first)', items.length, el('div', {}, el('div', { className: 'bar', style: 'margin-bottom:8px' }, sel, el('span', { className: 'muted small', text: 'Lifecycle changes, audit events, account changes and access requests in one list.' })), box));
|
|
129
|
+
}
|