@j-schreiber/sf-cli-security-audit 0.7.0 → 0.8.0
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/README.md +26 -22
- package/messages/org.audit.init.md +3 -3
- package/messages/org.audit.run.md +11 -3
- package/messages/org.scan.user-perms.md +7 -5
- package/messages/rules.enforceClassificationPresets.md +4 -0
- package/messages/rules.users.md +12 -0
- package/oclif.lock +365 -71
- package/oclif.manifest.json +2 -253
- package/package.json +1 -1
- package/lib/commands/org/audit/init.d.ts +0 -19
- package/lib/commands/org/audit/init.js +0 -72
- package/lib/commands/org/audit/init.js.map +0 -1
- package/lib/commands/org/audit/run.d.ts +0 -22
- package/lib/commands/org/audit/run.js +0 -119
- package/lib/commands/org/audit/run.js.map +0 -1
- package/lib/commands/org/scan/user-perms.d.ts +0 -20
- package/lib/commands/org/scan/user-perms.js +0 -87
- package/lib/commands/org/scan/user-perms.js.map +0 -1
- package/lib/libs/conf-init/auditConfig.d.ts +0 -35
- package/lib/libs/conf-init/auditConfig.js +0 -41
- package/lib/libs/conf-init/auditConfig.js.map +0 -1
- package/lib/libs/conf-init/permissionsClassification.d.ts +0 -17
- package/lib/libs/conf-init/permissionsClassification.js +0 -80
- package/lib/libs/conf-init/permissionsClassification.js.map +0 -1
- package/lib/libs/conf-init/policyConfigs.d.ts +0 -31
- package/lib/libs/conf-init/policyConfigs.js +0 -91
- package/lib/libs/conf-init/policyConfigs.js.map +0 -1
- package/lib/libs/conf-init/presets/loose.d.ts +0 -6
- package/lib/libs/conf-init/presets/loose.js +0 -51
- package/lib/libs/conf-init/presets/loose.js.map +0 -1
- package/lib/libs/conf-init/presets/none.d.ts +0 -30
- package/lib/libs/conf-init/presets/none.js +0 -54
- package/lib/libs/conf-init/presets/none.js.map +0 -1
- package/lib/libs/conf-init/presets/strict.d.ts +0 -4
- package/lib/libs/conf-init/presets/strict.js +0 -45
- package/lib/libs/conf-init/presets/strict.js.map +0 -1
- package/lib/libs/conf-init/presets.d.ts +0 -7
- package/lib/libs/conf-init/presets.js +0 -20
- package/lib/libs/conf-init/presets.js.map +0 -1
- package/lib/libs/core/auditRun.d.ts +0 -36
- package/lib/libs/core/auditRun.js +0 -86
- package/lib/libs/core/auditRun.js.map +0 -1
- package/lib/libs/core/classification-types.d.ts +0 -20
- package/lib/libs/core/classification-types.js +0 -23
- package/lib/libs/core/classification-types.js.map +0 -1
- package/lib/libs/core/constants.d.ts +0 -11
- package/lib/libs/core/constants.js +0 -20
- package/lib/libs/core/constants.js.map +0 -1
- package/lib/libs/core/file-mgmt/auditConfigFileManager.d.ts +0 -48
- package/lib/libs/core/file-mgmt/auditConfigFileManager.js +0 -139
- package/lib/libs/core/file-mgmt/auditConfigFileManager.js.map +0 -1
- package/lib/libs/core/file-mgmt/schema.d.ts +0 -122
- package/lib/libs/core/file-mgmt/schema.js +0 -59
- package/lib/libs/core/file-mgmt/schema.js.map +0 -1
- package/lib/libs/core/mdapi/mdapiRetriever.d.ts +0 -54
- package/lib/libs/core/mdapi/mdapiRetriever.js +0 -123
- package/lib/libs/core/mdapi/mdapiRetriever.js.map +0 -1
- package/lib/libs/core/mdapi/metadataRegistryEntry.d.ts +0 -40
- package/lib/libs/core/mdapi/metadataRegistryEntry.js +0 -46
- package/lib/libs/core/mdapi/metadataRegistryEntry.js.map +0 -1
- package/lib/libs/core/mdapi/namedMetadataToolingQueryable.d.ts +0 -33
- package/lib/libs/core/mdapi/namedMetadataToolingQueryable.js +0 -41
- package/lib/libs/core/mdapi/namedMetadataToolingQueryable.js.map +0 -1
- package/lib/libs/core/mdapi/namedMetadataType.d.ts +0 -20
- package/lib/libs/core/mdapi/namedMetadataType.js +0 -41
- package/lib/libs/core/mdapi/namedMetadataType.js.map +0 -1
- package/lib/libs/core/mdapi/singletonMetadataType.d.ts +0 -21
- package/lib/libs/core/mdapi/singletonMetadataType.js +0 -37
- package/lib/libs/core/mdapi/singletonMetadataType.js.map +0 -1
- package/lib/libs/core/policies/connectedAppPolicy.d.ts +0 -10
- package/lib/libs/core/policies/connectedAppPolicy.js +0 -78
- package/lib/libs/core/policies/connectedAppPolicy.js.map +0 -1
- package/lib/libs/core/policies/permissionSetPolicy.d.ts +0 -11
- package/lib/libs/core/policies/permissionSetPolicy.js +0 -62
- package/lib/libs/core/policies/permissionSetPolicy.js.map +0 -1
- package/lib/libs/core/policies/policy.d.ts +0 -31
- package/lib/libs/core/policies/policy.js +0 -100
- package/lib/libs/core/policies/policy.js.map +0 -1
- package/lib/libs/core/policies/profilePolicy.d.ts +0 -11
- package/lib/libs/core/policies/profilePolicy.js +0 -64
- package/lib/libs/core/policies/profilePolicy.js.map +0 -1
- package/lib/libs/core/policies/salesforceStandardTypes.d.ts +0 -53
- package/lib/libs/core/policies/salesforceStandardTypes.js +0 -2
- package/lib/libs/core/policies/salesforceStandardTypes.js.map +0 -1
- package/lib/libs/core/policies/userPolicy.d.ts +0 -11
- package/lib/libs/core/policies/userPolicy.js +0 -104
- package/lib/libs/core/policies/userPolicy.js.map +0 -1
- package/lib/libs/core/policy-types.d.ts +0 -18
- package/lib/libs/core/policy-types.js +0 -28
- package/lib/libs/core/policy-types.js.map +0 -1
- package/lib/libs/core/policyRegistry.d.ts +0 -23
- package/lib/libs/core/policyRegistry.js +0 -38
- package/lib/libs/core/policyRegistry.js.map +0 -1
- package/lib/libs/core/registries/connectedApps.d.ts +0 -13
- package/lib/libs/core/registries/connectedApps.js +0 -13
- package/lib/libs/core/registries/connectedApps.js.map +0 -1
- package/lib/libs/core/registries/permissionSets.d.ts +0 -11
- package/lib/libs/core/registries/permissionSets.js +0 -11
- package/lib/libs/core/registries/permissionSets.js.map +0 -1
- package/lib/libs/core/registries/profiles.d.ts +0 -11
- package/lib/libs/core/registries/profiles.js +0 -13
- package/lib/libs/core/registries/profiles.js.map +0 -1
- package/lib/libs/core/registries/ruleRegistry.d.ts +0 -37
- package/lib/libs/core/registries/ruleRegistry.js +0 -48
- package/lib/libs/core/registries/ruleRegistry.js.map +0 -1
- package/lib/libs/core/registries/rules/allUsedAppsUnderManagement.d.ts +0 -7
- package/lib/libs/core/registries/rules/allUsedAppsUnderManagement.js +0 -23
- package/lib/libs/core/registries/rules/allUsedAppsUnderManagement.js.map +0 -1
- package/lib/libs/core/registries/rules/enforceCustomPermsClassificationOnProfiles.d.ts +0 -7
- package/lib/libs/core/registries/rules/enforceCustomPermsClassificationOnProfiles.js +0 -52
- package/lib/libs/core/registries/rules/enforceCustomPermsClassificationOnProfiles.js.map +0 -1
- package/lib/libs/core/registries/rules/enforceUserPermsClassificationOnPermSets.d.ts +0 -7
- package/lib/libs/core/registries/rules/enforceUserPermsClassificationOnPermSets.js +0 -52
- package/lib/libs/core/registries/rules/enforceUserPermsClassificationOnPermSets.js.map +0 -1
- package/lib/libs/core/registries/rules/enforceUserPermsClassificationOnProfiles.d.ts +0 -7
- package/lib/libs/core/registries/rules/enforceUserPermsClassificationOnProfiles.js +0 -54
- package/lib/libs/core/registries/rules/enforceUserPermsClassificationOnProfiles.js.map +0 -1
- package/lib/libs/core/registries/rules/noInactiveUsers.d.ts +0 -9
- package/lib/libs/core/registries/rules/noInactiveUsers.js +0 -44
- package/lib/libs/core/registries/rules/noInactiveUsers.js.map +0 -1
- package/lib/libs/core/registries/rules/noOtherApexApiLogins.d.ts +0 -7
- package/lib/libs/core/registries/rules/noOtherApexApiLogins.js +0 -24
- package/lib/libs/core/registries/rules/noOtherApexApiLogins.js.map +0 -1
- package/lib/libs/core/registries/rules/noUserCanSelfAuthorize.d.ts +0 -7
- package/lib/libs/core/registries/rules/noUserCanSelfAuthorize.js +0 -31
- package/lib/libs/core/registries/rules/noUserCanSelfAuthorize.js.map +0 -1
- package/lib/libs/core/registries/rules/policyRule.d.ts +0 -19
- package/lib/libs/core/registries/rules/policyRule.js +0 -31
- package/lib/libs/core/registries/rules/policyRule.js.map +0 -1
- package/lib/libs/core/registries/types.d.ts +0 -37
- package/lib/libs/core/registries/types.js +0 -11
- package/lib/libs/core/registries/types.js.map +0 -1
- package/lib/libs/core/registries/users.d.ts +0 -26
- package/lib/libs/core/registries/users.js +0 -10
- package/lib/libs/core/registries/users.js.map +0 -1
- package/lib/libs/core/result-types.d.ts +0 -172
- package/lib/libs/core/result-types.js +0 -2
- package/lib/libs/core/result-types.js.map +0 -1
- package/lib/libs/core/utils.d.ts +0 -12
- package/lib/libs/core/utils.js +0 -31
- package/lib/libs/core/utils.js.map +0 -1
- package/lib/libs/quick-scan/types.d.ts +0 -17
- package/lib/libs/quick-scan/types.js +0 -2
- package/lib/libs/quick-scan/types.js.map +0 -1
- package/lib/libs/quick-scan/userPermissionScanner.d.ts +0 -22
- package/lib/libs/quick-scan/userPermissionScanner.js +0 -75
- package/lib/libs/quick-scan/userPermissionScanner.js.map +0 -1
- package/lib/ux/auditRunMultiStage.d.ts +0 -65
- package/lib/ux/auditRunMultiStage.js +0 -120
- package/lib/ux/auditRunMultiStage.js.map +0 -1
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import EventEmitter from 'node:events';
|
|
2
|
-
import { AuditPolicyResult, EntityResolveError } from '../result-types.js';
|
|
3
|
-
import { AuditRunConfig, BasePolicyFileContent } from '../file-mgmt/schema.js';
|
|
4
|
-
import RuleRegistry, { RegistryRuleResolveResult } from '../registries/ruleRegistry.js';
|
|
5
|
-
import { AuditContext, IPolicy } from '../registries/types.js';
|
|
6
|
-
export type ResolveEntityResult<T> = {
|
|
7
|
-
resolvedEntities: Record<string, T>;
|
|
8
|
-
ignoredEntities: EntityResolveError[];
|
|
9
|
-
};
|
|
10
|
-
export default abstract class Policy<T> extends EventEmitter implements IPolicy {
|
|
11
|
-
config: BasePolicyFileContent;
|
|
12
|
-
auditConfig: AuditRunConfig;
|
|
13
|
-
protected registry: RuleRegistry;
|
|
14
|
-
protected resolvedRules: RegistryRuleResolveResult;
|
|
15
|
-
protected entities?: ResolveEntityResult<T>;
|
|
16
|
-
constructor(config: BasePolicyFileContent, auditConfig: AuditRunConfig, registry: RuleRegistry);
|
|
17
|
-
/**
|
|
18
|
-
* Resolves all entities of the policy.
|
|
19
|
-
*/
|
|
20
|
-
resolve(context: AuditContext): Promise<ResolveEntityResult<T>>;
|
|
21
|
-
/**
|
|
22
|
-
* Runs all rules of a policy. If the entities are not yet resolved, they are
|
|
23
|
-
* resolved on the fly before rules are executed.
|
|
24
|
-
*
|
|
25
|
-
* @param context
|
|
26
|
-
* @returns
|
|
27
|
-
*/
|
|
28
|
-
run(context: AuditContext): Promise<AuditPolicyResult>;
|
|
29
|
-
protected abstract resolveEntities(context: AuditContext): Promise<ResolveEntityResult<T>>;
|
|
30
|
-
}
|
|
31
|
-
export declare function getTotal(resolveResult: ResolveEntityResult<unknown>): number;
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import EventEmitter from 'node:events';
|
|
2
|
-
export default class Policy extends EventEmitter {
|
|
3
|
-
config;
|
|
4
|
-
auditConfig;
|
|
5
|
-
registry;
|
|
6
|
-
resolvedRules;
|
|
7
|
-
entities;
|
|
8
|
-
constructor(config, auditConfig, registry) {
|
|
9
|
-
super();
|
|
10
|
-
this.config = config;
|
|
11
|
-
this.auditConfig = auditConfig;
|
|
12
|
-
this.registry = registry;
|
|
13
|
-
this.resolvedRules = registry.resolveRules(config.rules, auditConfig);
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Resolves all entities of the policy.
|
|
17
|
-
*/
|
|
18
|
-
async resolve(context) {
|
|
19
|
-
// when a policy is disabled, we still want to appear it in audit results
|
|
20
|
-
// as disabled with 0 resolved entities and 0 executed rules
|
|
21
|
-
if (!this.config.enabled) {
|
|
22
|
-
return { resolvedEntities: {}, ignoredEntities: [] };
|
|
23
|
-
}
|
|
24
|
-
if (!this.entities) {
|
|
25
|
-
this.entities = await this.resolveEntities(context);
|
|
26
|
-
}
|
|
27
|
-
return this.entities;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Runs all rules of a policy. If the entities are not yet resolved, they are
|
|
31
|
-
* resolved on the fly before rules are executed.
|
|
32
|
-
*
|
|
33
|
-
* @param context
|
|
34
|
-
* @returns
|
|
35
|
-
*/
|
|
36
|
-
async run(context) {
|
|
37
|
-
if (!this.config.enabled) {
|
|
38
|
-
return {
|
|
39
|
-
isCompliant: true,
|
|
40
|
-
enabled: false,
|
|
41
|
-
executedRules: {},
|
|
42
|
-
skippedRules: [],
|
|
43
|
-
auditedEntities: [],
|
|
44
|
-
ignoredEntities: [],
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
const resolveResult = await this.resolve(context);
|
|
48
|
-
const ruleResultPromises = Array();
|
|
49
|
-
for (const rule of this.resolvedRules.enabledRules) {
|
|
50
|
-
ruleResultPromises.push(rule.run({ ...context, resolvedEntities: resolveResult.resolvedEntities }));
|
|
51
|
-
}
|
|
52
|
-
const ruleResults = await Promise.all(ruleResultPromises);
|
|
53
|
-
const executedRules = {};
|
|
54
|
-
for (const ruleResult of ruleResults) {
|
|
55
|
-
const { compliantEntities, violatedEntities } = evalResolvedEntities(ruleResult, resolveResult);
|
|
56
|
-
executedRules[ruleResult.ruleName] = {
|
|
57
|
-
...ruleResult,
|
|
58
|
-
isCompliant: ruleResult.violations.length === 0,
|
|
59
|
-
compliantEntities,
|
|
60
|
-
violatedEntities,
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
return {
|
|
64
|
-
isCompliant: isCompliant(executedRules),
|
|
65
|
-
enabled: true,
|
|
66
|
-
executedRules,
|
|
67
|
-
skippedRules: this.resolvedRules.skippedRules,
|
|
68
|
-
auditedEntities: Object.keys(resolveResult.resolvedEntities),
|
|
69
|
-
ignoredEntities: resolveResult.ignoredEntities,
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
function isCompliant(ruleResults) {
|
|
74
|
-
const list = Object.values(ruleResults);
|
|
75
|
-
if (list.length === 0) {
|
|
76
|
-
return true;
|
|
77
|
-
}
|
|
78
|
-
return list.reduce((prevVal, currentVal) => prevVal && currentVal.isCompliant, list[0].isCompliant);
|
|
79
|
-
}
|
|
80
|
-
function evalResolvedEntities(ruleResult, entities) {
|
|
81
|
-
const compliantEntities = [];
|
|
82
|
-
const violatedEntities = new Set();
|
|
83
|
-
ruleResult.violations.forEach((vio) => {
|
|
84
|
-
if (vio.identifier.length > 0) {
|
|
85
|
-
violatedEntities.add(vio.identifier[0]);
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
Object.keys(entities.resolvedEntities).forEach((entityIdentifier) => {
|
|
89
|
-
if (!violatedEntities.has(entityIdentifier)) {
|
|
90
|
-
compliantEntities.push(entityIdentifier);
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
return { compliantEntities, violatedEntities: Array.from(violatedEntities) };
|
|
94
|
-
}
|
|
95
|
-
export function getTotal(resolveResult) {
|
|
96
|
-
const resolvedCount = resolveResult.resolvedEntities ? Object.keys(resolveResult.resolvedEntities).length : 0;
|
|
97
|
-
const ignoredCount = resolveResult.ignoredEntities ? resolveResult.ignoredEntities.length : 0;
|
|
98
|
-
return resolvedCount + ignoredCount;
|
|
99
|
-
}
|
|
100
|
-
//# sourceMappingURL=policy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"policy.js","sourceRoot":"","sources":["../../../../src/libs/core/policies/policy.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,aAAa,CAAC;AAUvC,MAAM,CAAC,OAAO,OAAgB,MAAU,SAAQ,YAAY;IAKjD;IACA;IACG;IANF,aAAa,CAA4B;IACzC,QAAQ,CAA0B;IAE5C,YACS,MAA6B,EAC7B,WAA2B,EACxB,QAAsB;QAEhC,KAAK,EAAE,CAAC;QAJD,WAAM,GAAN,MAAM,CAAuB;QAC7B,gBAAW,GAAX,WAAW,CAAgB;QACxB,aAAQ,GAAR,QAAQ,CAAc;QAGhC,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,CA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AAC,CAAC,CAAC,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,OAAO,CAAC,CAAC,gBAAgB,EAAE,EAAE;QAClE,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,CAAC;YAC5C,iBAAiB,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE,CAAC;AAC/E,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,aAA2C;IAClE,MAAM,aAAa,GAAG,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9G,MAAM,YAAY,GAAG,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC,aAAa,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9F,OAAO,aAAa,GAAG,YAAY,CAAC;AACtC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AuditRunConfig, ProfilesPolicyFileContent } from '../file-mgmt/schema.js';
|
|
2
|
-
import { AuditContext } from '../registries/types.js';
|
|
3
|
-
import { ResolvedProfile } from '../registries/profiles.js';
|
|
4
|
-
import Policy, { ResolveEntityResult } from './policy.js';
|
|
5
|
-
export default class ProfilePolicy extends Policy<ResolvedProfile> {
|
|
6
|
-
config: ProfilesPolicyFileContent;
|
|
7
|
-
auditConfig: AuditRunConfig;
|
|
8
|
-
private totalEntities;
|
|
9
|
-
constructor(config: ProfilesPolicyFileContent, auditConfig: AuditRunConfig, registry?: import("../registries/profiles.js").default);
|
|
10
|
-
protected resolveEntities(context: AuditContext): Promise<ResolveEntityResult<ResolvedProfile>>;
|
|
11
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { Messages } from '@salesforce/core';
|
|
2
|
-
import MDAPI from '../mdapi/mdapiRetriever.js';
|
|
3
|
-
import { ProfilesRiskPreset } from '../policy-types.js';
|
|
4
|
-
import { ProfilesRegistry } from '../registries/profiles.js';
|
|
5
|
-
import Policy, { getTotal } from './policy.js';
|
|
6
|
-
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
7
|
-
const messages = Messages.loadMessages('@j-schreiber/sf-cli-security-audit', 'policies.general');
|
|
8
|
-
export default class ProfilePolicy extends Policy {
|
|
9
|
-
config;
|
|
10
|
-
auditConfig;
|
|
11
|
-
totalEntities;
|
|
12
|
-
constructor(config, auditConfig, registry = ProfilesRegistry) {
|
|
13
|
-
super(config, auditConfig, registry);
|
|
14
|
-
this.config = config;
|
|
15
|
-
this.auditConfig = auditConfig;
|
|
16
|
-
this.totalEntities = this.config.profiles ? Object.keys(this.config.profiles).length : 0;
|
|
17
|
-
}
|
|
18
|
-
async resolveEntities(context) {
|
|
19
|
-
this.emit('entityresolve', {
|
|
20
|
-
total: this.totalEntities,
|
|
21
|
-
resolved: 0,
|
|
22
|
-
});
|
|
23
|
-
const successfullyResolved = {};
|
|
24
|
-
const ignoredEntities = {};
|
|
25
|
-
const definitiveProfiles = this.config.profiles ?? {};
|
|
26
|
-
const classifiedProfiles = [];
|
|
27
|
-
Object.entries(definitiveProfiles).forEach(([profileName, profileDef]) => {
|
|
28
|
-
if (profileDef.preset === ProfilesRiskPreset.UNKNOWN) {
|
|
29
|
-
ignoredEntities[profileName] = {
|
|
30
|
-
name: profileName,
|
|
31
|
-
message: messages.getMessage('preset-unknown', ['Profile']),
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
classifiedProfiles.push(profileName);
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
const mdapi = new MDAPI(context.targetOrgConnection);
|
|
39
|
-
const resolvedProfiles = await mdapi.resolve('Profile', classifiedProfiles);
|
|
40
|
-
classifiedProfiles.forEach((profileName) => {
|
|
41
|
-
const resolvedProfile = resolvedProfiles[profileName];
|
|
42
|
-
if (!resolvedProfile) {
|
|
43
|
-
ignoredEntities[profileName] = {
|
|
44
|
-
name: profileName,
|
|
45
|
-
message: messages.getMessage('entity-not-found'),
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
successfullyResolved[profileName] = {
|
|
50
|
-
name: profileName,
|
|
51
|
-
preset: definitiveProfiles[profileName].preset,
|
|
52
|
-
metadata: resolvedProfile,
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
const result = { resolvedEntities: successfullyResolved, ignoredEntities: Object.values(ignoredEntities) };
|
|
57
|
-
this.emit('entityresolve', {
|
|
58
|
-
total: this.totalEntities,
|
|
59
|
-
resolved: getTotal(result),
|
|
60
|
-
});
|
|
61
|
-
return result;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
//# sourceMappingURL=profilePolicy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"profilePolicy.js","sourceRoot":"","sources":["../../../../src/libs/core/policies/profilePolicy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,OAAO,KAAK,MAAM,4BAA4B,CAAC;AAE/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAmB,MAAM,2BAA2B,CAAC;AAC9E,OAAO,MAAM,EAAE,EAAE,QAAQ,EAAuB,MAAM,aAAa,CAAC;AAEpE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,oCAAoC,EAA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CAAC,WAAW,CAAC,CAAC;YACvC,CAAC;QACH,CAAC,CAAC,CAAC;QACH,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;QACrD,MAAM,gBAAgB,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC;QAC5E,kBAAkB,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE,EAAE;YACzC,MAAM,eAAe,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;YACtD,IAAI,CAAC,eAAe,EAAE,CAAC;gBACrB,eAAe,CAAC,WAAW,CAAC,GAAG;oBAC7B,IAAI,EAAE,WAAW;oBACjB,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,kBAAkB,CAAC;iBACjD,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,oBAAoB,CAAC,WAAW,CAAC,GAAG;oBAClC,IAAI,EAAE,WAAW;oBACjB,MAAM,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC,MAAM;oBAC9C,QAAQ,EAAE,eAAe;iBAC1B,CAAC;YACJ,CAAC;QACH,CAAC,CAAC,CAAC;QACH,MAAM,MAAM,GAAG,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE,CAAC;QAC3G,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE;YACzB,KAAK,EAAE,IAAI,CAAC,aAAa;YACzB,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC;SAC3B,CAAC,CAAC;QACH,OAAO,MAAM,CAAC;IAChB,CAAC;CACF"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { Record } from '@jsforce/jsforce-node';
|
|
2
|
-
import { Profile as JsForceProfile } from '@jsforce/jsforce-node/lib/api/metadata.js';
|
|
3
|
-
export type CustomPermission = Record & {
|
|
4
|
-
Id: string;
|
|
5
|
-
MasterLabel: string;
|
|
6
|
-
DeveloperName: string;
|
|
7
|
-
};
|
|
8
|
-
export type ConnectedApp = Record & {
|
|
9
|
-
Id: string;
|
|
10
|
-
Name: string;
|
|
11
|
-
OptionsAllowAdminApprovedUsersOnly: boolean;
|
|
12
|
-
};
|
|
13
|
-
export type OauthToken = Record & {
|
|
14
|
-
Id: string;
|
|
15
|
-
User: Pick<User, 'Username'>;
|
|
16
|
-
AppName: string;
|
|
17
|
-
UseCount: number;
|
|
18
|
-
};
|
|
19
|
-
export type User = Record & {
|
|
20
|
-
Username: string;
|
|
21
|
-
LastLoginDate?: string;
|
|
22
|
-
CreatedDate: string;
|
|
23
|
-
Profile: ProfileBasic;
|
|
24
|
-
};
|
|
25
|
-
export type Profile = ProfileBasic & {
|
|
26
|
-
Metadata: JsForceProfile;
|
|
27
|
-
};
|
|
28
|
-
type ProfileBasic = Record & {
|
|
29
|
-
Id: string;
|
|
30
|
-
Name: string;
|
|
31
|
-
UserType: string;
|
|
32
|
-
};
|
|
33
|
-
export type PermissionSet = Record & {
|
|
34
|
-
Id: string;
|
|
35
|
-
IsOwnedByProfile: boolean;
|
|
36
|
-
IsCustom: boolean;
|
|
37
|
-
Name: string;
|
|
38
|
-
Label: string;
|
|
39
|
-
Profile: ProfileBasic;
|
|
40
|
-
NamespacePrefix?: string;
|
|
41
|
-
};
|
|
42
|
-
export type PermissionSetAssignment = Record & {
|
|
43
|
-
AssigneeId: string;
|
|
44
|
-
PermissionSet: Pick<PermissionSet, 'Name'>;
|
|
45
|
-
};
|
|
46
|
-
export type UserLoginsAggregate = Record & {
|
|
47
|
-
LoginType: string;
|
|
48
|
-
Application: string;
|
|
49
|
-
UserId: string;
|
|
50
|
-
LoginCount: number;
|
|
51
|
-
LastLogin: string;
|
|
52
|
-
};
|
|
53
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"salesforceStandardTypes.js","sourceRoot":"","sources":["../../../../src/libs/core/policies/salesforceStandardTypes.ts"],"names":[],"mappings":""}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AuditRunConfig, UsersPolicyFileContent } from '../file-mgmt/schema.js';
|
|
2
|
-
import { AuditContext } from '../registries/types.js';
|
|
3
|
-
import { ResolvedUser } from '../registries/users.js';
|
|
4
|
-
import Policy, { ResolveEntityResult } from './policy.js';
|
|
5
|
-
export default class UserPolicy extends Policy<ResolvedUser> {
|
|
6
|
-
config: UsersPolicyFileContent;
|
|
7
|
-
auditConfig: AuditRunConfig;
|
|
8
|
-
private totalEntities;
|
|
9
|
-
constructor(config: UsersPolicyFileContent, auditConfig: AuditRunConfig, registry?: import("../registries/users.js").default);
|
|
10
|
-
protected resolveEntities(context: AuditContext): Promise<ResolveEntityResult<ResolvedUser>>;
|
|
11
|
-
}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { Messages } from '@salesforce/core';
|
|
2
|
-
import { ACTIVE_USERS_DETAILS_QUERY, buildLoginHistoryQuery } from '../constants.js';
|
|
3
|
-
import { UsersRegistry } from '../registries/users.js';
|
|
4
|
-
import { ProfilesRiskPreset } from '../policy-types.js';
|
|
5
|
-
import Policy, { getTotal } from './policy.js';
|
|
6
|
-
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
7
|
-
const messages = Messages.loadMessages('@j-schreiber/sf-cli-security-audit', 'policies.general');
|
|
8
|
-
export default class UserPolicy extends Policy {
|
|
9
|
-
config;
|
|
10
|
-
auditConfig;
|
|
11
|
-
totalEntities;
|
|
12
|
-
constructor(config, auditConfig, registry = UsersRegistry) {
|
|
13
|
-
super(config, auditConfig, registry);
|
|
14
|
-
this.config = config;
|
|
15
|
-
this.auditConfig = auditConfig;
|
|
16
|
-
this.totalEntities = this.config.users ? Object.keys(this.config.users).length : 0;
|
|
17
|
-
}
|
|
18
|
-
async resolveEntities(context) {
|
|
19
|
-
this.emit('entityresolve', {
|
|
20
|
-
total: this.totalEntities,
|
|
21
|
-
resolved: 0,
|
|
22
|
-
});
|
|
23
|
-
const usersById = {};
|
|
24
|
-
const ignoredEntities = {};
|
|
25
|
-
const configuredUsers = this.config.users ?? {};
|
|
26
|
-
const classifiedUsers = [];
|
|
27
|
-
const userIds = [];
|
|
28
|
-
Object.entries(configuredUsers).forEach(([userName, userDef]) => {
|
|
29
|
-
if (userDef.role === ProfilesRiskPreset.UNKNOWN) {
|
|
30
|
-
ignoredEntities[userName] = {
|
|
31
|
-
name: userName,
|
|
32
|
-
message: messages.getMessage('user-with-role-unknown'),
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
classifiedUsers.push(userName);
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
// fetch all users from org and merge with configured users
|
|
40
|
-
const allUsersOnOrg = await context.targetOrgConnection.query(ACTIVE_USERS_DETAILS_QUERY);
|
|
41
|
-
allUsersOnOrg.records.forEach((user) => {
|
|
42
|
-
if (ignoredEntities[user.Username] === undefined) {
|
|
43
|
-
usersById[user.Id] = {
|
|
44
|
-
userId: user.Id,
|
|
45
|
-
username: user.Username,
|
|
46
|
-
lastLogin: user.LastLoginDate ? Date.parse(user.LastLoginDate) : undefined,
|
|
47
|
-
createdDate: Date.parse(user.CreatedDate),
|
|
48
|
-
assignedProfile: user.Profile.Name,
|
|
49
|
-
assignedPermissionSets: [],
|
|
50
|
-
logins: [],
|
|
51
|
-
role: configuredUsers[user.Username]?.role ?? this.config.options.defaultRoleForMissingUsers,
|
|
52
|
-
};
|
|
53
|
-
userIds.push(user.Id);
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
this.totalEntities = allUsersOnOrg.totalSize;
|
|
57
|
-
this.emit('entityresolve', {
|
|
58
|
-
total: this.totalEntities,
|
|
59
|
-
resolved: 0,
|
|
60
|
-
});
|
|
61
|
-
const userLogins = await resolveLogins(context, this.config.options.analyseLastNDaysOfLoginHistory);
|
|
62
|
-
Object.entries(userLogins).forEach(([userId, user]) => {
|
|
63
|
-
if (usersById[userId] !== undefined) {
|
|
64
|
-
usersById[userId].logins = user.logins;
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
// resolve perm set assignments per user
|
|
68
|
-
// const assignments = await context.targetOrgConnection.query<PermissionSetAssignment>(
|
|
69
|
-
// buildPermsetAssignmentsQuery(userIds)
|
|
70
|
-
// );
|
|
71
|
-
// assignments.records.forEach(assignment => {
|
|
72
|
-
// })
|
|
73
|
-
const result = { resolvedEntities: organizeByUsername(usersById), ignoredEntities: Object.values(ignoredEntities) };
|
|
74
|
-
this.emit('entityresolve', {
|
|
75
|
-
total: this.totalEntities,
|
|
76
|
-
resolved: getTotal(result),
|
|
77
|
-
});
|
|
78
|
-
return result;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
async function resolveLogins(context, daysToAnalyse) {
|
|
82
|
-
const loginHistory = await context.targetOrgConnection.query(buildLoginHistoryQuery(daysToAnalyse));
|
|
83
|
-
const partialUsers = {};
|
|
84
|
-
loginHistory.records.forEach((loginHistoryRow) => {
|
|
85
|
-
if (!partialUsers[loginHistoryRow.UserId]) {
|
|
86
|
-
partialUsers[loginHistoryRow.UserId] = { logins: [] };
|
|
87
|
-
}
|
|
88
|
-
partialUsers[loginHistoryRow.UserId].logins.push({
|
|
89
|
-
loginType: loginHistoryRow.LoginType,
|
|
90
|
-
loginCount: loginHistoryRow.LoginCount,
|
|
91
|
-
application: loginHistoryRow.Application,
|
|
92
|
-
lastLogin: Date.parse(loginHistoryRow.LastLogin),
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
return partialUsers;
|
|
96
|
-
}
|
|
97
|
-
function organizeByUsername(partial) {
|
|
98
|
-
const full = {};
|
|
99
|
-
Object.values(partial).forEach((resolved) => {
|
|
100
|
-
full[resolved.username] = resolved;
|
|
101
|
-
});
|
|
102
|
-
return full;
|
|
103
|
-
}
|
|
104
|
-
//# sourceMappingURL=userPolicy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"userPolicy.js","sourceRoot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AAG,MAAM,OAAO,CAAC,mBAAmB,CAAC,KAAK,CAC1D,sBAAsB,CAAC,aAAa,CAAC,CACtC,CAAC;IACF,MAAM,YAAY,GAA8C,EAAE,CAAC;IACnE,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,eAAe,EAAE,EAAE;QAC/C,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,CAAC;YAC1C,YAAY,CAAC,eAAe,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;QACxD,CAAC;QACD,YAAY,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC;YAC/C,SAAS,EAAE,eAAe,CAAC,SAAS;YACpC,UAAU,EAAE,eAAe,CAAC,UAAU;YACtC,WAAW,EAAE,eAAe,CAAC,WAAW;YACxC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,SAAS,CAAC;SACjD,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,OAAO,YAAY,CAAC;AACtB,CAAC;AAID,SAAS,kBAAkB,CAAC,OAAqC;IAC/D,MAAM,IAAI,GAAiC,EAAE,CAAC;IAC9C,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;QAC1C,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC;IACrC,CAAC,CAAC,CAAC;IACH,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Presets can be assigned to profiles and permission sets.
|
|
3
|
-
* A preset allows permissions up to a fixed risk level.
|
|
4
|
-
*/
|
|
5
|
-
export declare enum ProfilesRiskPreset {
|
|
6
|
-
/** Allows up to "Critical" permissions */
|
|
7
|
-
DEVELOPER = "Developer",
|
|
8
|
-
/** Allows up to "High" permissions */
|
|
9
|
-
ADMIN = "Admin",
|
|
10
|
-
/** Allows up to "Medium" permissions */
|
|
11
|
-
POWER_USER = "Power User",
|
|
12
|
-
/** Allows only "Low" permissions */
|
|
13
|
-
STANDARD_USER = "Standard User",
|
|
14
|
-
/** Disables the profile for audit */
|
|
15
|
-
UNKNOWN = "Unknown"
|
|
16
|
-
}
|
|
17
|
-
export declare function resolvePresetOrdinalValue(value: string): number;
|
|
18
|
-
export declare function permissionAllowedInPreset(permClassification: string, preset: string): boolean;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { PermissionRiskLevel, resolveRiskLevelOrdinalValue } from './classification-types.js';
|
|
2
|
-
/**
|
|
3
|
-
* Presets can be assigned to profiles and permission sets.
|
|
4
|
-
* A preset allows permissions up to a fixed risk level.
|
|
5
|
-
*/
|
|
6
|
-
export var ProfilesRiskPreset;
|
|
7
|
-
(function (ProfilesRiskPreset) {
|
|
8
|
-
/** Allows up to "Critical" permissions */
|
|
9
|
-
ProfilesRiskPreset["DEVELOPER"] = "Developer";
|
|
10
|
-
/** Allows up to "High" permissions */
|
|
11
|
-
ProfilesRiskPreset["ADMIN"] = "Admin";
|
|
12
|
-
/** Allows up to "Medium" permissions */
|
|
13
|
-
ProfilesRiskPreset["POWER_USER"] = "Power User";
|
|
14
|
-
/** Allows only "Low" permissions */
|
|
15
|
-
ProfilesRiskPreset["STANDARD_USER"] = "Standard User";
|
|
16
|
-
/** Disables the profile for audit */
|
|
17
|
-
ProfilesRiskPreset["UNKNOWN"] = "Unknown";
|
|
18
|
-
})(ProfilesRiskPreset || (ProfilesRiskPreset = {}));
|
|
19
|
-
export function resolvePresetOrdinalValue(value) {
|
|
20
|
-
return Object.keys(ProfilesRiskPreset).indexOf(value.toUpperCase().replace(' ', '_'));
|
|
21
|
-
}
|
|
22
|
-
export function permissionAllowedInPreset(permClassification, preset) {
|
|
23
|
-
// this works, as long as we are mindful when adding new risk levels and presets
|
|
24
|
-
const invertedPermValue = Object.keys(PermissionRiskLevel).length - resolveRiskLevelOrdinalValue(permClassification);
|
|
25
|
-
const invertedPresetValue = Object.keys(ProfilesRiskPreset).length - resolvePresetOrdinalValue(preset);
|
|
26
|
-
return invertedPresetValue >= invertedPermValue;
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=policy-types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"policy-types.js","sourceRoot":"","sources":["../../../src/libs/core/policy-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAE9F;;;GAGG;AACH,MAAM,CAAN,IAAY,kBAWX;AAXD,WAAY,kBAAkB;IAC5B,0CAA0C;IAC1C,6CAAuB,CAAA;IACvB,sCAAsC;IACtC,qCAAe,CAAA;IACf,wCAAwC;IACxC,+CAAyB,CAAA;IACzB,oCAAoC;IACpC,qDAA+B,CAAA;IAC/B,qCAAqC;IACrC,yCAAmB,CAAA;AACrB,CAAC,EAXW,kBAAkB,KAAlB,kBAAkB,QAW7B;AAED,MAAM,UAAU,yBAAyB,CAAC,KAAa;IACrD,OAAO,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;AACxF,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,kBAA0B,EAAE,MAAc;IAClF,gFAAgF;IAChF,MAAM,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,MAAM,GAAG,4BAA4B,CAAC,kBAAkB,CAAC,CAAC;IACrH,MAAM,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC,MAAM,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAC;IACvG,OAAO,mBAAmB,IAAI,iBAAiB,CAAC;AAClD,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import z from 'zod';
|
|
2
|
-
import { AuditRunConfigClassifications, AuditRunConfigPolicies } from './file-mgmt/schema.js';
|
|
3
|
-
import { Constructor } from './registries/types.js';
|
|
4
|
-
import Policy from './policies/policy.js';
|
|
5
|
-
export declare const classificationDefs: ClassificationRegistry;
|
|
6
|
-
export type PolicyNames = keyof AuditRunConfigPolicies;
|
|
7
|
-
export type ClassificationNames = keyof AuditRunConfigClassifications;
|
|
8
|
-
export type PolicyRegistry = Record<PolicyNames, PolicyRegistryEntry>;
|
|
9
|
-
export declare const policyDefs: PolicyRegistry;
|
|
10
|
-
type PolicyRegistryEntry = ConfigFileDefinition & {
|
|
11
|
-
dependencies?: ConfigFileDependency[];
|
|
12
|
-
handler: Constructor<Policy<unknown>>;
|
|
13
|
-
};
|
|
14
|
-
type ConfigFileDefinition = {
|
|
15
|
-
fileName?: string;
|
|
16
|
-
schema: z.ZodObject;
|
|
17
|
-
};
|
|
18
|
-
type ConfigFileDependency = {
|
|
19
|
-
errorName: string;
|
|
20
|
-
path: string[];
|
|
21
|
-
};
|
|
22
|
-
type ClassificationRegistry = Record<keyof AuditRunConfigClassifications, ConfigFileDefinition>;
|
|
23
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { PermissionsConfigFileSchema, PermSetsPolicyFileSchema, PolicyFileSchema, ProfilesPolicyFileSchema, UsersPolicyFileSchema, } from './file-mgmt/schema.js';
|
|
2
|
-
import ConnectedAppPolicy from './policies/connectedAppPolicy.js';
|
|
3
|
-
import PermissionSetPolicy from './policies/permissionSetPolicy.js';
|
|
4
|
-
import ProfilePolicy from './policies/profilePolicy.js';
|
|
5
|
-
import UserPolicy from './policies/userPolicy.js';
|
|
6
|
-
export const classificationDefs = {
|
|
7
|
-
userPermissions: {
|
|
8
|
-
schema: PermissionsConfigFileSchema,
|
|
9
|
-
},
|
|
10
|
-
customPermissions: {
|
|
11
|
-
schema: PermissionsConfigFileSchema,
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
export const policyDefs = {
|
|
15
|
-
profiles: {
|
|
16
|
-
handler: ProfilePolicy,
|
|
17
|
-
schema: ProfilesPolicyFileSchema,
|
|
18
|
-
dependencies: [
|
|
19
|
-
{ path: ['classifications', 'userPermissions'], errorName: 'UserPermClassificationRequiredForProfiles' },
|
|
20
|
-
],
|
|
21
|
-
},
|
|
22
|
-
permissionSets: {
|
|
23
|
-
handler: PermissionSetPolicy,
|
|
24
|
-
schema: PermSetsPolicyFileSchema,
|
|
25
|
-
dependencies: [
|
|
26
|
-
{ path: ['classifications', 'userPermissions'], errorName: 'UserPermClassificationRequiredForPermSets' },
|
|
27
|
-
],
|
|
28
|
-
},
|
|
29
|
-
connectedApps: {
|
|
30
|
-
handler: ConnectedAppPolicy,
|
|
31
|
-
schema: PolicyFileSchema,
|
|
32
|
-
},
|
|
33
|
-
users: {
|
|
34
|
-
handler: UserPolicy,
|
|
35
|
-
schema: UsersPolicyFileSchema,
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
//# sourceMappingURL=policyRegistry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"policyRegistry.js","sourceRoot":"","sources":["../../../src/libs/core/policyRegistry.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,2BAA2B,EAC3B,wBAAwB,EACxB,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,kBAAkB,MAAM,kCAAkC,CAAC;AAClE,OAAO,mBAAmB,MAAM,mCAAmC,CAAC;AAEpE,OAAO,aAAa,MAAM,6BAA6B,CAAC;AACxD,OAAO,UAAU,MAAM,0BAA0B,CAAC;AAElD,MAAM,CAAC,MAAM,kBAAkB,GAA2B;IACxD,eAAe,EAAE;QACf,MAAM,EAAE,2BAA2B;KACpC;IACD,iBAAiB,EAAE;QACjB,MAAM,EAAE,2BAA2B;KACpC;CACF,CAAC;AAOF,MAAM,CAAC,MAAM,UAAU,GAAmB;IACxC,QAAQ,EAAE;QACR,OAAO,EAAE,aAAa;QACtB,MAAM,EAAE,wBAAwB;QAChC,YAAY,EAAE;YACZ,EAAE,IAAI,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,EAAE,SAAS,EAAE,2CAA2C,EAAE;SACzG;KACF;IACD,cAAc,EAAE;QACd,OAAO,EAAE,mBAAmB;QAC5B,MAAM,EAAE,wBAAwB;QAChC,YAAY,EAAE;YACZ,EAAE,IAAI,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,EAAE,SAAS,EAAE,2CAA2C,EAAE;SACzG;KACF;IACD,aAAa,EAAE;QACb,OAAO,EAAE,kBAAkB;QAC3B,MAAM,EAAE,gBAAgB;KACzB;IACD,KAAK,EAAE;QACL,OAAO,EAAE,UAAU;QACnB,MAAM,EAAE,qBAAqB;KAC9B;CACF,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import RuleRegistry from './ruleRegistry.js';
|
|
2
|
-
export type ResolvedConnectedApp = {
|
|
3
|
-
name: string;
|
|
4
|
-
origin: 'Installed' | 'OauthToken' | 'Owned';
|
|
5
|
-
onlyAdminApprovedUsersAllowed: boolean;
|
|
6
|
-
overrideByApiSecurityAccess: boolean;
|
|
7
|
-
useCount: number;
|
|
8
|
-
users: string[];
|
|
9
|
-
};
|
|
10
|
-
export default class ConnectedAppsRuleRegistry extends RuleRegistry {
|
|
11
|
-
constructor();
|
|
12
|
-
}
|
|
13
|
-
export declare const ConnectedAppsRegistry: ConnectedAppsRuleRegistry;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import AllUsedAppsUnderManagement from './rules/allUsedAppsUnderManagement.js';
|
|
2
|
-
import NoUserCanSelfAuthorize from './rules/noUserCanSelfAuthorize.js';
|
|
3
|
-
import RuleRegistry from './ruleRegistry.js';
|
|
4
|
-
export default class ConnectedAppsRuleRegistry extends RuleRegistry {
|
|
5
|
-
constructor() {
|
|
6
|
-
super({
|
|
7
|
-
AllUsedAppsUnderManagement,
|
|
8
|
-
NoUserCanSelfAuthorize,
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
export const ConnectedAppsRegistry = new ConnectedAppsRuleRegistry();
|
|
13
|
-
//# sourceMappingURL=connectedApps.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connectedApps.js","sourceRoot":"","sources":["../../../../src/libs/core/registries/connectedApps.ts"],"names":[],"mappings":"AAAA,OAAO,0BAA0B,MAAM,uCAAuC,CAAC;AAC/E,OAAO,sBAAsB,MAAM,mCAAmC,CAAC;AACvE,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAU7C,MAAM,CAAC,OAAO,OAAO,yBAA0B,SAAQ,YAAY;IACjE;QACE,KAAK,CAAC;YACJ,0BAA0B;YAC1B,sBAAsB;SACvB,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,yBAAyB,EAAE,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { PermissionSet } from '@jsforce/jsforce-node/lib/api/metadata.js';
|
|
2
|
-
import RuleRegistry from './ruleRegistry.js';
|
|
3
|
-
export type ResolvedPermissionSet = {
|
|
4
|
-
name: string;
|
|
5
|
-
preset: string;
|
|
6
|
-
metadata: PermissionSet;
|
|
7
|
-
};
|
|
8
|
-
export default class PermSetsRuleRegistry extends RuleRegistry {
|
|
9
|
-
constructor();
|
|
10
|
-
}
|
|
11
|
-
export declare const PermissionSetsRegistry: PermSetsRuleRegistry;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import EnforceUserPermsClassificationOnPermSets from './rules/enforceUserPermsClassificationOnPermSets.js';
|
|
2
|
-
import RuleRegistry from './ruleRegistry.js';
|
|
3
|
-
export default class PermSetsRuleRegistry extends RuleRegistry {
|
|
4
|
-
constructor() {
|
|
5
|
-
super({
|
|
6
|
-
EnforceUserPermissionClassifications: EnforceUserPermsClassificationOnPermSets,
|
|
7
|
-
});
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
export const PermissionSetsRegistry = new PermSetsRuleRegistry();
|
|
11
|
-
//# sourceMappingURL=permissionSets.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"permissionSets.js","sourceRoot":"","sources":["../../../../src/libs/core/registries/permissionSets.ts"],"names":[],"mappings":"AACA,OAAO,wCAAwC,MAAM,qDAAqD,CAAC;AAC3G,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAO7C,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,YAAY;IAC5D;QACE,KAAK,CAAC;YACJ,oCAAoC,EAAE,wCAAwC;SAC/E,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,oBAAoB,EAAE,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Profile as ProfileMetadata } from '@jsforce/jsforce-node/lib/api/metadata.js';
|
|
2
|
-
import RuleRegistry from './ruleRegistry.js';
|
|
3
|
-
export type ResolvedProfile = {
|
|
4
|
-
name: string;
|
|
5
|
-
preset: string;
|
|
6
|
-
metadata: ProfileMetadata;
|
|
7
|
-
};
|
|
8
|
-
export default class ProfilesRuleRegistry extends RuleRegistry {
|
|
9
|
-
constructor();
|
|
10
|
-
}
|
|
11
|
-
export declare const ProfilesRegistry: ProfilesRuleRegistry;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import EnforceCustomPermsClassificationOnProfiles from './rules/enforceCustomPermsClassificationOnProfiles.js';
|
|
2
|
-
import EnforceUserPermsClassificationOnProfiles from './rules/enforceUserPermsClassificationOnProfiles.js';
|
|
3
|
-
import RuleRegistry from './ruleRegistry.js';
|
|
4
|
-
export default class ProfilesRuleRegistry extends RuleRegistry {
|
|
5
|
-
constructor() {
|
|
6
|
-
super({
|
|
7
|
-
EnforceCustomPermissionClassifications: EnforceCustomPermsClassificationOnProfiles,
|
|
8
|
-
EnforceUserPermissionClassifications: EnforceUserPermsClassificationOnProfiles,
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
export const ProfilesRegistry = new ProfilesRuleRegistry();
|
|
13
|
-
//# sourceMappingURL=profiles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../../../src/libs/core/registries/profiles.ts"],"names":[],"mappings":"AACA,OAAO,0CAA0C,MAAM,uDAAuD,CAAC;AAC/G,OAAO,wCAAwC,MAAM,qDAAqD,CAAC;AAC3G,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAQ7C,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,YAAY;IAC5D;QACE,KAAK,CAAC;YACJ,sCAAsC,EAAE,0CAA0C;YAClF,oCAAoC,EAAE,wCAAwC;SAC/E,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,oBAAoB,EAAE,CAAC"}
|