auth0-deploy-cli 8.20.4-beta.0 → 8.22.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.
Files changed (318) hide show
  1. package/.circleci/config.yml +5 -46
  2. package/.eslintignore +5 -0
  3. package/.eslintrc +69 -0
  4. package/CHANGELOG.md +30 -6
  5. package/lib/args.js +1 -0
  6. package/lib/args.js.map +1 -0
  7. package/lib/commands/export.js +49 -41
  8. package/lib/commands/export.js.map +1 -0
  9. package/lib/commands/import.js +43 -36
  10. package/lib/commands/import.js.map +1 -0
  11. package/lib/commands/index.js +1 -0
  12. package/lib/commands/index.js.map +1 -0
  13. package/lib/configFactory.js +1 -0
  14. package/lib/configFactory.js.map +1 -0
  15. package/lib/context/defaults.js +10 -38
  16. package/lib/context/defaults.js.map +1 -0
  17. package/lib/context/directory/handlers/actions.js +39 -40
  18. package/lib/context/directory/handlers/actions.js.map +1 -0
  19. package/lib/context/directory/handlers/attackProtection.js +34 -22
  20. package/lib/context/directory/handlers/attackProtection.js.map +1 -0
  21. package/lib/context/directory/handlers/branding.js +21 -12
  22. package/lib/context/directory/handlers/branding.js.map +1 -0
  23. package/lib/context/directory/handlers/clientGrants.js +62 -52
  24. package/lib/context/directory/handlers/clientGrants.js.map +1 -0
  25. package/lib/context/directory/handlers/clients.js +60 -17
  26. package/lib/context/directory/handlers/clients.js.map +1 -0
  27. package/lib/context/directory/handlers/connectionProfiles.d.ts +11 -0
  28. package/lib/context/directory/handlers/connectionProfiles.js +59 -0
  29. package/lib/context/directory/handlers/connectionProfiles.js.map +1 -0
  30. package/lib/context/directory/handlers/connections.js +41 -32
  31. package/lib/context/directory/handlers/connections.js.map +1 -0
  32. package/lib/context/directory/handlers/customDomains.js +21 -9
  33. package/lib/context/directory/handlers/customDomains.js.map +1 -0
  34. package/lib/context/directory/handlers/databases.js +35 -37
  35. package/lib/context/directory/handlers/databases.js.map +1 -0
  36. package/lib/context/directory/handlers/emailProvider.js +36 -22
  37. package/lib/context/directory/handlers/emailProvider.js.map +1 -0
  38. package/lib/context/directory/handlers/emailTemplates.js +29 -20
  39. package/lib/context/directory/handlers/emailTemplates.js.map +1 -0
  40. package/lib/context/directory/handlers/flowVaultConnections.js +49 -39
  41. package/lib/context/directory/handlers/flowVaultConnections.js.map +1 -0
  42. package/lib/context/directory/handlers/flows.js +48 -38
  43. package/lib/context/directory/handlers/flows.js.map +1 -0
  44. package/lib/context/directory/handlers/forms.js +48 -38
  45. package/lib/context/directory/handlers/forms.js.map +1 -0
  46. package/lib/context/directory/handlers/guardianFactorProviders.js +21 -9
  47. package/lib/context/directory/handlers/guardianFactorProviders.js.map +1 -0
  48. package/lib/context/directory/handlers/guardianFactorTemplates.js +21 -9
  49. package/lib/context/directory/handlers/guardianFactorTemplates.js.map +1 -0
  50. package/lib/context/directory/handlers/guardianFactors.js +21 -9
  51. package/lib/context/directory/handlers/guardianFactors.js.map +1 -0
  52. package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.js +20 -8
  53. package/lib/context/directory/handlers/guardianPhoneFactorMessageTypes.js.map +1 -0
  54. package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.js +20 -8
  55. package/lib/context/directory/handlers/guardianPhoneFactorSelectedProvider.js.map +1 -0
  56. package/lib/context/directory/handlers/guardianPolicies.js +20 -8
  57. package/lib/context/directory/handlers/guardianPolicies.js.map +1 -0
  58. package/lib/context/directory/handlers/hooks.js +34 -24
  59. package/lib/context/directory/handlers/hooks.js.map +1 -0
  60. package/lib/context/directory/handlers/index.js +3 -0
  61. package/lib/context/directory/handlers/index.js.map +1 -0
  62. package/lib/context/directory/handlers/logStreams.js +24 -12
  63. package/lib/context/directory/handlers/logStreams.js.map +1 -0
  64. package/lib/context/directory/handlers/networkACLs.js +34 -22
  65. package/lib/context/directory/handlers/networkACLs.js.map +1 -0
  66. package/lib/context/directory/handlers/organizations.js +44 -39
  67. package/lib/context/directory/handlers/organizations.js.map +1 -0
  68. package/lib/context/directory/handlers/pages.js +37 -31
  69. package/lib/context/directory/handlers/pages.js.map +1 -0
  70. package/lib/context/directory/handlers/phoneProvider.js +24 -12
  71. package/lib/context/directory/handlers/phoneProvider.js.map +1 -0
  72. package/lib/context/directory/handlers/prompts.js +76 -58
  73. package/lib/context/directory/handlers/prompts.js.map +1 -0
  74. package/lib/context/directory/handlers/resourceServers.d.ts +1 -1
  75. package/lib/context/directory/handlers/resourceServers.js +30 -18
  76. package/lib/context/directory/handlers/resourceServers.js.map +1 -0
  77. package/lib/context/directory/handlers/roles.js +31 -21
  78. package/lib/context/directory/handlers/roles.js.map +1 -0
  79. package/lib/context/directory/handlers/rules.js +32 -22
  80. package/lib/context/directory/handlers/rules.js.map +1 -0
  81. package/lib/context/directory/handlers/rulesConfigs.js +15 -3
  82. package/lib/context/directory/handlers/rulesConfigs.js.map +1 -0
  83. package/lib/context/directory/handlers/selfServiceProfiles.js +40 -28
  84. package/lib/context/directory/handlers/selfServiceProfiles.js.map +1 -0
  85. package/lib/context/directory/handlers/tenant.js +34 -14
  86. package/lib/context/directory/handlers/tenant.js.map +1 -0
  87. package/lib/context/directory/handlers/themes.js +21 -9
  88. package/lib/context/directory/handlers/themes.js.map +1 -0
  89. package/lib/context/directory/handlers/triggers.d.ts +1 -1
  90. package/lib/context/directory/handlers/triggers.js +26 -16
  91. package/lib/context/directory/handlers/triggers.js.map +1 -0
  92. package/lib/context/directory/handlers/userAttributeProfiles.d.ts +1 -1
  93. package/lib/context/directory/handlers/userAttributeProfiles.js +26 -16
  94. package/lib/context/directory/handlers/userAttributeProfiles.js.map +1 -0
  95. package/lib/context/directory/index.js +80 -66
  96. package/lib/context/directory/index.js.map +1 -0
  97. package/lib/context/index.js +20 -9
  98. package/lib/context/index.js.map +1 -0
  99. package/lib/context/yaml/handlers/actions.js +41 -39
  100. package/lib/context/yaml/handlers/actions.js.map +1 -0
  101. package/lib/context/yaml/handlers/attackProtection.js +41 -27
  102. package/lib/context/yaml/handlers/attackProtection.js.map +1 -0
  103. package/lib/context/yaml/handlers/branding.js +69 -47
  104. package/lib/context/yaml/handlers/branding.js.map +1 -0
  105. package/lib/context/yaml/handlers/clientGrants.js +40 -26
  106. package/lib/context/yaml/handlers/clientGrants.js.map +1 -0
  107. package/lib/context/yaml/handlers/clients.js +85 -41
  108. package/lib/context/yaml/handlers/clients.js.map +1 -0
  109. package/lib/context/yaml/handlers/connectionProfiles.d.ts +11 -0
  110. package/lib/context/yaml/handlers/connectionProfiles.js +44 -0
  111. package/lib/context/yaml/handlers/connectionProfiles.js.map +1 -0
  112. package/lib/context/yaml/handlers/connections.js +67 -63
  113. package/lib/context/yaml/handlers/connections.js.map +1 -0
  114. package/lib/context/yaml/handlers/customDomains.js +19 -7
  115. package/lib/context/yaml/handlers/customDomains.js.map +1 -0
  116. package/lib/context/yaml/handlers/databases.js +65 -63
  117. package/lib/context/yaml/handlers/databases.js.map +1 -0
  118. package/lib/context/yaml/handlers/emailProvider.js +37 -22
  119. package/lib/context/yaml/handlers/emailProvider.js.map +1 -0
  120. package/lib/context/yaml/handlers/emailTemplates.js +39 -28
  121. package/lib/context/yaml/handlers/emailTemplates.js.map +1 -0
  122. package/lib/context/yaml/handlers/flowVaultConnections.js +50 -36
  123. package/lib/context/yaml/handlers/flowVaultConnections.js.map +1 -0
  124. package/lib/context/yaml/handlers/flows.js +66 -55
  125. package/lib/context/yaml/handlers/flows.js.map +1 -0
  126. package/lib/context/yaml/handlers/forms.js +66 -55
  127. package/lib/context/yaml/handlers/forms.js.map +1 -0
  128. package/lib/context/yaml/handlers/guardianFactorProviders.js +19 -7
  129. package/lib/context/yaml/handlers/guardianFactorProviders.js.map +1 -0
  130. package/lib/context/yaml/handlers/guardianFactorTemplates.js +19 -7
  131. package/lib/context/yaml/handlers/guardianFactorTemplates.js.map +1 -0
  132. package/lib/context/yaml/handlers/guardianFactors.js +19 -7
  133. package/lib/context/yaml/handlers/guardianFactors.js.map +1 -0
  134. package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.js +19 -7
  135. package/lib/context/yaml/handlers/guardianPhoneFactorMessageTypes.js.map +1 -0
  136. package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.js +19 -7
  137. package/lib/context/yaml/handlers/guardianPhoneFactorSelectedProvider.js.map +1 -0
  138. package/lib/context/yaml/handlers/guardianPolicies.js +19 -7
  139. package/lib/context/yaml/handlers/guardianPolicies.js.map +1 -0
  140. package/lib/context/yaml/handlers/hooks.js +48 -34
  141. package/lib/context/yaml/handlers/hooks.js.map +1 -0
  142. package/lib/context/yaml/handlers/index.js +3 -0
  143. package/lib/context/yaml/handlers/index.js.map +1 -0
  144. package/lib/context/yaml/handlers/logStreams.js +30 -16
  145. package/lib/context/yaml/handlers/logStreams.js.map +1 -0
  146. package/lib/context/yaml/handlers/networkACLs.js +39 -25
  147. package/lib/context/yaml/handlers/networkACLs.js.map +1 -0
  148. package/lib/context/yaml/handlers/organizations.js +46 -37
  149. package/lib/context/yaml/handlers/organizations.js.map +1 -0
  150. package/lib/context/yaml/handlers/pages.js +39 -31
  151. package/lib/context/yaml/handlers/pages.js.map +1 -0
  152. package/lib/context/yaml/handlers/phoneProvider.js +31 -17
  153. package/lib/context/yaml/handlers/phoneProvider.js.map +1 -0
  154. package/lib/context/yaml/handlers/prompts.js +47 -22
  155. package/lib/context/yaml/handlers/prompts.js.map +1 -0
  156. package/lib/context/yaml/handlers/resourceServers.d.ts +1 -1
  157. package/lib/context/yaml/handlers/resourceServers.js +33 -21
  158. package/lib/context/yaml/handlers/resourceServers.js.map +1 -0
  159. package/lib/context/yaml/handlers/roles.js +33 -19
  160. package/lib/context/yaml/handlers/roles.js.map +1 -0
  161. package/lib/context/yaml/handlers/rules.js +39 -28
  162. package/lib/context/yaml/handlers/rules.js.map +1 -0
  163. package/lib/context/yaml/handlers/rulesConfigs.js +28 -14
  164. package/lib/context/yaml/handlers/rulesConfigs.js.map +1 -0
  165. package/lib/context/yaml/handlers/selfServiceProfiles.js +43 -29
  166. package/lib/context/yaml/handlers/selfServiceProfiles.js.map +1 -0
  167. package/lib/context/yaml/handlers/tenant.js +41 -19
  168. package/lib/context/yaml/handlers/tenant.js.map +1 -0
  169. package/lib/context/yaml/handlers/themes.js +19 -7
  170. package/lib/context/yaml/handlers/themes.js.map +1 -0
  171. package/lib/context/yaml/handlers/triggers.d.ts +1 -1
  172. package/lib/context/yaml/handlers/triggers.js +29 -15
  173. package/lib/context/yaml/handlers/triggers.js.map +1 -0
  174. package/lib/context/yaml/handlers/userAttributeProfiles.d.ts +1 -1
  175. package/lib/context/yaml/handlers/userAttributeProfiles.js +19 -7
  176. package/lib/context/yaml/handlers/userAttributeProfiles.js.map +1 -0
  177. package/lib/context/yaml/index.js +128 -120
  178. package/lib/context/yaml/index.js.map +1 -0
  179. package/lib/index.d.ts +96 -4
  180. package/lib/index.js +34 -24
  181. package/lib/index.js.map +1 -0
  182. package/lib/keywordPreservation.d.ts +1 -1
  183. package/lib/keywordPreservation.js +6 -10
  184. package/lib/keywordPreservation.js.map +1 -0
  185. package/lib/logger.js +1 -0
  186. package/lib/logger.js.map +1 -0
  187. package/lib/readonly.js +4 -3
  188. package/lib/readonly.js.map +1 -0
  189. package/lib/sessionDurationsToMinutes.js +1 -0
  190. package/lib/sessionDurationsToMinutes.js.map +1 -0
  191. package/lib/tools/auth0/client.js +127 -108
  192. package/lib/tools/auth0/client.js.map +1 -0
  193. package/lib/tools/auth0/handlers/actions.d.ts +26 -8
  194. package/lib/tools/auth0/handlers/actions.js +149 -138
  195. package/lib/tools/auth0/handlers/actions.js.map +1 -0
  196. package/lib/tools/auth0/handlers/attackProtection.js +92 -80
  197. package/lib/tools/auth0/handlers/attackProtection.js.map +1 -0
  198. package/lib/tools/auth0/handlers/branding.js +99 -75
  199. package/lib/tools/auth0/handlers/branding.js.map +1 -0
  200. package/lib/tools/auth0/handlers/clientGrants.d.ts +9 -2
  201. package/lib/tools/auth0/handlers/clientGrants.js +72 -65
  202. package/lib/tools/auth0/handlers/clientGrants.js.map +1 -0
  203. package/lib/tools/auth0/handlers/clients.d.ts +96 -7
  204. package/lib/tools/auth0/handlers/clients.js +221 -66
  205. package/lib/tools/auth0/handlers/clients.js.map +1 -0
  206. package/lib/tools/auth0/handlers/connectionProfiles.d.ts +182 -0
  207. package/lib/tools/auth0/handlers/connectionProfiles.js +239 -0
  208. package/lib/tools/auth0/handlers/connectionProfiles.js.map +1 -0
  209. package/lib/tools/auth0/handlers/connections.d.ts +1 -3
  210. package/lib/tools/auth0/handlers/connections.js +135 -130
  211. package/lib/tools/auth0/handlers/connections.js.map +1 -0
  212. package/lib/tools/auth0/handlers/customDomains.d.ts +1 -4
  213. package/lib/tools/auth0/handlers/customDomains.js +53 -43
  214. package/lib/tools/auth0/handlers/customDomains.js.map +1 -0
  215. package/lib/tools/auth0/handlers/databases.js +114 -94
  216. package/lib/tools/auth0/handlers/databases.js.map +1 -0
  217. package/lib/tools/auth0/handlers/default.d.ts +2 -2
  218. package/lib/tools/auth0/handlers/default.js +171 -210
  219. package/lib/tools/auth0/handlers/default.js.map +1 -0
  220. package/lib/tools/auth0/handlers/emailProvider.js +52 -41
  221. package/lib/tools/auth0/handlers/emailProvider.js.map +1 -0
  222. package/lib/tools/auth0/handlers/emailTemplates.js +71 -49
  223. package/lib/tools/auth0/handlers/emailTemplates.js.map +1 -0
  224. package/lib/tools/auth0/handlers/flowVaultConnections.d.ts +12 -5
  225. package/lib/tools/auth0/handlers/flowVaultConnections.js +143 -108
  226. package/lib/tools/auth0/handlers/flowVaultConnections.js.map +1 -0
  227. package/lib/tools/auth0/handlers/flows.d.ts +3 -2
  228. package/lib/tools/auth0/handlers/flows.js +129 -92
  229. package/lib/tools/auth0/handlers/flows.js.map +1 -0
  230. package/lib/tools/auth0/handlers/forms.d.ts +3 -3
  231. package/lib/tools/auth0/handlers/forms.js +112 -98
  232. package/lib/tools/auth0/handlers/forms.js.map +1 -0
  233. package/lib/tools/auth0/handlers/guardianFactorProviders.js +84 -61
  234. package/lib/tools/auth0/handlers/guardianFactorProviders.js.map +1 -0
  235. package/lib/tools/auth0/handlers/guardianFactorTemplates.js +68 -46
  236. package/lib/tools/auth0/handlers/guardianFactorTemplates.js.map +1 -0
  237. package/lib/tools/auth0/handlers/guardianFactors.js +45 -35
  238. package/lib/tools/auth0/handlers/guardianFactors.js.map +1 -0
  239. package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js +45 -29
  240. package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js.map +1 -0
  241. package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js +45 -29
  242. package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js.map +1 -0
  243. package/lib/tools/auth0/handlers/guardianPolicies.js +35 -20
  244. package/lib/tools/auth0/handlers/guardianPolicies.js.map +1 -0
  245. package/lib/tools/auth0/handlers/hooks.js +153 -123
  246. package/lib/tools/auth0/handlers/hooks.js.map +1 -0
  247. package/lib/tools/auth0/handlers/index.js +3 -0
  248. package/lib/tools/auth0/handlers/index.js.map +1 -0
  249. package/lib/tools/auth0/handlers/logStreams.js +47 -42
  250. package/lib/tools/auth0/handlers/logStreams.js.map +1 -0
  251. package/lib/tools/auth0/handlers/networkACLs.d.ts +4 -5
  252. package/lib/tools/auth0/handlers/networkACLs.js +133 -115
  253. package/lib/tools/auth0/handlers/networkACLs.js.map +1 -0
  254. package/lib/tools/auth0/handlers/organizations.d.ts +9 -10
  255. package/lib/tools/auth0/handlers/organizations.js +429 -360
  256. package/lib/tools/auth0/handlers/organizations.js.map +1 -0
  257. package/lib/tools/auth0/handlers/pages.js +83 -74
  258. package/lib/tools/auth0/handlers/pages.js.map +1 -0
  259. package/lib/tools/auth0/handlers/phoneProvider.d.ts +2 -2
  260. package/lib/tools/auth0/handlers/phoneProvider.js +82 -69
  261. package/lib/tools/auth0/handlers/phoneProvider.js.map +1 -0
  262. package/lib/tools/auth0/handlers/prompts.d.ts +5 -5
  263. package/lib/tools/auth0/handlers/prompts.js +235 -240
  264. package/lib/tools/auth0/handlers/prompts.js.map +1 -0
  265. package/lib/tools/auth0/handlers/resourceServers.d.ts +2 -3
  266. package/lib/tools/auth0/handlers/resourceServers.js +106 -57
  267. package/lib/tools/auth0/handlers/resourceServers.js.map +1 -0
  268. package/lib/tools/auth0/handlers/roles.js +178 -162
  269. package/lib/tools/auth0/handlers/roles.js.map +1 -0
  270. package/lib/tools/auth0/handlers/rules.js +162 -144
  271. package/lib/tools/auth0/handlers/rules.js.map +1 -0
  272. package/lib/tools/auth0/handlers/rulesConfigs.js +39 -30
  273. package/lib/tools/auth0/handlers/rulesConfigs.js.map +1 -0
  274. package/lib/tools/auth0/handlers/scimHandler.d.ts +3 -4
  275. package/lib/tools/auth0/handlers/scimHandler.js +132 -110
  276. package/lib/tools/auth0/handlers/scimHandler.js.map +1 -0
  277. package/lib/tools/auth0/handlers/selfServiceProfiles.d.ts +5 -13
  278. package/lib/tools/auth0/handlers/selfServiceProfiles.js +204 -170
  279. package/lib/tools/auth0/handlers/selfServiceProfiles.js.map +1 -0
  280. package/lib/tools/auth0/handlers/tenant.d.ts +3 -5
  281. package/lib/tools/auth0/handlers/tenant.js +52 -45
  282. package/lib/tools/auth0/handlers/tenant.js.map +1 -0
  283. package/lib/tools/auth0/handlers/themes.d.ts +12 -12
  284. package/lib/tools/auth0/handlers/themes.js +102 -86
  285. package/lib/tools/auth0/handlers/themes.js.map +1 -0
  286. package/lib/tools/auth0/handlers/triggers.js +75 -59
  287. package/lib/tools/auth0/handlers/triggers.js.map +1 -0
  288. package/lib/tools/auth0/handlers/userAttributeProfiles.d.ts +4 -4
  289. package/lib/tools/auth0/handlers/userAttributeProfiles.js +63 -56
  290. package/lib/tools/auth0/handlers/userAttributeProfiles.js.map +1 -0
  291. package/lib/tools/auth0/index.js +48 -35
  292. package/lib/tools/auth0/index.js.map +1 -0
  293. package/lib/tools/auth0/schema.js +4 -6
  294. package/lib/tools/auth0/schema.js.map +1 -0
  295. package/lib/tools/calculateChanges.js +15 -24
  296. package/lib/tools/calculateChanges.js.map +1 -0
  297. package/lib/tools/constants.d.ts +3 -2
  298. package/lib/tools/constants.js +2 -0
  299. package/lib/tools/constants.js.map +1 -0
  300. package/lib/tools/deploy.js +29 -17
  301. package/lib/tools/deploy.js.map +1 -0
  302. package/lib/tools/index.d.ts +89 -3
  303. package/lib/tools/index.js +2 -3
  304. package/lib/tools/index.js.map +1 -0
  305. package/lib/tools/utils.d.ts +1 -1
  306. package/lib/tools/utils.js +22 -12
  307. package/lib/tools/utils.js.map +1 -0
  308. package/lib/tools/validationError.js +1 -0
  309. package/lib/tools/validationError.js.map +1 -0
  310. package/lib/types.d.ts +8 -9
  311. package/lib/types.js +1 -0
  312. package/lib/types.js.map +1 -0
  313. package/lib/utils.d.ts +58 -3
  314. package/lib/utils.js +5 -8
  315. package/lib/utils.js.map +1 -0
  316. package/package.json +12 -13
  317. package/tsconfig.json +3 -4
  318. package/eslint.config.js +0 -130
