auth0-deploy-cli 8.24.0 → 8.26.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/.github/workflows/claude-code-review.yml +1 -4
- package/CHANGELOG.md +44 -1
- package/lib/context/directory/handlers/tenant.js +7 -2
- package/lib/context/directory/index.js +3 -0
- package/lib/context/index.js +10 -0
- package/lib/context/yaml/handlers/tenant.js +7 -2
- package/lib/context/yaml/index.js +5 -0
- package/lib/sessionDurationsToMinutes.d.ts +5 -1
- package/lib/sessionDurationsToMinutes.js +5 -1
- package/lib/tools/auth0/handlers/actions.js +1 -1
- package/lib/tools/auth0/handlers/clientGrants.d.ts +5 -0
- package/lib/tools/auth0/handlers/clientGrants.js +18 -3
- package/lib/tools/auth0/handlers/clients.d.ts +43 -8
- package/lib/tools/auth0/handlers/clients.js +106 -35
- package/lib/tools/auth0/handlers/connectionProfiles.js +0 -3
- package/lib/tools/auth0/handlers/connections.d.ts +5 -6
- package/lib/tools/auth0/handlers/connections.js +41 -53
- package/lib/tools/auth0/handlers/customDomains.d.ts +4 -0
- package/lib/tools/auth0/handlers/customDomains.js +6 -3
- package/lib/tools/auth0/handlers/databases.d.ts +57 -0
- package/lib/tools/auth0/handlers/databases.js +52 -2
- package/lib/tools/auth0/handlers/default.js +2 -4
- package/lib/tools/auth0/handlers/flowVaultConnections.js +6 -3
- package/lib/tools/auth0/handlers/flows.js +0 -3
- package/lib/tools/auth0/handlers/forms.js +0 -3
- package/lib/tools/auth0/handlers/index.d.ts +1 -0
- package/lib/tools/auth0/handlers/logStreams.js +0 -3
- package/lib/tools/auth0/handlers/organizations.d.ts +4 -1
- package/lib/tools/auth0/handlers/organizations.js +61 -32
- package/lib/tools/auth0/handlers/prompts.d.ts +2 -2
- package/lib/tools/auth0/handlers/prompts.js +1 -0
- package/lib/tools/auth0/handlers/resourceServers.d.ts +1 -3
- package/lib/tools/auth0/handlers/resourceServers.js +4 -4
- package/lib/tools/auth0/handlers/roles.js +6 -3
- package/lib/tools/auth0/handlers/scimHandler.d.ts +5 -8
- package/lib/tools/auth0/handlers/scimHandler.js +13 -13
- package/lib/tools/auth0/handlers/tokenExchangeProfiles.d.ts +0 -14
- package/lib/tools/auth0/handlers/tokenExchangeProfiles.js +27 -34
- package/lib/tools/auth0/handlers/userAttributeProfiles.js +0 -3
- package/lib/tools/auth0/schema.d.ts +7 -0
- package/lib/tools/auth0/schema.js +11 -0
- package/lib/tools/utils.d.ts +1 -0
- package/lib/tools/utils.js +14 -0
- package/lib/types.d.ts +4 -0
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [8.26.0] - 2026-01-30
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Add support for `use_for_organization_discovery` in organizations `discovery-domains`. [#1283]
|
|
15
|
+
- Add support for passwordless authentication methods (`email_otp` and `phone_otp`) in `databases`. [#1282]
|
|
16
|
+
- Add support for `relying_party_identifier` in `customDomains`. [#1280]
|
|
17
|
+
- Add support for `allow_all_scopes` property in `clientGrants`. [#1278]
|
|
18
|
+
- Add OIDC logout configuration support with session metadata in `clients`. [#1263]
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- Optimize directory provisioning configuration fetching for `connections`. [#1284]
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- Fix exclude read-only `is_default` from `customDomains`. [#1279]
|
|
27
|
+
- Fix pagination skipping last page. [#1277]
|
|
28
|
+
|
|
29
|
+
## [8.25.0] - 2026-01-08
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- `AUTH0_INCLUDED_CONNECTIONS` config property to include only selected `connection`. [#1242]
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
37
|
+
- Fix `tokenExchangeProfiles` profiles handling. [#1253]
|
|
38
|
+
- Fix `idle_ephemeral_session_lifetime` and `ephemeral_session_lifetime` handling while importing [#1261]
|
|
39
|
+
|
|
10
40
|
## [8.24.0] - 2025-12-22
|
|
11
41
|
|
|
12
42
|
### Added
|
|
@@ -1591,9 +1621,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
1591
1621
|
[#1232]: https://github.com/auth0/auth0-deploy-cli/issues/1232
|
|
1592
1622
|
[#1239]: https://github.com/auth0/auth0-deploy-cli/issues/1239
|
|
1593
1623
|
[#1240]: https://github.com/auth0/auth0-deploy-cli/issues/1240
|
|
1624
|
+
[#1242]: https://github.com/auth0/auth0-deploy-cli/issues/1242
|
|
1594
1625
|
[#1244]: https://github.com/auth0/auth0-deploy-cli/issues/1244
|
|
1595
1626
|
[#1246]: https://github.com/auth0/auth0-deploy-cli/issues/1246
|
|
1596
|
-
[
|
|
1627
|
+
[#1253]: https://github.com/auth0/auth0-deploy-cli/issues/1253
|
|
1628
|
+
[#1261]: https://github.com/auth0/auth0-deploy-cli/issues/1261
|
|
1629
|
+
[#1263]: https://github.com/auth0/auth0-deploy-cli/issues/1263
|
|
1630
|
+
[#1277]: https://github.com/auth0/auth0-deploy-cli/issues/1277
|
|
1631
|
+
[#1278]: https://github.com/auth0/auth0-deploy-cli/issues/1278
|
|
1632
|
+
[#1279]: https://github.com/auth0/auth0-deploy-cli/issues/1279
|
|
1633
|
+
[#1280]: https://github.com/auth0/auth0-deploy-cli/issues/1280
|
|
1634
|
+
[#1282]: https://github.com/auth0/auth0-deploy-cli/issues/1282
|
|
1635
|
+
[#1283]: https://github.com/auth0/auth0-deploy-cli/issues/1283
|
|
1636
|
+
[#1284]: https://github.com/auth0/auth0-deploy-cli/issues/1284
|
|
1637
|
+
[Unreleased]: https://github.com/auth0/auth0-deploy-cli/compare/v8.26.0...HEAD
|
|
1638
|
+
[8.26.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.25.0...v8.26.0
|
|
1639
|
+
[8.25.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.24.0...v8.25.0
|
|
1597
1640
|
[8.24.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.23.2...v8.24.0
|
|
1598
1641
|
[8.23.2]: https://github.com/auth0/auth0-deploy-cli/compare/v8.23.1...v8.23.2
|
|
1599
1642
|
[8.23.1]: https://github.com/auth0/auth0-deploy-cli/compare/v8.23.0...v8.23.1
|
|
@@ -15,12 +15,17 @@ function parse(context) {
|
|
|
15
15
|
return { tenant: null };
|
|
16
16
|
}
|
|
17
17
|
/* eslint-disable camelcase */
|
|
18
|
-
const { session_lifetime, idle_session_lifetime, ...tenant } = (0, utils_1.loadJSON)(tenantFile, {
|
|
18
|
+
const { session_lifetime, idle_session_lifetime, idle_ephemeral_session_lifetime, ephemeral_session_lifetime, ...tenant } = (0, utils_1.loadJSON)(tenantFile, {
|
|
19
19
|
mappings: context.mappings,
|
|
20
20
|
disableKeywordReplacement: context.disableKeywordReplacement,
|
|
21
21
|
});
|
|
22
22
|
(0, utils_1.clearTenantFlags)(tenant);
|
|
23
|
-
const sessionDurations = (0, sessionDurationsToMinutes_1.sessionDurationsToMinutes)({
|
|
23
|
+
const sessionDurations = (0, sessionDurationsToMinutes_1.sessionDurationsToMinutes)({
|
|
24
|
+
session_lifetime,
|
|
25
|
+
idle_session_lifetime,
|
|
26
|
+
idle_ephemeral_session_lifetime,
|
|
27
|
+
ephemeral_session_lifetime,
|
|
28
|
+
});
|
|
24
29
|
return {
|
|
25
30
|
//@ts-ignore
|
|
26
31
|
tenant: {
|
|
@@ -63,6 +63,9 @@ class DirectoryContext {
|
|
|
63
63
|
resourceServers: config.AUTH0_EXCLUDED_RESOURCE_SERVERS || [],
|
|
64
64
|
defaults: config.AUTH0_EXCLUDED_DEFAULTS || [],
|
|
65
65
|
};
|
|
66
|
+
this.assets.include = {
|
|
67
|
+
connections: config.AUTH0_INCLUDED_CONNECTIONS || [],
|
|
68
|
+
};
|
|
66
69
|
}
|
|
67
70
|
loadFile(f, folder) {
|
|
68
71
|
const basePath = path.join(this.filePath, folder);
|
package/lib/context/index.js
CHANGED
|
@@ -26,6 +26,7 @@ const nonPrimitiveProps = [
|
|
|
26
26
|
'AUTH0_INCLUDED_ONLY',
|
|
27
27
|
'EXCLUDED_PROPS',
|
|
28
28
|
'INCLUDED_PROPS',
|
|
29
|
+
'AUTH0_INCLUDED_CONNECTIONS',
|
|
29
30
|
];
|
|
30
31
|
const EA_FEATURES = [];
|
|
31
32
|
const setupContext = async (config, command) => {
|
|
@@ -97,6 +98,15 @@ const setupContext = async (config, command) => {
|
|
|
97
98
|
logger_1.default.warn(`Usage of the ${usedDeprecatedParams.join(', ')} exclusion ${usedDeprecatedParams.length > 1 ? 'params are' : 'param is'} deprecated and may be removed from future major versions. See: https://github.com/auth0/auth0-deploy-cli/issues/451#user-content-deprecated-exclusion-props for details.`);
|
|
98
99
|
}
|
|
99
100
|
})(config);
|
|
101
|
+
((config) => {
|
|
102
|
+
const hasIncludedConnections = config.AUTH0_INCLUDED_CONNECTIONS !== undefined &&
|
|
103
|
+
config.AUTH0_INCLUDED_CONNECTIONS.length > 0;
|
|
104
|
+
const hasExcludedConnections = config.AUTH0_EXCLUDED_CONNECTIONS !== undefined &&
|
|
105
|
+
config.AUTH0_EXCLUDED_CONNECTIONS.length > 0;
|
|
106
|
+
if (hasIncludedConnections && hasExcludedConnections) {
|
|
107
|
+
throw new Error('Both AUTH0_INCLUDED_CONNECTIONS and AUTH0_EXCLUDED_CONNECTIONS configuration values are defined, only one can be configured at a time.');
|
|
108
|
+
}
|
|
109
|
+
})(config);
|
|
100
110
|
((config) => {
|
|
101
111
|
// Check if experimental early access features are enabled
|
|
102
112
|
if (config.AUTH0_EXPERIMENTAL_EA) {
|
|
@@ -6,9 +6,14 @@ async function parse(context) {
|
|
|
6
6
|
if (!context.assets.tenant)
|
|
7
7
|
return { tenant: null };
|
|
8
8
|
/* eslint-disable camelcase */
|
|
9
|
-
const { session_lifetime, idle_session_lifetime, ...tenant } = context.assets.tenant;
|
|
9
|
+
const { session_lifetime, idle_session_lifetime, idle_ephemeral_session_lifetime, ephemeral_session_lifetime, ...tenant } = context.assets.tenant;
|
|
10
10
|
(0, utils_1.clearTenantFlags)(tenant);
|
|
11
|
-
const sessionDurations = (0, sessionDurationsToMinutes_1.sessionDurationsToMinutes)({
|
|
11
|
+
const sessionDurations = (0, sessionDurationsToMinutes_1.sessionDurationsToMinutes)({
|
|
12
|
+
session_lifetime,
|
|
13
|
+
idle_session_lifetime,
|
|
14
|
+
idle_ephemeral_session_lifetime,
|
|
15
|
+
ephemeral_session_lifetime,
|
|
16
|
+
});
|
|
12
17
|
return {
|
|
13
18
|
tenant: {
|
|
14
19
|
...tenant,
|
|
@@ -32,6 +32,9 @@ class YAMLContext {
|
|
|
32
32
|
resourceServers: config.AUTH0_EXCLUDED_RESOURCE_SERVERS || [],
|
|
33
33
|
defaults: config.AUTH0_EXCLUDED_DEFAULTS || [],
|
|
34
34
|
};
|
|
35
|
+
this.assets.include = {
|
|
36
|
+
connections: config.AUTH0_INCLUDED_CONNECTIONS || [],
|
|
37
|
+
};
|
|
35
38
|
this.basePath = (() => {
|
|
36
39
|
if (!!config.AUTH0_BASE_PATH)
|
|
37
40
|
return config.AUTH0_BASE_PATH;
|
|
@@ -80,6 +83,7 @@ class YAMLContext {
|
|
|
80
83
|
}, {});
|
|
81
84
|
const initialAssets = {
|
|
82
85
|
exclude: this.assets.exclude, // Keep the exclude rules in result assets
|
|
86
|
+
include: this.assets.include, // Keep the include rules in result assets
|
|
83
87
|
};
|
|
84
88
|
this.assets = Object.keys(this.assets).reduce((acc, key) => {
|
|
85
89
|
// Get the list of asset types to include
|
|
@@ -173,6 +177,7 @@ class YAMLContext {
|
|
|
173
177
|
let cleaned = (0, readonly_1.default)(this.assets, this.config);
|
|
174
178
|
// Delete exclude as it's not part of the auth0 tenant config
|
|
175
179
|
delete cleaned.exclude;
|
|
180
|
+
delete cleaned.include;
|
|
176
181
|
// Optionally Strip identifiers
|
|
177
182
|
if (!this.config.AUTH0_EXPORT_IDENTIFIERS) {
|
|
178
183
|
cleaned = (0, utils_1.stripIdentifiers)(auth0, cleaned);
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
export declare const sessionDurationsToMinutes: ({ session_lifetime, idle_session_lifetime, }: {
|
|
1
|
+
export declare const sessionDurationsToMinutes: ({ session_lifetime, idle_session_lifetime, idle_ephemeral_session_lifetime, ephemeral_session_lifetime, }: {
|
|
2
2
|
session_lifetime?: number;
|
|
3
3
|
idle_session_lifetime?: number;
|
|
4
|
+
idle_ephemeral_session_lifetime?: number;
|
|
5
|
+
ephemeral_session_lifetime?: number;
|
|
4
6
|
}) => {
|
|
5
7
|
session_lifetime_in_minutes?: number;
|
|
6
8
|
idle_session_lifetime_in_minutes?: number;
|
|
9
|
+
idle_ephemeral_session_lifetime_in_minutes?: number;
|
|
10
|
+
ephemeral_session_lifetime_in_minutes?: number;
|
|
7
11
|
};
|
|
@@ -4,12 +4,16 @@ exports.sessionDurationsToMinutes = void 0;
|
|
|
4
4
|
function hoursToMinutes(hours) {
|
|
5
5
|
return Math.round(hours * 60);
|
|
6
6
|
}
|
|
7
|
-
const sessionDurationsToMinutes = ({ session_lifetime, idle_session_lifetime, }) => {
|
|
7
|
+
const sessionDurationsToMinutes = ({ session_lifetime, idle_session_lifetime, idle_ephemeral_session_lifetime, ephemeral_session_lifetime, }) => {
|
|
8
8
|
const sessionDurations = {};
|
|
9
9
|
if (!!session_lifetime)
|
|
10
10
|
sessionDurations.session_lifetime_in_minutes = hoursToMinutes(session_lifetime);
|
|
11
11
|
if (!!idle_session_lifetime)
|
|
12
12
|
sessionDurations.idle_session_lifetime_in_minutes = hoursToMinutes(idle_session_lifetime);
|
|
13
|
+
if (!!idle_ephemeral_session_lifetime)
|
|
14
|
+
sessionDurations.idle_ephemeral_session_lifetime_in_minutes = hoursToMinutes(idle_ephemeral_session_lifetime);
|
|
15
|
+
if (!!ephemeral_session_lifetime)
|
|
16
|
+
sessionDurations.ephemeral_session_lifetime_in_minutes = hoursToMinutes(ephemeral_session_lifetime);
|
|
13
17
|
return sessionDurations;
|
|
14
18
|
};
|
|
15
19
|
exports.sessionDurationsToMinutes = sessionDurationsToMinutes;
|
|
@@ -114,7 +114,7 @@ class ActionHandler extends default_1.default {
|
|
|
114
114
|
type: 'actions',
|
|
115
115
|
functions: {
|
|
116
116
|
create: (action) => this.createAction(action),
|
|
117
|
-
update: (
|
|
117
|
+
update: (id, action) => this.updateAction(id, action),
|
|
118
118
|
delete: (actionId) => this.deleteAction(actionId),
|
|
119
119
|
},
|
|
120
120
|
stripUpdateFields: ['deployed', 'status'],
|
|
@@ -33,6 +33,10 @@ export declare const schema: {
|
|
|
33
33
|
};
|
|
34
34
|
uniqueItems: boolean;
|
|
35
35
|
};
|
|
36
|
+
allow_all_scopes: {
|
|
37
|
+
type: string;
|
|
38
|
+
description: string;
|
|
39
|
+
};
|
|
36
40
|
};
|
|
37
41
|
required: string[];
|
|
38
42
|
};
|
|
@@ -42,6 +46,7 @@ export default class ClientGrantsHandler extends DefaultHandler {
|
|
|
42
46
|
existing: ClientGrant[] | null;
|
|
43
47
|
constructor(config: DefaultAPIHandler);
|
|
44
48
|
objString(item: any): string;
|
|
49
|
+
validate(assets: Assets): Promise<void>;
|
|
45
50
|
getType(): Promise<ClientGrant[]>;
|
|
46
51
|
processChanges(assets: Assets): Promise<void>;
|
|
47
52
|
}
|
|
@@ -69,6 +69,10 @@ exports.schema = {
|
|
|
69
69
|
},
|
|
70
70
|
uniqueItems: true,
|
|
71
71
|
},
|
|
72
|
+
allow_all_scopes: {
|
|
73
|
+
type: 'boolean',
|
|
74
|
+
description: 'When enabled, all scopes configured on the resource server are allowed for by this client grant.',
|
|
75
|
+
},
|
|
72
76
|
},
|
|
73
77
|
required: ['client_id', 'audience'],
|
|
74
78
|
},
|
|
@@ -81,15 +85,26 @@ class ClientGrantsHandler extends default_1.default {
|
|
|
81
85
|
id: 'id',
|
|
82
86
|
// @ts-ignore because not sure why two-dimensional array passed in
|
|
83
87
|
identifiers: ['id', ['client_id', 'audience']],
|
|
84
|
-
functions: {
|
|
85
|
-
update: async ({ id }, bodyParams) => this.client.clientGrants.update(id, bodyParams),
|
|
86
|
-
},
|
|
87
88
|
stripUpdateFields: ['audience', 'client_id', 'subject_type', 'is_system'],
|
|
88
89
|
});
|
|
89
90
|
}
|
|
90
91
|
objString(item) {
|
|
91
92
|
return super.objString({ id: item.id, client_id: item.client_id, audience: item.audience });
|
|
92
93
|
}
|
|
94
|
+
async validate(assets) {
|
|
95
|
+
const { clientGrants } = assets;
|
|
96
|
+
// Do nothing if not set
|
|
97
|
+
if (!clientGrants)
|
|
98
|
+
return;
|
|
99
|
+
// Validate each client grant
|
|
100
|
+
clientGrants.forEach((grant) => {
|
|
101
|
+
// When allow_all_scopes is true, scope should not be present
|
|
102
|
+
if (grant.allow_all_scopes === true && grant.scope && grant.scope.length > 0) {
|
|
103
|
+
throw new Error(`Client grant for client_id "${grant.client_id}" and audience "${grant.audience}": Cannot specify "scope" when "allow_all_scopes" is set to true. Remove the "scope" property or set "allow_all_scopes" to false.`);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
await super.validate(assets);
|
|
107
|
+
}
|
|
93
108
|
async getType() {
|
|
94
109
|
if (this.existing) {
|
|
95
110
|
return this.existing;
|
|
@@ -263,6 +263,49 @@ export declare const schema: {
|
|
|
263
263
|
};
|
|
264
264
|
};
|
|
265
265
|
};
|
|
266
|
+
oidc_logout: {
|
|
267
|
+
type: string[];
|
|
268
|
+
description: string;
|
|
269
|
+
properties: {
|
|
270
|
+
backchannel_logout_urls: {
|
|
271
|
+
type: string;
|
|
272
|
+
description: string;
|
|
273
|
+
items: {
|
|
274
|
+
type: string;
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
backchannel_logout_initiators: {
|
|
278
|
+
type: string;
|
|
279
|
+
description: string;
|
|
280
|
+
properties: {
|
|
281
|
+
mode: {
|
|
282
|
+
type: string;
|
|
283
|
+
schemaName: string;
|
|
284
|
+
enum: string[];
|
|
285
|
+
description: string;
|
|
286
|
+
};
|
|
287
|
+
selected_initiators: {
|
|
288
|
+
type: string;
|
|
289
|
+
items: {
|
|
290
|
+
type: string;
|
|
291
|
+
enum: string[];
|
|
292
|
+
description: string;
|
|
293
|
+
};
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
backchannel_logout_session_metadata: {
|
|
298
|
+
type: string[];
|
|
299
|
+
description: string;
|
|
300
|
+
properties: {
|
|
301
|
+
include: {
|
|
302
|
+
type: string;
|
|
303
|
+
description: string;
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
};
|
|
266
309
|
};
|
|
267
310
|
required: string[];
|
|
268
311
|
};
|
|
@@ -273,14 +316,6 @@ export default class ClientHandler extends DefaultAPIHandler {
|
|
|
273
316
|
constructor(config: DefaultAPIHandler);
|
|
274
317
|
objString(item: any): string;
|
|
275
318
|
processChanges(assets: Assets): Promise<void>;
|
|
276
|
-
/**
|
|
277
|
-
* @description
|
|
278
|
-
* Sanitize the deprecated field `cross_origin_auth` to `cross_origin_authentication`
|
|
279
|
-
*
|
|
280
|
-
* @param {Client[]} clients - The client array to sanitize.
|
|
281
|
-
* @returns {Client[]} The sanitized array of clients.
|
|
282
|
-
*/
|
|
283
|
-
private sanitizeCrossOriginAuth;
|
|
284
319
|
getType(): Promise<Management.Client[]>;
|
|
285
320
|
sanitizeMapExpressConfiguration(auth0Client: Auth0APIClient, clientList: Client[]): Promise<Client[]>;
|
|
286
321
|
}
|
|
@@ -263,10 +263,111 @@ exports.schema = {
|
|
|
263
263
|
},
|
|
264
264
|
},
|
|
265
265
|
},
|
|
266
|
+
oidc_logout: {
|
|
267
|
+
type: ['object', 'null'],
|
|
268
|
+
description: 'Configuration for OIDC backchannel logout',
|
|
269
|
+
properties: {
|
|
270
|
+
backchannel_logout_urls: {
|
|
271
|
+
type: 'array',
|
|
272
|
+
description: 'Comma-separated list of URLs that are valid to call back from Auth0 for OIDC backchannel logout. Currently only one URL is allowed.',
|
|
273
|
+
items: {
|
|
274
|
+
type: 'string',
|
|
275
|
+
},
|
|
276
|
+
},
|
|
277
|
+
backchannel_logout_initiators: {
|
|
278
|
+
type: 'object',
|
|
279
|
+
description: 'Configuration for OIDC backchannel logout initiators',
|
|
280
|
+
properties: {
|
|
281
|
+
mode: {
|
|
282
|
+
type: 'string',
|
|
283
|
+
schemaName: 'ClientOIDCBackchannelLogoutInitiatorsModeEnum',
|
|
284
|
+
enum: ['custom', 'all'],
|
|
285
|
+
description: 'The `mode` property determines the configuration method for enabling initiators. `custom` enables only the initiators listed in the selected_initiators array, `all` enables all current and future initiators.',
|
|
286
|
+
},
|
|
287
|
+
selected_initiators: {
|
|
288
|
+
type: 'array',
|
|
289
|
+
items: {
|
|
290
|
+
type: 'string',
|
|
291
|
+
enum: [
|
|
292
|
+
'rp-logout',
|
|
293
|
+
'idp-logout',
|
|
294
|
+
'password-changed',
|
|
295
|
+
'session-expired',
|
|
296
|
+
'session-revoked',
|
|
297
|
+
'account-deleted',
|
|
298
|
+
'email-identifier-changed',
|
|
299
|
+
'mfa-phone-unenrolled',
|
|
300
|
+
'account-deactivated',
|
|
301
|
+
],
|
|
302
|
+
description: 'The `selected_initiators` property contains the list of initiators to be enabled for the given application.',
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
backchannel_logout_session_metadata: {
|
|
308
|
+
type: ['object', 'null'],
|
|
309
|
+
description: 'Controls whether session metadata is included in the logout token. Default value is null.',
|
|
310
|
+
properties: {
|
|
311
|
+
include: {
|
|
312
|
+
type: 'boolean',
|
|
313
|
+
description: 'The `include` property determines whether session metadata is included in the logout token.',
|
|
314
|
+
},
|
|
315
|
+
},
|
|
316
|
+
},
|
|
317
|
+
},
|
|
318
|
+
},
|
|
266
319
|
},
|
|
267
320
|
required: ['name'],
|
|
268
321
|
},
|
|
269
322
|
};
|
|
323
|
+
const createClientSanitizer = (clients) => {
|
|
324
|
+
let sanitized = clients;
|
|
325
|
+
return {
|
|
326
|
+
sanitizeCrossOriginAuth() {
|
|
327
|
+
const deprecatedClients = [];
|
|
328
|
+
sanitized = sanitized.map((client) => {
|
|
329
|
+
let updated = { ...client };
|
|
330
|
+
if ((0, lodash_1.has)(updated, 'cross_origin_auth')) {
|
|
331
|
+
const clientName = client.name || client.client_id || 'unknown client';
|
|
332
|
+
deprecatedClients.push(clientName);
|
|
333
|
+
if (!(0, lodash_1.has)(updated, 'cross_origin_authentication')) {
|
|
334
|
+
updated.cross_origin_authentication = updated.cross_origin_auth;
|
|
335
|
+
}
|
|
336
|
+
updated = (0, lodash_1.omit)(updated, 'cross_origin_auth');
|
|
337
|
+
}
|
|
338
|
+
return updated;
|
|
339
|
+
});
|
|
340
|
+
if (deprecatedClients.length > 0) {
|
|
341
|
+
logger_1.default.warn("The 'cross_origin_auth' parameter is deprecated in clients and scheduled for removal in future releases.\n" +
|
|
342
|
+
`Use 'cross_origin_authentication' going forward. Clients using the deprecated setting: [${deprecatedClients.join(', ')}]`);
|
|
343
|
+
}
|
|
344
|
+
return this;
|
|
345
|
+
},
|
|
346
|
+
sanitizeOidcLogout() {
|
|
347
|
+
const deprecatedClients = [];
|
|
348
|
+
sanitized = sanitized.map((client) => {
|
|
349
|
+
let updated = { ...client };
|
|
350
|
+
if ((0, lodash_1.has)(updated, 'oidc_backchannel_logout')) {
|
|
351
|
+
const clientName = client.name || client.client_id || 'unknown client';
|
|
352
|
+
deprecatedClients.push(clientName);
|
|
353
|
+
if (!(0, lodash_1.has)(updated, 'oidc_logout')) {
|
|
354
|
+
updated.oidc_logout = updated.oidc_backchannel_logout;
|
|
355
|
+
}
|
|
356
|
+
updated = (0, lodash_1.omit)(updated, 'oidc_backchannel_logout');
|
|
357
|
+
}
|
|
358
|
+
return updated;
|
|
359
|
+
});
|
|
360
|
+
if (deprecatedClients.length > 0) {
|
|
361
|
+
logger_1.default.warn("The 'oidc_backchannel_logout' parameter is deprecated in clients and scheduled for removal in future releases.\n" +
|
|
362
|
+
`Use 'oidc_logout' going forward. Clients using the deprecated setting: [${deprecatedClients.join(', ')}]`);
|
|
363
|
+
}
|
|
364
|
+
return this;
|
|
365
|
+
},
|
|
366
|
+
get: () => {
|
|
367
|
+
return sanitized;
|
|
368
|
+
},
|
|
369
|
+
};
|
|
370
|
+
};
|
|
270
371
|
class ClientHandler extends default_1.default {
|
|
271
372
|
constructor(config) {
|
|
272
373
|
super({
|
|
@@ -284,11 +385,6 @@ class ClientHandler extends default_1.default {
|
|
|
284
385
|
'jwt_configuration.secret_encoded',
|
|
285
386
|
'resource_server_identifier',
|
|
286
387
|
],
|
|
287
|
-
functions: {
|
|
288
|
-
update: async (
|
|
289
|
-
// eslint-disable-next-line camelcase
|
|
290
|
-
{ client_id }, bodyParams) => this.client.clients.update(client_id, bodyParams),
|
|
291
|
-
},
|
|
292
388
|
});
|
|
293
389
|
}
|
|
294
390
|
objString(item) {
|
|
@@ -319,7 +415,10 @@ class ClientHandler extends default_1.default {
|
|
|
319
415
|
(!excludeThirdPartyClients || item.is_first_party));
|
|
320
416
|
// Sanitize client fields
|
|
321
417
|
const sanitizeClientFields = (list) => {
|
|
322
|
-
const sanitizedClients =
|
|
418
|
+
const sanitizedClients = createClientSanitizer(list)
|
|
419
|
+
.sanitizeCrossOriginAuth()
|
|
420
|
+
.sanitizeOidcLogout()
|
|
421
|
+
.get();
|
|
323
422
|
return sanitizedClients.map((item) => {
|
|
324
423
|
if (item.app_type === 'resource_server') {
|
|
325
424
|
if ('oidc_backchannel_logout' in item) {
|
|
@@ -345,33 +444,6 @@ class ClientHandler extends default_1.default {
|
|
|
345
444
|
...changes,
|
|
346
445
|
});
|
|
347
446
|
}
|
|
348
|
-
/**
|
|
349
|
-
* @description
|
|
350
|
-
* Sanitize the deprecated field `cross_origin_auth` to `cross_origin_authentication`
|
|
351
|
-
*
|
|
352
|
-
* @param {Client[]} clients - The client array to sanitize.
|
|
353
|
-
* @returns {Client[]} The sanitized array of clients.
|
|
354
|
-
*/
|
|
355
|
-
sanitizeCrossOriginAuth(clients) {
|
|
356
|
-
const deprecatedClients = [];
|
|
357
|
-
const updatedClients = clients.map((client) => {
|
|
358
|
-
let updated = { ...client };
|
|
359
|
-
if ((0, lodash_1.has)(updated, 'cross_origin_auth')) {
|
|
360
|
-
const clientName = client.name || client.client_id || 'unknown client';
|
|
361
|
-
deprecatedClients.push(clientName);
|
|
362
|
-
if (!(0, lodash_1.has)(updated, 'cross_origin_authentication')) {
|
|
363
|
-
updated.cross_origin_authentication = updated.cross_origin_auth;
|
|
364
|
-
}
|
|
365
|
-
updated = (0, lodash_1.omit)(updated, 'cross_origin_auth');
|
|
366
|
-
}
|
|
367
|
-
return updated;
|
|
368
|
-
});
|
|
369
|
-
if (deprecatedClients.length > 0) {
|
|
370
|
-
logger_1.default.warn("The 'cross_origin_auth' parameter is deprecated in clients and scheduled for removal in future releases.\n" +
|
|
371
|
-
`Use 'cross_origin_authentication' going forward. Clients using the deprecated setting: [${deprecatedClients.join(', ')}]`);
|
|
372
|
-
}
|
|
373
|
-
return updatedClients;
|
|
374
|
-
}
|
|
375
447
|
async getType() {
|
|
376
448
|
if (this.existing)
|
|
377
449
|
return this.existing;
|
|
@@ -382,8 +454,7 @@ class ClientHandler extends default_1.default {
|
|
|
382
454
|
is_global: false,
|
|
383
455
|
...(excludeThirdPartyClients && { is_first_party: true }),
|
|
384
456
|
});
|
|
385
|
-
|
|
386
|
-
this.existing = sanitizedClients;
|
|
457
|
+
this.existing = createClientSanitizer(clients).sanitizeCrossOriginAuth().get();
|
|
387
458
|
return this.existing;
|
|
388
459
|
}
|
|
389
460
|
// convert names back to IDs for express configuration
|
|
@@ -206,9 +206,6 @@ class ConnectionProfilesHandler extends default_1.default {
|
|
|
206
206
|
type: 'connectionProfiles',
|
|
207
207
|
id: 'id',
|
|
208
208
|
identifiers: ['id', 'name'],
|
|
209
|
-
functions: {
|
|
210
|
-
update: (args, data) => this.client.connectionProfiles.update(args?.id, data),
|
|
211
|
-
},
|
|
212
209
|
});
|
|
213
210
|
}
|
|
214
211
|
objString(item) {
|
|
@@ -107,10 +107,10 @@ export declare const schema: {
|
|
|
107
107
|
required: string[];
|
|
108
108
|
};
|
|
109
109
|
};
|
|
110
|
-
type DirectoryProvisioningConfig = Management.
|
|
110
|
+
type DirectoryProvisioningConfig = Management.DirectoryProvisioning;
|
|
111
111
|
export type Connection = Management.ConnectionForList & {
|
|
112
112
|
enabled_clients?: string[];
|
|
113
|
-
directory_provisioning_configuration?: DirectoryProvisioningConfig
|
|
113
|
+
directory_provisioning_configuration?: Pick<DirectoryProvisioningConfig, 'mapping' | 'synchronize_automatically'>;
|
|
114
114
|
};
|
|
115
115
|
export declare const addExcludedConnectionPropertiesToChanges: ({ proposedChanges, existingConnections, config, }: {
|
|
116
116
|
proposedChanges: CalculatedChanges;
|
|
@@ -165,11 +165,10 @@ export default class ConnectionsHandler extends DefaultAPIHandler {
|
|
|
165
165
|
options?: undefined;
|
|
166
166
|
};
|
|
167
167
|
/**
|
|
168
|
-
* Retrieves directory provisioning
|
|
169
|
-
* @
|
|
170
|
-
* @returns A promise that resolves to the configuration object, or null if not configured/supported
|
|
168
|
+
* Retrieves all directory provisioning configurations for all connections.
|
|
169
|
+
* @returns A promise that resolves to the configurations object, or null if not configured/supported
|
|
171
170
|
*/
|
|
172
|
-
|
|
171
|
+
getConnectionDirectoryProvisionings(): Promise<DirectoryProvisioningConfig[] | null>;
|
|
173
172
|
/**
|
|
174
173
|
* Creates directory provisioning configuration for a connection.
|
|
175
174
|
*/
|