identityscope 0.0.0-stage → 0.28.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +917 -3
- 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,18 @@
|
|
|
1
|
+
id: role-membership-counts
|
|
2
|
+
name: Members per role
|
|
3
|
+
description: >-
|
|
4
|
+
How many people hold each role. Roles nobody holds do not appear here; compare with the full
|
|
5
|
+
role list to find them.
|
|
6
|
+
category: Access model
|
|
7
|
+
tags: [roles, overview]
|
|
8
|
+
from:
|
|
9
|
+
dataset: identities
|
|
10
|
+
expand:
|
|
11
|
+
path: identity.access
|
|
12
|
+
as: access
|
|
13
|
+
where: { field: access.type, op: eq, value: ROLE }
|
|
14
|
+
group:
|
|
15
|
+
by: [access.displayName]
|
|
16
|
+
countLabel: Members
|
|
17
|
+
columns:
|
|
18
|
+
- { field: access.displayName, label: Role }
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
id: roles-without-owner
|
|
2
|
+
name: Roles without an owner
|
|
3
|
+
description: Roles with no owner, so role approvals and reviews have nobody to go to.
|
|
4
|
+
category: Access model
|
|
5
|
+
tags: [ownership, governance]
|
|
6
|
+
from:
|
|
7
|
+
dataset: roles
|
|
8
|
+
where: { field: role.owner, op: missing }
|
|
9
|
+
columns:
|
|
10
|
+
- { field: role.name, label: Role }
|
|
11
|
+
- { field: role.description, label: Description }
|
|
12
|
+
- { field: role.enabled, label: Enabled, format: boolean }
|
|
13
|
+
- { field: role.requestable, label: Requestable, format: boolean }
|
|
14
|
+
- { field: role.accessProfileCount, label: Access profiles, format: number }
|
|
15
|
+
- { field: role.entitlementCount, label: Entitlements, format: number }
|
|
16
|
+
- { field: role.modified, label: Last changed, format: date }
|
|
17
|
+
sort: [role.name]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
id: sources-needing-attention
|
|
2
|
+
name: Sources without an owner or in error
|
|
3
|
+
description: >-
|
|
4
|
+
Sources that have no owner, or whose health status is an error or failure. Sources ISC has not
|
|
5
|
+
checked yet are not counted as errors.
|
|
6
|
+
category: Hygiene
|
|
7
|
+
tags: [governance, operations]
|
|
8
|
+
from:
|
|
9
|
+
dataset: sources
|
|
10
|
+
where:
|
|
11
|
+
any:
|
|
12
|
+
- { field: source.owner, op: missing }
|
|
13
|
+
- { field: source.status, op: startsWith, value: SOURCE_STATE_ERROR }
|
|
14
|
+
- { field: source.status, op: startsWith, value: SOURCE_STATE_FAILURE }
|
|
15
|
+
columns:
|
|
16
|
+
- { field: source.name, label: Source }
|
|
17
|
+
- { field: source.connectorName, label: Connector }
|
|
18
|
+
- { field: source.owner.name, label: Owner, default: None }
|
|
19
|
+
- { field: source.status, label: Status }
|
|
20
|
+
- { field: source.healthy, label: Healthy flag, format: boolean }
|
|
21
|
+
- { field: source.authoritative, label: Authoritative, format: boolean }
|
|
22
|
+
- { field: source.modified, label: Last changed, format: date }
|
|
23
|
+
sort: [source.name]
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
id: stuck-access-requests
|
|
2
|
+
name: Access requests stuck in progress
|
|
3
|
+
description: >-
|
|
4
|
+
Access requests that are still running after the given number of days, with who they are waiting
|
|
5
|
+
on. Needs an org admin's token.
|
|
6
|
+
category: Requests
|
|
7
|
+
tags: [operations, helpdesk]
|
|
8
|
+
params:
|
|
9
|
+
olderThanDays:
|
|
10
|
+
type: number
|
|
11
|
+
description: Only requests older than this many days
|
|
12
|
+
default: 3
|
|
13
|
+
from:
|
|
14
|
+
dataset: accessRequests
|
|
15
|
+
where:
|
|
16
|
+
all:
|
|
17
|
+
- { field: request.state, op: in, value: [EXECUTING, PROVISIONING_VERIFICATION_PENDING] }
|
|
18
|
+
- { field: request.created, op: olderThanDays, value: "${olderThanDays}" }
|
|
19
|
+
columns:
|
|
20
|
+
- { field: request.requestedFor.name, label: Requested for }
|
|
21
|
+
- { field: request.requester.name, label: Requested by }
|
|
22
|
+
- { field: request.name, label: Access }
|
|
23
|
+
- { field: request.type, label: Access type }
|
|
24
|
+
- { field: request.requestType, label: Request type }
|
|
25
|
+
- { field: request.state, label: State }
|
|
26
|
+
- { field: request.approvalDetails.currentOwner.name, label: Waiting on }
|
|
27
|
+
- { field: request.created, label: Submitted, format: date }
|
|
28
|
+
- { field: request.errorMessages, label: Errors }
|
|
29
|
+
sort: [request.created]
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
id: team-access
|
|
2
|
+
name: My team's access
|
|
3
|
+
description: >-
|
|
4
|
+
The access of everyone who reports to a manager, one row per person and access item. Give the
|
|
5
|
+
manager's username or display name.
|
|
6
|
+
category: People
|
|
7
|
+
tags: [manager, review]
|
|
8
|
+
params:
|
|
9
|
+
manager:
|
|
10
|
+
type: string
|
|
11
|
+
description: Manager (username or display name)
|
|
12
|
+
required: true
|
|
13
|
+
from:
|
|
14
|
+
dataset: identities
|
|
15
|
+
query: "manager.name:${manager|q} OR manager.displayName:${manager|q}"
|
|
16
|
+
where:
|
|
17
|
+
any:
|
|
18
|
+
- { field: identity.manager.name, op: eq, value: "${manager}" }
|
|
19
|
+
- { field: identity.manager.displayName, op: eq, value: "${manager}" }
|
|
20
|
+
expand:
|
|
21
|
+
path: identity.access
|
|
22
|
+
as: access
|
|
23
|
+
columns:
|
|
24
|
+
- { field: identity.displayName, label: Person }
|
|
25
|
+
- { field: identity.attributes.cloudLifecycleState, label: Lifecycle state }
|
|
26
|
+
- { field: access.type, label: Type }
|
|
27
|
+
- { field: access.displayName, label: Access }
|
|
28
|
+
- { field: access.source.name, label: Source }
|
|
29
|
+
- { field: access.privileged, label: Privileged, format: boolean }
|
|
30
|
+
sort: [identity.displayName, access.displayName]
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
id: terminated-users-with-active-accounts
|
|
2
|
+
name: Terminated users with active accounts
|
|
3
|
+
description: >-
|
|
4
|
+
People who have left (inactive identity or a leaver lifecycle state) but still have enabled
|
|
5
|
+
accounts on non-authoritative sources. Each row is one account that should probably be disabled.
|
|
6
|
+
category: Lifecycle
|
|
7
|
+
tags: [audit, leaver, sox]
|
|
8
|
+
params:
|
|
9
|
+
lifecycleStates:
|
|
10
|
+
type: list
|
|
11
|
+
description: Lifecycle states that mean the person has left
|
|
12
|
+
default: [inactive, terminated]
|
|
13
|
+
sources:
|
|
14
|
+
type: list
|
|
15
|
+
pick: sources
|
|
16
|
+
description: Sources (leave empty for all)
|
|
17
|
+
from:
|
|
18
|
+
dataset: identities
|
|
19
|
+
where:
|
|
20
|
+
any:
|
|
21
|
+
- { field: identity.inactive, op: isTrue }
|
|
22
|
+
- { field: identity.attributes.cloudLifecycleState, op: in, value: "${lifecycleStates}" }
|
|
23
|
+
expand:
|
|
24
|
+
path: identity.accounts
|
|
25
|
+
as: account
|
|
26
|
+
where:
|
|
27
|
+
all:
|
|
28
|
+
- { field: account.disabled, op: isFalse }
|
|
29
|
+
- { field: account.source.id, op: in, value: "${sources}" }
|
|
30
|
+
joins:
|
|
31
|
+
- dataset: sources
|
|
32
|
+
as: source
|
|
33
|
+
on: { field: account.source.id, equals: id }
|
|
34
|
+
filter:
|
|
35
|
+
{ field: source.authoritative, op: isFalse }
|
|
36
|
+
columns:
|
|
37
|
+
- { field: identity.displayName, label: Person }
|
|
38
|
+
- { field: identity.name, label: Username }
|
|
39
|
+
- { field: identity.email, label: Email }
|
|
40
|
+
- { field: identity.attributes.cloudLifecycleState, label: Lifecycle state }
|
|
41
|
+
- { field: identity.manager.displayName, label: Manager }
|
|
42
|
+
- { field: account.source.name, label: Source }
|
|
43
|
+
- { field: account.name, label: Account }
|
|
44
|
+
- { field: account.privileged, label: Privileged account, format: boolean }
|
|
45
|
+
- { field: identity.modified, label: Identity last changed, format: date }
|
|
46
|
+
sort: [account.source.name, identity.displayName]
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
id: uncorrelated-accounts
|
|
2
|
+
name: Accounts not linked to any person
|
|
3
|
+
description: >-
|
|
4
|
+
Accounts that ISC could not correlate to an identity. They are not covered by certifications
|
|
5
|
+
or leaver processing until someone links or removes them. Pick one or more sources to read only
|
|
6
|
+
those (much faster on large tenants).
|
|
7
|
+
category: Hygiene
|
|
8
|
+
tags: [audit, orphan]
|
|
9
|
+
params:
|
|
10
|
+
sources:
|
|
11
|
+
type: list
|
|
12
|
+
pick: sources
|
|
13
|
+
description: Sources (leave empty for all)
|
|
14
|
+
from:
|
|
15
|
+
dataset: accounts
|
|
16
|
+
filter:
|
|
17
|
+
- uncorrelated eq true
|
|
18
|
+
- sourceId in ${sources|list}
|
|
19
|
+
where:
|
|
20
|
+
all:
|
|
21
|
+
# Checked again here, so the report never depends on ISC applying the filter.
|
|
22
|
+
- { field: account.uncorrelated, op: isTrue }
|
|
23
|
+
- { field: account.sourceId, op: in, value: "${sources}" }
|
|
24
|
+
joins:
|
|
25
|
+
- dataset: sources
|
|
26
|
+
as: source
|
|
27
|
+
on: { field: account.sourceId, equals: id }
|
|
28
|
+
columns:
|
|
29
|
+
- { field: account.sourceName, label: Source }
|
|
30
|
+
- { field: account.name, label: Account }
|
|
31
|
+
- { field: account.nativeIdentity, label: Native identity }
|
|
32
|
+
- { field: account.uncorrelated, label: Uncorrelated, format: boolean }
|
|
33
|
+
- { field: account.disabled, label: Disabled, format: boolean }
|
|
34
|
+
- { field: account.hasEntitlements, label: Has entitlements, format: boolean }
|
|
35
|
+
- { field: account.isMachine, label: Machine account, format: boolean }
|
|
36
|
+
- { field: source.owner.name, label: Source owner }
|
|
37
|
+
- { field: account.created, label: First seen, format: date }
|
|
38
|
+
sort: [account.sourceName, account.name]
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
var hash = new URLSearchParams(location.hash.slice(1));
|
|
2
|
+
var KEY = hash.get('k') || sessionStorage.getItem('isc-reports-key') || '';
|
|
3
|
+
if (hash.get('k')) { sessionStorage.setItem('isc-reports-key', KEY); history.replaceState(null, '', location.pathname); }
|
|
4
|
+
|
|
5
|
+
var state = { reports: [], catalog: null, current: null, tab: 'run', job: null, result: null, dirty: false, picks: {}, disc: {}, homeCat: '' };
|
|
6
|
+
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
// ---------- small helpers ----------
|
|
2
|
+
function $(id) { return document.getElementById(id); }
|
|
3
|
+
function el(tag, attrs) {
|
|
4
|
+
var e = document.createElement(tag);
|
|
5
|
+
if (attrs) for (var k in attrs) {
|
|
6
|
+
var v = attrs[k];
|
|
7
|
+
if (v === undefined || v === null || v === false) continue;
|
|
8
|
+
if (k === 'text') e.textContent = v;
|
|
9
|
+
else if (k === 'className') e.className = v;
|
|
10
|
+
else if (k.slice(0, 2) === 'on') e.addEventListener(k.slice(2), v);
|
|
11
|
+
else if (k === 'value') e.value = v;
|
|
12
|
+
else if (k === 'checked') e.checked = !!v;
|
|
13
|
+
else e.setAttribute(k, v === true ? '' : v);
|
|
14
|
+
}
|
|
15
|
+
for (var i = 2; i < arguments.length; i++) add(e, arguments[i]);
|
|
16
|
+
return e;
|
|
17
|
+
}
|
|
18
|
+
function add(e, c) {
|
|
19
|
+
if (c === null || c === undefined || c === false) return;
|
|
20
|
+
if (Array.isArray(c)) c.forEach(function (x) { add(e, x); });
|
|
21
|
+
else e.appendChild(typeof c === 'string' ? document.createTextNode(c) : c);
|
|
22
|
+
}
|
|
23
|
+
function clone(x) { return JSON.parse(JSON.stringify(x)); }
|
|
24
|
+
var ICONS = {
|
|
25
|
+
people: 'M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM4 20c0-3.5 3.6-6 8-6s8 2.5 8 6',
|
|
26
|
+
lifecycle: 'M4 12a8 8 0 0 1 14-5.3L20 9M20 4v5h-5M20 12a8 8 0 0 1-14 5.3L4 15M4 20v-5h5',
|
|
27
|
+
shield: 'M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6zM8.5 12l2.5 2.5 4.5-5',
|
|
28
|
+
layers: 'M12 3l9 5-9 5-9-5zM3 13l9 5 9-5',
|
|
29
|
+
apps: 'M4 4h6v6H4zM14 4h6v6h-6zM4 14h6v6H4zM14 14h6v6h-6z',
|
|
30
|
+
cert: 'M9 3h6v3H9zM7 4.5H5V21h14V4.5h-2M9 13.5l2 2 4-4',
|
|
31
|
+
inbox: 'M4 13h4l2 3h4l2-3h4M4 13l3-8h10l3 8v6H4z',
|
|
32
|
+
pulse: 'M3 12h4l3-7 4 14 3-7h4',
|
|
33
|
+
file: 'M6 3h9l4 4v14H6zM14 3v5h5M9 13h7M9 17h5',
|
|
34
|
+
search: 'M11 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14zM21 21l-5-5',
|
|
35
|
+
download: 'M12 4v11M7 10l5 5 5-5M5 20h14',
|
|
36
|
+
play: 'M7 5l12 7-12 7z',
|
|
37
|
+
plus: 'M12 5v14M5 12h14',
|
|
38
|
+
x: 'M6 6l12 12M18 6L6 18',
|
|
39
|
+
chev: 'M6 9l6 6 6-6',
|
|
40
|
+
clock: 'M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM12 7v5l3 2',
|
|
41
|
+
up: 'M12 19V5M6 11l6-6 6 6',
|
|
42
|
+
down: 'M12 5v14M6 13l6 6 6-6',
|
|
43
|
+
trash: 'M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13',
|
|
44
|
+
logout: 'M15 4h4v16h-4M10 8l-4 4 4 4M6 12h10',
|
|
45
|
+
eye: 'M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12zM12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z',
|
|
46
|
+
save: 'M5 3h11l3 3v15H5zM8 3v5h7M8 14h8v7H8z',
|
|
47
|
+
filter: 'M4 5h16l-6 7v6l-4 2v-8z',
|
|
48
|
+
cols: 'M4 4h16v16H4zM10 4v16M16 4v16',
|
|
49
|
+
sigma: 'M18 5H6l6 7-6 7h12',
|
|
50
|
+
sort: 'M7 4v16M3 16l4 4 4-4M17 20V4M13 8l4-4 4 4',
|
|
51
|
+
db: 'M12 8c4.4 0 8-1.3 8-3s-3.6-3-8-3-8 1.3-8 3 3.6 3 8 3zM4 5v14c0 1.7 3.6 3 8 3s8-1.3 8-3V5M4 12c0 1.7 3.6 3 8 3s8-1.3 8-3',
|
|
52
|
+
grid: 'M4 4h16v16H4zM4 10h16M4 16h16M10 4v16',
|
|
53
|
+
code: 'M8 8l-4 4 4 4M16 8l4 4-4 4M14 5l-4 14',
|
|
54
|
+
sliders: 'M4 6h10M18 6h2M4 12h4M12 12h8M4 18h12M20 18h0M14 4v4M8 10v4M16 16v4',
|
|
55
|
+
copy: 'M8 8h12v12H8zM4 16V4h12',
|
|
56
|
+
heart: 'M3 12h4l2-4 3 8 2-4h7'
|
|
57
|
+
};
|
|
58
|
+
function icon(name, cls) {
|
|
59
|
+
var NS = 'http://www.w3.org/2000/svg';
|
|
60
|
+
var s = document.createElementNS(NS, 'svg');
|
|
61
|
+
s.setAttribute('viewBox', '0 0 24 24');
|
|
62
|
+
s.setAttribute('class', 'i' + (cls ? ' ' + cls : ''));
|
|
63
|
+
s.setAttribute('aria-hidden', 'true');
|
|
64
|
+
var p = document.createElementNS(NS, 'path');
|
|
65
|
+
p.setAttribute('d', ICONS[name] || ICONS.file);
|
|
66
|
+
if (name === 'play') { p.setAttribute('fill', 'currentColor'); }
|
|
67
|
+
s.appendChild(p);
|
|
68
|
+
return s;
|
|
69
|
+
}
|
|
70
|
+
var CATS = {
|
|
71
|
+
'People': ['people', '#2457d6', '#eaf0fd'],
|
|
72
|
+
'Lifecycle': ['lifecycle', '#7c3aed', '#f1ebfe'],
|
|
73
|
+
'Hygiene': ['shield', '#0e7c66', '#e3f5f0'],
|
|
74
|
+
'Access model': ['layers', '#b45309', '#fdf1e2'],
|
|
75
|
+
'Application owners': ['apps', '#0369a1', '#e2f1fa'],
|
|
76
|
+
'Certifications': ['cert', '#be185d', '#fce8f1'],
|
|
77
|
+
'Requests': ['inbox', '#4d7c0f', '#eef6df'],
|
|
78
|
+
'Operations': ['pulse', '#b91c1c', '#fdeaea'],
|
|
79
|
+
'Configuration': ['sliders', '#0f766e', '#e0f4f1'],
|
|
80
|
+
'My reports': ['file', '#334155', '#eef1f5']
|
|
81
|
+
};
|
|
82
|
+
var CAT_ORDER = ['My reports', 'People', 'Lifecycle', 'Hygiene', 'Operations', 'Access model', 'Application owners', 'Certifications', 'Requests', 'Configuration'];
|
|
83
|
+
function catOf(r) { return r.custom ? 'My reports' : (r.definition.category || 'Other'); }
|
|
84
|
+
function catIcon(cat) {
|
|
85
|
+
var c = CATS[cat] || ['file', '#334155', '#eef1f5'];
|
|
86
|
+
return el('span', { className: 'cat-ico', style: 'color:' + c[1] + ';background:' + c[2] }, icon(c[0]));
|
|
87
|
+
}
|
|
88
|
+
var POPULAR = ['provisioning-errors', 'aggregation-failures', 'uncorrelated-accounts', 'terminated-users-with-active-accounts', 'person-access', 'application-accounts', 'identity-attribute-mappings', 'privileged-access', 'new-identities'];
|
|
89
|
+
|
|
90
|
+
function api(path, method, body) {
|
|
91
|
+
return fetch(path, {
|
|
92
|
+
method: method || 'GET',
|
|
93
|
+
headers: Object.assign({ 'x-isc-reports-key': KEY }, body ? { 'content-type': 'application/json' } : {}),
|
|
94
|
+
body: body ? JSON.stringify(body) : undefined
|
|
95
|
+
}).then(function (res) {
|
|
96
|
+
var n = res.headers.get('x-isc-api-calls');
|
|
97
|
+
if (n !== null && $('calls')) $('calls').textContent = Number(n).toLocaleString('en-US');
|
|
98
|
+
return res.json().catch(function () { return {}; }).then(function (data) {
|
|
99
|
+
if (!res.ok) {
|
|
100
|
+
var err = new Error(data.error || ('Request failed (' + res.status + ')'));
|
|
101
|
+
err.problems = data.problems || [];
|
|
102
|
+
err.data = data;
|
|
103
|
+
throw err;
|
|
104
|
+
}
|
|
105
|
+
return data;
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
var NOT_ANSWERING = 'IdentityScope on this computer is not answering. If its window was closed or shows an error, start it again and reload this page.';
|
|
110
|
+
function errorText(e) { if (e && e.name === 'TypeError' && /fetch|network|load failed/i.test(e.message || '')) return NOT_ANSWERING; return e.message + (e.problems && e.problems.length ? '\n- ' + e.problems.join('\n- ') : ''); }
|
|
111
|
+
var toastTimer;
|
|
112
|
+
function toast(text) {
|
|
113
|
+
var t = $('toast');
|
|
114
|
+
t.textContent = text;
|
|
115
|
+
t.classList.remove('hidden');
|
|
116
|
+
clearTimeout(toastTimer);
|
|
117
|
+
toastTimer = setTimeout(function () { t.classList.add('hidden'); }, 2600);
|
|
118
|
+
}
|
|
119
|
+
function fmtNum(n) { return Number(n).toLocaleString('en-US'); }
|
|
120
|
+
|
|
121
|
+
// static icons in the page frame
|
|
122
|
+
add($('nav-reports'), [icon('grid'), 'Reports']);
|
|
123
|
+
add($('nav-schedules'), [icon('clock'), 'Schedules']);
|
|
124
|
+
add($('nav-roles'), [icon('layers'), 'Role tools']);
|
|
125
|
+
add($('nav-checks'), [icon('pulse'), 'Instant check']);
|
|
126
|
+
add($('nav-warnings'), [icon('clock'), 'Warnings']);
|
|
127
|
+
add($('nav-nerm'), [icon('people'), 'Non-employees']);
|
|
128
|
+
add($('nav-logs'), [icon('file'), 'Logs']);
|
|
129
|
+
add($('nav-lookup'), [icon('search'), 'Lookup']);
|
|
130
|
+
add($('nav-tenant'), [icon('db'), 'Tenant']);
|
|
131
|
+
add($('nav-build'), [icon('code'), 'Build & test']);
|
|
132
|
+
add($('nav-certs'), [icon('cert'), 'Audit']);
|
|
133
|
+
add($('nav-monthly'), [icon('sigma'), 'Insights']);
|
|
134
|
+
add($('btn-doctor'), [icon('heart'), 'Health check']);
|
|
135
|
+
add($('btn-help'), ['? Help']);
|
|
136
|
+
add($('btn-partner-nav'), [icon('db'), 'All tenants']);
|
|
137
|
+
$('btn-partner-nav').addEventListener('click', function () { showPartner(); });
|
|
138
|
+
$('btn-partner').addEventListener('click', function () { showPartner(); });
|
|
139
|
+
$('btn-help').addEventListener('click', function () { openHelp(); });
|
|
140
|
+
add($('btn-disconnect'), [icon('logout'), 'Disconnect']);
|
|
141
|
+
add($('btn-new'), [icon('plus'), 'New report']);
|
|
142
|
+
add($('search-ico'), icon('search'));
|
|
143
|
+
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
// ---------- connection ----------
|
|
2
|
+
function showConnect(st) {
|
|
3
|
+
$('connect').classList.remove('hidden');
|
|
4
|
+
$('app').classList.add('hidden');
|
|
5
|
+
$('partner').classList.add('hidden');
|
|
6
|
+
$('btn-partner-nav').classList.add('hidden');
|
|
7
|
+
$('demo-bar').classList.add('hidden');
|
|
8
|
+
['btn-doctor', 'btn-disconnect', 'nav', 'schedules', 'roles', 'checks', 'lookup', 'tenant-page', 'certs', 'monthly', 'warnings', 'nerm', 'logs', 'tenant-chip', 'calls-chip', 'token-chip', 'btn-help'].forEach(function (id) { $(id).classList.add('hidden'); });
|
|
9
|
+
if (st && st.signIn) {
|
|
10
|
+
if (st.signIn.baseUrl && !$('si-base').value) $('si-base').value = st.signIn.baseUrl;
|
|
11
|
+
if (st.signIn.clientId && !$('si-client').value) $('si-client').value = st.signIn.clientId;
|
|
12
|
+
$('redirect-uri').textContent = st.signIn.redirectUri;
|
|
13
|
+
}
|
|
14
|
+
if (st && st.saved && st.saved.hasCredentials) {
|
|
15
|
+
$('saved-box').classList.remove('hidden');
|
|
16
|
+
$('saved-url').textContent = st.saved.baseUrl;
|
|
17
|
+
} else $('saved-box').classList.add('hidden');
|
|
18
|
+
}
|
|
19
|
+
function showApp(tenant, user) {
|
|
20
|
+
$('connect').classList.add('hidden');
|
|
21
|
+
['btn-doctor', 'btn-disconnect', 'nav', 'tenant-chip', 'calls-chip', 'btn-help'].forEach(function (id) { $(id).classList.remove('hidden'); });
|
|
22
|
+
api('/api/state').then(function (st) { state.consoleUrl = st.consoleUrl; state.diagnostics = st.diagnostics; state.demo = !!st.demo; $('demo-bar').classList.toggle('hidden', !st.demo); });
|
|
23
|
+
state.tn.data = {};
|
|
24
|
+
state.ins = null; state.sd = {}; state.ch = {}; state.rc = {}; state.rq = { days: 90 }; state.mn.data = null; state.ev = { days: 365 };
|
|
25
|
+
state.wn = null;
|
|
26
|
+
state.ct.data = null; state.ow.data = null; state.cp.info = null; state.cp.data = null; state.mr.data = null;
|
|
27
|
+
$('tenant').textContent = (tenant || '') + (user ? ' · ' + user : '');
|
|
28
|
+
state.picks = {};
|
|
29
|
+
state.disc = {};
|
|
30
|
+
state.chk.meta = null; state.chk.results = null; state.chk.selected = null;
|
|
31
|
+
state.lk.sources = null; state.lk.person = null; state.lk.source = null; state.lk.matches = null;
|
|
32
|
+
showPage('reports');
|
|
33
|
+
loadLibrary();
|
|
34
|
+
state.pt.data = null;
|
|
35
|
+
loadPartner().catch(function () {});
|
|
36
|
+
if (!state.updateNoticed) { state.updateNoticed = true; noticeNewVersion(); }
|
|
37
|
+
noticeTokenExpiry();
|
|
38
|
+
}
|
|
39
|
+
// Warns in the header when the token this connection uses expires within 14 days.
|
|
40
|
+
function noticeTokenExpiry() {
|
|
41
|
+
var chip = $('token-chip');
|
|
42
|
+
chip.classList.add('hidden');
|
|
43
|
+
api('/api/credentials/mine').then(function (m) {
|
|
44
|
+
if (m.kind !== 'token' || m.daysToExpiry === null || m.daysToExpiry > 14) return;
|
|
45
|
+
var long = m.daysToExpiry < 0 ? 'Token expired' : m.daysToExpiry === 0 ? 'Token expires today' : 'Token expires in ' + m.daysToExpiry + ' day' + (m.daysToExpiry === 1 ? '' : 's');
|
|
46
|
+
var short = m.daysToExpiry < 0 ? 'Token expired' : 'Token: ' + m.daysToExpiry + 'd';
|
|
47
|
+
chip.textContent = '';
|
|
48
|
+
chip.appendChild(el('span', { className: 'tk-long', text: long }));
|
|
49
|
+
chip.appendChild(el('span', { className: 'tk-short', text: short }));
|
|
50
|
+
chip.title = 'The personal access token IdentityScope uses (' + m.name + ') expires ' + (m.expires || '').slice(0, 10) + '. Create a new one in ISC and sign in again with it; scheduled reports stop working when it expires.';
|
|
51
|
+
chip.onclick = function () { state.tn.tab = 'credentials'; showPage('tenant'); };
|
|
52
|
+
chip.classList.remove('hidden');
|
|
53
|
+
}).catch(function () {});
|
|
54
|
+
}
|
|
55
|
+
function showPage(name) {
|
|
56
|
+
state.page = name;
|
|
57
|
+
$('partner').classList.add('hidden');
|
|
58
|
+
$('nav-reports').classList.toggle('active', name === 'reports');
|
|
59
|
+
$('nav-schedules').classList.toggle('active', name === 'schedules');
|
|
60
|
+
$('nav-roles').classList.toggle('active', name === 'roles');
|
|
61
|
+
$('nav-checks').classList.toggle('active', name === 'checks');
|
|
62
|
+
$('nav-lookup').classList.toggle('active', name === 'lookup');
|
|
63
|
+
$('nav-tenant').classList.toggle('active', name === 'tenant');
|
|
64
|
+
$('nav-build').classList.toggle('active', name === 'build');
|
|
65
|
+
$('nav-certs').classList.toggle('active', name === 'certs');
|
|
66
|
+
$('nav-monthly').classList.toggle('active', name === 'monthly');
|
|
67
|
+
$('nav-warnings').classList.toggle('active', name === 'warnings');
|
|
68
|
+
$('nav-nerm').classList.toggle('active', name === 'nerm');
|
|
69
|
+
$('nav-logs').classList.toggle('active', name === 'logs');
|
|
70
|
+
$('app').classList.toggle('hidden', name !== 'reports');
|
|
71
|
+
['schedules', 'roles', 'checks', 'lookup', 'certs', 'monthly', 'warnings', 'nerm', 'logs', 'build'].forEach(function (p) { $(p).classList.toggle('hidden', name !== p); });
|
|
72
|
+
if (name === 'certs') renderAudit();
|
|
73
|
+
if (name === 'monthly') { state.mr.data = null; renderInsights(); }
|
|
74
|
+
if (name === 'warnings') renderWarnings();
|
|
75
|
+
if (name === 'nerm') renderNerm();
|
|
76
|
+
if (name === 'logs') renderLogs();
|
|
77
|
+
$('tenant-page').classList.toggle('hidden', name !== 'tenant');
|
|
78
|
+
if (name === 'tenant') renderTenant();
|
|
79
|
+
if (name === 'build') renderBuild();
|
|
80
|
+
if (name === 'schedules') loadSchedules();
|
|
81
|
+
if (name === 'roles') renderRoles();
|
|
82
|
+
if (name === 'checks') renderChecks();
|
|
83
|
+
if (name === 'lookup') renderLookup();
|
|
84
|
+
}
|
|
85
|
+
$('nav-checks').addEventListener('click', function () { showPage('checks'); });
|
|
86
|
+
$('nav-lookup').addEventListener('click', function () { showPage('lookup'); });
|
|
87
|
+
$('nav-tenant').addEventListener('click', function () { showPage('tenant'); });
|
|
88
|
+
$('nav-build').addEventListener('click', function () { showPage('build'); });
|
|
89
|
+
$('nav-certs').addEventListener('click', function () { showPage('certs'); });
|
|
90
|
+
$('nav-monthly').addEventListener('click', function () { showPage('monthly'); });
|
|
91
|
+
$('nav-warnings').addEventListener('click', function () { showPage('warnings'); });
|
|
92
|
+
$('nav-nerm').addEventListener('click', function () { showPage('nerm'); });
|
|
93
|
+
$('nav-logs').addEventListener('click', function () { showPage('logs'); });
|
|
94
|
+
$('nav-roles').addEventListener('click', function () { showPage('roles'); });
|
|
95
|
+
$('nav-reports').addEventListener('click', function () { showPage('reports'); });
|
|
96
|
+
$('nav-schedules').addEventListener('click', function () { state.editing = null; showPage('schedules'); });
|
|
97
|
+
function doConnect(body, button) {
|
|
98
|
+
var err = $('connect-error');
|
|
99
|
+
err.classList.add('hidden');
|
|
100
|
+
button.disabled = true;
|
|
101
|
+
var label = button.textContent;
|
|
102
|
+
button.textContent = 'Connecting...';
|
|
103
|
+
api('/api/connect', 'POST', body).then(function (r) {
|
|
104
|
+
$('in-secret').value = '';
|
|
105
|
+
state.signedIn = false;
|
|
106
|
+
showApp(r.tenant);
|
|
107
|
+
}).catch(function (e) {
|
|
108
|
+
err.textContent = errorText(e);
|
|
109
|
+
err.classList.remove('hidden');
|
|
110
|
+
}).then(function () { button.disabled = false; button.textContent = label; });
|
|
111
|
+
}
|
|
112
|
+
$('btn-connect').addEventListener('click', function () {
|
|
113
|
+
doConnect({ baseUrl: $('in-base').value, clientId: $('in-id').value, clientSecret: $('in-secret').value }, $('btn-connect'));
|
|
114
|
+
});
|
|
115
|
+
$('in-secret').addEventListener('keydown', function (e) { if (e.key === 'Enter') $('btn-connect').click(); });
|
|
116
|
+
$('btn-signin').addEventListener('click', function () {
|
|
117
|
+
var err = $('signin-error');
|
|
118
|
+
err.classList.add('hidden');
|
|
119
|
+
var win = window.open('about:blank', '_blank');
|
|
120
|
+
api('/api/login/start', 'POST', { baseUrl: $('si-base').value, clientId: $('si-client').value, clientSecret: $('si-secret').value }).then(function (r) {
|
|
121
|
+
$('si-secret').value = '';
|
|
122
|
+
if (win) win.location.href = r.authorizeUrl;
|
|
123
|
+
$('signin-link').href = r.authorizeUrl;
|
|
124
|
+
$('signin-wait').classList.remove('hidden');
|
|
125
|
+
var waitUntil = Date.now() + 10 * 60 * 1000;
|
|
126
|
+
(function check() {
|
|
127
|
+
api('/api/state').then(function (st) {
|
|
128
|
+
if (st.connected) { $('signin-wait').classList.add('hidden'); state.signedIn = true; showApp(st.tenant, st.signedInAs); }
|
|
129
|
+
else if (Date.now() < waitUntil) setTimeout(check, 1500);
|
|
130
|
+
else { $('signin-wait').classList.add('hidden'); err.textContent = 'Sign-in timed out. Try again.'; err.classList.remove('hidden'); }
|
|
131
|
+
});
|
|
132
|
+
})();
|
|
133
|
+
}).catch(function (e) {
|
|
134
|
+
if (win) win.close();
|
|
135
|
+
err.textContent = errorText(e);
|
|
136
|
+
err.classList.remove('hidden');
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
$('btn-use-saved').addEventListener('click', function () { doConnect({ useSaved: true }, $('btn-use-saved')); });
|
|
140
|
+
$('btn-demo').addEventListener('click', function () {
|
|
141
|
+
var b = $('btn-demo'), err = $('connect-error');
|
|
142
|
+
err.classList.add('hidden');
|
|
143
|
+
b.disabled = true; b.textContent = 'Starting the demo...';
|
|
144
|
+
api('/api/demo/start', 'POST', {}).then(function (r) { state.signedIn = false; showApp(r.tenant); }, function (e) { err.textContent = errorText(e); err.classList.remove('hidden'); })
|
|
145
|
+
.then(function () { b.disabled = false; b.textContent = 'Try the demo tenant'; });
|
|
146
|
+
});
|
|
147
|
+
$('btn-disconnect').addEventListener('click', function () {
|
|
148
|
+
api('/api/disconnect', 'POST', {}).then(function () { return api('/api/state'); }).then(showConnect);
|
|
149
|
+
});
|
|
150
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// ---------- health check ----------
|
|
2
|
+
function modal(title, text) {
|
|
3
|
+
$('modal-title').textContent = title;
|
|
4
|
+
$('modal-text').textContent = text;
|
|
5
|
+
$('modal').classList.remove('hidden');
|
|
6
|
+
}
|
|
7
|
+
$('modal-close').addEventListener('click', function () { $('modal').classList.add('hidden'); });
|
|
8
|
+
$('modal').addEventListener('click', function (e) { if (e.target === $('modal')) $('modal').classList.add('hidden'); });
|
|
9
|
+
$('modal-copy').addEventListener('click', function () {
|
|
10
|
+
navigator.clipboard.writeText($('modal-text').textContent).then(function () { toast('Copied'); });
|
|
11
|
+
});
|
|
12
|
+
$('btn-doctor').addEventListener('click', function () {
|
|
13
|
+
modal('Health check', 'Checking sign-in, permissions and data... (about 30 seconds)');
|
|
14
|
+
api('/api/doctor', 'POST', {}).then(function (r) { modal('Health check: safe to share, no names or IDs', r.text); })
|
|
15
|
+
.catch(function (e) { modal('Health check failed', errorText(e)); });
|
|
16
|
+
});
|
|
17
|
+
|