auth0-deploy-cli 8.37.0 → 8.39.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 +32 -1
- package/lib/context/defaults.d.ts +1 -0
- package/lib/context/defaults.js +47 -0
- package/lib/context/directory/handlers/eventStreams.d.ts +5 -0
- package/lib/context/directory/handlers/eventStreams.js +52 -0
- package/lib/context/directory/handlers/index.js +2 -0
- package/lib/context/yaml/handlers/eventStreams.d.ts +5 -0
- package/lib/context/yaml/handlers/eventStreams.js +24 -0
- package/lib/context/yaml/handlers/index.js +2 -0
- package/lib/tools/auth0/handlers/branding.js +5 -0
- package/lib/tools/auth0/handlers/clients.d.ts +32 -0
- package/lib/tools/auth0/handlers/clients.js +30 -0
- package/lib/tools/auth0/handlers/connections.js +1 -0
- package/lib/tools/auth0/handlers/eventStreams.d.ts +58 -0
- package/lib/tools/auth0/handlers/eventStreams.js +178 -0
- package/lib/tools/auth0/handlers/index.js +2 -0
- package/lib/tools/auth0/handlers/resourceServers.d.ts +6 -0
- package/lib/tools/auth0/handlers/resourceServers.js +2 -0
- package/lib/tools/constants.d.ts +1 -0
- package/lib/tools/constants.js +3 -0
- package/lib/tools/utils.js +2 -1
- package/lib/types.d.ts +3 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [8.39.0] - 2026-06-30
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Add `eventStreams` support. [#1412]
|
|
15
|
+
- Add `id_token_session_expiry_supported` validation for enterprise connections. [#1411]
|
|
16
|
+
|
|
17
|
+
## [8.38.0] - 2026-06-25
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- Add `session_transfer` delegation config support for CTE impersonation on the Client entity. [#1406]
|
|
22
|
+
- Add `fedcm_login` support for Google One Tap / FedCM in Universal Login on the Client entity. [#1407]
|
|
23
|
+
- Add `login-post-identifier` and `signup-post-identifier` as supported action triggers. [#1409]
|
|
24
|
+
- Add `allow_online_access` and `allow_online_access_with_ephemeral_sessions` fields to resource server. [#1398]
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- Fix keyword placeholder validation to allow lowercase Auth0 template variables (e.g. `@@password@@`). [#1408]
|
|
29
|
+
- Re-apply prompt settings after branding update to prevent Authentication Profile reset. [#1404]
|
|
30
|
+
|
|
10
31
|
## [8.37.0] - 2026-06-17
|
|
11
32
|
|
|
12
33
|
### Added
|
|
@@ -1822,10 +1843,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
1822
1843
|
[#1391]: https://github.com/auth0/auth0-deploy-cli/issues/1391
|
|
1823
1844
|
[#1392]: https://github.com/auth0/auth0-deploy-cli/issues/1392
|
|
1824
1845
|
[#1396]: https://github.com/auth0/auth0-deploy-cli/issues/1396
|
|
1846
|
+
[#1398]: https://github.com/auth0/auth0-deploy-cli/issues/1398
|
|
1825
1847
|
[#1400]: https://github.com/auth0/auth0-deploy-cli/issues/1400
|
|
1826
1848
|
[#1401]: https://github.com/auth0/auth0-deploy-cli/issues/1401
|
|
1827
1849
|
[#1403]: https://github.com/auth0/auth0-deploy-cli/issues/1403
|
|
1828
|
-
[
|
|
1850
|
+
[#1404]: https://github.com/auth0/auth0-deploy-cli/issues/1404
|
|
1851
|
+
[#1406]: https://github.com/auth0/auth0-deploy-cli/issues/1406
|
|
1852
|
+
[#1407]: https://github.com/auth0/auth0-deploy-cli/issues/1407
|
|
1853
|
+
[#1408]: https://github.com/auth0/auth0-deploy-cli/issues/1408
|
|
1854
|
+
[#1409]: https://github.com/auth0/auth0-deploy-cli/issues/1409
|
|
1855
|
+
[#1411]: https://github.com/auth0/auth0-deploy-cli/issues/1411
|
|
1856
|
+
[#1412]: https://github.com/auth0/auth0-deploy-cli/issues/1412
|
|
1857
|
+
[Unreleased]: https://github.com/auth0/auth0-deploy-cli/compare/v8.39.0...HEAD
|
|
1858
|
+
[8.39.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.38.0...v8.39.0
|
|
1859
|
+
[8.38.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.37.0...v8.38.0
|
|
1829
1860
|
[8.37.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.36.0...v8.37.0
|
|
1830
1861
|
[8.36.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.35.0...v8.36.0
|
|
1831
1862
|
[8.35.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.34.0...v8.35.0
|
|
@@ -5,4 +5,5 @@ export declare function phoneProviderDefaults(phoneProvider: any): any;
|
|
|
5
5
|
export declare function phoneTemplatesDefaults(phoneTemplate: any): any;
|
|
6
6
|
export declare function connectionDefaults(connection: any, config?: Pick<Config, 'AUTH0_EXPORT_SECRETS'>): any;
|
|
7
7
|
export declare function logStreamDefaults(logStreams: any, config?: Pick<Config, 'AUTH0_EXPORT_SECRETS'>): any;
|
|
8
|
+
export declare function eventStreamDefaults(eventStreams: any[], config?: Pick<Config, 'AUTH0_EXPORT_SECRETS'>): any[];
|
|
8
9
|
export declare function attackProtectionDefaults(attackProtection: AttackProtection, config?: Pick<Config, 'AUTH0_EXPORT_SECRETS'>): AttackProtection;
|
package/lib/context/defaults.js
CHANGED
|
@@ -5,6 +5,7 @@ exports.phoneProviderDefaults = phoneProviderDefaults;
|
|
|
5
5
|
exports.phoneTemplatesDefaults = phoneTemplatesDefaults;
|
|
6
6
|
exports.connectionDefaults = connectionDefaults;
|
|
7
7
|
exports.logStreamDefaults = logStreamDefaults;
|
|
8
|
+
exports.eventStreamDefaults = eventStreamDefaults;
|
|
8
9
|
exports.attackProtectionDefaults = attackProtectionDefaults;
|
|
9
10
|
const utils_1 = require("../tools/utils");
|
|
10
11
|
// env vars arrive as strings, so check both forms
|
|
@@ -146,6 +147,52 @@ function logStreamDefaults(logStreams, config) {
|
|
|
146
147
|
});
|
|
147
148
|
return maskedLogStreams;
|
|
148
149
|
}
|
|
150
|
+
function eventStreamDefaults(eventStreams, config) {
|
|
151
|
+
return eventStreams.map((stream) => {
|
|
152
|
+
const { created_at: _ca, updated_at: _ua, ...rest } = stream;
|
|
153
|
+
stream = rest;
|
|
154
|
+
if (isExportSecrets(config))
|
|
155
|
+
return stream;
|
|
156
|
+
if (stream.destination?.type !== 'webhook')
|
|
157
|
+
return stream;
|
|
158
|
+
const auth = stream.destination.configuration?.webhook_authorization;
|
|
159
|
+
if (!auth)
|
|
160
|
+
return stream;
|
|
161
|
+
const method = auth.method;
|
|
162
|
+
let maskedAuth;
|
|
163
|
+
if (method === 'basic') {
|
|
164
|
+
maskedAuth = {
|
|
165
|
+
method,
|
|
166
|
+
username: auth.username ?? '',
|
|
167
|
+
password: `##EVENT_STREAM_WEBHOOK_BASIC_AUTH_PASSWORD##`,
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
else if (method === 'bearer') {
|
|
171
|
+
maskedAuth = { method, token: `##EVENT_STREAM_WEBHOOK_BEARER_TOKEN##` };
|
|
172
|
+
}
|
|
173
|
+
else if (method === 'custom_header') {
|
|
174
|
+
maskedAuth = {
|
|
175
|
+
method,
|
|
176
|
+
header_key: auth.header_key ?? '',
|
|
177
|
+
header_value: `##EVENT_STREAM_WEBHOOK_HEADER_VALUE##`,
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
else {
|
|
181
|
+
// Unknown auth method — preserve as-is rather than silently dropping credentials
|
|
182
|
+
return stream;
|
|
183
|
+
}
|
|
184
|
+
return {
|
|
185
|
+
...stream,
|
|
186
|
+
destination: {
|
|
187
|
+
...stream.destination,
|
|
188
|
+
configuration: {
|
|
189
|
+
...stream.destination.configuration,
|
|
190
|
+
webhook_authorization: maskedAuth,
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
};
|
|
194
|
+
});
|
|
195
|
+
}
|
|
149
196
|
function attackProtectionDefaults(attackProtection, config) {
|
|
150
197
|
if (isExportSecrets(config))
|
|
151
198
|
return attackProtection;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const path_1 = __importDefault(require("path"));
|
|
7
|
+
const fs_extra_1 = __importDefault(require("fs-extra"));
|
|
8
|
+
const tools_1 = require("../../../tools");
|
|
9
|
+
const utils_1 = require("../../../utils");
|
|
10
|
+
const defaults_1 = require("../../defaults");
|
|
11
|
+
function parse(context) {
|
|
12
|
+
const eventStreamsDirectory = path_1.default.join(context.filePath, tools_1.constants.EVENT_STREAMS_DIRECTORY);
|
|
13
|
+
if (!(0, utils_1.existsMustBeDir)(eventStreamsDirectory))
|
|
14
|
+
return { eventStreams: null };
|
|
15
|
+
const foundFiles = (0, utils_1.getFiles)(eventStreamsDirectory, ['.json']);
|
|
16
|
+
const eventStreams = foundFiles
|
|
17
|
+
.map((f) => (0, utils_1.loadJSON)(f, {
|
|
18
|
+
mappings: context.mappings,
|
|
19
|
+
disableKeywordReplacement: context.disableKeywordReplacement,
|
|
20
|
+
}))
|
|
21
|
+
.filter((p) => Object.keys(p).length > 0);
|
|
22
|
+
return {
|
|
23
|
+
eventStreams,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
async function dump(context) {
|
|
27
|
+
const { eventStreams } = context.assets;
|
|
28
|
+
if (!eventStreams)
|
|
29
|
+
return;
|
|
30
|
+
const eventStreamsDirectory = path_1.default.join(context.filePath, tools_1.constants.EVENT_STREAMS_DIRECTORY);
|
|
31
|
+
fs_extra_1.default.ensureDirSync(eventStreamsDirectory);
|
|
32
|
+
const maskedEventStreams = (0, defaults_1.eventStreamDefaults)(eventStreams, context.config);
|
|
33
|
+
const expectedFiles = new Set();
|
|
34
|
+
maskedEventStreams.forEach((eventStream) => {
|
|
35
|
+
const fileName = `${(0, utils_1.sanitize)(eventStream.name)}.json`;
|
|
36
|
+
const streamFile = path_1.default.join(eventStreamsDirectory, fileName);
|
|
37
|
+
(0, utils_1.dumpJSON)(streamFile, eventStream);
|
|
38
|
+
expectedFiles.add(fileName);
|
|
39
|
+
});
|
|
40
|
+
// Remove files for event streams no longer present in the tenant
|
|
41
|
+
for (const existing of fs_extra_1.default.readdirSync(eventStreamsDirectory)) {
|
|
42
|
+
const fullPath = path_1.default.join(eventStreamsDirectory, existing);
|
|
43
|
+
if (fs_extra_1.default.statSync(fullPath).isFile() && !expectedFiles.has(existing)) {
|
|
44
|
+
fs_extra_1.default.removeSync(fullPath);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const eventStreamsHandler = {
|
|
49
|
+
parse,
|
|
50
|
+
dump,
|
|
51
|
+
};
|
|
52
|
+
exports.default = eventStreamsHandler;
|
|
@@ -43,6 +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 eventStreams_1 = __importDefault(require("./eventStreams"));
|
|
46
47
|
const selfServiceProfiles_1 = __importDefault(require("./selfServiceProfiles"));
|
|
47
48
|
const directoryHandlers = {
|
|
48
49
|
rules: rules_1.default,
|
|
@@ -86,5 +87,6 @@ const directoryHandlers = {
|
|
|
86
87
|
connectionProfiles: connectionProfiles_1.default,
|
|
87
88
|
tokenExchangeProfiles: tokenExchangeProfiles_1.default,
|
|
88
89
|
supplementalSignals: supplementalSignals_1.default,
|
|
90
|
+
eventStreams: eventStreams_1.default,
|
|
89
91
|
};
|
|
90
92
|
exports.default = directoryHandlers;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const defaults_1 = require("../../defaults");
|
|
4
|
+
async function parse(context) {
|
|
5
|
+
const { eventStreams } = context.assets;
|
|
6
|
+
if (!eventStreams)
|
|
7
|
+
return { eventStreams: null };
|
|
8
|
+
return {
|
|
9
|
+
eventStreams,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
async function dump(context) {
|
|
13
|
+
const { eventStreams } = context.assets;
|
|
14
|
+
if (!eventStreams)
|
|
15
|
+
return { eventStreams: null };
|
|
16
|
+
return {
|
|
17
|
+
eventStreams: (0, defaults_1.eventStreamDefaults)(eventStreams, context.config),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
const eventStreamsHandler = {
|
|
21
|
+
parse,
|
|
22
|
+
dump,
|
|
23
|
+
};
|
|
24
|
+
exports.default = eventStreamsHandler;
|
|
@@ -43,6 +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 eventStreams_1 = __importDefault(require("./eventStreams"));
|
|
46
47
|
const selfServiceProfiles_1 = __importDefault(require("./selfServiceProfiles"));
|
|
47
48
|
const yamlHandlers = {
|
|
48
49
|
rules: rules_1.default,
|
|
@@ -86,5 +87,6 @@ const yamlHandlers = {
|
|
|
86
87
|
connectionProfiles: connectionProfiles_1.default,
|
|
87
88
|
tokenExchangeProfiles: tokenExchangeProfiles_1.default,
|
|
88
89
|
supplementalSignals: supplementalSignals_1.default,
|
|
90
|
+
eventStreams: eventStreams_1.default,
|
|
89
91
|
};
|
|
90
92
|
exports.default = yamlHandlers;
|
|
@@ -130,7 +130,12 @@ class BrandingHandler extends default_1.default {
|
|
|
130
130
|
delete brandingSettings.logo_url;
|
|
131
131
|
}
|
|
132
132
|
if (brandingSettings && Object.keys(brandingSettings).length) {
|
|
133
|
+
// Save prompt settings, update branding, then restore prompt settings to avoid mgmt API overwriting prompt settings
|
|
134
|
+
const promptSettings = await this.client.prompts.getSettings().catch(() => null);
|
|
133
135
|
await this.client.branding.update(brandingSettings);
|
|
136
|
+
if (promptSettings) {
|
|
137
|
+
await this.client.prompts.updateSettings(promptSettings);
|
|
138
|
+
}
|
|
134
139
|
this.updated += 1;
|
|
135
140
|
this.didUpdate(brandingSettings);
|
|
136
141
|
}
|
|
@@ -174,6 +174,22 @@ export declare const schema: {
|
|
|
174
174
|
description: string;
|
|
175
175
|
default: boolean;
|
|
176
176
|
};
|
|
177
|
+
delegation: {
|
|
178
|
+
type: string;
|
|
179
|
+
description: string;
|
|
180
|
+
properties: {
|
|
181
|
+
allow_delegated_access: {
|
|
182
|
+
type: string;
|
|
183
|
+
description: string;
|
|
184
|
+
};
|
|
185
|
+
enforce_device_binding: {
|
|
186
|
+
type: string;
|
|
187
|
+
description: string;
|
|
188
|
+
enum: string[];
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
additionalProperties: boolean;
|
|
192
|
+
};
|
|
177
193
|
};
|
|
178
194
|
additionalProperties: boolean;
|
|
179
195
|
};
|
|
@@ -365,6 +381,22 @@ export declare const schema: {
|
|
|
365
381
|
};
|
|
366
382
|
};
|
|
367
383
|
};
|
|
384
|
+
fedcm_login: {
|
|
385
|
+
type: string[];
|
|
386
|
+
description: string;
|
|
387
|
+
properties: {
|
|
388
|
+
google: {
|
|
389
|
+
type: string;
|
|
390
|
+
properties: {
|
|
391
|
+
is_enabled: {
|
|
392
|
+
type: string;
|
|
393
|
+
};
|
|
394
|
+
};
|
|
395
|
+
required: string[];
|
|
396
|
+
};
|
|
397
|
+
};
|
|
398
|
+
required: string[];
|
|
399
|
+
};
|
|
368
400
|
};
|
|
369
401
|
required: string[];
|
|
370
402
|
};
|
|
@@ -202,6 +202,22 @@ exports.schema = {
|
|
|
202
202
|
description: "Indicates whether Refresh Tokens created during a native-to-web session are tied to that session's lifetime. This determines if such refresh tokens should be automatically revoked when their corresponding sessions are. Usually configured in the web application.",
|
|
203
203
|
default: true,
|
|
204
204
|
},
|
|
205
|
+
delegation: {
|
|
206
|
+
type: 'object',
|
|
207
|
+
description: 'Settings for impersonation via session transfer. Required to accept Session Transfer Tokens that contain an Actor.',
|
|
208
|
+
properties: {
|
|
209
|
+
allow_delegated_access: {
|
|
210
|
+
type: 'boolean',
|
|
211
|
+
description: 'Allows clients to access an impersonated session via SSO by accepting STTs that contain an Actor.',
|
|
212
|
+
},
|
|
213
|
+
enforce_device_binding: {
|
|
214
|
+
type: 'string',
|
|
215
|
+
description: "Enforces device binding for impersonation sessions. Defaults to 'ip' when omitted.",
|
|
216
|
+
enum: ['ip', 'asn'],
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
additionalProperties: false,
|
|
220
|
+
},
|
|
205
221
|
},
|
|
206
222
|
additionalProperties: true,
|
|
207
223
|
},
|
|
@@ -379,6 +395,20 @@ exports.schema = {
|
|
|
379
395
|
},
|
|
380
396
|
},
|
|
381
397
|
},
|
|
398
|
+
fedcm_login: {
|
|
399
|
+
type: ['object', 'null'],
|
|
400
|
+
description: 'Configuration for FedCM (Federated Credential Management) login',
|
|
401
|
+
properties: {
|
|
402
|
+
google: {
|
|
403
|
+
type: 'object',
|
|
404
|
+
properties: {
|
|
405
|
+
is_enabled: { type: 'boolean' },
|
|
406
|
+
},
|
|
407
|
+
required: ['is_enabled'],
|
|
408
|
+
},
|
|
409
|
+
},
|
|
410
|
+
required: ['google'],
|
|
411
|
+
},
|
|
382
412
|
},
|
|
383
413
|
required: ['name'],
|
|
384
414
|
},
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Management } from 'auth0';
|
|
2
|
+
import DefaultAPIHandler from './default';
|
|
3
|
+
import { Asset, Assets } from '../../../types';
|
|
4
|
+
import { Action } from './actions';
|
|
5
|
+
export declare const schema: {
|
|
6
|
+
type: string;
|
|
7
|
+
items: {
|
|
8
|
+
type: string;
|
|
9
|
+
properties: {
|
|
10
|
+
id: {
|
|
11
|
+
type: string;
|
|
12
|
+
};
|
|
13
|
+
name: {
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
16
|
+
status: {
|
|
17
|
+
type: string;
|
|
18
|
+
enum: string[];
|
|
19
|
+
};
|
|
20
|
+
subscriptions: {
|
|
21
|
+
type: string;
|
|
22
|
+
items: {
|
|
23
|
+
type: string;
|
|
24
|
+
properties: {
|
|
25
|
+
event_type: {
|
|
26
|
+
type: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
destination: {
|
|
32
|
+
type: string;
|
|
33
|
+
properties: {
|
|
34
|
+
type: {
|
|
35
|
+
type: string;
|
|
36
|
+
enum: string[];
|
|
37
|
+
};
|
|
38
|
+
configuration: {
|
|
39
|
+
type: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
required: string[];
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
required: string[];
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export type EventStream = Management.EventStreamResponseContent;
|
|
49
|
+
export default class EventStreamsHandler extends DefaultAPIHandler {
|
|
50
|
+
existing: Asset[] | null;
|
|
51
|
+
private actions;
|
|
52
|
+
constructor(config: DefaultAPIHandler);
|
|
53
|
+
objString(item: Asset): string;
|
|
54
|
+
getActions(): Promise<Action[]>;
|
|
55
|
+
getType(): Promise<Asset[]>;
|
|
56
|
+
private resolveActionId;
|
|
57
|
+
processChanges(assets: Assets): Promise<void>;
|
|
58
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.schema = void 0;
|
|
43
|
+
const default_1 = __importStar(require("./default"));
|
|
44
|
+
const client_1 = require("../client");
|
|
45
|
+
exports.schema = {
|
|
46
|
+
type: 'array',
|
|
47
|
+
items: {
|
|
48
|
+
type: 'object',
|
|
49
|
+
properties: {
|
|
50
|
+
id: { type: 'string' },
|
|
51
|
+
name: { type: 'string' },
|
|
52
|
+
status: { type: 'string', enum: ['enabled', 'disabled'] },
|
|
53
|
+
subscriptions: {
|
|
54
|
+
type: 'array',
|
|
55
|
+
items: {
|
|
56
|
+
type: 'object',
|
|
57
|
+
properties: {
|
|
58
|
+
event_type: { type: 'string' },
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
destination: {
|
|
63
|
+
type: 'object',
|
|
64
|
+
properties: {
|
|
65
|
+
type: { type: 'string', enum: ['webhook', 'eventbridge', 'action'] },
|
|
66
|
+
configuration: { type: 'object' },
|
|
67
|
+
},
|
|
68
|
+
required: ['type', 'configuration'],
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
required: ['name', 'destination'],
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
class EventStreamsHandler extends default_1.default {
|
|
75
|
+
constructor(config) {
|
|
76
|
+
super({
|
|
77
|
+
...config,
|
|
78
|
+
type: 'eventStreams',
|
|
79
|
+
identifiers: ['id', 'name'],
|
|
80
|
+
// aws_partner_event_source is auto-populated by AWS after creation; sending it on create fails
|
|
81
|
+
stripCreateFields: [
|
|
82
|
+
'destination.configuration.aws_partner_event_source',
|
|
83
|
+
'created_at',
|
|
84
|
+
'updated_at',
|
|
85
|
+
],
|
|
86
|
+
stripUpdateFields: ['created_at', 'updated_at'],
|
|
87
|
+
});
|
|
88
|
+
this.actions = null;
|
|
89
|
+
}
|
|
90
|
+
objString(item) {
|
|
91
|
+
return super.objString(item.name);
|
|
92
|
+
}
|
|
93
|
+
async getActions() {
|
|
94
|
+
if (this.actions)
|
|
95
|
+
return this.actions;
|
|
96
|
+
this.actions = await (0, client_1.paginate)(this.client.actions.list, { paginate: true });
|
|
97
|
+
return this.actions;
|
|
98
|
+
}
|
|
99
|
+
async getType() {
|
|
100
|
+
if (this.existing) {
|
|
101
|
+
return this.existing;
|
|
102
|
+
}
|
|
103
|
+
const eventStreams = [];
|
|
104
|
+
let page = await this.client.eventStreams.list();
|
|
105
|
+
eventStreams.push(...page.data);
|
|
106
|
+
while (page.hasNextPage()) {
|
|
107
|
+
page = await page.getNextPage();
|
|
108
|
+
eventStreams.push(...page.data);
|
|
109
|
+
}
|
|
110
|
+
// For action-destination streams, replace action_id with the action name for export
|
|
111
|
+
const actions = await this.getActions();
|
|
112
|
+
this.existing = eventStreams.map((stream) => {
|
|
113
|
+
if (stream.destination?.type === 'action' && stream.destination.configuration?.action_id) {
|
|
114
|
+
const action = actions.find((a) => a.id === stream.destination.configuration.action_id);
|
|
115
|
+
if (action) {
|
|
116
|
+
return {
|
|
117
|
+
...stream,
|
|
118
|
+
destination: {
|
|
119
|
+
...stream.destination,
|
|
120
|
+
configuration: {
|
|
121
|
+
...stream.destination.configuration,
|
|
122
|
+
action_id: action.name,
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return stream;
|
|
129
|
+
});
|
|
130
|
+
return this.existing;
|
|
131
|
+
}
|
|
132
|
+
resolveActionId(stream) {
|
|
133
|
+
if (stream.destination?.type !== 'action' || !stream.destination.configuration?.action_id) {
|
|
134
|
+
return stream;
|
|
135
|
+
}
|
|
136
|
+
const name = stream.destination.configuration.action_id;
|
|
137
|
+
const action = (this.actions ?? []).find((a) => a.name === name);
|
|
138
|
+
if (!action) {
|
|
139
|
+
throw new Error(`Event stream "${stream.name}" references action "${name}" which was not found`);
|
|
140
|
+
}
|
|
141
|
+
return {
|
|
142
|
+
...stream,
|
|
143
|
+
destination: {
|
|
144
|
+
...stream.destination,
|
|
145
|
+
configuration: {
|
|
146
|
+
...stream.destination.configuration,
|
|
147
|
+
action_id: action.id,
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
async processChanges(assets) {
|
|
153
|
+
const { eventStreams } = assets;
|
|
154
|
+
if (!eventStreams)
|
|
155
|
+
return;
|
|
156
|
+
if (!this.actions) {
|
|
157
|
+
this.actions = await this.getActions();
|
|
158
|
+
}
|
|
159
|
+
const changes = await this.calcChanges(assets).then((changesResponse) => ({
|
|
160
|
+
...changesResponse,
|
|
161
|
+
create: changesResponse.create.map((stream) => this.resolveActionId(stream)),
|
|
162
|
+
update: changesResponse.update.map((stream) => {
|
|
163
|
+
const resolved = this.resolveActionId(stream);
|
|
164
|
+
// EventBridge destinations cannot be patched — the API rejects destination on PATCH
|
|
165
|
+
if (resolved.destination?.type === 'eventbridge') {
|
|
166
|
+
const { destination: _dest, ...rest } = resolved;
|
|
167
|
+
return rest;
|
|
168
|
+
}
|
|
169
|
+
return resolved;
|
|
170
|
+
}),
|
|
171
|
+
}));
|
|
172
|
+
await super.processChanges(assets, changes);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
exports.default = EventStreamsHandler;
|
|
176
|
+
__decorate([
|
|
177
|
+
(0, default_1.order)('75')
|
|
178
|
+
], EventStreamsHandler.prototype, "processChanges", null);
|
|
@@ -74,6 +74,7 @@ const userAttributeProfiles = __importStar(require("./userAttributeProfiles"));
|
|
|
74
74
|
const connectionProfiles = __importStar(require("./connectionProfiles"));
|
|
75
75
|
const tokenExchangeProfiles = __importStar(require("./tokenExchangeProfiles"));
|
|
76
76
|
const supplementalSignals = __importStar(require("./supplementalSignals"));
|
|
77
|
+
const eventStreams = __importStar(require("./eventStreams"));
|
|
77
78
|
const auth0ApiHandlers = {
|
|
78
79
|
rules,
|
|
79
80
|
rulesConfigs,
|
|
@@ -117,5 +118,6 @@ const auth0ApiHandlers = {
|
|
|
117
118
|
connectionProfiles,
|
|
118
119
|
tokenExchangeProfiles,
|
|
119
120
|
supplementalSignals,
|
|
121
|
+
eventStreams,
|
|
120
122
|
};
|
|
121
123
|
exports.default = auth0ApiHandlers; // TODO: apply stronger types to schema properties
|
package/lib/tools/constants.d.ts
CHANGED
package/lib/tools/constants.js
CHANGED
|
@@ -66,6 +66,8 @@ const constants = {
|
|
|
66
66
|
'send-phone-message',
|
|
67
67
|
'password-reset-post-challenge',
|
|
68
68
|
'custom-token-exchange',
|
|
69
|
+
'login-post-identifier',
|
|
70
|
+
'signup-post-identifier',
|
|
69
71
|
],
|
|
70
72
|
EMAIL_TEMPLATES_DIRECTORY: 'emails',
|
|
71
73
|
EMAIL_VERIFY,
|
|
@@ -218,5 +220,6 @@ const constants = {
|
|
|
218
220
|
CONNECTION_PROFILES_DIRECTORY: 'connection-profiles',
|
|
219
221
|
TOKEN_EXCHANGE_PROFILES_DIRECTORY: 'token-exchange-profiles',
|
|
220
222
|
SUPPLEMENTAL_SIGNALS_DIRECTORY: 'supplemental-signals',
|
|
223
|
+
EVENT_STREAMS_DIRECTORY: 'event-streams',
|
|
221
224
|
};
|
|
222
225
|
exports.default = constants;
|
package/lib/tools/utils.js
CHANGED
|
@@ -259,7 +259,8 @@ const obfuscateSensitiveValues = (data, sensitiveFieldsToObfuscate) => {
|
|
|
259
259
|
return newAsset;
|
|
260
260
|
};
|
|
261
261
|
exports.obfuscateSensitiveValues = obfuscateSensitiveValues;
|
|
262
|
-
|
|
262
|
+
// Uppercase-only to avoid false positives on lowercase Auth0 template variables like @@password@@
|
|
263
|
+
const UNRESOLVED_PLACEHOLDER_REGEX = /^(##[A-Z0-9_]+##|@@[A-Z0-9_]+@@)$/;
|
|
263
264
|
// Recursively collects all fields in an asset that still contain an unresolved
|
|
264
265
|
// ##...## (string) or @@...@@ (array) keyword placeholder.
|
|
265
266
|
const collectUnresolvedPlaceholders = (data, parentPath = '') => {
|
package/lib/types.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ import { AttackProtection } from './tools/auth0/handlers/attackProtection';
|
|
|
21
21
|
import { TokenExchangeProfile } from './tools/auth0/handlers/tokenExchangeProfiles';
|
|
22
22
|
import { RiskAssessment } from './tools/auth0/handlers/riskAssessment';
|
|
23
23
|
import { SupplementalSignals } from './tools/auth0/handlers/supplementalSignals';
|
|
24
|
+
import { EventStream } from './tools/auth0/handlers/eventStreams';
|
|
24
25
|
type SharedPaginationParams = {
|
|
25
26
|
checkpoint?: boolean;
|
|
26
27
|
paginate?: boolean;
|
|
@@ -158,6 +159,7 @@ export type Assets = Partial<{
|
|
|
158
159
|
userAttributeProfilesWithId: UserAttributeProfile[] | null;
|
|
159
160
|
connectionProfiles: Asset[] | null;
|
|
160
161
|
tokenExchangeProfiles: TokenExchangeProfile[] | null;
|
|
162
|
+
eventStreams: EventStream[] | null;
|
|
161
163
|
}>;
|
|
162
164
|
export type CalculatedChanges = {
|
|
163
165
|
del: Asset[];
|
|
@@ -178,7 +180,7 @@ export type DetailedDryRunChanges = {
|
|
|
178
180
|
changes: DetailedDryRunChange[];
|
|
179
181
|
};
|
|
180
182
|
};
|
|
181
|
-
export type AssetTypes = 'rules' | 'rulesConfigs' | 'hooks' | 'pages' | 'databases' | 'clientGrants' | 'resourceServers' | 'clients' | 'connections' | 'tenant' | 'emailProvider' | 'emailTemplates' | 'guardianFactors' | 'guardianFactorProviders' | 'guardianFactorTemplates' | 'guardianPhoneFactorMessageTypes' | 'guardianPhoneFactorSelectedProvider' | 'guardianPolicies' | 'roles' | 'actions' | 'actionModules' | 'organizations' | 'triggers' | 'attackProtection' | 'riskAssessment' | 'branding' | 'phoneProviders' | 'phoneTemplates' | 'logStreams' | 'prompts' | 'customDomains' | 'themes' | 'forms' | 'flows' | 'flowVaultConnections' | 'selfServiceProfiles' | 'networkACLs' | 'userAttributeProfiles' | 'connectionProfiles' | 'tokenExchangeProfiles' | 'supplementalSignals';
|
|
183
|
+
export type AssetTypes = 'rules' | 'rulesConfigs' | 'hooks' | 'pages' | 'databases' | 'clientGrants' | 'resourceServers' | 'clients' | 'connections' | 'tenant' | 'emailProvider' | 'emailTemplates' | 'guardianFactors' | 'guardianFactorProviders' | 'guardianFactorTemplates' | 'guardianPhoneFactorMessageTypes' | 'guardianPhoneFactorSelectedProvider' | 'guardianPolicies' | 'roles' | 'actions' | 'actionModules' | 'organizations' | 'triggers' | 'attackProtection' | 'riskAssessment' | 'branding' | 'phoneProviders' | 'phoneTemplates' | 'logStreams' | 'prompts' | 'customDomains' | 'themes' | 'forms' | 'flows' | 'flowVaultConnections' | 'selfServiceProfiles' | 'networkACLs' | 'userAttributeProfiles' | 'connectionProfiles' | 'tokenExchangeProfiles' | 'supplementalSignals' | 'eventStreams';
|
|
182
184
|
export type KeywordMappings = {
|
|
183
185
|
[key: string]: (string | number)[] | string | number;
|
|
184
186
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "auth0-deploy-cli",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.39.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,9 +33,9 @@
|
|
|
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.4.0",
|
|
37
37
|
"ajv": "^6.12.6",
|
|
38
|
-
"auth0": "^5.
|
|
38
|
+
"auth0": "^5.13.0",
|
|
39
39
|
"chalk": "5.6.2",
|
|
40
40
|
"dot-prop": "^5.3.0",
|
|
41
41
|
"fs-extra": "^10.1.0",
|