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,24 @@
|
|
|
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
|
+
};
|
|
11
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
12
|
+
var t = {};
|
|
13
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
+
t[p] = s[p];
|
|
15
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
+
t[p[i]] = s[p[i]];
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
21
|
+
};
|
|
2
22
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
23
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
24
|
};
|
|
@@ -199,138 +219,136 @@ exports.schema = {
|
|
|
199
219
|
};
|
|
200
220
|
class NetworkACLsHandler extends default_1.default {
|
|
201
221
|
constructor(config) {
|
|
202
|
-
super({
|
|
203
|
-
...config,
|
|
204
|
-
type: 'networkACLs',
|
|
205
|
-
id: 'id',
|
|
206
|
-
identifiers: ['id', 'priority', 'active', 'rule'],
|
|
207
|
-
stripCreateFields: ['created_at', 'updated_at'],
|
|
208
|
-
stripUpdateFields: ['created_at', 'updated_at'],
|
|
209
|
-
});
|
|
222
|
+
super(Object.assign(Object.assign({}, config), { type: 'networkACLs', id: 'id', identifiers: ['id', 'priority', 'active', 'rule'], stripCreateFields: ['created_at', 'updated_at'], stripUpdateFields: ['created_at', 'updated_at'] }));
|
|
210
223
|
}
|
|
211
|
-
|
|
212
|
-
return
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
priority: acl.priority,
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
async getType() {
|
|
219
|
-
if (this.existing) {
|
|
220
|
-
return this.existing;
|
|
221
|
-
}
|
|
222
|
-
try {
|
|
223
|
-
const networkACLs = await (0, client_1.paginate)(this.client.networkAcls.list, {
|
|
224
|
-
paginate: true,
|
|
225
|
-
});
|
|
226
|
-
this.existing = networkACLs;
|
|
227
|
-
return this.existing;
|
|
228
|
-
}
|
|
229
|
-
catch (err) {
|
|
230
|
-
if (err.statusCode === 404 || err.statusCode === 501) {
|
|
231
|
-
return null;
|
|
224
|
+
getType() {
|
|
225
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
226
|
+
if (this.existing) {
|
|
227
|
+
return this.existing;
|
|
232
228
|
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
229
|
+
try {
|
|
230
|
+
const networkACLs = yield (0, client_1.paginate)(this.client.networkAcls.getAll, {
|
|
231
|
+
paginate: true,
|
|
232
|
+
include_totals: true,
|
|
233
|
+
});
|
|
234
|
+
this.existing = networkACLs;
|
|
235
|
+
return this.existing;
|
|
236
236
|
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
logger_1.default.debug(`Start processChanges for network ACLs [delete:${del.length}] [update:${update.length}], [create:${create.length}]`);
|
|
247
|
-
const changes = [{ del: del }, { create: create }, { update: update }];
|
|
248
|
-
await Promise.all(changes.map(async (change) => {
|
|
249
|
-
switch (true) {
|
|
250
|
-
case change.del && change.del.length > 0:
|
|
251
|
-
await this.deleteNetworkACLs(change.del || []);
|
|
252
|
-
break;
|
|
253
|
-
case change.create && change.create.length > 0:
|
|
254
|
-
await this.createNetworkACLs(change.create);
|
|
255
|
-
break;
|
|
256
|
-
case change.update && change.update.length > 0:
|
|
257
|
-
if (change.update)
|
|
258
|
-
await this.updateNetworkACLs(change.update);
|
|
259
|
-
break;
|
|
260
|
-
default:
|
|
261
|
-
break;
|
|
237
|
+
catch (err) {
|
|
238
|
+
if (err.statusCode === 404 || err.statusCode === 501) {
|
|
239
|
+
return null;
|
|
240
|
+
}
|
|
241
|
+
if (err.statusCode === 403) {
|
|
242
|
+
logger_1.default.debug('Tenant ACL Management is not enabled for this tenant. Please verify `scope` or contact Auth0 support to enable this feature.');
|
|
243
|
+
return null;
|
|
244
|
+
}
|
|
245
|
+
throw err;
|
|
262
246
|
}
|
|
263
|
-
})
|
|
264
|
-
}
|
|
265
|
-
async createNetworkACL(acl) {
|
|
266
|
-
await this.client.networkAcls.create(acl);
|
|
267
|
-
return acl;
|
|
247
|
+
});
|
|
268
248
|
}
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
249
|
+
processChanges(assets) {
|
|
250
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
251
|
+
const { networkACLs } = assets;
|
|
252
|
+
// Do nothing if not set
|
|
253
|
+
if (!networkACLs)
|
|
254
|
+
return;
|
|
255
|
+
const { del, update, create } = yield this.calcChanges(assets);
|
|
256
|
+
logger_1.default.debug(`Start processChanges for network ACLs [delete:${del.length}] [update:${update.length}], [create:${create.length}]`);
|
|
257
|
+
const changes = [{ del: del }, { create: create }, { update: update }];
|
|
258
|
+
yield Promise.all(changes.map((change) => __awaiter(this, void 0, void 0, function* () {
|
|
259
|
+
switch (true) {
|
|
260
|
+
case change.del && change.del.length > 0:
|
|
261
|
+
yield this.deleteNetworkACLs(change.del || []);
|
|
262
|
+
break;
|
|
263
|
+
case change.create && change.create.length > 0:
|
|
264
|
+
yield this.createNetworkACLs(change.create);
|
|
265
|
+
break;
|
|
266
|
+
case change.update && change.update.length > 0:
|
|
267
|
+
if (change.update)
|
|
268
|
+
yield this.updateNetworkACLs(change.update);
|
|
269
|
+
break;
|
|
270
|
+
default:
|
|
271
|
+
break;
|
|
272
|
+
}
|
|
273
|
+
})));
|
|
274
|
+
});
|
|
283
275
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
}
|
|
289
|
-
const updated = await this.client.networkAcls.update(id, updateParams);
|
|
290
|
-
return updated;
|
|
276
|
+
createNetworkACL(acl) {
|
|
277
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
278
|
+
const { data: created } = yield this.client.networkAcls.create(acl);
|
|
279
|
+
return created;
|
|
280
|
+
});
|
|
291
281
|
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
.
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
282
|
+
createNetworkACLs(creates) {
|
|
283
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
284
|
+
yield this.client.pool
|
|
285
|
+
.addEachTask({
|
|
286
|
+
data: creates || [],
|
|
287
|
+
generator: (item) => this.createNetworkACL(item)
|
|
288
|
+
.then((data) => {
|
|
289
|
+
this.didCreate(data);
|
|
290
|
+
this.created += 1;
|
|
291
|
+
})
|
|
292
|
+
.catch((err) => {
|
|
293
|
+
throw new Error(`Problem creating ${this.type} ${this.objString(item)}\n${err}`);
|
|
294
|
+
}),
|
|
300
295
|
})
|
|
301
|
-
.
|
|
302
|
-
|
|
303
|
-
}),
|
|
304
|
-
})
|
|
305
|
-
.promise();
|
|
296
|
+
.promise();
|
|
297
|
+
});
|
|
306
298
|
}
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
299
|
+
updateNetworkACL(acl) {
|
|
300
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
301
|
+
const { id } = acl, updateParams = __rest(acl, ["id"]);
|
|
302
|
+
const updated = yield this.client.networkAcls.update({ id }, updateParams);
|
|
303
|
+
return updated;
|
|
304
|
+
});
|
|
312
305
|
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
this.
|
|
316
|
-
await this.client.pool
|
|
306
|
+
updateNetworkACLs(updates) {
|
|
307
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
308
|
+
yield this.client.pool
|
|
317
309
|
.addEachTask({
|
|
318
|
-
data:
|
|
319
|
-
generator: (item) => this.
|
|
320
|
-
.then(() => {
|
|
321
|
-
this.
|
|
322
|
-
this.
|
|
310
|
+
data: updates || [],
|
|
311
|
+
generator: (item) => this.updateNetworkACL(item)
|
|
312
|
+
.then((data) => {
|
|
313
|
+
this.didUpdate(data);
|
|
314
|
+
this.updated += 1;
|
|
323
315
|
})
|
|
324
316
|
.catch((err) => {
|
|
325
|
-
throw new Error(`Problem
|
|
317
|
+
throw new Error(`Problem updating ${this.type} ${this.objString(item)}\n${err}`);
|
|
326
318
|
}),
|
|
327
319
|
})
|
|
328
320
|
.promise();
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
deleteNetworkACL(acl) {
|
|
324
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
325
|
+
yield this.client.networkAcls.delete({ id: acl.id });
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
deleteNetworkACLs(data) {
|
|
329
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
330
|
+
if (this.config('AUTH0_ALLOW_DELETE') === 'true' ||
|
|
331
|
+
this.config('AUTH0_ALLOW_DELETE') === true) {
|
|
332
|
+
yield this.client.pool
|
|
333
|
+
.addEachTask({
|
|
334
|
+
data: data || [],
|
|
335
|
+
generator: (item) => this.deleteNetworkACL(item)
|
|
336
|
+
.then(() => {
|
|
337
|
+
this.didDelete(item);
|
|
338
|
+
this.deleted += 1;
|
|
339
|
+
})
|
|
340
|
+
.catch((err) => {
|
|
341
|
+
throw new Error(`Problem deleting ${this.type} ${this.objString(item)}\n${err}`);
|
|
342
|
+
}),
|
|
343
|
+
})
|
|
344
|
+
.promise();
|
|
345
|
+
}
|
|
346
|
+
else {
|
|
347
|
+
logger_1.default.warn(`Detected the following ${this.type} should be deleted. Doing so may be destructive.\nYou can enable deletes by setting 'AUTH0_ALLOW_DELETE' to true in the config
|
|
332
348
|
\n${data.map((i) => this.objString(i)).join('\n')}`);
|
|
333
|
-
|
|
349
|
+
}
|
|
350
|
+
});
|
|
334
351
|
}
|
|
335
352
|
}
|
|
336
353
|
exports.default = NetworkACLsHandler;
|
|
354
|
+
//# sourceMappingURL=networkACLs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"networkACLs.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/networkACLs.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,wDAA0C;AAE1C,sCAAqC;AACrC,6DAAkC;AAKlC,sBAAsB;AACtB,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,OAAO,CAAC;IACnB,UAAU,EAAE;QACV,KAAK,EAAE;YACL,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,CAAC,IAAI,CAAC;SACb;KACF;IACD,oBAAoB,EAAE,KAAK;CAC5B,CAAC;AAEF,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,OAAO,CAAC;IACnB,UAAU,EAAE;QACV,KAAK,EAAE;YACL,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,CAAC,IAAI,CAAC;SACb;KACF;IACD,oBAAoB,EAAE,KAAK;CAC5B,CAAC;AAEF,MAAM,SAAS,GAAG;IAChB,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,KAAK,CAAC;IACjB,UAAU,EAAE;QACV,GAAG,EAAE;YACH,IAAI,EAAE,SAAS;YACf,IAAI,EAA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AC,CAAC;QACvD,CAAC;KAAA;IAEK,iBAAiB,CAAC,IAAa;;YACnC,IACE,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,KAAK,MAAM;gBAC5C,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,KAAK,IAAI,EAC1C,CAAC;gBACD,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI;qBACnB,WAAW,CAAC;oBACX,IAAI,EAAE,IAAI,IAAI,EAAE;oBAChB,SAAS,EAAE,CAAC,IAAgB,EAAE,EAAE,CAC9B,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC;yBACxB,IAAI,CAAC,GAAG,EAAE;wBACT,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;wBACrB,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC;oBACpB,CAAC,CAAC;yBACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;wBACb,MAAM,IAAI,KAAK,CAAC,oBAAoB,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC;oBACnF,CAAC,CAAC;iBACP,CAAC;qBACD,OAAO,EAAE,CAAC;YACf,CAAC;iBAAM,CAAC;gBACN,gBAAG,CAAC,IAAI,CAAC,0BACP,IAAI,CAAC,IACP;UACI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACvD,CAAC;QACH,CAAC;KAAA;CACF;AArJD,qCAqJC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CreateOrganizationDiscoveryDomainRequestContent, CreateOrganizationDiscoveryDomainResponseContent, GetOrganizationClientGrants200ResponseOneOfInner, GetOrganizationDiscoveryDomainResponseContent, OrganizationDiscoveryDomain, OrganizationDiscoveryDomainStatus, UpdateOrganizationDiscoveryDomainResponseContent } from 'auth0';
|
|
2
2
|
import DefaultHandler from './default';
|
|
3
3
|
import { Asset, Assets, CalculatedChanges } from '../../../types';
|
|
4
4
|
export declare const schema: {
|
|
@@ -96,8 +96,8 @@ export declare const schema: {
|
|
|
96
96
|
};
|
|
97
97
|
};
|
|
98
98
|
type FormattedClientGrants = {
|
|
99
|
-
grant_id: string
|
|
100
|
-
client_id: string
|
|
99
|
+
grant_id: string;
|
|
100
|
+
client_id: string;
|
|
101
101
|
};
|
|
102
102
|
export default class OrganizationsHandler extends DefaultHandler {
|
|
103
103
|
existing: Asset[];
|
|
@@ -115,14 +115,13 @@ export default class OrganizationsHandler extends DefaultHandler {
|
|
|
115
115
|
updateOrganizations(updates: CalculatedChanges['update'], orgs: Asset[]): Promise<void>;
|
|
116
116
|
getType(): Promise<Asset[]>;
|
|
117
117
|
processChanges(assets: Assets): Promise<void>;
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
createOrganizationClientGrants(organizationId: string, grantId: string): Promise<Management.AssociateOrganizationClientGrantResponseContent>;
|
|
118
|
+
getOrganizationClientGrants(organizationId: string): Promise<GetOrganizationClientGrants200ResponseOneOfInner[]>;
|
|
119
|
+
createOrganizationClientGrants(organizationId: string, grantId: string): Promise<GetOrganizationClientGrants200ResponseOneOfInner>;
|
|
121
120
|
deleteOrganizationClientGrants(organizationId: string, grantId: string): Promise<void>;
|
|
122
|
-
getAllOrganizationDiscoveryDomains(organizationId: string): Promise<
|
|
123
|
-
getOrganizationDiscoveryDomain(organizationId: string, discoveryDomainId: string): Promise<
|
|
124
|
-
createOrganizationDiscoveryDomain(organizationId: string, discoveryDomain:
|
|
125
|
-
updateOrganizationDiscoveryDomain(organizationId: string, discoveryDomainId: string, discoveryDomain: string, status:
|
|
121
|
+
getAllOrganizationDiscoveryDomains(organizationId: string): Promise<OrganizationDiscoveryDomain[] | null>;
|
|
122
|
+
getOrganizationDiscoveryDomain(organizationId: string, discoveryDomainId: string): Promise<GetOrganizationDiscoveryDomainResponseContent>;
|
|
123
|
+
createOrganizationDiscoveryDomain(organizationId: string, discoveryDomain: CreateOrganizationDiscoveryDomainRequestContent): Promise<CreateOrganizationDiscoveryDomainResponseContent>;
|
|
124
|
+
updateOrganizationDiscoveryDomain(organizationId: string, discoveryDomainId: string, discoveryDomain: string, status: OrganizationDiscoveryDomainStatus): Promise<UpdateOrganizationDiscoveryDomainResponseContent>;
|
|
126
125
|
deleteOrganizationDiscoveryDomain(organizationId: string, discoveryDomain: string, discoveryDomainId: string): Promise<void>;
|
|
127
126
|
}
|
|
128
127
|
export {};
|