@@ -1,11 +1,24 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
2
11
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
13
  };
5
14
  Object.defineProperty(exports, "__esModule", { value: true });
6
15
  exports.schema = void 0;
16
+ const lodash_1 = require("lodash");
7
17
  const client_1 = require("../client");
8
18
  const default_1 = __importDefault(require("./default"));
19
+ const connectionProfiles_1 = require("./connectionProfiles");
20
+ const userAttributeProfiles_1 = require("./userAttributeProfiles");
21
+ const logger_1 = __importDefault(require("../../../logger"));
9
22
  const multiResourceRefreshTokenPoliciesSchema = {
10
23
  type: ['array', 'null'],
11
24
  description: 'A collection of policies governing multi-resource refresh token exchange (MRRT), defining how refresh tokens can be used across different resource servers',
@@ -114,26 +127,40 @@ exports.schema = {
114
127
  properties: {
115
128
  can_create_session_transfer_token: {
116
129
  type: 'boolean',
130
+ description: "Indicates whether an app can issue a Session Transfer Token through Token Exchange. If set to 'false', the app will not be able to issue a Session Transfer Token. Usually configured in the native application.",
117
131
  default: false,
118
- description: 'Specifies whether the application (Native app) can use the Token Exchange endpoint to create a session_transfer_token.',
132
+ },
133
+ enforce_cascade_revocation: {
134
+ type: 'boolean',
135
+ description: 'Indicates whether revoking the parent Refresh Token that initiated a Native to Web flow and was used to issue a Session Transfer Token should trigger a cascade revocation affecting its dependent child entities. Usually configured in the native application.',
136
+ default: true,
119
137
  },
120
138
  allowed_authentication_methods: {
121
- type: 'array',
139
+ type: ['array', 'null'],
140
+ description: 'Indicates whether an app can create a session from a Session Transfer Token received via indicated methods. Can include `cookie` and/or `query`. Usually configured in the web application.',
122
141
  items: {
123
142
  type: 'string',
124
143
  enum: ['cookie', 'query'],
125
144
  },
126
- default: [],
127
- description: 'Determines the methods allowed for a web application to create a session using a session_transfer_token.',
128
145
  },
129
146
  enforce_device_binding: {
130
147
  type: 'string',
131
- enum: ['none', 'ip', 'asn'],
148
+ description: "Indicates whether device binding security should be enforced for the app. If set to 'ip', the app will enforce device binding by IP, meaning that consumption of Session Transfer Token must be done from the same IP of the issuer. Likewise, if set to 'asn', device binding is enforced by ASN, meaning consumption of Session Transfer Token must be done from the same ASN as the issuer. If set to 'null', device binding is not enforced. Usually configured in the web application.",
149
+ enum: ['ip', 'asn', 'none'],
132
150
  default: 'ip',
133
- description: 'Configures the level of device binding enforced when a session_transfer_token is consumed.',
151
+ },
152
+ allow_refresh_token: {
153
+ type: 'boolean',
154
+ description: 'Indicates whether Refresh Tokens are allowed to be issued when authenticating with a Session Transfer Token. Usually configured in the web application.',
155
+ default: false,
156
+ },
157
+ enforce_online_refresh_tokens: {
158
+ type: 'boolean',
159
+ 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.",
160
+ default: true,
134
161
  },
135
162
  },
136
- additionalProperties: false,
163
+ additionalProperties: true,
137
164
  },
138
165
  app_type: {
139
166
  type: 'string',
@@ -170,19 +197,74 @@ exports.schema = {
170
197
  type: ['boolean', 'null'],
171
198
  description: 'Whether to skip the confirmation prompt for non-verifiable callback URIs',
172
199
  },
200
+ express_configuration: {
201
+ type: ['object', 'null'],
202
+ description: 'Application specific configuration for use with the OIN Express Configuration feature',
203
+ properties: {
204
+ initiate_login_uri_template: {
205
+ type: 'string',
206
+ description: 'The URI users should bookmark to log in to this application. Variable substitution is permitted for the following properties: organization_name, organization_id, and connection_name.',
207
+ },
208
+ user_attribute_profile_id: {
209
+ type: 'string',
210
+ description: 'The ID of the user attribute profile to use for this application',
211
+ },
212
+ connection_profile_id: {
213
+ type: 'string',
214
+ description: 'The ID of the connection profile to use for this application',
215
+ },
216
+ enable_client: {
217
+ type: 'boolean',
218
+ description: 'When true, all connections made via express configuration will be enabled for this application',
219
+ },
220
+ enable_organization: {
221
+ type: 'boolean',
222
+ description: 'When true, all connections made via express configuration will have the associated organization enabled',
223
+ },
224
+ linked_clients: {
225
+ type: 'array',
226
+ description: 'List of client IDs that are linked to this express configuration (e.g. web or mobile clients)',
227
+ items: {
228
+ type: 'object',
229
+ properties: {
230
+ client_id: {
231
+ type: 'string',
232
+ description: 'The ID of the linked client',
233
+ },
234
+ },
235
+ required: ['client_id'],
236
+ },
237
+ },
238
+ okta_oin_client_id: {
239
+ type: 'string',
240
+ description: 'This is the unique identifier for the Okta OIN Express Configuration Client, which Okta will use for this application',
241
+ },
242
+ admin_login_domain: {
243
+ type: 'string',
244
+ description: 'This is the domain that admins are expected to log in via for authenticating for express configuration. It can be either the canonical domain or a registered custom domain',
245
+ },
246
+ oin_submission_id: {
247
+ type: 'string',
248
+ description: 'The identifier of the published application in the OKTA OIN',
249
+ },
250
+ },
251
+ required: [
252
+ 'initiate_login_uri_template',
253
+ 'user_attribute_profile_id',
254
+ 'connection_profile_id',
255
+ 'enable_client',
256
+ 'enable_organization',
257
+ 'okta_oin_client_id',
258
+ 'admin_login_domain',
259
+ ],
260
+ },
173
261
  },
174
262
  required: ['name'],
175
263
  },
