auth0-deploy-cli 8.18.0 → 8.20.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/defaults.d.ts +2 -0
- package/lib/context/defaults.js +17 -0
- package/lib/context/defaults.js.map +1 -1
- package/lib/context/directory/handlers/actions.js +4 -13
- package/lib/context/directory/handlers/actions.js.map +1 -1
- package/lib/context/directory/handlers/attackProtection.d.ts +3 -6
- package/lib/context/directory/handlers/attackProtection.js +34 -8
- package/lib/context/directory/handlers/attackProtection.js.map +1 -1
- package/lib/context/directory/handlers/emailProvider.js +11 -1
- package/lib/context/directory/handlers/emailProvider.js.map +1 -1
- package/lib/context/directory/handlers/organizations.js +7 -0
- package/lib/context/directory/handlers/organizations.js.map +1 -1
- package/lib/context/yaml/handlers/actions.js +6 -13
- package/lib/context/yaml/handlers/actions.js.map +1 -1
- package/lib/context/yaml/handlers/attackProtection.d.ts +3 -6
- package/lib/context/yaml/handlers/attackProtection.js +15 -6
- package/lib/context/yaml/handlers/attackProtection.js.map +1 -1
- package/lib/context/yaml/handlers/organizations.js +7 -0
- package/lib/context/yaml/handlers/organizations.js.map +1 -1
- package/lib/tools/auth0/handlers/actions.js +1 -1
- package/lib/tools/auth0/handlers/actions.js.map +1 -1
- package/lib/tools/auth0/handlers/attackProtection.d.ts +166 -5
- package/lib/tools/auth0/handlers/attackProtection.js +242 -7
- package/lib/tools/auth0/handlers/attackProtection.js.map +1 -1
- package/lib/tools/auth0/handlers/clients.d.ts +27 -0
- package/lib/tools/auth0/handlers/clients.js +29 -2
- package/lib/tools/auth0/handlers/clients.js.map +1 -1
- package/lib/tools/auth0/handlers/databases.d.ts +8 -2
- package/lib/tools/auth0/handlers/databases.js +43 -0
- package/lib/tools/auth0/handlers/databases.js.map +1 -1
- package/lib/tools/auth0/handlers/organizations.d.ts +22 -1
- package/lib/tools/auth0/handlers/organizations.js +167 -2
- package/lib/tools/auth0/handlers/organizations.js.map +1 -1
- package/lib/tools/auth0/handlers/tenant.d.ts +4 -0
- package/lib/tools/auth0/handlers/tenant.js +4 -0
- package/lib/tools/auth0/handlers/tenant.js.map +1 -1
- package/lib/tools/auth0/handlers/themes.d.ts +5 -0
- package/lib/tools/auth0/handlers/themes.js +5 -0
- package/lib/tools/auth0/handlers/themes.js.map +1 -1
- package/lib/tools/auth0/handlers/userAttributeProfiles.d.ts +1 -1
- package/lib/tools/auth0/handlers/userAttributeProfiles.js +19 -7
- package/lib/tools/auth0/handlers/userAttributeProfiles.js.map +1 -1
- package/lib/types.d.ts +2 -1
- package/lib/types.js.map +1 -1
- package/lib/utils.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,26 +1,187 @@
|
|
|
1
1
|
import DefaultAPIHandler from './default';
|
|
2
2
|
import { Asset, Assets } from '../../../types';
|
|
3
|
+
export declare const CAPTCHA_PROVIDERS: string[];
|
|
3
4
|
export declare const schema: {
|
|
4
5
|
type: string;
|
|
5
6
|
properties: {
|
|
7
|
+
botDetection: {
|
|
8
|
+
type: string;
|
|
9
|
+
properties: {
|
|
10
|
+
bot_detection_level: {
|
|
11
|
+
type: string;
|
|
12
|
+
enum: string[];
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
15
|
+
challenge_password_policy: {
|
|
16
|
+
type: string;
|
|
17
|
+
enum: string[];
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
20
|
+
challenge_passwordless_policy: {
|
|
21
|
+
type: string;
|
|
22
|
+
enum: string[];
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
challenge_password_reset_policy: {
|
|
26
|
+
type: string;
|
|
27
|
+
enum: string[];
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
allowlist: {
|
|
31
|
+
type: string;
|
|
32
|
+
items: {
|
|
33
|
+
type: string;
|
|
34
|
+
oneOf: {
|
|
35
|
+
type: string;
|
|
36
|
+
format: string;
|
|
37
|
+
description: string;
|
|
38
|
+
}[];
|
|
39
|
+
description: string;
|
|
40
|
+
};
|
|
41
|
+
description: string;
|
|
42
|
+
};
|
|
43
|
+
monitoring_mode_enabled: {
|
|
44
|
+
type: string;
|
|
45
|
+
description: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
6
49
|
breachedPasswordDetection: {
|
|
7
50
|
type: string;
|
|
8
51
|
};
|
|
9
52
|
bruteForceProtection: {
|
|
10
53
|
type: string;
|
|
11
54
|
};
|
|
55
|
+
captcha: {
|
|
56
|
+
type: string;
|
|
57
|
+
properties: {
|
|
58
|
+
active_provider_id: {
|
|
59
|
+
type: string;
|
|
60
|
+
description: string;
|
|
61
|
+
enum: string[];
|
|
62
|
+
};
|
|
63
|
+
arkose: {
|
|
64
|
+
type: string;
|
|
65
|
+
properties: {
|
|
66
|
+
site_key: {
|
|
67
|
+
type: string;
|
|
68
|
+
description: string;
|
|
69
|
+
};
|
|
70
|
+
secret: {
|
|
71
|
+
type: string;
|
|
72
|
+
description: string;
|
|
73
|
+
};
|
|
74
|
+
client_subdomain: {
|
|
75
|
+
type: string;
|
|
76
|
+
description: string;
|
|
77
|
+
};
|
|
78
|
+
verify_subdomain: {
|
|
79
|
+
type: string;
|
|
80
|
+
description: string;
|
|
81
|
+
};
|
|
82
|
+
fail_open: {
|
|
83
|
+
type: string;
|
|
84
|
+
description: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
required: string[];
|
|
88
|
+
additionalProperties: boolean;
|
|
89
|
+
};
|
|
90
|
+
auth_challenge: {
|
|
91
|
+
type: string;
|
|
92
|
+
properties: {
|
|
93
|
+
fail_open: {
|
|
94
|
+
type: string;
|
|
95
|
+
description: string;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
required: string[];
|
|
99
|
+
additionalProperties: boolean;
|
|
100
|
+
};
|
|
101
|
+
hcaptcha: {
|
|
102
|
+
type: string;
|
|
103
|
+
properties: {
|
|
104
|
+
site_key: {
|
|
105
|
+
type: string;
|
|
106
|
+
description: string;
|
|
107
|
+
};
|
|
108
|
+
secret: {
|
|
109
|
+
type: string;
|
|
110
|
+
description: string;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
required: string[];
|
|
114
|
+
additionalProperties: boolean;
|
|
115
|
+
};
|
|
116
|
+
friendly_captcha: {
|
|
117
|
+
type: string;
|
|
118
|
+
properties: {
|
|
119
|
+
site_key: {
|
|
120
|
+
type: string;
|
|
121
|
+
description: string;
|
|
122
|
+
};
|
|
123
|
+
secret: {
|
|
124
|
+
type: string;
|
|
125
|
+
description: string;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
required: string[];
|
|
129
|
+
additionalProperties: boolean;
|
|
130
|
+
};
|
|
131
|
+
recaptcha_enterprise: {
|
|
132
|
+
type: string;
|
|
133
|
+
properties: {
|
|
134
|
+
site_key: {
|
|
135
|
+
type: string;
|
|
136
|
+
description: string;
|
|
137
|
+
};
|
|
138
|
+
api_key: {
|
|
139
|
+
type: string;
|
|
140
|
+
description: string;
|
|
141
|
+
};
|
|
142
|
+
project_id: {
|
|
143
|
+
type: string;
|
|
144
|
+
description: string;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
required: string[];
|
|
148
|
+
additionalProperties: boolean;
|
|
149
|
+
};
|
|
150
|
+
recaptcha_v2: {
|
|
151
|
+
type: string;
|
|
152
|
+
properties: {
|
|
153
|
+
site_key: {
|
|
154
|
+
type: string;
|
|
155
|
+
description: string;
|
|
156
|
+
};
|
|
157
|
+
secret: {
|
|
158
|
+
type: string;
|
|
159
|
+
description: string;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
required: string[];
|
|
163
|
+
additionalProperties: boolean;
|
|
164
|
+
};
|
|
165
|
+
simple_captcha: {
|
|
166
|
+
type: string;
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
};
|
|
12
170
|
suspiciousIpThrottling: {
|
|
13
171
|
type: string;
|
|
14
172
|
};
|
|
15
173
|
};
|
|
16
174
|
additionalProperties: boolean;
|
|
17
175
|
};
|
|
176
|
+
export type AttackProtection = {
|
|
177
|
+
botDetection?: Asset | null;
|
|
178
|
+
breachedPasswordDetection: Asset;
|
|
179
|
+
bruteForceProtection: Asset;
|
|
180
|
+
captcha?: Asset | null;
|
|
181
|
+
suspiciousIpThrottling: Asset;
|
|
182
|
+
};
|
|
18
183
|
export default class AttackProtectionHandler extends DefaultAPIHandler {
|
|
19
|
-
existing:
|
|
20
|
-
breachedPasswordDetection: any;
|
|
21
|
-
bruteForceProtection: any;
|
|
22
|
-
suspiciousIpThrottling: any;
|
|
23
|
-
} | null;
|
|
184
|
+
existing: AttackProtection | null;
|
|
24
185
|
constructor(config: DefaultAPIHandler);
|
|
25
186
|
objString(item: Asset): string;
|
|
26
187
|
getType(): Promise<Asset>;
|
|
@@ -12,17 +12,191 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.schema = void 0;
|
|
15
|
+
exports.schema = exports.CAPTCHA_PROVIDERS = void 0;
|
|
16
16
|
const default_1 = __importDefault(require("./default"));
|
|
17
|
+
const logger_1 = __importDefault(require("../../../logger"));
|
|
18
|
+
exports.CAPTCHA_PROVIDERS = [
|
|
19
|
+
'arkose',
|
|
20
|
+
'auth_challenge',
|
|
21
|
+
'friendly_captcha',
|
|
22
|
+
'hcaptcha',
|
|
23
|
+
'recaptcha_v2',
|
|
24
|
+
'recaptcha_enterprise',
|
|
25
|
+
'simple_captcha',
|
|
26
|
+
];
|
|
17
27
|
exports.schema = {
|
|
18
28
|
type: 'object',
|
|
19
29
|
properties: {
|
|
30
|
+
botDetection: {
|
|
31
|
+
type: 'object',
|
|
32
|
+
properties: {
|
|
33
|
+
bot_detection_level: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
enum: ['low', 'medium', 'high'],
|
|
36
|
+
description: 'The level of bot detection sensitivity',
|
|
37
|
+
},
|
|
38
|
+
challenge_password_policy: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
enum: ['never', 'when_risky', 'always'],
|
|
41
|
+
description: 'The policy that defines how often to show CAPTCHA for password flows',
|
|
42
|
+
},
|
|
43
|
+
challenge_passwordless_policy: {
|
|
44
|
+
type: 'string',
|
|
45
|
+
enum: ['never', 'when_risky', 'always'],
|
|
46
|
+
description: 'The policy that defines how often to show CAPTCHA for passwordless flows',
|
|
47
|
+
},
|
|
48
|
+
challenge_password_reset_policy: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
enum: ['never', 'when_risky', 'always'],
|
|
51
|
+
description: 'The policy that defines how often to show CAPTCHA for password reset flows',
|
|
52
|
+
},
|
|
53
|
+
allowlist: {
|
|
54
|
+
type: 'array',
|
|
55
|
+
items: {
|
|
56
|
+
type: 'string',
|
|
57
|
+
oneOf: [
|
|
58
|
+
{
|
|
59
|
+
type: 'string',
|
|
60
|
+
format: 'ipv4',
|
|
61
|
+
description: 'IPv4 address or CIDR block',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
type: 'string',
|
|
65
|
+
format: 'ipv6',
|
|
66
|
+
description: 'IPv6 address or CIDR block',
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
description: 'IP address (IPv4 or IPv6) or CIDR block',
|
|
70
|
+
},
|
|
71
|
+
description: 'List of IP addresses or CIDR blocks to allowlist',
|
|
72
|
+
},
|
|
73
|
+
monitoring_mode_enabled: {
|
|
74
|
+
type: 'boolean',
|
|
75
|
+
description: 'Whether monitoring mode is enabled (logs but does not block)',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
20
79
|
breachedPasswordDetection: {
|
|
21
80
|
type: 'object',
|
|
22
81
|
},
|
|
23
82
|
bruteForceProtection: {
|
|
24
83
|
type: 'object',
|
|
25
84
|
},
|
|
85
|
+
captcha: {
|
|
86
|
+
type: 'object',
|
|
87
|
+
properties: {
|
|
88
|
+
active_provider_id: {
|
|
89
|
+
type: 'string',
|
|
90
|
+
description: 'The id of the active provider for the CAPTCHA.',
|
|
91
|
+
enum: exports.CAPTCHA_PROVIDERS,
|
|
92
|
+
},
|
|
93
|
+
arkose: {
|
|
94
|
+
type: 'object',
|
|
95
|
+
properties: {
|
|
96
|
+
site_key: {
|
|
97
|
+
type: 'string',
|
|
98
|
+
description: 'The site key for the Arkose captcha provider.',
|
|
99
|
+
},
|
|
100
|
+
secret: {
|
|
101
|
+
type: 'string',
|
|
102
|
+
description: 'The secret key for the Arkose captcha provider.',
|
|
103
|
+
},
|
|
104
|
+
client_subdomain: {
|
|
105
|
+
type: 'string',
|
|
106
|
+
description: 'The subdomain used for client requests to the Arkose captcha provider.',
|
|
107
|
+
},
|
|
108
|
+
verify_subdomain: {
|
|
109
|
+
type: 'string',
|
|
110
|
+
description: 'The subdomain used for server-side verification requests to the Arkose captcha provider.',
|
|
111
|
+
},
|
|
112
|
+
fail_open: {
|
|
113
|
+
type: 'boolean',
|
|
114
|
+
description: 'Whether the captcha should fail open.',
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
required: ['site_key', 'secret'],
|
|
118
|
+
additionalProperties: false,
|
|
119
|
+
},
|
|
120
|
+
auth_challenge: {
|
|
121
|
+
type: 'object',
|
|
122
|
+
properties: {
|
|
123
|
+
fail_open: {
|
|
124
|
+
type: 'boolean',
|
|
125
|
+
description: 'Whether the auth challenge should fail open.',
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
required: ['fail_open'],
|
|
129
|
+
additionalProperties: false,
|
|
130
|
+
},
|
|
131
|
+
hcaptcha: {
|
|
132
|
+
type: 'object',
|
|
133
|
+
properties: {
|
|
134
|
+
site_key: {
|
|
135
|
+
type: 'string',
|
|
136
|
+
description: 'The site key for the hCaptcha provider.',
|
|
137
|
+
},
|
|
138
|
+
secret: {
|
|
139
|
+
type: 'string',
|
|
140
|
+
description: 'The secret key for the hCaptcha provider.',
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
required: ['site_key', 'secret'],
|
|
144
|
+
additionalProperties: false,
|
|
145
|
+
},
|
|
146
|
+
friendly_captcha: {
|
|
147
|
+
type: 'object',
|
|
148
|
+
properties: {
|
|
149
|
+
site_key: {
|
|
150
|
+
type: 'string',
|
|
151
|
+
description: 'The site key for the Friendly Captcha provider.',
|
|
152
|
+
},
|
|
153
|
+
secret: {
|
|
154
|
+
type: 'string',
|
|
155
|
+
description: 'The secret key for the Friendly Captcha provider.',
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
required: ['site_key', 'secret'],
|
|
159
|
+
additionalProperties: false,
|
|
160
|
+
},
|
|
161
|
+
recaptcha_enterprise: {
|
|
162
|
+
type: 'object',
|
|
163
|
+
properties: {
|
|
164
|
+
site_key: {
|
|
165
|
+
type: 'string',
|
|
166
|
+
description: 'The site key for the reCAPTCHA Enterprise provider.',
|
|
167
|
+
},
|
|
168
|
+
api_key: {
|
|
169
|
+
type: 'string',
|
|
170
|
+
description: 'The API key for the reCAPTCHA Enterprise provider.',
|
|
171
|
+
},
|
|
172
|
+
project_id: {
|
|
173
|
+
type: 'string',
|
|
174
|
+
description: 'The project ID for the reCAPTCHA Enterprise provider.',
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
required: ['site_key', 'api_key', 'project_id'],
|
|
178
|
+
additionalProperties: false,
|
|
179
|
+
},
|
|
180
|
+
recaptcha_v2: {
|
|
181
|
+
type: 'object',
|
|
182
|
+
properties: {
|
|
183
|
+
site_key: {
|
|
184
|
+
type: 'string',
|
|
185
|
+
description: 'The site key for the reCAPTCHA v2 provider.',
|
|
186
|
+
},
|
|
187
|
+
secret: {
|
|
188
|
+
type: 'string',
|
|
189
|
+
description: 'The secret key for the reCAPTCHA v2 provider.',
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
required: ['site_key', 'secret'],
|
|
193
|
+
additionalProperties: false,
|
|
194
|
+
},
|
|
195
|
+
simple_captcha: {
|
|
196
|
+
type: 'object',
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
},
|
|
26
200
|
suspiciousIpThrottling: {
|
|
27
201
|
type: 'object',
|
|
28
202
|
},
|
|
@@ -37,6 +211,12 @@ class AttackProtectionHandler extends default_1.default {
|
|
|
37
211
|
const objectString = (() => {
|
|
38
212
|
var _a, _b, _c;
|
|
39
213
|
const obj = {};
|
|
214
|
+
if (item.botDetection) {
|
|
215
|
+
obj['bot-detection'] = {
|
|
216
|
+
bot_detection_level: item.botDetection.bot_detection_level,
|
|
217
|
+
monitoring_mode_enabled: item.botDetection.monitoring_mode_enabled,
|
|
218
|
+
};
|
|
219
|
+
}
|
|
40
220
|
if ((_a = item.breachedPasswordDetection) === null || _a === void 0 ? void 0 : _a.enabled) {
|
|
41
221
|
obj['breached-password-protection'] = {
|
|
42
222
|
enabled: item.breachedPasswordDetection.enabled,
|
|
@@ -47,6 +227,11 @@ class AttackProtectionHandler extends default_1.default {
|
|
|
47
227
|
enabled: item.bruteForceProtection.enabled,
|
|
48
228
|
};
|
|
49
229
|
}
|
|
230
|
+
if (item.captcha) {
|
|
231
|
+
obj.captcha = {
|
|
232
|
+
active_provider_id: item.captcha.active_provider_id,
|
|
233
|
+
};
|
|
234
|
+
}
|
|
50
235
|
if ((_c = item.suspiciousIpThrottling) === null || _c === void 0 ? void 0 : _c.enabled) {
|
|
51
236
|
obj['suspicious-ip-throttling'] = {
|
|
52
237
|
enabled: item.suspiciousIpThrottling.enabled,
|
|
@@ -66,11 +251,31 @@ class AttackProtectionHandler extends default_1.default {
|
|
|
66
251
|
this.client.attackProtection.getBruteForceConfig(),
|
|
67
252
|
this.client.attackProtection.getSuspiciousIpThrottlingConfig(),
|
|
68
253
|
]);
|
|
69
|
-
|
|
254
|
+
let botDetection = null;
|
|
255
|
+
let captcha = null;
|
|
256
|
+
try {
|
|
257
|
+
[botDetection, captcha] = yield Promise.all([
|
|
258
|
+
this.client.attackProtection.getBotDetectionConfig(),
|
|
259
|
+
this.client.attackProtection.getCaptchaConfig(),
|
|
260
|
+
]);
|
|
261
|
+
}
|
|
262
|
+
catch (err) {
|
|
263
|
+
if (err.statusCode === 403) {
|
|
264
|
+
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
|
+
}
|
|
266
|
+
}
|
|
267
|
+
const attackProtection = {
|
|
70
268
|
breachedPasswordDetection: breachedPasswordDetection.data,
|
|
71
269
|
bruteForceProtection: bruteForceProtection.data,
|
|
72
270
|
suspiciousIpThrottling: suspiciousIpThrottling.data,
|
|
73
271
|
};
|
|
272
|
+
if (botDetection === null || botDetection === void 0 ? void 0 : botDetection.data) {
|
|
273
|
+
attackProtection.botDetection = botDetection.data;
|
|
274
|
+
}
|
|
275
|
+
if (captcha === null || captcha === void 0 ? void 0 : captcha.data) {
|
|
276
|
+
attackProtection.captcha = captcha.data;
|
|
277
|
+
}
|
|
278
|
+
this.existing = attackProtection;
|
|
74
279
|
return this.existing;
|
|
75
280
|
});
|
|
76
281
|
}
|
|
@@ -80,11 +285,41 @@ class AttackProtectionHandler extends default_1.default {
|
|
|
80
285
|
if (!attackProtection || !Object.keys(attackProtection).length) {
|
|
81
286
|
return;
|
|
82
287
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
288
|
+
const updates = [];
|
|
289
|
+
const attackProtectionClient = this.client.attackProtection;
|
|
290
|
+
if (attackProtection.botDetection && Object.keys(attackProtection.botDetection).length) {
|
|
291
|
+
updates.push(attackProtectionClient.updateBotDetectionConfig.call(attackProtectionClient, attackProtection.botDetection));
|
|
292
|
+
}
|
|
293
|
+
if (attackProtection.breachedPasswordDetection) {
|
|
294
|
+
updates.push(attackProtectionClient.updateBreachedPasswordDetectionConfig(attackProtection.breachedPasswordDetection));
|
|
295
|
+
}
|
|
296
|
+
if (attackProtection.captcha && Object.keys(attackProtection.captcha).length) {
|
|
297
|
+
const { captcha } = attackProtection;
|
|
298
|
+
// remove empty CAPTCHA provider configurations before updates to prevent API errors
|
|
299
|
+
exports.CAPTCHA_PROVIDERS.forEach((provider) => {
|
|
300
|
+
if (provider in captcha) {
|
|
301
|
+
const providerConfig = captcha[provider];
|
|
302
|
+
const isEmpty = provider === 'auth_challenge' || provider === 'simple_captcha'
|
|
303
|
+
? Object.keys(providerConfig).length === 0
|
|
304
|
+
: !(providerConfig === null || providerConfig === void 0 ? void 0 : providerConfig.site_key) || providerConfig.site_key === '';
|
|
305
|
+
if (isEmpty) {
|
|
306
|
+
delete captcha[provider];
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
attackProtection.captcha = captcha;
|
|
311
|
+
updates.push(attackProtectionClient.updateCaptchaConfig.call(attackProtectionClient, attackProtection.captcha));
|
|
312
|
+
}
|
|
313
|
+
if (attackProtection.bruteForceProtection) {
|
|
314
|
+
updates.push(attackProtectionClient.updateBruteForceConfig(attackProtection.bruteForceProtection));
|
|
315
|
+
}
|
|
316
|
+
if (attackProtection.suspiciousIpThrottling) {
|
|
317
|
+
updates.push(attackProtectionClient.updateSuspiciousIpThrottlingConfig(attackProtection.suspiciousIpThrottling));
|
|
318
|
+
}
|
|
319
|
+
if (!updates.length) {
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
yield Promise.all(updates);
|
|
88
323
|
this.updated += 1;
|
|
89
324
|
this.didUpdate(attackProtection);
|
|
90
325
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attackProtection.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/attackProtection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,wDAA0C;
|
|
1
|
+
{"version":3,"file":"attackProtection.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/attackProtection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,wDAA0C;AAE1C,6DAAkC;AAErB,QAAA,iB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AAS,CAAC,gBAAgB,CAAC,CAAC;QACnC,CAAC;KAAA;CACF;AA3KD,0CA2KC"}
|
|
@@ -154,6 +154,33 @@ export declare const schema: {
|
|
|
154
154
|
type: string;
|
|
155
155
|
description: string;
|
|
156
156
|
};
|
|
157
|
+
organization_usage: {
|
|
158
|
+
type: string;
|
|
159
|
+
enum: string[];
|
|
160
|
+
};
|
|
161
|
+
organization_require_behavior: {
|
|
162
|
+
type: string;
|
|
163
|
+
enum: string[];
|
|
164
|
+
};
|
|
165
|
+
organization_discovery_methods: {
|
|
166
|
+
type: string[];
|
|
167
|
+
items: {
|
|
168
|
+
type: string;
|
|
169
|
+
enum: string[];
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
async_approval_notification_channels: {
|
|
173
|
+
type: string[];
|
|
174
|
+
description: string;
|
|
175
|
+
items: {
|
|
176
|
+
type: string;
|
|
177
|
+
enum: string[];
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
skip_non_verifiable_callback_uri_confirmation_prompt: {
|
|
181
|
+
type: string[];
|
|
182
|
+
description: string;
|
|
183
|
+
};
|
|
157
184
|
};
|
|
158
185
|
required: string[];
|
|
159
186
|
};
|
|
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.schema = void 0;
|
|
16
16
|
const client_1 = require("../client");
|
|
17
17
|
const default_1 = __importDefault(require("./default"));
|
|
18
|
-
const
|
|
18
|
+
const multiResourceRefreshTokenPoliciesSchema = {
|
|
19
19
|
type: ['array', 'null'],
|
|
20
20
|
description: 'A collection of policies governing multi-resource refresh token exchange (MRRT), defining how refresh tokens can be used across different resource servers',
|
|
21
21
|
items: {
|
|
@@ -90,7 +90,7 @@ exports.schema = {
|
|
|
90
90
|
type: ['object', 'null'],
|
|
91
91
|
description: 'Refresh token configuration',
|
|
92
92
|
properties: {
|
|
93
|
-
policies:
|
|
93
|
+
policies: multiResourceRefreshTokenPoliciesSchema,
|
|
94
94
|
},
|
|
95
95
|
},
|
|
96
96
|
token_quota: {
|
|
@@ -152,6 +152,33 @@ exports.schema = {
|
|
|
152
152
|
type: 'string',
|
|
153
153
|
description: 'The identifier of a resource server in your tenant. This property links a client to a resource server indicating that the client IS that resource server. Can only be set when app_type=resource_server.',
|
|
154
154
|
},
|
|
155
|
+
organization_usage: {
|
|
156
|
+
type: 'string',
|
|
157
|
+
enum: ['deny', 'allow', 'require'],
|
|
158
|
+
},
|
|
159
|
+
organization_require_behavior: {
|
|
160
|
+
type: 'string',
|
|
161
|
+
enum: ['no_prompt', 'pre_login_prompt', 'post_login_prompt'],
|
|
162
|
+
},
|
|
163
|
+
organization_discovery_methods: {
|
|
164
|
+
type: ['array', 'null'],
|
|
165
|
+
items: {
|
|
166
|
+
type: 'string',
|
|
167
|
+
enum: ['email', 'organization_name'],
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
async_approval_notification_channels: {
|
|
171
|
+
type: ['array', 'null'],
|
|
172
|
+
description: 'An ordered array of notification channels enabled for CIBA (Client-Initiated Backchannel Authentication) requests. Channels are evaluated in the order specified.',
|
|
173
|
+
items: {
|
|
174
|
+
type: 'string',
|
|
175
|
+
enum: ['guardian-push', 'email'],
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
skip_non_verifiable_callback_uri_confirmation_prompt: {
|
|
179
|
+
type: ['boolean', 'null'],
|
|
180
|
+
description: 'Whether to skip the confirmation prompt for non-verifiable callback URIs',
|
|
181
|
+
},
|
|
155
182
|
},
|
|
156
183
|
required: ['name'],
|
|
157
184
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clients.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/clients.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,sCAAqC;AACrC,wDAA0C;AAE1C,MAAM,
|
|
1
|
+
{"version":3,"file":"clients.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/clients.ts"],"names":[],"mappings":";;;;;;;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IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE;gBACjE,QAAQ,EAAE,IAAI;gBACd,cAAc,EAAE,IAAI;gBACpB,SAAS,EAAE,KAAK;aACjB,CAAC,CAAC;YAEH,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;YACxB,OAAO,IAAI,CAAC,QAAQ,CAAC;QACvB,CAAC;KAAA;CACF;AA5FD,gCA4FC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import DefaultAPIHandler from './default';
|
|
2
|
-
import { CalculatedChanges, Assets } from '../../../types';
|
|
2
|
+
import { CalculatedChanges, Assets, Asset } from '../../../types';
|
|
3
3
|
export declare const schema: {
|
|
4
4
|
type: string;
|
|
5
5
|
items: {
|
|
@@ -26,6 +26,10 @@ export declare const schema: {
|
|
|
26
26
|
email: {
|
|
27
27
|
type: string;
|
|
28
28
|
properties: {
|
|
29
|
+
unique: {
|
|
30
|
+
type: string;
|
|
31
|
+
default: boolean;
|
|
32
|
+
};
|
|
29
33
|
identifier: {
|
|
30
34
|
type: string;
|
|
31
35
|
properties: {
|
|
@@ -129,8 +133,10 @@ export declare const schema: {
|
|
|
129
133
|
export default class DatabaseHandler extends DefaultAPIHandler {
|
|
130
134
|
constructor(config: DefaultAPIHandler);
|
|
131
135
|
objString(db: any): string;
|
|
136
|
+
validate(assets: Assets): Promise<void>;
|
|
137
|
+
private validateEmailUniqueConstraints;
|
|
132
138
|
getClientFN(fn: 'create' | 'delete' | 'getAll' | 'update'): Function;
|
|
133
|
-
getType(): Promise<
|
|
139
|
+
getType(): Promise<Asset | Asset[]>;
|
|
134
140
|
calcChanges(assets: Assets): Promise<CalculatedChanges>;
|
|
135
141
|
processChanges(assets: Assets): Promise<void>;
|
|
136
142
|
}
|