auth0-deploy-cli 8.20.4-beta.0 → 8.21.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/.circleci/config.yml +5 -46
- package/.eslintignore +5 -0
- package/.eslintrc +69 -0
- package/CHANGELOG.md +15 -6
- package/lib/args.js +1 -0
- package/lib/args.js.map +1 -0
- package/lib/commands/export.js +49 -41
- package/lib/commands/export.js.map +1 -0
- package/lib/commands/import.js +43 -36
- package/lib/commands/import.js.map +1 -0
- package/lib/commands/index.js +1 -0
- package/lib/commands/index.js.map +1 -0
- package/lib/configFactory.js +1 -0
- package/lib/configFactory.js.map +1 -0
- package/lib/context/defaults.js +10 -38
- package/lib/context/defaults.js.map +1 -0
- package/lib/context/directory/handlers/actions.js +39 -40
- package/lib/context/directory/handlers/actions.js.map +1 -0
- package/lib/context/directory/handlers/attackProtection.js +34 -22
- package/lib/context/directory/handlers/attackProtection.js.map +1 -0
- package/lib/context/directory/handlers/branding.js +21 -12
- package/lib/context/directory/handlers/branding.js.map +1 -0
- package/lib/context/directory/handlers/clientGrants.js +62 -52
- package/lib/context/directory/handlers/clientGrants.js.map +1 -0
- package/lib/context/directory/handlers/clients.js +60 -17
- package/lib/context/directory/handlers/clients.js.map +1 -0
- package/lib/context/directory/handlers/connectionProfiles.d.ts +11 -0
- package/lib/context/directory/handlers/connectionProfiles.js +59 -0
- package/lib/context/directory/handlers/connectionProfiles.js.map +1 -0
- package/lib/context/directory/handlers/connections.js +41 -32
- package/lib/context/directory/handlers/connections.js.map +1 -0
- package/lib/context/directory/handlers/customDomains.js +21 -9
- package/lib/context/directory/handlers/customDomains.js.map +1 -0
- package/lib/context/directory/handlers/databases.js +35 -37
- package/lib/context/directory/handlers/databases.js.map +1 -0
- package/lib/context/directory/handlers/emailProvider.js +36 -22
- package/lib/context/directory/handlers/emailProvider.js.map +1 -0
- package/lib/context/directory/handlers/emailTemplates.js +29 -20
- package/lib/context/directory/handlers/emailTemplates.js.map +1 -0
- package/lib/context/directory/handlers/flowVaultConnections.js +49 -39
- package/lib/context/directory/handlers/flowVaultConnections.js.map +1 -0
- package/lib/context/directory/handlers/flows.js +48 -38
- package/lib/context/directory/handlers/flows.js.map +1 -0
- package/lib/context/directory/handlers/forms.js +48 -38
- package/lib/context/directory/handlers/forms.js.map +1 -0
- package/lib/context/directory/handlers/guardianFactorProviders.js +21 -9
- package/lib/context/directory/handlers/guardianFactorProviders.js.map +1 -0
- package/lib/context/directory/handlers/guardianFactorTemplates.js +21 -9
- package/lib/context/directory/handlers/guardianFactorTemplates.js.map +1 -0
- package/lib/context/directory/handlers/guardianFactors.js +21 -9
- package/lib/context/directory/handlers/guardianFactors.js.map +1 -0
- package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.js +20 -8
- package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.js.map +1 -0
- package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.js +20 -8
- package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.js.map +1 -0
- package/lib/context/directory/handlers/guardianPolicies.js +20 -8
- package/lib/context/directory/handlers/guardianPolicies.js.map +1 -0
- package/lib/context/directory/handlers/hooks.js +34 -24
- package/lib/context/directory/handlers/hooks.js.map +1 -0
- package/lib/context/directory/handlers/index.js +3 -0
- package/lib/context/directory/handlers/index.js.map +1 -0
- package/lib/context/directory/handlers/logStreams.js +24 -12
- package/lib/context/directory/handlers/logStreams.js.map +1 -0
- package/lib/context/directory/handlers/networkACLs.js +34 -22
- package/lib/context/directory/handlers/networkACLs.js.map +1 -0
- package/lib/context/directory/handlers/organizations.js +44 -39
- package/lib/context/directory/handlers/organizations.js.map +1 -0
- package/lib/context/directory/handlers/pages.js +37 -31
- package/lib/context/directory/handlers/pages.js.map +1 -0
- package/lib/context/directory/handlers/phoneProvider.js +24 -12
- package/lib/context/directory/handlers/phoneProvider.js.map +1 -0
- package/lib/context/directory/handlers/prompts.js +76 -58
- package/lib/context/directory/handlers/prompts.js.map +1 -0
- package/lib/context/directory/handlers/resourceServers.d.ts +1 -1
- package/lib/context/directory/handlers/resourceServers.js +30 -18
- package/lib/context/directory/handlers/resourceServers.js.map +1 -0
- package/lib/context/directory/handlers/roles.js +31 -21
- package/lib/context/directory/handlers/roles.js.map +1 -0
- package/lib/context/directory/handlers/rules.js +32 -22
- package/lib/context/directory/handlers/rules.js.map +1 -0
- package/lib/context/directory/handlers/rulesConfigs.js +15 -3
- package/lib/context/directory/handlers/rulesConfigs.js.map +1 -0
- package/lib/context/directory/handlers/selfServiceProfiles.js +40 -28
- package/lib/context/directory/handlers/selfServiceProfiles.js.map +1 -0
- package/lib/context/directory/handlers/tenant.js +34 -14
- package/lib/context/directory/handlers/tenant.js.map +1 -0
- package/lib/context/directory/handlers/themes.js +21 -9
- package/lib/context/directory/handlers/themes.js.map +1 -0
- package/lib/context/directory/handlers/triggers.d.ts +1 -1
- package/lib/context/directory/handlers/triggers.js +26 -16
- package/lib/context/directory/handlers/triggers.js.map +1 -0
- package/lib/context/directory/handlers/userAttributeProfiles.d.ts +1 -1
- package/lib/context/directory/handlers/userAttributeProfiles.js +26 -16
- package/lib/context/directory/handlers/userAttributeProfiles.js.map +1 -0
- package/lib/context/directory/index.js +80 -66
- package/lib/context/directory/index.js.map +1 -0
- package/lib/context/index.js +20 -9
- package/lib/context/index.js.map +1 -0
- package/lib/context/yaml/handlers/actions.js +41 -39
- package/lib/context/yaml/handlers/actions.js.map +1 -0
- package/lib/context/yaml/handlers/attackProtection.js +41 -27
- package/lib/context/yaml/handlers/attackProtection.js.map +1 -0
- package/lib/context/yaml/handlers/branding.js +69 -47
- package/lib/context/yaml/handlers/branding.js.map +1 -0
- package/lib/context/yaml/handlers/clientGrants.js +40 -26
- package/lib/context/yaml/handlers/clientGrants.js.map +1 -0
- package/lib/context/yaml/handlers/clients.js +85 -41
- package/lib/context/yaml/handlers/clients.js.map +1 -0
- package/lib/context/yaml/handlers/connectionProfiles.d.ts +11 -0
- package/lib/context/yaml/handlers/connectionProfiles.js +44 -0
- package/lib/context/yaml/handlers/connectionProfiles.js.map +1 -0
- package/lib/context/yaml/handlers/connections.js +67 -63
- package/lib/context/yaml/handlers/connections.js.map +1 -0
- package/lib/context/yaml/handlers/customDomains.js +19 -7
- package/lib/context/yaml/handlers/customDomains.js.map +1 -0
- package/lib/context/yaml/handlers/databases.js +65 -63
- package/lib/context/yaml/handlers/databases.js.map +1 -0
- package/lib/context/yaml/handlers/emailProvider.js +37 -22
- package/lib/context/yaml/handlers/emailProvider.js.map +1 -0
- package/lib/context/yaml/handlers/emailTemplates.js +39 -28
- package/lib/context/yaml/handlers/emailTemplates.js.map +1 -0
- package/lib/context/yaml/handlers/flowVaultConnections.js +50 -36
- package/lib/context/yaml/handlers/flowVaultConnections.js.map +1 -0
- package/lib/context/yaml/handlers/flows.js +66 -55
- package/lib/context/yaml/handlers/flows.js.map +1 -0
- package/lib/context/yaml/handlers/forms.js +66 -55
- package/lib/context/yaml/handlers/forms.js.map +1 -0
- package/lib/context/yaml/handlers/guardianFactorProviders.js +19 -7
- package/lib/context/yaml/handlers/guardianFactorProviders.js.map +1 -0
- package/lib/context/yaml/handlers/guardianFactorTemplates.js +19 -7
- package/lib/context/yaml/handlers/guardianFactorTemplates.js.map +1 -0
- package/lib/context/yaml/handlers/guardianFactors.js +19 -7
- package/lib/context/yaml/handlers/guardianFactors.js.map +1 -0
- package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.js +19 -7
- package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.js.map +1 -0
- package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.js +19 -7
- package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.js.map +1 -0
- package/lib/context/yaml/handlers/guardianPolicies.js +19 -7
- package/lib/context/yaml/handlers/guardianPolicies.js.map +1 -0
- package/lib/context/yaml/handlers/hooks.js +48 -34
- package/lib/context/yaml/handlers/hooks.js.map +1 -0
- package/lib/context/yaml/handlers/index.js +3 -0
- package/lib/context/yaml/handlers/index.js.map +1 -0
- package/lib/context/yaml/handlers/logStreams.js +30 -16
- package/lib/context/yaml/handlers/logStreams.js.map +1 -0
- package/lib/context/yaml/handlers/networkACLs.js +39 -25
- package/lib/context/yaml/handlers/networkACLs.js.map +1 -0
- package/lib/context/yaml/handlers/organizations.js +46 -37
- package/lib/context/yaml/handlers/organizations.js.map +1 -0
- package/lib/context/yaml/handlers/pages.js +39 -31
- package/lib/context/yaml/handlers/pages.js.map +1 -0
- package/lib/context/yaml/handlers/phoneProvider.js +31 -17
- package/lib/context/yaml/handlers/phoneProvider.js.map +1 -0
- package/lib/context/yaml/handlers/prompts.js +47 -22
- package/lib/context/yaml/handlers/prompts.js.map +1 -0
- package/lib/context/yaml/handlers/resourceServers.d.ts +1 -1
- package/lib/context/yaml/handlers/resourceServers.js +33 -21
- package/lib/context/yaml/handlers/resourceServers.js.map +1 -0
- package/lib/context/yaml/handlers/roles.js +33 -19
- package/lib/context/yaml/handlers/roles.js.map +1 -0
- package/lib/context/yaml/handlers/rules.js +39 -28
- package/lib/context/yaml/handlers/rules.js.map +1 -0
- package/lib/context/yaml/handlers/rulesConfigs.js +28 -14
- package/lib/context/yaml/handlers/rulesConfigs.js.map +1 -0
- package/lib/context/yaml/handlers/selfServiceProfiles.js +43 -29
- package/lib/context/yaml/handlers/selfServiceProfiles.js.map +1 -0
- package/lib/context/yaml/handlers/tenant.js +41 -19
- package/lib/context/yaml/handlers/tenant.js.map +1 -0
- package/lib/context/yaml/handlers/themes.js +19 -7
- package/lib/context/yaml/handlers/themes.js.map +1 -0
- package/lib/context/yaml/handlers/triggers.d.ts +1 -1
- package/lib/context/yaml/handlers/triggers.js +29 -15
- package/lib/context/yaml/handlers/triggers.js.map +1 -0
- package/lib/context/yaml/handlers/userAttributeProfiles.d.ts +1 -1
- package/lib/context/yaml/handlers/userAttributeProfiles.js +19 -7
- package/lib/context/yaml/handlers/userAttributeProfiles.js.map +1 -0
- package/lib/context/yaml/index.js +128 -120
- package/lib/context/yaml/index.js.map +1 -0
- package/lib/index.d.ts +96 -4
- package/lib/index.js +34 -24
- package/lib/index.js.map +1 -0
- package/lib/keywordPreservation.d.ts +1 -1
- package/lib/keywordPreservation.js +6 -10
- package/lib/keywordPreservation.js.map +1 -0
- package/lib/logger.js +1 -0
- package/lib/logger.js.map +1 -0
- package/lib/readonly.js +4 -3
- package/lib/readonly.js.map +1 -0
- package/lib/sessionDurationsToMinutes.js +1 -0
- package/lib/sessionDurationsToMinutes.js.map +1 -0
- package/lib/tools/auth0/client.js +127 -108
- package/lib/tools/auth0/client.js.map +1 -0
- package/lib/tools/auth0/handlers/actions.d.ts +26 -8
- package/lib/tools/auth0/handlers/actions.js +149 -138
- package/lib/tools/auth0/handlers/actions.js.map +1 -0
- package/lib/tools/auth0/handlers/attackProtection.js +92 -80
- package/lib/tools/auth0/handlers/attackProtection.js.map +1 -0
- package/lib/tools/auth0/handlers/branding.js +99 -75
- package/lib/tools/auth0/handlers/branding.js.map +1 -0
- package/lib/tools/auth0/handlers/clientGrants.d.ts +9 -2
- package/lib/tools/auth0/handlers/clientGrants.js +72 -65
- package/lib/tools/auth0/handlers/clientGrants.js.map +1 -0
- package/lib/tools/auth0/handlers/clients.d.ts +85 -7
- package/lib/tools/auth0/handlers/clients.js +187 -66
- package/lib/tools/auth0/handlers/clients.js.map +1 -0
- package/lib/tools/auth0/handlers/connectionProfiles.d.ts +182 -0
- package/lib/tools/auth0/handlers/connectionProfiles.js +239 -0
- package/lib/tools/auth0/handlers/connectionProfiles.js.map +1 -0
- package/lib/tools/auth0/handlers/connections.d.ts +1 -3
- package/lib/tools/auth0/handlers/connections.js +135 -130
- package/lib/tools/auth0/handlers/connections.js.map +1 -0
- package/lib/tools/auth0/handlers/customDomains.d.ts +1 -4
- package/lib/tools/auth0/handlers/customDomains.js +53 -43
- package/lib/tools/auth0/handlers/customDomains.js.map +1 -0
- package/lib/tools/auth0/handlers/databases.js +114 -94
- package/lib/tools/auth0/handlers/databases.js.map +1 -0
- package/lib/tools/auth0/handlers/default.d.ts +2 -2
- package/lib/tools/auth0/handlers/default.js +171 -210
- package/lib/tools/auth0/handlers/default.js.map +1 -0
- package/lib/tools/auth0/handlers/emailProvider.js +52 -41
- package/lib/tools/auth0/handlers/emailProvider.js.map +1 -0
- package/lib/tools/auth0/handlers/emailTemplates.js +71 -49
- package/lib/tools/auth0/handlers/emailTemplates.js.map +1 -0
- package/lib/tools/auth0/handlers/flowVaultConnections.d.ts +12 -5
- package/lib/tools/auth0/handlers/flowVaultConnections.js +143 -108
- package/lib/tools/auth0/handlers/flowVaultConnections.js.map +1 -0
- package/lib/tools/auth0/handlers/flows.d.ts +3 -2
- package/lib/tools/auth0/handlers/flows.js +129 -92
- package/lib/tools/auth0/handlers/flows.js.map +1 -0
- package/lib/tools/auth0/handlers/forms.d.ts +3 -3
- package/lib/tools/auth0/handlers/forms.js +112 -98
- package/lib/tools/auth0/handlers/forms.js.map +1 -0
- package/lib/tools/auth0/handlers/guardianFactorProviders.js +84 -61
- package/lib/tools/auth0/handlers/guardianFactorProviders.js.map +1 -0
- package/lib/tools/auth0/handlers/guardianFactorTemplates.js +68 -46
- package/lib/tools/auth0/handlers/guardianFactorTemplates.js.map +1 -0
- package/lib/tools/auth0/handlers/guardianFactors.js +45 -35
- package/lib/tools/auth0/handlers/guardianFactors.js.map +1 -0
- package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js +45 -29
- package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js.map +1 -0
- package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js +45 -29
- package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js.map +1 -0
- package/lib/tools/auth0/handlers/guardianPolicies.js +35 -20
- package/lib/tools/auth0/handlers/guardianPolicies.js.map +1 -0
- package/lib/tools/auth0/handlers/hooks.js +153 -123
- package/lib/tools/auth0/handlers/hooks.js.map +1 -0
- package/lib/tools/auth0/handlers/index.js +3 -0
- package/lib/tools/auth0/handlers/index.js.map +1 -0
- package/lib/tools/auth0/handlers/logStreams.js +47 -42
- package/lib/tools/auth0/handlers/logStreams.js.map +1 -0
- package/lib/tools/auth0/handlers/networkACLs.d.ts +4 -5
- package/lib/tools/auth0/handlers/networkACLs.js +133 -115
- package/lib/tools/auth0/handlers/networkACLs.js.map +1 -0
- package/lib/tools/auth0/handlers/organizations.d.ts +9 -10
- package/lib/tools/auth0/handlers/organizations.js +429 -360
- package/lib/tools/auth0/handlers/organizations.js.map +1 -0
- package/lib/tools/auth0/handlers/pages.js +83 -74
- package/lib/tools/auth0/handlers/pages.js.map +1 -0
- package/lib/tools/auth0/handlers/phoneProvider.d.ts +2 -2
- package/lib/tools/auth0/handlers/phoneProvider.js +82 -69
- package/lib/tools/auth0/handlers/phoneProvider.js.map +1 -0
- package/lib/tools/auth0/handlers/prompts.d.ts +5 -5
- package/lib/tools/auth0/handlers/prompts.js +235 -240
- package/lib/tools/auth0/handlers/prompts.js.map +1 -0
- package/lib/tools/auth0/handlers/resourceServers.d.ts +1 -3
- package/lib/tools/auth0/handlers/resourceServers.js +60 -59
- package/lib/tools/auth0/handlers/resourceServers.js.map +1 -0
- package/lib/tools/auth0/handlers/roles.js +178 -162
- package/lib/tools/auth0/handlers/roles.js.map +1 -0
- package/lib/tools/auth0/handlers/rules.js +162 -144
- package/lib/tools/auth0/handlers/rules.js.map +1 -0
- package/lib/tools/auth0/handlers/rulesConfigs.js +39 -30
- package/lib/tools/auth0/handlers/rulesConfigs.js.map +1 -0
- package/lib/tools/auth0/handlers/scimHandler.d.ts +3 -4
- package/lib/tools/auth0/handlers/scimHandler.js +132 -110
- package/lib/tools/auth0/handlers/scimHandler.js.map +1 -0
- package/lib/tools/auth0/handlers/selfServiceProfiles.d.ts +5 -13
- package/lib/tools/auth0/handlers/selfServiceProfiles.js +204 -170
- package/lib/tools/auth0/handlers/selfServiceProfiles.js.map +1 -0
- package/lib/tools/auth0/handlers/tenant.d.ts +3 -5
- package/lib/tools/auth0/handlers/tenant.js +52 -45
- package/lib/tools/auth0/handlers/tenant.js.map +1 -0
- package/lib/tools/auth0/handlers/themes.d.ts +12 -12
- package/lib/tools/auth0/handlers/themes.js +102 -86
- package/lib/tools/auth0/handlers/themes.js.map +1 -0
- package/lib/tools/auth0/handlers/triggers.js +75 -59
- package/lib/tools/auth0/handlers/triggers.js.map +1 -0
- package/lib/tools/auth0/handlers/userAttributeProfiles.d.ts +4 -4
- package/lib/tools/auth0/handlers/userAttributeProfiles.js +63 -56
- package/lib/tools/auth0/handlers/userAttributeProfiles.js.map +1 -0
- package/lib/tools/auth0/index.js +48 -35
- package/lib/tools/auth0/index.js.map +1 -0
- package/lib/tools/auth0/schema.js +4 -6
- package/lib/tools/auth0/schema.js.map +1 -0
- package/lib/tools/calculateChanges.js +15 -24
- package/lib/tools/calculateChanges.js.map +1 -0
- package/lib/tools/constants.d.ts +3 -2
- package/lib/tools/constants.js +2 -0
- package/lib/tools/constants.js.map +1 -0
- package/lib/tools/deploy.js +29 -17
- package/lib/tools/deploy.js.map +1 -0
- package/lib/tools/index.d.ts +89 -3
- package/lib/tools/index.js +2 -3
- package/lib/tools/index.js.map +1 -0
- package/lib/tools/utils.d.ts +1 -1
- package/lib/tools/utils.js +22 -12
- package/lib/tools/utils.js.map +1 -0
- package/lib/tools/validationError.js +1 -0
- package/lib/tools/validationError.js.map +1 -0
- package/lib/types.d.ts +6 -9
- package/lib/types.js +1 -0
- package/lib/types.js.map +1 -0
- package/lib/utils.d.ts +58 -3
- package/lib/utils.js +5 -8
- package/lib/utils.js.map +1 -0
- package/package.json +10 -11
- package/tsconfig.json +3 -4
- package/eslint.config.js +0 -130
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
2
11
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
13
|
};
|
|
@@ -37,39 +46,34 @@ class ScimHandler {
|
|
|
37
46
|
* So, we need this map to perform `create`, `update` or `delete` actions on SCIM.
|
|
38
47
|
* @param connections
|
|
39
48
|
*/
|
|
40
|
-
|
|
41
|
-
this
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
if (connection_id) {
|
|
60
|
-
this.idMap.set(connection_id, {
|
|
61
|
-
...this.idMap.get(connection_id),
|
|
62
|
-
scimConfiguration: { mapping, user_id_attribute },
|
|
63
|
-
});
|
|
49
|
+
createIdMap(connections) {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
this.idMap.clear();
|
|
52
|
+
logger_1.default.info('Reviewing connections for SCIM support. This may take a while...');
|
|
53
|
+
yield this.poolClient
|
|
54
|
+
.addEachTask({
|
|
55
|
+
data: connections || [],
|
|
56
|
+
generator: (connection) => {
|
|
57
|
+
if (!this.scimScopes.read)
|
|
58
|
+
return Promise.resolve(null);
|
|
59
|
+
if (!this.isScimStrategy(connection.strategy))
|
|
60
|
+
return Promise.resolve(null);
|
|
61
|
+
this.idMap.set(connection.id, { strategy: connection.strategy });
|
|
62
|
+
return this.getScimConfiguration({ id: connection.id })
|
|
63
|
+
.then((response) => {
|
|
64
|
+
const scimConfiguration = response === null || response === void 0 ? void 0 : response.data;
|
|
65
|
+
if (scimConfiguration) {
|
|
66
|
+
const { mapping, user_id_attribute, connection_id } = scimConfiguration;
|
|
67
|
+
this.idMap.set(connection_id, Object.assign(Object.assign({}, this.idMap.get(connection_id)), { scimConfiguration: { mapping, user_id_attribute } }));
|
|
64
68
|
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
69
|
+
})
|
|
70
|
+
.catch((error) => {
|
|
71
|
+
throw new Error(`Problem fetching SCIM configurations while running \"createIdMap\".\n${error}`);
|
|
72
|
+
});
|
|
73
|
+
},
|
|
74
|
+
})
|
|
75
|
+
.promise();
|
|
76
|
+
});
|
|
73
77
|
}
|
|
74
78
|
/**
|
|
75
79
|
* Iterate through all the connections and add property `scim_configuration` to only `SCIM` connections.
|
|
@@ -79,20 +83,22 @@ class ScimHandler {
|
|
|
79
83
|
*
|
|
80
84
|
* This method mutates the incoming `connections`.
|
|
81
85
|
*/
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
if (
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
for (const connection of connections) {
|
|
91
|
-
const { scimConfiguration } = this.idMap.get(connection.id) || {};
|
|
92
|
-
if (scimConfiguration) {
|
|
93
|
-
connection.scim_configuration = scimConfiguration;
|
|
86
|
+
applyScimConfiguration(connections) {
|
|
87
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
+
// If `this.idMap` is empty, it means we haven't created the idMap yet. Create it.
|
|
89
|
+
// If `this.scimScopes.read` is false, it means we don't have `read:scim_config` scope. Return connections as is.
|
|
90
|
+
if (this.idMap.size === 0) {
|
|
91
|
+
if (!this.scimScopes.read)
|
|
92
|
+
return connections;
|
|
93
|
+
yield this.createIdMap(connections);
|
|
94
94
|
}
|
|
95
|
-
|
|
95
|
+
for (const connection of connections) {
|
|
96
|
+
const { scimConfiguration } = this.idMap.get(connection.id) || {};
|
|
97
|
+
if (scimConfiguration) {
|
|
98
|
+
connection.scim_configuration = scimConfiguration;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
});
|
|
96
102
|
}
|
|
97
103
|
/**
|
|
98
104
|
* Wrapper over scimClient methods.
|
|
@@ -114,18 +120,21 @@ class ScimHandler {
|
|
|
114
120
|
/**
|
|
115
121
|
* Error handler wrapper.
|
|
116
122
|
*/
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
123
|
+
withErrorHandling(callback, method, connectionId) {
|
|
124
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
+
try {
|
|
126
|
+
return yield callback();
|
|
127
|
+
}
|
|
128
|
+
catch (error) {
|
|
129
|
+
return this.handleExpectedErrors(error, method, connectionId);
|
|
130
|
+
}
|
|
131
|
+
});
|
|
124
132
|
}
|
|
125
133
|
/**
|
|
126
134
|
* Handle expected errors.
|
|
127
135
|
*/
|
|
128
136
|
handleExpectedErrors(error, method, connectionId) {
|
|
137
|
+
var _a;
|
|
129
138
|
// Skip the connection if it returns 404. This can happen if `SCIM` is not enabled on a `SCIM` connection.
|
|
130
139
|
if (error && error.statusCode === 404) {
|
|
131
140
|
logger_1.default.debug(`SCIM configuration is not enabled on connection \"${connectionId}\".`);
|
|
@@ -141,7 +150,7 @@ class ScimHandler {
|
|
|
141
150
|
return null;
|
|
142
151
|
}
|
|
143
152
|
// Skip the connection if it returns 400. This can happen if `SCIM` configuration already exists on a `SCIM` connection.
|
|
144
|
-
if (error && error.statusCode === 400 && error.message
|
|
153
|
+
if (error && error.statusCode === 400 && ((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('already exists'))) {
|
|
145
154
|
logger_1.default.warn(`SCIM configuration already exists on connection \"${connectionId}\".`);
|
|
146
155
|
return null;
|
|
147
156
|
}
|
|
@@ -156,81 +165,94 @@ class ScimHandler {
|
|
|
156
165
|
/**
|
|
157
166
|
* Creates a new `SCIM` configuration.
|
|
158
167
|
*/
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
168
|
+
createScimConfiguration(_a, _b) {
|
|
169
|
+
return __awaiter(this, arguments, void 0, function* ({ id },
|
|
170
|
+
// eslint-disable-next-line camelcase
|
|
171
|
+
{ user_id_attribute, mapping }) {
|
|
172
|
+
logger_1.default.debug(`Creating SCIM configuration on connection ${id}`);
|
|
173
|
+
return this.withErrorHandling(() => __awaiter(this, void 0, void 0, function* () { return this.connectionsManager.createScimConfiguration({ id }, { user_id_attribute, mapping }); }), 'create', id);
|
|
174
|
+
});
|
|
164
175
|
}
|
|
165
176
|
/**
|
|
166
177
|
* Retrieves `SCIM` configuration of an enterprise connection.
|
|
167
178
|
*/
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
179
|
+
getScimConfiguration(_a) {
|
|
180
|
+
return __awaiter(this, arguments, void 0, function* ({ id }) {
|
|
181
|
+
logger_1.default.debug(`Getting SCIM configuration from connection ${id}`);
|
|
182
|
+
return this.withErrorHandling(() => __awaiter(this, void 0, void 0, function* () { return this.connectionsManager.getScimConfiguration({ id }); }), 'get', id);
|
|
183
|
+
});
|
|
171
184
|
}
|
|
172
185
|
/**
|
|
173
186
|
* Updates an existing `SCIM` configuration.
|
|
174
187
|
*/
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
188
|
+
updateScimConfiguration(_a, _b) {
|
|
189
|
+
return __awaiter(this, arguments, void 0, function* ({ id },
|
|
190
|
+
// eslint-disable-next-line camelcase
|
|
191
|
+
{ user_id_attribute, mapping }) {
|
|
192
|
+
logger_1.default.debug(`Updating SCIM configuration on connection ${id}`);
|
|
193
|
+
return this.withErrorHandling(() => __awaiter(this, void 0, void 0, function* () { return this.connectionsManager.updateScimConfiguration({ id }, { user_id_attribute, mapping }); }), 'patch', id);
|
|
194
|
+
});
|
|
180
195
|
}
|
|
181
196
|
/**
|
|
182
197
|
* Deletes an existing `SCIM` configuration.
|
|
183
198
|
*/
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
199
|
+
deleteScimConfiguration(_a) {
|
|
200
|
+
return __awaiter(this, arguments, void 0, function* ({ id }) {
|
|
201
|
+
logger_1.default.debug(`Deleting SCIM configuration on connection ${id}`);
|
|
202
|
+
return this.withErrorHandling(() => __awaiter(this, void 0, void 0, function* () { return this.connectionsManager.deleteScimConfiguration({ id }); }), 'delete', id);
|
|
203
|
+
});
|
|
187
204
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
if (
|
|
202
|
-
if (
|
|
203
|
-
|
|
205
|
+
updateOverride(requestParams, bodyParams) {
|
|
206
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
207
|
+
// Extract `scim_configuration` from `bodyParams`.
|
|
208
|
+
// Remove `scim_configuration` from `bodyParams`, because `connections.update` doesn't accept it.
|
|
209
|
+
const { scim_configuration: scimBodyParams } = bodyParams;
|
|
210
|
+
delete bodyParams.scim_configuration;
|
|
211
|
+
// First, update `connections`.
|
|
212
|
+
const updated = yield this.connectionsManager.update(requestParams, bodyParams);
|
|
213
|
+
const idMapEntry = this.idMap.get(requestParams.id);
|
|
214
|
+
// Now, update `scim_configuration` inside the updated connection.
|
|
215
|
+
// If `scim_configuration` exists in both local and remote -> updateScimConfiguration(...)
|
|
216
|
+
// If `scim_configuration` exists in remote but local -> deleteScimConfiguration(...)
|
|
217
|
+
// If `scim_configuration` exists in local but remote -> createScimConfiguration(...)
|
|
218
|
+
if (idMapEntry === null || idMapEntry === void 0 ? void 0 : idMapEntry.scimConfiguration) {
|
|
219
|
+
if (scimBodyParams) {
|
|
220
|
+
if (this.scimScopes.update) {
|
|
221
|
+
yield this.updateScimConfiguration(requestParams, scimBodyParams);
|
|
222
|
+
}
|
|
204
223
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
224
|
+
else if (this.config('AUTH0_ALLOW_DELETE')) {
|
|
225
|
+
if (this.scimScopes.delete) {
|
|
226
|
+
yield this.deleteScimConfiguration(requestParams);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
logger_1.default.warn(`Skipping DELETE scim_configuration on \"${requestParams.id}\". Enable deletes by setting \"AUTH0_ALLOW_DELETE\" to true in your config.`);
|
|
209
231
|
}
|
|
210
232
|
}
|
|
211
|
-
else {
|
|
212
|
-
|
|
233
|
+
else if (scimBodyParams && this.scimScopes.create) {
|
|
234
|
+
yield this.createScimConfiguration(requestParams, scimBodyParams);
|
|
213
235
|
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}
|
|
218
|
-
// Return response from connections.update(...).
|
|
219
|
-
return updated;
|
|
236
|
+
// Return response from connections.update(...).
|
|
237
|
+
return updated;
|
|
238
|
+
});
|
|
220
239
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
240
|
+
createOverride(bodyParams) {
|
|
241
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
242
|
+
// Extract `scim_configuration` from `bodyParams`.
|
|
243
|
+
// Remove `scim_configuration` from `bodyParams`, because `connections.create` doesn't accept it.
|
|
244
|
+
const { scim_configuration: scimBodyParams } = bodyParams;
|
|
245
|
+
delete bodyParams.scim_configuration;
|
|
246
|
+
// First, create the new `connection`.
|
|
247
|
+
const { data } = yield this.connectionsManager.create(bodyParams);
|
|
248
|
+
if (scimBodyParams && this.scimScopes.create) {
|
|
249
|
+
// Now, create the `scim_configuration` for newly created `connection`.
|
|
250
|
+
yield this.createScimConfiguration({ id: data.id }, scimBodyParams);
|
|
251
|
+
}
|
|
252
|
+
// Return response from connections.create(...).
|
|
253
|
+
return data;
|
|
254
|
+
});
|
|
234
255
|
}
|
|
235
256
|
}
|
|
236
257
|
exports.default = ScimHandler;
|
|
258
|
+
//# sourceMappingURL=scimHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scimHandler.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/scimHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAGA,6DAAkC;AA+BlC;;;GAGG;AACH,MAAqB,WAAW;IAsB9B,YAAY,MAAM,EAAE,kBAAkB,EAAE,UAA+B;QAnBtD,mBAAc,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAM5D,eAAU,GAAe,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QAElF,mBAAc,GAAG;YACvB,GAAG,EAAE,MAAM;YACX,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,QAAQ;YACf,MAAM,EAAE,QAAQ;SACjB,CAAC;QAOA,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;QAC7C,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,IAAI,GAAG,EAAsB,CAAC;IAC7C,CAAC;IAED;;;OAGG;IACH,cAAc,CAAC,QAAgB;QAC7B,OAAO,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,CA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ACjB,CAAC;KAAA;IAEK,cAAc,CAAC,UAAiB;;YACpC,kDAAkD;YAClD,iGAAiG;YACjG,MAAM,EAAE,kBAAkB,EAAE,cAAc,EAAE,GAAG,UAAU,CAAC;YAC1D,OAAO,UAAU,CAAC,kBAAkB,CAAC;YAErC,sCAAsC;YACtC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,UAA8B,CAAC,CAAC;YAEtF,IAAI,cAAc,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC;gBAC7C,uEAAuE;gBACvE,MAAM,IAAI,CAAC,uBAAuB,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE,cAAc,CAAC,CAAC;YACtE,CAAC;YAED,gDAAgD;YAChD,OAAO,IAAI,CAAC;QACd,CAAC;KAAA;CACF;AArSD,8BAqSC"}
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Asset, Assets, CalculatedChanges } from '../../../types';
|
|
1
|
+
import { GetSelfServiceProfileCustomTextLanguageEnum, GetSelfServiceProfileCustomTextPageEnum, SsProfile, UserAttributeProfile } from 'auth0';
|
|
2
|
+
import { Asset, Assets, Auth0APIClient, CalculatedChanges } from '../../../types';
|
|
3
3
|
import DefaultAPIHandler from './default';
|
|
4
|
-
import { UserAttributeProfile } from './userAttributeProfiles';
|
|
5
|
-
declare const SelfServiceProfileCustomTextLanguageEnum: {
|
|
6
|
-
readonly en: "en";
|
|
7
|
-
};
|
|
8
|
-
declare const SelfServiceProfileCustomTextPageEnum: {
|
|
9
|
-
readonly getStarted: "get-started";
|
|
10
|
-
};
|
|
11
4
|
type customTextType = {
|
|
12
|
-
[
|
|
13
|
-
[
|
|
5
|
+
[GetSelfServiceProfileCustomTextLanguageEnum.en]: {
|
|
6
|
+
[GetSelfServiceProfileCustomTextPageEnum.get_started]: Object;
|
|
14
7
|
};
|
|
15
8
|
};
|
|
16
|
-
type SsProfile = Management.SelfServiceProfile;
|
|
17
9
|
export type SsProfileWithCustomText = Omit<SsProfile, 'created_at' | 'updated_at'> & {
|
|
18
10
|
customText?: customTextType;
|
|
19
11
|
};
|
|
@@ -97,7 +89,7 @@ export default class SelfServiceProfileHandler extends DefaultAPIHandler {
|
|
|
97
89
|
updateSelfServiceProfile(profile: SsProfileWithCustomText): Promise<Asset>;
|
|
98
90
|
deleteSelfServiceProfiles(deletes: CalculatedChanges['del']): Promise<void>;
|
|
99
91
|
deleteSelfServiceProfile(profile: SsProfileWithCustomText): Promise<void>;
|
|
100
|
-
getUserAttributeProfiles(selfServiceProfiles: SsProfileWithCustomText[]): Promise<UserAttributeProfile[]>;
|
|
92
|
+
getUserAttributeProfiles(auth0Client: Auth0APIClient, selfServiceProfiles: SsProfileWithCustomText[]): Promise<UserAttributeProfile[]>;
|
|
101
93
|
hasConflictingUserAttribute(profile: SsProfileWithCustomText): boolean;
|
|
102
94
|
}
|
|
103
95
|
export {};
|