auth0-deploy-cli 8.33.0 → 8.35.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/CHANGELOG.md +38 -1
- package/lib/context/directory/handlers/actionModules.js +3 -0
- package/lib/context/directory/handlers/actions.js +3 -0
- package/lib/context/directory/handlers/databases.js +10 -3
- package/lib/context/directory/index.js +3 -0
- package/lib/context/yaml/index.js +3 -0
- package/lib/keywordPreservation.js +8 -3
- package/lib/tools/auth0/handlers/connections.d.ts +35 -1
- package/lib/tools/auth0/handlers/connections.js +78 -0
- package/lib/tools/auth0/handlers/default.d.ts +7 -0
- package/lib/tools/auth0/handlers/default.js +21 -2
- package/lib/tools/auth0/handlers/networkACLs.d.ts +42 -0
- package/lib/tools/auth0/handlers/networkACLs.js +21 -0
- package/lib/tools/auth0/handlers/resourceServers.js +2 -0
- package/lib/tools/auth0/handlers/themes.js +1 -0
- package/lib/types.d.ts +3 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [8.35.0] - 2026-05-22
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Add `AUTH0_IGNORE_DRY_RUN_FIELDS` config option to exclude specified fields from `--dry-run` diff output per handler type. [#1385]
|
|
15
|
+
- Add hostnames and CIDR fields to network ACL match schema. [#1386]
|
|
16
|
+
- Add `ES384` and `ES512` as valid `dpop_signing_alg` values for OIDC and Okta enterprise connections (GA). [#1391]
|
|
17
|
+
|
|
18
|
+
### Deprecated
|
|
19
|
+
|
|
20
|
+
- Deprecate absolute and external file path references in config handlers; a warning is emitted when detected. Support will be removed in a future major version. [#1392]
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- Fix keyword markers in themes not being preserved during default export configuration. [#1387]
|
|
25
|
+
|
|
26
|
+
## [8.34.0] - 2026-05-11
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- Add support for `authorization_policy` on the Auth0 My Account API resource server, enabling ACR (Authentication Context Class Reference) policy configuration via Deploy CLI. [#1381]
|
|
31
|
+
- Add Google Workspace inbound group sync support to directory provisioning configuration. [#1380]
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
|
|
35
|
+
- Fix keyword replacement mappings (e.g. `##ENV##`) not being applied to `theme.json` during import. [#1379]
|
|
36
|
+
|
|
10
37
|
## [8.33.0] - 2026-05-05
|
|
11
38
|
|
|
12
39
|
### Added
|
|
@@ -1764,7 +1791,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
1764
1791
|
[#1372]: https://github.com/auth0/auth0-deploy-cli/issues/1372
|
|
1765
1792
|
[#1374]: https://github.com/auth0/auth0-deploy-cli/issues/1374
|
|
1766
1793
|
[#1375]: https://github.com/auth0/auth0-deploy-cli/issues/1375
|
|
1767
|
-
[
|
|
1794
|
+
[#1379]: https://github.com/auth0/auth0-deploy-cli/issues/1379
|
|
1795
|
+
[#1380]: https://github.com/auth0/auth0-deploy-cli/issues/1380
|
|
1796
|
+
[#1381]: https://github.com/auth0/auth0-deploy-cli/issues/1381
|
|
1797
|
+
[#1385]: https://github.com/auth0/auth0-deploy-cli/issues/1385
|
|
1798
|
+
[#1386]: https://github.com/auth0/auth0-deploy-cli/issues/1386
|
|
1799
|
+
[#1387]: https://github.com/auth0/auth0-deploy-cli/issues/1387
|
|
1800
|
+
[#1391]: https://github.com/auth0/auth0-deploy-cli/issues/1391
|
|
1801
|
+
[#1392]: https://github.com/auth0/auth0-deploy-cli/issues/1392
|
|
1802
|
+
[Unreleased]: https://github.com/auth0/auth0-deploy-cli/compare/v8.35.0...HEAD
|
|
1803
|
+
[8.35.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.34.0...v8.35.0
|
|
1804
|
+
[8.34.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.33.0...v8.34.0
|
|
1768
1805
|
[8.33.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.32.0...v8.33.0
|
|
1769
1806
|
[8.32.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.31.0...v8.32.0
|
|
1770
1807
|
[8.31.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.30.0...v8.31.0
|
|
@@ -26,6 +26,9 @@ function parse(context) {
|
|
|
26
26
|
// It can be a relative path, so we need to handle both cases.
|
|
27
27
|
const unixPath = module.code.replace(/[\\/]+/g, '/').replace(/^([a-zA-Z]+:|\.\/)/, '');
|
|
28
28
|
if (fs_extra_1.default.existsSync(unixPath)) {
|
|
29
|
+
logger_1.default.warn(`Support for absolute paths and paths outside the config root will be deprecated in a future version to improve the security of the tool. ` +
|
|
30
|
+
`Please update your configuration to use paths relative to the config directory. ` +
|
|
31
|
+
`Current absolute path used: ["${module.code}"]`);
|
|
29
32
|
module.code = context.loadFile(unixPath, moduleFolder);
|
|
30
33
|
}
|
|
31
34
|
else {
|
|
@@ -28,6 +28,9 @@ function parse(context) {
|
|
|
28
28
|
const unixPath = action.code.replace(/[\\/]+/g, '/').replace(/^([a-zA-Z]+:|\.\/)/, '');
|
|
29
29
|
if (fs_extra_1.default.existsSync(unixPath)) {
|
|
30
30
|
// If the Unix-style path exists, load the file from that path
|
|
31
|
+
logger_1.default.warn(`Support for absolute paths and paths outside the config root will be deprecated in a future version to improve the security of the tool. ` +
|
|
32
|
+
`Please update your configuration to use paths relative to the config directory. ` +
|
|
33
|
+
`Current absolute path used: ["${action.code}"]`);
|
|
31
34
|
action.code = context.loadFile(unixPath, actionFolder);
|
|
32
35
|
}
|
|
33
36
|
else {
|
|
@@ -8,7 +8,7 @@ const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
|
8
8
|
const tools_1 = require("../../../tools");
|
|
9
9
|
const logger_1 = __importDefault(require("../../../logger"));
|
|
10
10
|
const utils_1 = require("../../../utils");
|
|
11
|
-
function getDatabase(folder, mappingOpts) {
|
|
11
|
+
function getDatabase(folder, configRoot, mappingOpts) {
|
|
12
12
|
const metaFile = path_1.default.join(folder, 'database.json');
|
|
13
13
|
const metaData = (() => {
|
|
14
14
|
try {
|
|
@@ -40,7 +40,14 @@ function getDatabase(folder, mappingOpts) {
|
|
|
40
40
|
logger_1.default.warn('Skipping invalid database configuration: ' + name);
|
|
41
41
|
}
|
|
42
42
|
else {
|
|
43
|
-
|
|
43
|
+
const resolvedBase = path_1.default.resolve(configRoot);
|
|
44
|
+
const toLoad = path_1.default.resolve(folder, script);
|
|
45
|
+
if (!toLoad.startsWith(resolvedBase + path_1.default.sep)) {
|
|
46
|
+
logger_1.default.warn(`Support for absolute paths and paths outside the config root will be deprecated in a future version to improve the security of the tool. ` +
|
|
47
|
+
`Please update your configuration to use paths relative to the config directory. ` +
|
|
48
|
+
`Current absolute path used: ["${script}"]`);
|
|
49
|
+
}
|
|
50
|
+
database.options.customScripts[name] = (0, tools_1.loadFileAndReplaceKeywords)(toLoad, mappingOpts);
|
|
44
51
|
}
|
|
45
52
|
});
|
|
46
53
|
}
|
|
@@ -55,7 +62,7 @@ function parse(context) {
|
|
|
55
62
|
.map((f) => path_1.default.join(databaseFolder, f))
|
|
56
63
|
.filter((f) => (0, utils_1.isDirectory)(f));
|
|
57
64
|
const databases = folders
|
|
58
|
-
.map((f) => getDatabase(f, {
|
|
65
|
+
.map((f) => getDatabase(f, context.filePath, {
|
|
59
66
|
mappings: context.mappings,
|
|
60
67
|
disableKeywordReplacement: context.disableKeywordReplacement,
|
|
61
68
|
}))
|
|
@@ -73,6 +73,9 @@ class DirectoryContext {
|
|
|
73
73
|
if (!(0, utils_1.isFile)(toLoad)) {
|
|
74
74
|
// try load not relative to yaml file
|
|
75
75
|
toLoad = f;
|
|
76
|
+
logger_1.default.warn(`Support for absolute paths and paths outside the config root will be deprecated in a future version to improve the security of the tool. ` +
|
|
77
|
+
`Please update your configuration to use paths relative to the config directory. ` +
|
|
78
|
+
`Current absolute path used: ["${f}"]`);
|
|
76
79
|
}
|
|
77
80
|
return (0, tools_1.loadFileAndReplaceKeywords)(toLoad, {
|
|
78
81
|
mappings: this.mappings,
|
|
@@ -47,6 +47,9 @@ class YAMLContext {
|
|
|
47
47
|
if (!(0, utils_1.isFile)(toLoad)) {
|
|
48
48
|
// try load not relative to yaml file
|
|
49
49
|
toLoad = f;
|
|
50
|
+
logger_1.default.warn(`Support for absolute paths and paths outside the config root will be deprecated in a future version to improve the security of the tool. ` +
|
|
51
|
+
`Please update your configuration to use paths relative to the config directory. ` +
|
|
52
|
+
`Current absolute path used: ["${f}"]`);
|
|
50
53
|
}
|
|
51
54
|
return (0, tools_1.loadFileAndReplaceKeywords)(path_1.default.resolve(toLoad), {
|
|
52
55
|
mappings: this.mappings,
|
|
@@ -48,17 +48,22 @@ const getPreservableFieldsFromAssets = (asset, keywordMappings, resourceSpecific
|
|
|
48
48
|
const specificAddress = resourceIdentifiers.reduce((aggregateAddress, resourceIdentifier) => {
|
|
49
49
|
resourceSpecificIdentifiers[address];
|
|
50
50
|
if (resourceIdentifier === undefined)
|
|
51
|
-
return
|
|
51
|
+
return aggregateAddress; // See if this specific resource type has an identifier
|
|
52
52
|
const identifierFieldValue = arrayItem[resourceIdentifier];
|
|
53
53
|
if (identifierFieldValue === undefined)
|
|
54
|
-
return
|
|
54
|
+
return aggregateAddress; // See if this specific array item possess the resource-specific identifier
|
|
55
55
|
if (aggregateAddress === '') {
|
|
56
56
|
return `${resourceIdentifier}=${identifierFieldValue}`;
|
|
57
57
|
}
|
|
58
58
|
return `${aggregateAddress}||${resourceIdentifier}=${identifierFieldValue}`;
|
|
59
59
|
}, '');
|
|
60
60
|
if (specificAddress.length === 0) {
|
|
61
|
-
|
|
61
|
+
// No identifiers registered: skip. Identifiers registered but absent from item: fall back to positional index.
|
|
62
|
+
if (resourceIdentifiers.length === 0) {
|
|
63
|
+
return [];
|
|
64
|
+
}
|
|
65
|
+
const arrayIndex = asset.indexOf(arrayItem);
|
|
66
|
+
return (0, exports.getPreservableFieldsFromAssets)(arrayItem, keywordMappings, resourceSpecificIdentifiers, `${address}${shouldRenderDot ? '.' : ''}${arrayIndex}`);
|
|
62
67
|
}
|
|
63
68
|
return (0, exports.getPreservableFieldsFromAssets)(arrayItem, keywordMappings, resourceSpecificIdentifiers, `${address}${shouldRenderDot ? '.' : ''}[${specificAddress}]`);
|
|
64
69
|
})
|
|
@@ -18,8 +18,12 @@ export declare const schema: {
|
|
|
18
18
|
type: string;
|
|
19
19
|
additionalProperties: boolean;
|
|
20
20
|
properties: {
|
|
21
|
+
api_enable_groups: {
|
|
22
|
+
type: string;
|
|
23
|
+
};
|
|
21
24
|
dpop_signing_alg: {
|
|
22
25
|
type: string;
|
|
26
|
+
enum: string[];
|
|
23
27
|
};
|
|
24
28
|
token_endpoint_auth_signing_alg: {
|
|
25
29
|
type: string;
|
|
@@ -122,6 +126,22 @@ export declare const schema: {
|
|
|
122
126
|
type: string;
|
|
123
127
|
description: string;
|
|
124
128
|
};
|
|
129
|
+
synchronize_groups: {
|
|
130
|
+
type: string;
|
|
131
|
+
enum: ("all" | "off" | "selected")[];
|
|
132
|
+
};
|
|
133
|
+
synchronized_groups: {
|
|
134
|
+
type: string;
|
|
135
|
+
items: {
|
|
136
|
+
type: string;
|
|
137
|
+
properties: {
|
|
138
|
+
id: {
|
|
139
|
+
type: string;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
required: string[];
|
|
143
|
+
};
|
|
144
|
+
};
|
|
125
145
|
};
|
|
126
146
|
};
|
|
127
147
|
};
|
|
@@ -131,7 +151,11 @@ export declare const schema: {
|
|
|
131
151
|
type DirectoryProvisioningConfig = Management.DirectoryProvisioning;
|
|
132
152
|
export type Connection = Management.ConnectionForList & {
|
|
133
153
|
enabled_clients?: string[];
|
|
134
|
-
directory_provisioning_configuration?: Pick<DirectoryProvisioningConfig, 'mapping' | 'synchronize_automatically'
|
|
154
|
+
directory_provisioning_configuration?: Pick<DirectoryProvisioningConfig, 'mapping' | 'synchronize_automatically' | 'synchronize_groups'> & {
|
|
155
|
+
synchronized_groups?: Array<{
|
|
156
|
+
id: string;
|
|
157
|
+
}>;
|
|
158
|
+
};
|
|
135
159
|
};
|
|
136
160
|
export declare const addExcludedConnectionPropertiesToChanges: ({ proposedChanges, existingConnections, config, }: {
|
|
137
161
|
proposedChanges: CalculatedChanges;
|
|
@@ -203,6 +227,16 @@ export default class ConnectionsHandler extends DefaultAPIHandler {
|
|
|
203
227
|
* Deletes directory provisioning configuration for a connection.
|
|
204
228
|
*/
|
|
205
229
|
private deleteConnectionDirectoryProvisioning;
|
|
230
|
+
/**
|
|
231
|
+
* Retrieves all synchronized groups for a connection using checkpoint pagination.
|
|
232
|
+
*/
|
|
233
|
+
getConnectionSynchronizedGroups(connectionId: string): Promise<Array<{
|
|
234
|
+
id: string;
|
|
235
|
+
}> | null>;
|
|
236
|
+
/**
|
|
237
|
+
* Replaces the synchronized groups for a connection (PUT replace-all semantics).
|
|
238
|
+
*/
|
|
239
|
+
private updateConnectionSynchronizedGroups;
|
|
206
240
|
/**
|
|
207
241
|
* This function processes directory provisioning for create, update, and conflict operations.
|
|
208
242
|
* Directory provisioning is only supported for google-apps strategy connections.
|
|
@@ -56,8 +56,12 @@ const connectionOptionsSchema = {
|
|
|
56
56
|
type: 'object',
|
|
57
57
|
additionalProperties: true,
|
|
58
58
|
properties: {
|
|
59
|
+
api_enable_groups: {
|
|
60
|
+
type: 'boolean',
|
|
61
|
+
},
|
|
59
62
|
dpop_signing_alg: {
|
|
60
63
|
type: 'string',
|
|
64
|
+
enum: ['ES256', 'ES384', 'ES512', 'Ed25519'],
|
|
61
65
|
},
|
|
62
66
|
token_endpoint_auth_signing_alg: {
|
|
63
67
|
type: 'string',
|
|
@@ -141,6 +145,20 @@ exports.schema = {
|
|
|
141
145
|
type: 'boolean',
|
|
142
146
|
description: 'The field whether periodic automatic synchronization is enabled',
|
|
143
147
|
},
|
|
148
|
+
synchronize_groups: {
|
|
149
|
+
type: 'string',
|
|
150
|
+
enum: Object.values(auth0_1.Management.SynchronizeGroupsEnum),
|
|
151
|
+
},
|
|
152
|
+
synchronized_groups: {
|
|
153
|
+
type: 'array',
|
|
154
|
+
items: {
|
|
155
|
+
type: 'object',
|
|
156
|
+
properties: {
|
|
157
|
+
id: { type: 'string' },
|
|
158
|
+
},
|
|
159
|
+
required: ['id'],
|
|
160
|
+
},
|
|
161
|
+
},
|
|
144
162
|
},
|
|
145
163
|
},
|
|
146
164
|
},
|
|
@@ -411,6 +429,7 @@ class ConnectionsHandler extends default_1.default {
|
|
|
411
429
|
const createPayload = {
|
|
412
430
|
mapping: payload.mapping,
|
|
413
431
|
synchronize_automatically: payload.synchronize_automatically,
|
|
432
|
+
...(payload.synchronize_groups && { synchronize_groups: payload.synchronize_groups }),
|
|
414
433
|
};
|
|
415
434
|
await this.client.connections.directoryProvisioning.create(connectionId, createPayload);
|
|
416
435
|
logger_1.default.debug(`Created directory provisioning for connection '${connectionId}'`);
|
|
@@ -425,6 +444,7 @@ class ConnectionsHandler extends default_1.default {
|
|
|
425
444
|
const updatePayload = {
|
|
426
445
|
mapping: payload.mapping,
|
|
427
446
|
synchronize_automatically: payload.synchronize_automatically,
|
|
447
|
+
...(payload.synchronize_groups && { synchronize_groups: payload.synchronize_groups }),
|
|
428
448
|
};
|
|
429
449
|
await this.client.connections.directoryProvisioning.update(connectionId, updatePayload);
|
|
430
450
|
logger_1.default.debug(`Updated directory provisioning for connection '${connectionId}'`);
|
|
@@ -439,6 +459,40 @@ class ConnectionsHandler extends default_1.default {
|
|
|
439
459
|
await this.client.connections.directoryProvisioning.delete(connectionId);
|
|
440
460
|
logger_1.default.debug(`Deleted directory provisioning for connection '${connectionId}'`);
|
|
441
461
|
}
|
|
462
|
+
/**
|
|
463
|
+
* Retrieves all synchronized groups for a connection using checkpoint pagination.
|
|
464
|
+
*/
|
|
465
|
+
async getConnectionSynchronizedGroups(connectionId) {
|
|
466
|
+
try {
|
|
467
|
+
const groups = [];
|
|
468
|
+
let page = await this.client.connections.directoryProvisioning.listSynchronizedGroups(connectionId, {});
|
|
469
|
+
for (const g of page.data ?? [])
|
|
470
|
+
groups.push({ id: g.id });
|
|
471
|
+
while (page.hasNextPage?.()) {
|
|
472
|
+
page = await page.getNextPage();
|
|
473
|
+
for (const g of page.data ?? [])
|
|
474
|
+
groups.push({ id: g.id });
|
|
475
|
+
}
|
|
476
|
+
return groups;
|
|
477
|
+
}
|
|
478
|
+
catch (error) {
|
|
479
|
+
const errLog = `Unable to fetch synchronized groups for connection '${connectionId}'. `;
|
|
480
|
+
const statusCode = error?.statusCode;
|
|
481
|
+
if (statusCode != null && [403, 404, 501].includes(statusCode)) {
|
|
482
|
+
const bodyMessage = error instanceof auth0_1.ManagementError ? error.body?.message : error.message;
|
|
483
|
+
logger_1.default.warn(errLog + bodyMessage);
|
|
484
|
+
return null;
|
|
485
|
+
}
|
|
486
|
+
throw error;
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* Replaces the synchronized groups for a connection (PUT replace-all semantics).
|
|
491
|
+
*/
|
|
492
|
+
async updateConnectionSynchronizedGroups(connectionId, groups) {
|
|
493
|
+
await this.client.connections.directoryProvisioning.set(connectionId, { groups });
|
|
494
|
+
logger_1.default.debug(`Updated synchronized groups for connection '${connectionId}'`);
|
|
495
|
+
}
|
|
442
496
|
/**
|
|
443
497
|
* This function processes directory provisioning for create, update, and conflict operations.
|
|
444
498
|
* Directory provisioning is only supported for google-apps strategy connections.
|
|
@@ -513,6 +567,20 @@ class ConnectionsHandler extends default_1.default {
|
|
|
513
567
|
.map((i) => this.objString(i))
|
|
514
568
|
.join('\n')}`);
|
|
515
569
|
}
|
|
570
|
+
// Process synchronized groups for connections where synchronize_groups === 'selected'
|
|
571
|
+
const connectionsToSyncGroups = [
|
|
572
|
+
...directoryConnectionsToCreate,
|
|
573
|
+
...directoryConnectionsToUpdate,
|
|
574
|
+
].filter((conn) => conn.directory_provisioning_configuration?.synchronize_groups === 'selected' &&
|
|
575
|
+
conn.directory_provisioning_configuration?.synchronized_groups !== undefined);
|
|
576
|
+
await this.client.pool
|
|
577
|
+
.addEachTask({
|
|
578
|
+
data: connectionsToSyncGroups,
|
|
579
|
+
generator: (conn) => this.updateConnectionSynchronizedGroups(conn.id, conn.directory_provisioning_configuration.synchronized_groups).catch((err) => {
|
|
580
|
+
throw new Error(`Failed to update synchronized groups for connection '${conn.id}':\n${err}`);
|
|
581
|
+
}),
|
|
582
|
+
})
|
|
583
|
+
.promise();
|
|
516
584
|
}
|
|
517
585
|
async getType() {
|
|
518
586
|
if (this.existing)
|
|
@@ -552,7 +620,17 @@ class ConnectionsHandler extends default_1.default {
|
|
|
552
620
|
connection.directory_provisioning_configuration = {
|
|
553
621
|
mapping: dirProvConfig.mapping,
|
|
554
622
|
synchronize_automatically: dirProvConfig.synchronize_automatically,
|
|
623
|
+
...(dirProvConfig.synchronize_groups && {
|
|
624
|
+
synchronize_groups: dirProvConfig.synchronize_groups,
|
|
625
|
+
}),
|
|
555
626
|
};
|
|
627
|
+
if (dirProvConfig.synchronize_groups === 'selected') {
|
|
628
|
+
const syncedGroups = await this.getConnectionSynchronizedGroups(con.id);
|
|
629
|
+
if (syncedGroups?.length) {
|
|
630
|
+
connection.directory_provisioning_configuration.synchronized_groups =
|
|
631
|
+
syncedGroups;
|
|
632
|
+
}
|
|
633
|
+
}
|
|
556
634
|
}
|
|
557
635
|
}
|
|
558
636
|
return { index, connection };
|
|
@@ -42,6 +42,13 @@ export default class APIHandler {
|
|
|
42
42
|
};
|
|
43
43
|
ignoreDryRunFields: APIHandler['ignoreDryRunFields'];
|
|
44
44
|
});
|
|
45
|
+
/**
|
|
46
|
+
* Returns the effective `ignoreDryRunFields` for this handler, merging the
|
|
47
|
+
* handler's hardcoded defaults with any user-supplied entries from the
|
|
48
|
+
* `AUTH0_IGNORE_DRY_RUN_FIELDS[<type>]` config key. Read lazily so that the
|
|
49
|
+
* constructor remains free of config-provider invocations.
|
|
50
|
+
*/
|
|
51
|
+
getEffectiveIgnoreDryRunFields(): string[];
|
|
45
52
|
getClientFN(fn: ApiMethodOverride): Function;
|
|
46
53
|
didDelete(item: Asset): void;
|
|
47
54
|
didCreate(item: Asset): void;
|
|
@@ -88,6 +88,25 @@ class APIHandler {
|
|
|
88
88
|
this.created = 0;
|
|
89
89
|
this.deleted = 0;
|
|
90
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* Returns the effective `ignoreDryRunFields` for this handler, merging the
|
|
93
|
+
* handler's hardcoded defaults with any user-supplied entries from the
|
|
94
|
+
* `AUTH0_IGNORE_DRY_RUN_FIELDS[<type>]` config key. Read lazily so that the
|
|
95
|
+
* constructor remains free of config-provider invocations.
|
|
96
|
+
*/
|
|
97
|
+
getEffectiveIgnoreDryRunFields() {
|
|
98
|
+
let configured = [];
|
|
99
|
+
try {
|
|
100
|
+
const map = this.config('AUTH0_IGNORE_DRY_RUN_FIELDS');
|
|
101
|
+
if (map && Array.isArray(map[this.type])) {
|
|
102
|
+
configured = map[this.type];
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
catch {
|
|
106
|
+
configured = [];
|
|
107
|
+
}
|
|
108
|
+
return [...this.ignoreDryRunFields, ...configured].filter((field, index, allFields) => allFields.indexOf(field) === index);
|
|
109
|
+
}
|
|
91
110
|
getClientFN(fn) {
|
|
92
111
|
if (typeof fn === 'string') {
|
|
93
112
|
const client = this.client[this.type];
|
|
@@ -194,7 +213,7 @@ class APIHandler {
|
|
|
194
213
|
// @ts-ignore TODO: investigate what happens when `existing` is null
|
|
195
214
|
existing,
|
|
196
215
|
identifiers: this.identifiers,
|
|
197
|
-
ignoreDryRunFields: this.
|
|
216
|
+
ignoreDryRunFields: this.getEffectiveIgnoreDryRunFields(),
|
|
198
217
|
});
|
|
199
218
|
}
|
|
200
219
|
// if we are not in dry run mode, calculate the changes
|
|
@@ -227,7 +246,7 @@ class APIHandler {
|
|
|
227
246
|
// @ts-ignore TODO: investigate what happens when `existing` is null
|
|
228
247
|
existing,
|
|
229
248
|
identifiers: this.identifiers,
|
|
230
|
-
ignoreDryRunFields: this.
|
|
249
|
+
ignoreDryRunFields: this.getEffectiveIgnoreDryRunFields(),
|
|
231
250
|
});
|
|
232
251
|
}
|
|
233
252
|
async validate(assets) {
|
|
@@ -150,6 +150,27 @@ export declare const schema: {
|
|
|
150
150
|
minItems: number;
|
|
151
151
|
maxItems: number;
|
|
152
152
|
};
|
|
153
|
+
hostnames: {
|
|
154
|
+
type: string;
|
|
155
|
+
items: {
|
|
156
|
+
type: string;
|
|
157
|
+
};
|
|
158
|
+
uniqueItems: boolean;
|
|
159
|
+
};
|
|
160
|
+
connecting_ipv4_cidrs: {
|
|
161
|
+
type: string;
|
|
162
|
+
items: {
|
|
163
|
+
type: string;
|
|
164
|
+
};
|
|
165
|
+
uniqueItems: boolean;
|
|
166
|
+
};
|
|
167
|
+
connecting_ipv6_cidrs: {
|
|
168
|
+
type: string;
|
|
169
|
+
items: {
|
|
170
|
+
type: string;
|
|
171
|
+
};
|
|
172
|
+
uniqueItems: boolean;
|
|
173
|
+
};
|
|
153
174
|
};
|
|
154
175
|
additionalProperties: boolean;
|
|
155
176
|
};
|
|
@@ -228,6 +249,27 @@ export declare const schema: {
|
|
|
228
249
|
minItems: number;
|
|
229
250
|
maxItems: number;
|
|
230
251
|
};
|
|
252
|
+
hostnames: {
|
|
253
|
+
type: string;
|
|
254
|
+
items: {
|
|
255
|
+
type: string;
|
|
256
|
+
};
|
|
257
|
+
uniqueItems: boolean;
|
|
258
|
+
};
|
|
259
|
+
connecting_ipv4_cidrs: {
|
|
260
|
+
type: string;
|
|
261
|
+
items: {
|
|
262
|
+
type: string;
|
|
263
|
+
};
|
|
264
|
+
uniqueItems: boolean;
|
|
265
|
+
};
|
|
266
|
+
connecting_ipv6_cidrs: {
|
|
267
|
+
type: string;
|
|
268
|
+
items: {
|
|
269
|
+
type: string;
|
|
270
|
+
};
|
|
271
|
+
uniqueItems: boolean;
|
|
272
|
+
};
|
|
231
273
|
};
|
|
232
274
|
additionalProperties: boolean;
|
|
233
275
|
};
|
|
@@ -133,6 +133,27 @@ const MatchSchema = {
|
|
|
133
133
|
minItems: 1,
|
|
134
134
|
maxItems: 10,
|
|
135
135
|
},
|
|
136
|
+
hostnames: {
|
|
137
|
+
type: 'array',
|
|
138
|
+
items: {
|
|
139
|
+
type: 'string',
|
|
140
|
+
},
|
|
141
|
+
uniqueItems: true,
|
|
142
|
+
},
|
|
143
|
+
connecting_ipv4_cidrs: {
|
|
144
|
+
type: 'array',
|
|
145
|
+
items: {
|
|
146
|
+
type: 'string',
|
|
147
|
+
},
|
|
148
|
+
uniqueItems: true,
|
|
149
|
+
},
|
|
150
|
+
connecting_ipv6_cidrs: {
|
|
151
|
+
type: 'array',
|
|
152
|
+
items: {
|
|
153
|
+
type: 'string',
|
|
154
|
+
},
|
|
155
|
+
uniqueItems: true,
|
|
156
|
+
},
|
|
136
157
|
},
|
|
137
158
|
additionalProperties: false,
|
|
138
159
|
};
|
|
@@ -117,6 +117,7 @@ class ResourceServersHandler extends default_1.default {
|
|
|
117
117
|
'identifier',
|
|
118
118
|
'id',
|
|
119
119
|
'is_system',
|
|
120
|
+
'authorization_policy',
|
|
120
121
|
];
|
|
121
122
|
const sanitized = {};
|
|
122
123
|
allowedKeys.forEach((key) => {
|
|
@@ -168,6 +169,7 @@ class ResourceServersHandler extends default_1.default {
|
|
|
168
169
|
proof_of_possession: update.proof_of_possession,
|
|
169
170
|
skip_consent_for_verifiable_first_party_clients: update.skip_consent_for_verifiable_first_party_clients,
|
|
170
171
|
subject_type_authorization: update.subject_type_authorization,
|
|
172
|
+
authorization_policy: update.authorization_policy,
|
|
171
173
|
};
|
|
172
174
|
return this.client.resourceServers.update(id, updateFields);
|
|
173
175
|
}
|
package/lib/types.d.ts
CHANGED
|
@@ -76,6 +76,9 @@ export type Config = {
|
|
|
76
76
|
AUTH0_DRY_RUN?: boolean | 'preview';
|
|
77
77
|
AUTH0_DRY_RUN_INTERACTIVE?: boolean;
|
|
78
78
|
AUTH0_DRY_RUN_APPLY?: boolean;
|
|
79
|
+
AUTH0_IGNORE_DRY_RUN_FIELDS?: {
|
|
80
|
+
[handlerType: string]: string[];
|
|
81
|
+
};
|
|
79
82
|
EXCLUDED_PROPS?: {
|
|
80
83
|
[key: string]: string[];
|
|
81
84
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "auth0-deploy-cli",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.35.0",
|
|
4
4
|
"description": "A command line tool for deploying updates to your Auth0 tenant",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"readme": "README.md",
|
|
34
34
|
"homepage": "https://github.com/auth0/auth0-deploy-cli#readme",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@clack/prompts": "1.
|
|
36
|
+
"@clack/prompts": "1.3.0",
|
|
37
37
|
"ajv": "^6.12.6",
|
|
38
38
|
"chalk": "5.6.2",
|
|
39
39
|
"auth0": "^5.9.0",
|