auth0-deploy-cli 8.42.0 → 9.0.0-beta.2
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/CHANGELOG.md +10 -50
- package/lib/context/directory/handlers/actionModules.js +10 -12
- package/lib/context/directory/handlers/actions.js +10 -13
- package/lib/context/directory/handlers/clients.js +0 -15
- package/lib/context/directory/handlers/databases.js +3 -4
- package/lib/context/directory/handlers/hooks.js +11 -1
- package/lib/context/directory/handlers/index.js +0 -4
- package/lib/context/directory/handlers/rules.js +11 -1
- package/lib/context/directory/index.js +6 -8
- package/lib/context/yaml/handlers/clients.js +0 -15
- package/lib/context/yaml/handlers/index.js +0 -4
- package/lib/context/yaml/index.js +6 -8
- package/lib/tools/auth0/handlers/attackProtection.js +5 -16
- package/lib/tools/auth0/handlers/clientGrants.d.ts +1 -1
- package/lib/tools/auth0/handlers/clients.d.ts +0 -46
- package/lib/tools/auth0/handlers/clients.js +1 -128
- package/lib/tools/auth0/handlers/connections.d.ts +0 -21
- package/lib/tools/auth0/handlers/connections.js +0 -16
- package/lib/tools/auth0/handlers/default.js +6 -6
- package/lib/tools/auth0/handlers/eventStreams.js +2 -10
- package/lib/tools/auth0/handlers/guardianFactorTemplates.js +4 -13
- package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js +9 -11
- package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js +9 -11
- package/lib/tools/auth0/handlers/hooks.js +1 -1
- package/lib/tools/auth0/handlers/index.js +0 -8
- package/lib/tools/auth0/handlers/networkACLs.d.ts +0 -18
- package/lib/tools/auth0/handlers/networkACLs.js +0 -9
- package/lib/tools/auth0/handlers/organizations.d.ts +0 -4
- package/lib/tools/auth0/handlers/organizations.js +0 -4
- package/lib/tools/auth0/handlers/prompts.js +1 -1
- package/lib/tools/auth0/handlers/rules.js +7 -19
- package/lib/tools/auth0/handlers/tenant.d.ts +0 -23
- package/lib/tools/auth0/handlers/tenant.js +0 -24
- package/lib/tools/auth0/handlers/themes.d.ts +1 -37
- package/lib/tools/auth0/handlers/themes.js +0 -64
- package/lib/tools/auth0/index.js +6 -12
- package/lib/tools/constants.d.ts +0 -1
- package/lib/tools/constants.js +0 -1
- package/lib/tools/utils.d.ts +0 -1
- package/lib/tools/utils.js +2 -25
- package/lib/types.d.ts +1 -3
- package/package.json +2 -2
- package/lib/context/directory/handlers/clientAuthCredentials.d.ts +0 -5
- package/lib/context/directory/handlers/clientAuthCredentials.js +0 -13
- package/lib/context/directory/handlers/rateLimitPolicies.d.ts +0 -6
- package/lib/context/directory/handlers/rateLimitPolicies.js +0 -53
- package/lib/context/yaml/handlers/clientAuthCredentials.d.ts +0 -5
- package/lib/context/yaml/handlers/clientAuthCredentials.js +0 -13
- package/lib/context/yaml/handlers/rateLimitPolicies.d.ts +0 -6
- package/lib/context/yaml/handlers/rateLimitPolicies.js +0 -27
- package/lib/tools/auth0/handlers/clientAuthCredentials.d.ts +0 -27
- package/lib/tools/auth0/handlers/clientAuthCredentials.js +0 -223
- package/lib/tools/auth0/handlers/clientAuthCredentialsPre.d.ts +0 -38
- package/lib/tools/auth0/handlers/clientAuthCredentialsPre.js +0 -123
- package/lib/tools/auth0/handlers/rateLimitPolicies.d.ts +0 -81
- package/lib/tools/auth0/handlers/rateLimitPolicies.js +0 -203
package/CHANGELOG.md
CHANGED
|
@@ -7,42 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
-
## [
|
|
11
|
-
|
|
12
|
-
### Added
|
|
13
|
-
|
|
14
|
-
- Add UL identifier input support for themes and tenant settings. [#1433]
|
|
15
|
-
- Add `token_vault_privileged_access` support for clients. [#1430]
|
|
16
|
-
- Add `auth0_managed` field support for network ACLs (Curated Blocklists - EA). [#1435]
|
|
17
|
-
- Add Cross App Access (XAA) resource app support for connections and clients. [#1431]
|
|
18
|
-
- Add `cross_app_access_requesting_app` support for connections (EA). [#1422]
|
|
10
|
+
## [9.0.0-beta.2] - 2026-08-11
|
|
19
11
|
|
|
20
12
|
### Fixed
|
|
21
13
|
|
|
22
|
-
-
|
|
23
|
-
- Resolve spurious dry-run diffs for rules, themes, and hooks. [#1437]
|
|
24
|
-
- Strip unresolved placeholders on deploy instead of throwing. [#1436]
|
|
25
|
-
- Handle 403 entitlement errors for bot detection and captcha on export. [#1434]
|
|
26
|
-
- Warn and skip deprecated guardian phone provider on 403 during import. [#1429]
|
|
27
|
-
- Add `use_scope_descriptions_for_consent` to allowed tenant flags. [#1428]
|
|
28
|
-
|
|
29
|
-
## [8.41.0] - 2026-07-16
|
|
30
|
-
|
|
31
|
-
### Added
|
|
32
|
-
|
|
33
|
-
- Add `third_party_client_access` support for organizations. [#1421]
|
|
34
|
-
|
|
35
|
-
## [8.40.0] - 2026-07-09
|
|
36
|
-
|
|
37
|
-
### Added
|
|
14
|
+
- Enforce path traversal protection for actions, rules, hooks, and databases. [#1448]
|
|
38
15
|
|
|
39
|
-
-
|
|
40
|
-
- Add Rate Limit Policies (EA) support. [#1395]
|
|
16
|
+
## [9.0.0-beta.1] - 2026-07-02
|
|
41
17
|
|
|
42
|
-
###
|
|
18
|
+
### Security
|
|
43
19
|
|
|
44
|
-
-
|
|
45
|
-
- Skip destination update for action event streams as the destination type cannot be changed after creation. [#1425]
|
|
20
|
+
- Prevent path traversal attacks in config file handlers for directory and YAML contexts. [#1418]
|
|
46
21
|
|
|
47
22
|
## [8.39.0] - 2026-06-30
|
|
48
23
|
|
|
@@ -1879,7 +1854,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
1879
1854
|
[#1389]: https://github.com/auth0/auth0-deploy-cli/issues/1389
|
|
1880
1855
|
[#1391]: https://github.com/auth0/auth0-deploy-cli/issues/1391
|
|
1881
1856
|
[#1392]: https://github.com/auth0/auth0-deploy-cli/issues/1392
|
|
1882
|
-
[#1395]: https://github.com/auth0/auth0-deploy-cli/issues/1395
|
|
1883
1857
|
[#1396]: https://github.com/auth0/auth0-deploy-cli/issues/1396
|
|
1884
1858
|
[#1398]: https://github.com/auth0/auth0-deploy-cli/issues/1398
|
|
1885
1859
|
[#1400]: https://github.com/auth0/auth0-deploy-cli/issues/1400
|
|
@@ -1892,25 +1866,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
1892
1866
|
[#1409]: https://github.com/auth0/auth0-deploy-cli/issues/1409
|
|
1893
1867
|
[#1411]: https://github.com/auth0/auth0-deploy-cli/issues/1411
|
|
1894
1868
|
[#1412]: https://github.com/auth0/auth0-deploy-cli/issues/1412
|
|
1895
|
-
[#
|
|
1896
|
-
[#
|
|
1897
|
-
[
|
|
1898
|
-
[
|
|
1899
|
-
[
|
|
1900
|
-
[#1428]: https://github.com/auth0/auth0-deploy-cli/issues/1428
|
|
1901
|
-
[#1429]: https://github.com/auth0/auth0-deploy-cli/issues/1429
|
|
1902
|
-
[#1430]: https://github.com/auth0/auth0-deploy-cli/issues/1430
|
|
1903
|
-
[#1431]: https://github.com/auth0/auth0-deploy-cli/issues/1431
|
|
1904
|
-
[#1433]: https://github.com/auth0/auth0-deploy-cli/issues/1433
|
|
1905
|
-
[#1434]: https://github.com/auth0/auth0-deploy-cli/issues/1434
|
|
1906
|
-
[#1435]: https://github.com/auth0/auth0-deploy-cli/issues/1435
|
|
1907
|
-
[#1436]: https://github.com/auth0/auth0-deploy-cli/issues/1436
|
|
1908
|
-
[#1437]: https://github.com/auth0/auth0-deploy-cli/issues/1437
|
|
1909
|
-
[#1438]: https://github.com/auth0/auth0-deploy-cli/issues/1438
|
|
1910
|
-
[Unreleased]: https://github.com/auth0/auth0-deploy-cli/compare/v8.42.0...HEAD
|
|
1911
|
-
[8.42.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.41.0...v8.42.0
|
|
1912
|
-
[8.41.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.40.0...v8.41.0
|
|
1913
|
-
[8.40.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.39.0...v8.40.0
|
|
1869
|
+
[#1418]: https://github.com/auth0/auth0-deploy-cli/issues/1418
|
|
1870
|
+
[#1448]: https://github.com/auth0/auth0-deploy-cli/issues/1448
|
|
1871
|
+
[Unreleased]: https://github.com/auth0/auth0-deploy-cli/compare/v9.0.0-beta.2...HEAD
|
|
1872
|
+
[9.0.0-beta.2]: https://github.com/auth0/auth0-deploy-cli/compare/v9.0.0-beta.1...v9.0.0-beta.2
|
|
1873
|
+
[9.0.0-beta.1]: https://github.com/auth0/auth0-deploy-cli/compare/v8.39.0...v9.0.0-beta.1
|
|
1914
1874
|
[8.39.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.38.0...v8.39.0
|
|
1915
1875
|
[8.38.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.37.0...v8.38.0
|
|
1916
1876
|
[8.37.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.36.0...v8.37.0
|
|
@@ -20,20 +20,18 @@ function parse(context) {
|
|
|
20
20
|
disableKeywordReplacement: context.disableKeywordReplacement,
|
|
21
21
|
}),
|
|
22
22
|
};
|
|
23
|
-
const moduleFolder = path_1.default.join(tools_1.constants.ACTION_MODULES_DIRECTORY, `${module.name}`);
|
|
24
23
|
if (module.code) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
if (
|
|
29
|
-
|
|
30
|
-
`
|
|
31
|
-
`Current absolute path used: ["${module.code}"]`);
|
|
32
|
-
module.code = context.loadFile(unixPath, moduleFolder);
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
module.code = context.loadFile(path_1.default.join(context.filePath, module.code), moduleFolder);
|
|
24
|
+
const normalizedCode = module.code.replace(/\\/g, '/');
|
|
25
|
+
const configRoot = path_1.default.resolve(context.filePath);
|
|
26
|
+
const resolvedPath = path_1.default.resolve(context.filePath, normalizedCode);
|
|
27
|
+
if (!resolvedPath.startsWith(configRoot + path_1.default.sep)) {
|
|
28
|
+
throw new Error(`Path "${module.code}" resolves to "${resolvedPath}" which is outside the config directory "${configRoot}". ` +
|
|
29
|
+
`Move the file inside your config directory.`);
|
|
36
30
|
}
|
|
31
|
+
module.code = (0, tools_1.loadFileAndReplaceKeywords)(resolvedPath, {
|
|
32
|
+
mappings: context.mappings,
|
|
33
|
+
disableKeywordReplacement: context.disableKeywordReplacement,
|
|
34
|
+
});
|
|
37
35
|
}
|
|
38
36
|
return module;
|
|
39
37
|
});
|
|
@@ -22,21 +22,18 @@ function parse(context) {
|
|
|
22
22
|
disableKeywordReplacement: context.disableKeywordReplacement,
|
|
23
23
|
}),
|
|
24
24
|
};
|
|
25
|
-
const actionFolder = path_1.default.join(tools_1.constants.ACTIONS_DIRECTORY, `${action.name}`);
|
|
26
25
|
if (action.code) {
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
`
|
|
33
|
-
`Current absolute path used: ["${action.code}"]`);
|
|
34
|
-
action.code = context.loadFile(unixPath, actionFolder);
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
// Otherwise, load the file from the context's file path
|
|
38
|
-
action.code = context.loadFile(path_1.default.join(context.filePath, action.code), actionFolder);
|
|
26
|
+
const normalizedCode = action.code.replace(/\\/g, '/');
|
|
27
|
+
const configRoot = path_1.default.resolve(context.filePath);
|
|
28
|
+
const resolvedPath = path_1.default.resolve(context.filePath, normalizedCode);
|
|
29
|
+
if (!resolvedPath.startsWith(configRoot + path_1.default.sep)) {
|
|
30
|
+
throw new Error(`Path "${action.code}" resolves to "${resolvedPath}" which is outside the config directory "${configRoot}". ` +
|
|
31
|
+
`Move the file inside your config directory.`);
|
|
39
32
|
}
|
|
33
|
+
action.code = (0, tools_1.loadFileAndReplaceKeywords)(resolvedPath, {
|
|
34
|
+
mappings: context.mappings,
|
|
35
|
+
disableKeywordReplacement: context.disableKeywordReplacement,
|
|
36
|
+
});
|
|
40
37
|
}
|
|
41
38
|
return action;
|
|
42
39
|
});
|
|
@@ -106,21 +106,6 @@ async function dump(context) {
|
|
|
106
106
|
organization_require_behavior: client.organization_require_behavior,
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
|
-
else {
|
|
110
|
-
// strip id-only credentials and remove client_authentication_methods entirely
|
|
111
|
-
// if no named credentials remain — an absent field is treated as deletion on deploy
|
|
112
|
-
if (client.client_authentication_methods) {
|
|
113
|
-
Object.values(client.client_authentication_methods).forEach((method) => {
|
|
114
|
-
if (method?.credentials) {
|
|
115
|
-
method.credentials = method.credentials.filter((c) => c.name);
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
const hasAnyCredentials = Object.values(client.client_authentication_methods).some((method) => method?.credentials?.length > 0);
|
|
119
|
-
if (!hasAnyCredentials) {
|
|
120
|
-
delete client.client_authentication_methods;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
109
|
(0, utils_1.dumpJSON)(clientFile, (0, utils_1.clearClientArrays)(client));
|
|
125
110
|
});
|
|
126
111
|
}
|
|
@@ -41,11 +41,10 @@ function getDatabase(folder, configRoot, mappingOpts) {
|
|
|
41
41
|
}
|
|
42
42
|
else {
|
|
43
43
|
const resolvedBase = path_1.default.resolve(configRoot);
|
|
44
|
-
const toLoad = path_1.default.resolve(folder, script);
|
|
44
|
+
const toLoad = path_1.default.resolve(folder, script.replace(/\\/g, '/'));
|
|
45
45
|
if (!toLoad.startsWith(resolvedBase + path_1.default.sep)) {
|
|
46
|
-
|
|
47
|
-
`
|
|
48
|
-
`Current absolute path used: ["${script}"]`);
|
|
46
|
+
throw new Error(`Path "${script}" resolves to "${toLoad}" which is outside the config directory "${resolvedBase}". ` +
|
|
47
|
+
`Move the file inside your config directory.`);
|
|
49
48
|
}
|
|
50
49
|
database.options.customScripts[name] = (0, tools_1.loadFileAndReplaceKeywords)(toLoad, mappingOpts);
|
|
51
50
|
}
|
|
@@ -21,7 +21,17 @@ function parse(context) {
|
|
|
21
21
|
}),
|
|
22
22
|
};
|
|
23
23
|
if (hook.script) {
|
|
24
|
-
|
|
24
|
+
const normalizedScript = hook.script.replace(/\\/g, '/');
|
|
25
|
+
const configRoot = path_1.default.resolve(context.filePath);
|
|
26
|
+
const resolvedPath = path_1.default.resolve(context.filePath, tools_1.constants.HOOKS_DIRECTORY, normalizedScript);
|
|
27
|
+
if (!resolvedPath.startsWith(configRoot + path_1.default.sep)) {
|
|
28
|
+
throw new Error(`Path "${hook.script}" resolves to "${resolvedPath}" which is outside the config directory "${configRoot}". ` +
|
|
29
|
+
`Move the file inside your config directory.`);
|
|
30
|
+
}
|
|
31
|
+
hook.script = (0, tools_1.loadFileAndReplaceKeywords)(resolvedPath, {
|
|
32
|
+
mappings: context.mappings,
|
|
33
|
+
disableKeywordReplacement: context.disableKeywordReplacement,
|
|
34
|
+
});
|
|
25
35
|
}
|
|
26
36
|
hook.name = hook.name.toLowerCase().replace(/\s/g, '-');
|
|
27
37
|
return hook;
|
|
@@ -43,9 +43,7 @@ const userAttributeProfiles_1 = __importDefault(require("./userAttributeProfiles
|
|
|
43
43
|
const connectionProfiles_1 = __importDefault(require("./connectionProfiles"));
|
|
44
44
|
const tokenExchangeProfiles_1 = __importDefault(require("./tokenExchangeProfiles"));
|
|
45
45
|
const supplementalSignals_1 = __importDefault(require("./supplementalSignals"));
|
|
46
|
-
const rateLimitPolicies_1 = __importDefault(require("./rateLimitPolicies"));
|
|
47
46
|
const eventStreams_1 = __importDefault(require("./eventStreams"));
|
|
48
|
-
const clientAuthCredentials_1 = __importDefault(require("./clientAuthCredentials"));
|
|
49
47
|
const selfServiceProfiles_1 = __importDefault(require("./selfServiceProfiles"));
|
|
50
48
|
const directoryHandlers = {
|
|
51
49
|
rules: rules_1.default,
|
|
@@ -89,8 +87,6 @@ const directoryHandlers = {
|
|
|
89
87
|
connectionProfiles: connectionProfiles_1.default,
|
|
90
88
|
tokenExchangeProfiles: tokenExchangeProfiles_1.default,
|
|
91
89
|
supplementalSignals: supplementalSignals_1.default,
|
|
92
|
-
rateLimitPolicies: rateLimitPolicies_1.default,
|
|
93
90
|
eventStreams: eventStreams_1.default,
|
|
94
|
-
clientAuthCredentials: clientAuthCredentials_1.default,
|
|
95
91
|
};
|
|
96
92
|
exports.default = directoryHandlers;
|
|
@@ -21,7 +21,17 @@ function parse(context) {
|
|
|
21
21
|
}),
|
|
22
22
|
};
|
|
23
23
|
if (rule.script) {
|
|
24
|
-
|
|
24
|
+
const normalizedScript = rule.script.replace(/\\/g, '/');
|
|
25
|
+
const configRoot = path_1.default.resolve(context.filePath);
|
|
26
|
+
const resolvedPath = path_1.default.resolve(context.filePath, tools_1.constants.RULES_DIRECTORY, normalizedScript);
|
|
27
|
+
if (!resolvedPath.startsWith(configRoot + path_1.default.sep)) {
|
|
28
|
+
throw new Error(`Path "${rule.script}" resolves to "${resolvedPath}" which is outside the config directory "${configRoot}". ` +
|
|
29
|
+
`Move the file inside your config directory.`);
|
|
30
|
+
}
|
|
31
|
+
rule.script = (0, tools_1.loadFileAndReplaceKeywords)(resolvedPath, {
|
|
32
|
+
mappings: context.mappings,
|
|
33
|
+
disableKeywordReplacement: context.disableKeywordReplacement,
|
|
34
|
+
});
|
|
25
35
|
}
|
|
26
36
|
return rule;
|
|
27
37
|
});
|
|
@@ -68,14 +68,12 @@ class DirectoryContext {
|
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
loadFile(f, folder) {
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
toLoad
|
|
76
|
-
|
|
77
|
-
`Please update your configuration to use paths relative to the config directory. ` +
|
|
78
|
-
`Current absolute path used: ["${f}"]`);
|
|
71
|
+
const configRoot = path.resolve(this.filePath);
|
|
72
|
+
const basePath = path.resolve(this.filePath, folder);
|
|
73
|
+
const toLoad = path.resolve(basePath, f.replace(/\\/g, '/'));
|
|
74
|
+
if (!toLoad.startsWith(configRoot + path.sep)) {
|
|
75
|
+
throw new Error(`Path "${f}" resolves to "${toLoad}" which is outside the config directory "${configRoot}". ` +
|
|
76
|
+
`Move the file inside your config directory.`);
|
|
79
77
|
}
|
|
80
78
|
return (0, tools_1.loadFileAndReplaceKeywords)(toLoad, {
|
|
81
79
|
mappings: this.mappings,
|
|
@@ -99,21 +99,6 @@ async function dump(context) {
|
|
|
99
99
|
organization_require_behavior: client.organization_require_behavior,
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
else {
|
|
103
|
-
// strip id-only credentials and remove client_authentication_methods entirely
|
|
104
|
-
// if no named credentials remain — an absent field is treated as deletion on deploy
|
|
105
|
-
if (client.client_authentication_methods) {
|
|
106
|
-
Object.values(client.client_authentication_methods).forEach((method) => {
|
|
107
|
-
if (method?.credentials) {
|
|
108
|
-
method.credentials = method.credentials.filter((c) => c.name);
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
const hasAnyCredentials = Object.values(client.client_authentication_methods).some((method) => method?.credentials?.length > 0);
|
|
112
|
-
if (!hasAnyCredentials) {
|
|
113
|
-
delete client.client_authentication_methods;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
102
|
return (0, utils_1.clearClientArrays)(client);
|
|
118
103
|
}),
|
|
119
104
|
],
|
|
@@ -43,9 +43,7 @@ const userAttributeProfiles_1 = __importDefault(require("./userAttributeProfiles
|
|
|
43
43
|
const connectionProfiles_1 = __importDefault(require("./connectionProfiles"));
|
|
44
44
|
const tokenExchangeProfiles_1 = __importDefault(require("./tokenExchangeProfiles"));
|
|
45
45
|
const supplementalSignals_1 = __importDefault(require("./supplementalSignals"));
|
|
46
|
-
const rateLimitPolicies_1 = __importDefault(require("./rateLimitPolicies"));
|
|
47
46
|
const eventStreams_1 = __importDefault(require("./eventStreams"));
|
|
48
|
-
const clientAuthCredentials_1 = __importDefault(require("./clientAuthCredentials"));
|
|
49
47
|
const selfServiceProfiles_1 = __importDefault(require("./selfServiceProfiles"));
|
|
50
48
|
const yamlHandlers = {
|
|
51
49
|
rules: rules_1.default,
|
|
@@ -89,8 +87,6 @@ const yamlHandlers = {
|
|
|
89
87
|
connectionProfiles: connectionProfiles_1.default,
|
|
90
88
|
tokenExchangeProfiles: tokenExchangeProfiles_1.default,
|
|
91
89
|
supplementalSignals: supplementalSignals_1.default,
|
|
92
|
-
rateLimitPolicies: rateLimitPolicies_1.default,
|
|
93
90
|
eventStreams: eventStreams_1.default,
|
|
94
|
-
clientAuthCredentials: clientAuthCredentials_1.default,
|
|
95
91
|
};
|
|
96
92
|
exports.default = yamlHandlers;
|
|
@@ -43,15 +43,13 @@ class YAMLContext {
|
|
|
43
43
|
})();
|
|
44
44
|
}
|
|
45
45
|
loadFile(f) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
toLoad
|
|
50
|
-
|
|
51
|
-
`Please update your configuration to use paths relative to the config directory. ` +
|
|
52
|
-
`Current absolute path used: ["${f}"]`);
|
|
46
|
+
const configRoot = path_1.default.resolve(this.basePath);
|
|
47
|
+
const toLoad = path_1.default.resolve(this.basePath, f.replace(/\\/g, '/'));
|
|
48
|
+
if (!toLoad.startsWith(configRoot + path_1.default.sep)) {
|
|
49
|
+
throw new Error(`Path "${f}" resolves to "${toLoad}" which is outside the config directory "${configRoot}". ` +
|
|
50
|
+
`Move the file inside your config directory.`);
|
|
53
51
|
}
|
|
54
|
-
return (0, tools_1.loadFileAndReplaceKeywords)(
|
|
52
|
+
return (0, tools_1.loadFileAndReplaceKeywords)(toLoad, {
|
|
55
53
|
mappings: this.mappings,
|
|
56
54
|
disableKeywordReplacement: this.disableKeywordReplacement,
|
|
57
55
|
});
|
|
@@ -243,25 +243,14 @@ class AttackProtectionHandler extends default_1.default {
|
|
|
243
243
|
let botDetection = null;
|
|
244
244
|
let captcha = null;
|
|
245
245
|
try {
|
|
246
|
-
botDetection = await
|
|
246
|
+
[botDetection, captcha] = await Promise.all([
|
|
247
|
+
this.client.attackProtection.botDetection.get(),
|
|
248
|
+
this.client.attackProtection.captcha.get(),
|
|
249
|
+
]);
|
|
247
250
|
}
|
|
248
251
|
catch (err) {
|
|
249
252
|
if (err.statusCode === 403) {
|
|
250
|
-
logger_1.default.warn(
|
|
251
|
-
}
|
|
252
|
-
else {
|
|
253
|
-
throw err;
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
try {
|
|
257
|
-
captcha = await this.client.attackProtection.captcha.get();
|
|
258
|
-
}
|
|
259
|
-
catch (err) {
|
|
260
|
-
if (err.statusCode === 403) {
|
|
261
|
-
logger_1.default.warn("Captcha is not available on this tenant's current plan. Skipping captcha settings.");
|
|
262
|
-
}
|
|
263
|
-
else {
|
|
264
|
-
throw err;
|
|
253
|
+
logger_1.default.warn('Bot Detection API are not enabled for this tenant. Please verify `scope` or contact Auth0 support to enable this feature.');
|
|
265
254
|
}
|
|
266
255
|
}
|
|
267
256
|
const attackProtection = {
|
|
@@ -193,18 +193,6 @@ export declare const schema: {
|
|
|
193
193
|
};
|
|
194
194
|
additionalProperties: boolean;
|
|
195
195
|
};
|
|
196
|
-
identity_assertion_authorization_grant: {
|
|
197
|
-
type: string;
|
|
198
|
-
description: string;
|
|
199
|
-
properties: {
|
|
200
|
-
active: {
|
|
201
|
-
type: string;
|
|
202
|
-
description: string;
|
|
203
|
-
};
|
|
204
|
-
};
|
|
205
|
-
required: string[];
|
|
206
|
-
additionalProperties: boolean;
|
|
207
|
-
};
|
|
208
196
|
app_type: {
|
|
209
197
|
type: string;
|
|
210
198
|
description: string;
|
|
@@ -340,40 +328,6 @@ export declare const schema: {
|
|
|
340
328
|
};
|
|
341
329
|
};
|
|
342
330
|
};
|
|
343
|
-
token_vault_privileged_access: {
|
|
344
|
-
type: string[];
|
|
345
|
-
description: string;
|
|
346
|
-
properties: {
|
|
347
|
-
ip_allowlist: {
|
|
348
|
-
type: string;
|
|
349
|
-
description: string;
|
|
350
|
-
items: {
|
|
351
|
-
type: string;
|
|
352
|
-
};
|
|
353
|
-
};
|
|
354
|
-
grants: {
|
|
355
|
-
type: string;
|
|
356
|
-
description: string;
|
|
357
|
-
items: {
|
|
358
|
-
type: string;
|
|
359
|
-
properties: {
|
|
360
|
-
connection: {
|
|
361
|
-
type: string;
|
|
362
|
-
description: string;
|
|
363
|
-
};
|
|
364
|
-
scopes: {
|
|
365
|
-
type: string;
|
|
366
|
-
description: string;
|
|
367
|
-
items: {
|
|
368
|
-
type: string;
|
|
369
|
-
};
|
|
370
|
-
};
|
|
371
|
-
};
|
|
372
|
-
required: string[];
|
|
373
|
-
};
|
|
374
|
-
};
|
|
375
|
-
};
|
|
376
|
-
};
|
|
377
331
|
third_party_security_mode: {
|
|
378
332
|
type: string;
|
|
379
333
|
enum: string[];
|
|
@@ -66,40 +66,6 @@ const myOrganizationConfigurationSchema = {
|
|
|
66
66
|
},
|
|
67
67
|
required: ['allowed_strategies', 'connection_deletion_behavior'],
|
|
68
68
|
};
|
|
69
|
-
const tokenVaultPrivilegedAccessSchema = {
|
|
70
|
-
type: ['object', 'null'],
|
|
71
|
-
description: 'Settings for Token Vault Privileged Access, hardening a privileged client by restricting the caller IPs, connections, and scopes it may use at runtime. Early Access, gated by the token_vault_subject_type_jwt_ea_rollout feature flag. Export-only: this object is exported for visibility but is not deployed by the Deploy CLI (it is stripped from create/update payloads because the required credentials are tenant-specific ids). Manage it directly on the tenant.',
|
|
72
|
-
properties: {
|
|
73
|
-
ip_allowlist: {
|
|
74
|
-
type: 'array',
|
|
75
|
-
description: 'IPv4/IPv6 addresses or CIDR ranges permitted to call token exchange on behalf of this privileged client. When the EA flag is on, this is required (non-empty) on create if token_vault_privileged_access is being set.',
|
|
76
|
-
items: {
|
|
77
|
-
type: 'string',
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
grants: {
|
|
81
|
-
type: 'array',
|
|
82
|
-
description: 'Connection/scope pin objects restricting which federated connections and OAuth scopes the privileged client may use at runtime. Maximum 5 connections; maximum 20 scopes in total across all connections.',
|
|
83
|
-
items: {
|
|
84
|
-
type: 'object',
|
|
85
|
-
properties: {
|
|
86
|
-
connection: {
|
|
87
|
-
type: 'string',
|
|
88
|
-
description: 'The connection name (e.g. google-oauth2). Validated at runtime; the connection need not exist at configuration time.',
|
|
89
|
-
},
|
|
90
|
-
scopes: {
|
|
91
|
-
type: 'array',
|
|
92
|
-
description: 'The OAuth scopes permitted for that connection.',
|
|
93
|
-
items: {
|
|
94
|
-
type: 'string',
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
required: ['connection', 'scopes'],
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
};
|
|
103
69
|
exports.schema = {
|
|
104
70
|
type: 'array',
|
|
105
71
|
items: {
|
|
@@ -255,18 +221,6 @@ exports.schema = {
|
|
|
255
221
|
},
|
|
256
222
|
additionalProperties: true,
|
|
257
223
|
},
|
|
258
|
-
identity_assertion_authorization_grant: {
|
|
259
|
-
type: 'object',
|
|
260
|
-
description: 'Settings for Cross App Access (ID-JAG) token exchange. Early Access. Enables the client to request identity assertion authorization grants.',
|
|
261
|
-
properties: {
|
|
262
|
-
active: {
|
|
263
|
-
type: 'boolean',
|
|
264
|
-
description: 'Indicates whether the client can request an identity assertion authorization grant (ID-JAG) via token exchange.',
|
|
265
|
-
},
|
|
266
|
-
},
|
|
267
|
-
required: ['active'],
|
|
268
|
-
additionalProperties: false,
|
|
269
|
-
},
|
|
270
224
|
app_type: {
|
|
271
225
|
type: 'string',
|
|
272
226
|
description: 'The type of application this client represents',
|
|
@@ -378,7 +332,6 @@ exports.schema = {
|
|
|
378
332
|
},
|
|
379
333
|
},
|
|
380
334
|
},
|
|
381
|
-
token_vault_privileged_access: tokenVaultPrivilegedAccessSchema,
|
|
382
335
|
third_party_security_mode: {
|
|
383
336
|
type: 'string',
|
|
384
337
|
enum: ['strict', 'permissive'],
|
|
@@ -507,40 +460,6 @@ const createClientSanitizer = (clients) => {
|
|
|
507
460
|
},
|
|
508
461
|
};
|
|
509
462
|
};
|
|
510
|
-
/**
|
|
511
|
-
* On export, remove `credentials` from `token_vault_privileged_access`.
|
|
512
|
-
*
|
|
513
|
-
* Auth0 returns these as tenant-specific credential references (`{ id }`) — never
|
|
514
|
-
* names or key material — so they are not portable across tenants and must never be
|
|
515
|
-
* written to disk. `ip_allowlist` and `grants` are kept for visibility. Mutates and
|
|
516
|
-
* returns the same client.
|
|
517
|
-
*/
|
|
518
|
-
const stripTokenVaultCredentialsOnExport = (client) => {
|
|
519
|
-
const tvpa = client
|
|
520
|
-
.token_vault_privileged_access;
|
|
521
|
-
if (tvpa && 'credentials' in tvpa) {
|
|
522
|
-
delete tvpa.credentials;
|
|
523
|
-
}
|
|
524
|
-
return client;
|
|
525
|
-
};
|
|
526
|
-
/**
|
|
527
|
-
* On write (create/update), remove the entire `token_vault_privileged_access` object.
|
|
528
|
-
*
|
|
529
|
-
* The Management API requires `credentials` whenever `token_vault_privileged_access`
|
|
530
|
-
* is present in the payload, but those credentials are tenant-specific ids that the
|
|
531
|
-
* Deploy CLI intentionally never persists (see stripTokenVaultCredentialsOnExport).
|
|
532
|
-
* Sending the object without `credentials` fails validation ("Missing required
|
|
533
|
-
* property: credentials"); sending it with exported ids would re-send stale ids on a
|
|
534
|
-
* cross-tenant deploy. The Deploy CLI therefore does not manage this field — it is
|
|
535
|
-
* export-only. Manage `token_vault_privileged_access` directly on the tenant.
|
|
536
|
-
* Mutates and returns the same client.
|
|
537
|
-
*/
|
|
538
|
-
const stripTokenVaultPrivilegedAccessOnWrite = (client) => {
|
|
539
|
-
if ('token_vault_privileged_access' in client) {
|
|
540
|
-
delete client.token_vault_privileged_access;
|
|
541
|
-
}
|
|
542
|
-
return client;
|
|
543
|
-
};
|
|
544
463
|
class ClientHandler extends default_1.default {
|
|
545
464
|
constructor(config) {
|
|
546
465
|
super({
|
|
@@ -647,21 +566,6 @@ class ClientHandler extends default_1.default {
|
|
|
647
566
|
delete item.refresh_token;
|
|
648
567
|
}
|
|
649
568
|
}
|
|
650
|
-
// Strip client_authentication_methods — the clientAuthCredentials handler (order 70)
|
|
651
|
-
// owns this field entirely. Auth0 rejects credential objects with name/credential_type in PATCH.
|
|
652
|
-
// Strip token_endpoint_auth_method only when client_authentication_methods is present in config:
|
|
653
|
-
// Auth0 rejects it in PATCH while a client has active credentials. For these clients the
|
|
654
|
-
// clientAuthCredentials handler (order 70) owns token_endpoint_auth_method too.
|
|
655
|
-
// For clients without client_authentication_methods, credentials were already cleared by
|
|
656
|
-
// clientAuthCredentialsPre (order 40), so token_endpoint_auth_method passes through safely.
|
|
657
|
-
if (item.client_authentication_methods) {
|
|
658
|
-
delete item.token_endpoint_auth_method;
|
|
659
|
-
}
|
|
660
|
-
delete item.client_authentication_methods;
|
|
661
|
-
// token_vault_privileged_access requires tenant-specific credential ids that
|
|
662
|
-
// the Deploy CLI never persists. Strip the whole object on write so we neither
|
|
663
|
-
// re-send stale ids nor fail validation for the missing credentials property.
|
|
664
|
-
stripTokenVaultPrivilegedAccessOnWrite(item);
|
|
665
569
|
return item;
|
|
666
570
|
});
|
|
667
571
|
};
|
|
@@ -683,38 +587,7 @@ class ClientHandler extends default_1.default {
|
|
|
683
587
|
is_global: false,
|
|
684
588
|
...((0, utils_1.shouldExcludeThirdPartyClients)(this.config) && { is_first_party: true }),
|
|
685
589
|
});
|
|
686
|
-
|
|
687
|
-
.sanitizeCrossOriginAuth(false)
|
|
688
|
-
.get()
|
|
689
|
-
// token_vault_privileged_access.credentials are returned as tenant-specific
|
|
690
|
-
// ids — strip them so they are never exported to disk.
|
|
691
|
-
.map(stripTokenVaultCredentialsOnExport);
|
|
692
|
-
// Enrich credential stubs with name and credential_type for export.
|
|
693
|
-
// Auth0 does not return pem on read — it is never exported.
|
|
694
|
-
await Promise.all(sanitized.map(async (client) => {
|
|
695
|
-
if (!client.client_authentication_methods)
|
|
696
|
-
return;
|
|
697
|
-
try {
|
|
698
|
-
const creds = await this.client.clients.credentials.list(client.client_id);
|
|
699
|
-
const credMap = new Map(creds.map((c) => [c.id, c]));
|
|
700
|
-
Object.values(client.client_authentication_methods).forEach((method) => {
|
|
701
|
-
if (method?.credentials) {
|
|
702
|
-
method.credentials = method.credentials
|
|
703
|
-
.map((stub) => {
|
|
704
|
-
const full = credMap.get(stub.id);
|
|
705
|
-
if (!full?.name)
|
|
706
|
-
return null;
|
|
707
|
-
return { name: full.name, credential_type: full.credential_type };
|
|
708
|
-
})
|
|
709
|
-
.filter(Boolean);
|
|
710
|
-
}
|
|
711
|
-
});
|
|
712
|
-
}
|
|
713
|
-
catch (_) {
|
|
714
|
-
// leave stubs as-is if the credentials API call fails
|
|
715
|
-
}
|
|
716
|
-
}));
|
|
717
|
-
this.existing = sanitized;
|
|
590
|
+
this.existing = createClientSanitizer(clients).sanitizeCrossOriginAuth(false).get();
|
|
718
591
|
return this.existing;
|
|
719
592
|
}
|
|
720
593
|
isCimdClient(client) {
|
|
@@ -103,27 +103,6 @@ export declare const schema: {
|
|
|
103
103
|
required: string[];
|
|
104
104
|
additionalProperties: boolean;
|
|
105
105
|
};
|
|
106
|
-
cross_app_access_requesting_app: {
|
|
107
|
-
type: string;
|
|
108
|
-
properties: {
|
|
109
|
-
active: {
|
|
110
|
-
type: string;
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
|
-
required: string[];
|
|
114
|
-
additionalProperties: boolean;
|
|
115
|
-
};
|
|
116
|
-
cross_app_access_resource_app: {
|
|
117
|
-
type: string;
|
|
118
|
-
properties: {
|
|
119
|
-
status: {
|
|
120
|
-
type: string;
|
|
121
|
-
enum: string[];
|
|
122
|
-
};
|
|
123
|
-
};
|
|
124
|
-
required: string[];
|
|
125
|
-
additionalProperties: boolean;
|
|
126
|
-
};
|
|
127
106
|
directory_provisioning_configuration: {
|
|
128
107
|
type: string;
|
|
129
108
|
properties: {
|