176
264
  };
177
265
  class ClientHandler extends default_1.default {
178
266
  constructor(config) {
179
- super({
180
- ...config,
181
- type: 'clients',
182
- id: 'client_id',
183
- identifiers: ['client_id', 'name'],
184
- objectFields: ['client_metadata'],
185
- stripUpdateFields: [
267
+ super(Object.assign(Object.assign({}, config), { type: 'clients', id: 'client_id', identifiers: ['client_id', 'name'], objectFields: ['client_metadata'], stripUpdateFields: [
186
268
  // Fields not allowed during updates
187
269
  'callback_url_template',
188
270
  'signing_keys',
@@ -190,68 +272,141 @@ class ClientHandler extends default_1.default {
190
272
  'tenant',
191
273
  'jwt_configuration.secret_encoded',
192
274
  'resource_server_identifier',
193
- ],
194
- functions: {
195
- update: async (
196
- // eslint-disable-next-line camelcase
197
- { client_id }, bodyParams) => this.client.clients.update(client_id, bodyParams),
198
- },
199
- });
275
+ ] }));
200
276
  }
201
277
  objString(item) {
202
278
  return super.objString({ name: item.name, client_id: item.client_id });
203
279
  }
204
- async processChanges(assets) {
205
- const { clients } = assets;
206
- // Do nothing if not set
207
- if (!clients)
208
- return;
209
- const excludedClients = (assets.exclude && assets.exclude.clients) || [];
210
- const { del, update, create, conflicts } = await this.calcChanges(assets);
211
- // Always filter out the client we are using to access Auth0 Management API
212
- // As it could cause problems if it gets deleted or updated etc
213
- const currentClient = this.config('AUTH0_CLIENT_ID') || '';
214
- const filterClients = (list) => {
215
- if (excludedClients.length) {
216
- return list.filter((item) => item.client_id !== currentClient && !excludedClients.includes(item.name));
217
- }
218
- return list.filter((item) => item.client_id !== currentClient);
219
- };
220
- // Sanitize client fields
221
- const sanitizeClientFields = (list) => list.map((item) => {
222
- // For resourceServers app type `resource_server`, don't include `oidc_backchannel_logout`, `oidc_logout`, `refresh_token`
223
- if (item.app_type === 'resource_server') {
224
- if ('oidc_backchannel_logout' in item) {
225
- delete item.oidc_backchannel_logout;
226
- }
227
- if ('oidc_logout' in item) {
228
- delete item.oidc_logout;
229
- }
230
- if ('refresh_token' in item) {
231
- delete item.refresh_token;
280
+ processChanges(assets) {
281
+ const _super = Object.create(null, {
282
+ processChanges: { get: () => super.processChanges }
283
+ });
284
+ return __awaiter(this, void 0, void 0, function* () {
285
+ const { clients } = assets;
286
+ // Do nothing if not set
287
+ if (!clients)
288
+ return;
289
+ assets.clients = yield this.sanitizeMapExpressConfiguration(this.client, clients);
290
+ const excludedClients = (assets.exclude && assets.exclude.clients) || [];
291
+ const excludeThirdPartyClients = this.config('AUTH0_EXCLUDE_THIRD_PARTY_CLIENTS') === 'true' ||
292
+ this.config('AUTH0_EXCLUDE_THIRD_PARTY_CLIENTS') === true;
293
+ const { del, update, create, conflicts } = yield this.calcChanges(assets);
294
+ // Always filter out the client we are using to access Auth0 Management API
295
+ // As it could cause problems if it gets deleted or updated etc
296
+ const currentClient = this.config('AUTH0_CLIENT_ID') || '';
297
+ /*
298
+ * Filter out:
299
+ * - The client used to access Auth0 Management API
300
+ * - Clients in the exclusion list
301
+ * - Third-party clients when AUTH0_EXCLUDE_THIRD_PARTY_CLIENTS is enabled
302
+ */
303
+ const filterClients = (list) => list.filter((item) => item.client_id !== currentClient &&
304
+ !excludedClients.includes(item.name) &&
305
+ (!excludeThirdPartyClients || item.is_first_party));
306
+ // Sanitize client fields
307
+ const sanitizeClientFields = (list) => {
308
+ const sanitizedClients = this.sanitizeCrossOriginAuth(list);
309
+ return sanitizedClients.map((item) => {
310
+ if (item.app_type === 'resource_server') {
311
+ if ('oidc_backchannel_logout' in item) {
312
+ delete item.oidc_backchannel_logout;
313
+ }
314
+ if ('oidc_logout' in item) {
315
+ delete item.oidc_logout;
316
+ }
317
+ if ('refresh_token' in item) {
318
+ delete item.refresh_token;
319
+ }
320
+ }
321
+ return item;
322
+ });
323
+ };
324
+ const changes = {
325
+ del: sanitizeClientFields(filterClients(del)),
326
+ update: sanitizeClientFields(filterClients(update)),
327
+ create: sanitizeClientFields(filterClients(create)),
328
+ conflicts: sanitizeClientFields(filterClients(conflicts)),
329
+ };
330
+ yield _super.processChanges.call(this, assets, Object.assign({}, changes));
331
+ });
332
+ }
333
+ /**
334
+ * @description
335
+ * Sanitize the deprecated field `cross_origin_auth` to `cross_origin_authentication`
336
+ *
337
+ * @param {Client[]} clients - The client array to sanitize.
338
+ * @returns {Client[]} The sanitized array of clients.
339
+ */
340
+ sanitizeCrossOriginAuth(clients) {
341
+ const deprecatedClients = [];
342
+ const updatedClients = clients.map((client) => {
343
+ let updated = Object.assign({}, client);
344
+ if ((0, lodash_1.has)(updated, 'cross_origin_auth')) {
345
+ deprecatedClients.push(client.name);
346
+ if (!(0, lodash_1.has)(updated, 'cross_origin_authentication')) {
347
+ updated.cross_origin_authentication = updated.cross_origin_auth;
232
348
  }
349
+ updated = (0, lodash_1.omit)(updated, 'cross_origin_auth');
233
350
  }
234
- return item;
235
- });
236
- const changes = {
237
- del: sanitizeClientFields(filterClients(del)),
238
- update: sanitizeClientFields(filterClients(update)),
239
- create: sanitizeClientFields(filterClients(create)),
240
- conflicts: sanitizeClientFields(filterClients(conflicts)),
241
- };
242
- await super.processChanges(assets, {
243
- ...changes,
351
+ return updated;
244
352
  });
353
+ if (deprecatedClients.length > 0) {
354
+ logger_1.default.warn("The 'cross_origin_auth' parameter is deprecated in clients and scheduled for removal in future releases.\n" +
355
+ `Use 'cross_origin_authentication' going forward. Clients using the deprecated setting: [${deprecatedClients.join(', ')}]`);
356
+ }
357
+ return updatedClients;
245
358
  }
246
- async getType() {
247
- if (this.existing)
359
+ getType() {
360
+ return __awaiter(this, void 0, void 0, function* () {
361
+ if (this.existing)
362
+ return this.existing;
363
+ const excludeThirdPartyClients = this.config('AUTH0_EXCLUDE_THIRD_PARTY_CLIENTS') === 'true' ||
364
+ this.config('AUTH0_EXCLUDE_THIRD_PARTY_CLIENTS') === true;
365
+ const clients = yield (0, client_1.paginate)(this.client.clients.getAll, Object.assign({ paginate: true, include_totals: true, is_global: false }, (excludeThirdPartyClients && { is_first_party: true })));
366
+ const sanitizedClients = this.sanitizeCrossOriginAuth(clients);
367
+ this.existing = sanitizedClients;
248
368
  return this.existing;
249
- const clients = await (0, client_1.paginate)(this.client.clients.list, {
250
- paginate: true,
251
- is_global: false,
252
369
  });
253
- this.existing = clients;
254
- return this.existing;
370
+ }
371
+ // convert names back to IDs for express configuration
372
+ sanitizeMapExpressConfiguration(auth0Client, clientList) {
373
+ return __awaiter(this, void 0, void 0, function* () {
374
+ // if no clients have express configuration, return early
375
+ if (!clientList.some((p) => p.express_configuration)) {
376
+ return clientList;
377
+ }
378
+ const clientData = yield this.getType();
379
+ const connectionProfiles = yield (0, connectionProfiles_1.getConnectionProfile)(auth0Client);
380
+ const userAttributeProfiles = yield (0, userAttributeProfiles_1.getUserAttributeProfiles)(auth0Client);
381
+ return clientList.map((client) => {
382
+ var _a;
383
+ if (!client.express_configuration)
384
+ return client;
385
+ const userAttributeProfileName = (_a = client.express_configuration) === null || _a === void 0 ? void 0 : _a.user_attribute_profile_id;
386
+ if (userAttributeProfileName) {
387
+ const userAttributeProfile = userAttributeProfiles === null || userAttributeProfiles === void 0 ? void 0 : userAttributeProfiles.find((uap) => uap.name === userAttributeProfileName);
388
+ if (userAttributeProfile === null || userAttributeProfile === void 0 ? void 0 : userAttributeProfile.id) {
389
+ client.express_configuration.user_attribute_profile_id = userAttributeProfile.id;
390
+ }
391
+ }
392
+ const connectionProfileName = client.express_configuration.connection_profile_id;
393
+ if (connectionProfileName) {
394
+ const connectionProfile = connectionProfiles === null || connectionProfiles === void 0 ? void 0 : connectionProfiles.find((cp) => cp.name === connectionProfileName);
395
+ if (connectionProfile === null || connectionProfile === void 0 ? void 0 : connectionProfile.id) {
396
+ client.express_configuration.connection_profile_id = connectionProfile.id;
397
+ }
398
+ }
399
+ const oktaOinClientName = client.express_configuration.okta_oin_client_id;
400
+ if (oktaOinClientName) {
401
+ const oktaOinClient = clientData === null || clientData === void 0 ? void 0 : clientData.find((c) => c.name === oktaOinClientName);
402
+ if (oktaOinClient) {
403
+ client.express_configuration.okta_oin_client_id = oktaOinClient.client_id;
404
+ }
405
+ }
406
+ return client;
407
+ });
408
+ });
255
409
  }
256
410
  }
257
411
  exports.default = ClientHandler;
412
+ //# sourceMappingURL=clients.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clients.js","sourceRoot":"","sources":["../../../../src/tools/auth0/handlers/clients.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAKA,mCAAmC;AAEnC,sCAAqC;AACrC,wDAA0C;AAC1C,6DAA4D;AAC5D,mEAAmE;AACnE,6DAAkC;AAElC,MAAM,uCAAuC,GAAG;IAC9C,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC;IACvB,WAAW,EACT,4JAA4J;IAC9J,KAAK,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;aACf;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;iBACf;gBACD,WAAW,EAAE,IAAI;aAClB;SACF;QACD,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;KAChC;CACF,CAAC;AAEW,QAAA,MAAM,GAAG;IACpB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACL,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE;YACzD,MAAM,EAAE;gBACN,IAAI,EAA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AAC;wBAC1B,MAAM,CAAC,qBAAqB,CAAC,qBAAqB,GAAG,iBAAiB,CAAC,EAAE,CAAC;oBAC5E,CAAC;gBACH,CAAC;gBAED,MAAM,iBAAiB,GAAG,MAAM,CAAC,qBAAqB,CAAC,kBAAkB,CAAC;gBAC1E,IAAI,iBAAiB,EAAE,CAAC;oBACtB,MAAM,aAAa,GAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,iBAAiB,CAAC,CAAC;oBAC5E,IAAI,aAAa,EAAE,CAAC;wBAClB,MAAM,CAAC,qBAAqB,CAAC,kBAAkB,GAAG,aAAa,CAAC,SAAS,CAAC;oBAC5E,CAAC;gBACH,CAAC;gBAED,OAAO,MAAM,CAAC;YAChB,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;CACF;AAtMD,gCAsMC"}
@@ -0,0 +1,182 @@
1
+ import { ConnectionProfile } from 'auth0';
2
+ import { Assets, Auth0APIClient } from '../../../types';
3
+ import DefaultAPIHandler from './default';
4
+ export declare const schema: {
5
+ type: string;
6
+ items: {
7
+ type: string;
8
+ properties: {
9
+ name: {
10
+ type: string;
11
+ };
12
+ organization: {
13
+ type: string;
14
+ properties: {
15
+ show_as_button: {
16
+ type: string;
17
+ enum: string[];
18
+ };
19
+ assign_membership_on_login: {
20
+ type: string;
21
+ enum: string[];
22
+ };
23
+ };
24
+ };
25
+ connection_name_prefix_template: {
26
+ type: string;
27
+ };
28
+ enabled_features: {
29
+ type: string;
30
+ items: {
31
+ type: string;
32
+ enum: string[];
33
+ };
34
+ uniqueItems: boolean;
35
+ };
36
+ connection_config: {
37
+ type: string[];
38
+ };
39
+ strategy_overrides: {
40
+ type: string[];
41
+ properties: {
42
+ pingfederate: {
43
+ type: string;
44
+ properties: {
45
+ enabled_features: {
46
+ type: string;
47
+ items: {
48
+ type: string;
49
+ enum: string[];
50
+ };
51
+ uniqueItems: boolean;
52
+ };
53
+ connection_config: {
54
+ type: string;
55
+ };
56
+ };
57
+ };
58
+ ad: {
59
+ type: string;
60
+ properties: {
61
+ enabled_features: {
62
+ type: string;
63
+ items: {
64
+ type: string;
65
+ enum: string[];
66
+ };
67
+ uniqueItems: boolean;
68
+ };
69
+ connection_config: {
70
+ type: string;
71
+ };
72
+ };
73
+ };
74
+ adfs: {
75
+ type: string;
76
+ properties: {
77
+ enabled_features: {
78
+ type: string;
79
+ items: {
80
+ type: string;
81
+ enum: string[];
82
+ };
83
+ uniqueItems: boolean;
84
+ };
85
+ connection_config: {
86
+ type: string;
87
+ };
88
+ };
89
+ };
90
+ waad: {
91
+ type: string;
92
+ properties: {
93
+ enabled_features: {
94
+ type: string;
95
+ items: {
96
+ type: string;
97
+ enum: string[];
98
+ };
99
+ uniqueItems: boolean;
100
+ };
101
+ connection_config: {
102
+ type: string;
103
+ };
104
+ };
105
+ };
106
+ 'google-apps': {
107
+ type: string;
108
+ properties: {
109
+ enabled_features: {
110
+ type: string;
111
+ items: {
112
+ type: string;
113
+ enum: string[];
114
+ };
115
+ uniqueItems: boolean;
116
+ };
117
+ connection_config: {
118
+ type: string;
119
+ };
120
+ };
121
+ };
122
+ okta: {
123
+ type: string;
124
+ properties: {
125
+ enabled_features: {
126
+ type: string;
127
+ items: {
128
+ type: string;
129
+ enum: string[];
130
+ };
131
+ uniqueItems: boolean;
132
+ };
133
+ connection_config: {
134
+ type: string;
135
+ };
136
+ };
137
+ };
138
+ oidc: {
139
+ type: string;
140
+ properties: {
141
+ enabled_features: {
142
+ type: string;
143
+ items: {
144
+ type: string;
145
+ enum: string[];
146
+ };
147
+ uniqueItems: boolean;
148
+ };
149
+ connection_config: {
150
+ type: string;
151
+ };
152
+ };
153
+ };
154
+ samlp: {
155
+ type: string;
156
+ properties: {
157
+ enabled_features: {
158
+ type: string;
159
+ items: {
160
+ type: string;
161
+ enum: string[];
162
+ };
163
+ uniqueItems: boolean;
164
+ };
165
+ connection_config: {
166
+ type: string;
167
+ };
168
+ };
169
+ };
170
+ };
171
+ };
172
+ };
173
+ required: string[];
174
+ };
175
+ };
176
+ export declare const getConnectionProfile: (auth0Client: Auth0APIClient) => Promise<ConnectionProfile[]>;
177
+ export default class ConnectionProfilesHandler extends DefaultAPIHandler {
178
+ existing: ConnectionProfile[];
179
+ constructor(config: DefaultAPIHandler);
180
+ getType(): Promise<ConnectionProfile[]>;
181
+ processChanges(assets: Assets): Promise<void>;
182
+ }