@pulumi/auth0 3.3.0 → 3.3.2
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/action.d.ts +6 -6
- package/action.js +3 -3
- package/attackProtection.d.ts +20 -20
- package/attackProtection.js +20 -20
- package/branding.d.ts +3 -22
- package/branding.js +3 -22
- package/branding.js.map +1 -1
- package/brandingTheme.d.ts +1 -82
- package/brandingTheme.js +1 -82
- package/brandingTheme.js.map +1 -1
- package/client.d.ts +48 -48
- package/client.js +43 -43
- package/clientCredentials.d.ts +3 -73
- package/clientCredentials.js +3 -55
- package/clientCredentials.js.map +1 -1
- package/clientGrant.d.ts +2 -2
- package/clientGrant.js +2 -2
- package/connection.d.ts +467 -91
- package/connection.js +464 -88
- package/connection.js.map +1 -1
- package/connectionClient.d.ts +9 -6
- package/connectionClient.js +9 -6
- package/connectionClient.js.map +1 -1
- package/connectionClients.d.ts +8 -5
- package/connectionClients.js +8 -5
- package/connectionClients.js.map +1 -1
- package/customDomain.d.ts +4 -4
- package/customDomain.js +4 -4
- package/customDomainVerification.d.ts +1 -9
- package/customDomainVerification.js +1 -1
- package/customDomainVerification.js.map +1 -1
- package/emailProvider.d.ts +3 -39
- package/emailProvider.js +3 -39
- package/emailProvider.js.map +1 -1
- package/emailTemplate.d.ts +9 -8
- package/emailTemplate.js +9 -8
- package/emailTemplate.js.map +1 -1
- package/getClient.d.ts +16 -0
- package/getClient.js +4 -0
- package/getClient.js.map +1 -1
- package/getConnection.d.ts +10 -0
- package/getConnection.js +4 -0
- package/getConnection.js.map +1 -1
- package/getOrganization.d.ts +4 -0
- package/getOrganization.js +4 -0
- package/getOrganization.js.map +1 -1
- package/getResourceServer.d.ts +4 -0
- package/getResourceServer.js +4 -0
- package/getResourceServer.js.map +1 -1
- package/getRole.d.ts +10 -0
- package/getRole.js +4 -0
- package/getRole.js.map +1 -1
- package/getUser.d.ts +2 -0
- package/getUser.js +2 -0
- package/getUser.js.map +1 -1
- package/guardian.d.ts +20 -20
- package/guardian.js +20 -20
- package/hook.d.ts +8 -8
- package/hook.js +8 -8
- package/logStream.d.ts +13 -11
- package/logStream.js +13 -11
- package/logStream.js.map +1 -1
- package/organization.d.ts +6 -5
- package/organization.js +6 -5
- package/organization.js.map +1 -1
- package/organizationConnection.d.ts +12 -6
- package/organizationConnection.js +12 -6
- package/organizationConnection.js.map +1 -1
- package/organizationConnections.d.ts +13 -4
- package/organizationConnections.js +13 -4
- package/organizationConnections.js.map +1 -1
- package/organizationMember.d.ts +8 -5
- package/organizationMember.js +8 -5
- package/organizationMember.js.map +1 -1
- package/organizationMemberRole.d.ts +10 -7
- package/organizationMemberRole.js +10 -7
- package/organizationMemberRole.js.map +1 -1
- package/organizationMemberRoles.d.ts +11 -8
- package/organizationMemberRoles.js +11 -8
- package/organizationMemberRoles.js.map +1 -1
- package/organizationMembers.d.ts +8 -5
- package/organizationMembers.js +8 -5
- package/organizationMembers.js.map +1 -1
- package/package.json +1 -1
- package/pages.d.ts +12 -12
- package/pages.js +12 -12
- package/prompt.d.ts +5 -5
- package/prompt.js +5 -5
- package/promptCustomText.d.ts +3 -3
- package/promptCustomText.js +3 -3
- package/promptPartials.d.ts +6 -6
- package/promptPartials.js +6 -6
- package/provider.d.ts +4 -4
- package/resourceServer.d.ts +5 -4
- package/resourceServer.js +5 -4
- package/resourceServer.js.map +1 -1
- package/resourceServerScope.d.ts +9 -6
- package/resourceServerScope.js +9 -6
- package/resourceServerScope.js.map +1 -1
- package/resourceServerScopes.d.ts +6 -3
- package/resourceServerScopes.js +6 -3
- package/resourceServerScopes.js.map +1 -1
- package/role.d.ts +5 -2
- package/role.js +5 -2
- package/role.js.map +1 -1
- package/rule.d.ts +4 -4
- package/rule.js +4 -4
- package/ruleConfig.d.ts +5 -5
- package/ruleConfig.js +5 -5
- package/tenant.d.ts +14 -14
- package/tenant.js +14 -14
- package/triggerAction.d.ts +6 -5
- package/triggerAction.js +6 -5
- package/triggerAction.js.map +1 -1
- package/triggerActions.d.ts +6 -4
- package/triggerActions.js +6 -4
- package/triggerActions.js.map +1 -1
- package/types/input.d.ts +30 -39
- package/types/output.d.ts +30 -39
- package/user.d.ts +5 -4
- package/user.js +5 -4
- package/user.js.map +1 -1
- package/userPermission.d.ts +3 -3
- package/userPermission.js +3 -3
- package/userPermissions.d.ts +1 -1
- package/userPermissions.js +1 -1
- package/userRole.d.ts +9 -5
- package/userRole.js +9 -5
- package/userRole.js.map +1 -1
- package/userRoles.d.ts +7 -3
- package/userRoles.js +7 -3
- package/userRoles.js.map +1 -1
package/connection.js
CHANGED
|
@@ -12,6 +12,76 @@ const utilities = require("./utilities");
|
|
|
12
12
|
* creation of multiple connections per strategy, the additional connections may not be visible in the Auth0 dashboard.
|
|
13
13
|
*
|
|
14
14
|
* ## Example Usage
|
|
15
|
+
*
|
|
16
|
+
* ### Auth0 Connection
|
|
17
|
+
*
|
|
18
|
+
* ```typescript
|
|
19
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
20
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
21
|
+
*
|
|
22
|
+
* // This is an example of an Auth0 connection.
|
|
23
|
+
* const myConnection = new auth0.Connection("my_connection", {
|
|
24
|
+
* name: "Example-Connection",
|
|
25
|
+
* isDomainConnection: true,
|
|
26
|
+
* strategy: "auth0",
|
|
27
|
+
* metadata: {
|
|
28
|
+
* key1: "foo",
|
|
29
|
+
* key2: "bar",
|
|
30
|
+
* },
|
|
31
|
+
* options: {
|
|
32
|
+
* passwordPolicy: "excellent",
|
|
33
|
+
* bruteForceProtection: true,
|
|
34
|
+
* enabledDatabaseCustomization: true,
|
|
35
|
+
* importMode: false,
|
|
36
|
+
* requiresUsername: true,
|
|
37
|
+
* disableSignup: false,
|
|
38
|
+
* customScripts: {
|
|
39
|
+
* get_user: ` function getByEmail(email, callback) {
|
|
40
|
+
* return callback(new Error("Whoops!"));
|
|
41
|
+
* }
|
|
42
|
+
* `,
|
|
43
|
+
* },
|
|
44
|
+
* configuration: {
|
|
45
|
+
* foo: "bar",
|
|
46
|
+
* bar: "baz",
|
|
47
|
+
* },
|
|
48
|
+
* upstreamParams: JSON.stringify({
|
|
49
|
+
* screen_name: {
|
|
50
|
+
* alias: "login_hint",
|
|
51
|
+
* },
|
|
52
|
+
* }),
|
|
53
|
+
* passwordHistories: [{
|
|
54
|
+
* enable: true,
|
|
55
|
+
* size: 3,
|
|
56
|
+
* }],
|
|
57
|
+
* passwordNoPersonalInfo: {
|
|
58
|
+
* enable: true,
|
|
59
|
+
* },
|
|
60
|
+
* passwordDictionary: {
|
|
61
|
+
* enable: true,
|
|
62
|
+
* dictionaries: [
|
|
63
|
+
* "password",
|
|
64
|
+
* "admin",
|
|
65
|
+
* "1234",
|
|
66
|
+
* ],
|
|
67
|
+
* },
|
|
68
|
+
* passwordComplexityOptions: {
|
|
69
|
+
* minLength: 12,
|
|
70
|
+
* },
|
|
71
|
+
* validation: {
|
|
72
|
+
* username: {
|
|
73
|
+
* min: 10,
|
|
74
|
+
* max: 40,
|
|
75
|
+
* },
|
|
76
|
+
* },
|
|
77
|
+
* mfa: {
|
|
78
|
+
* active: true,
|
|
79
|
+
* returnEnrollSettings: true,
|
|
80
|
+
* },
|
|
81
|
+
* },
|
|
82
|
+
* });
|
|
83
|
+
* ```
|
|
84
|
+
*
|
|
15
85
|
* ### Google OAuth2 Connection
|
|
16
86
|
*
|
|
17
87
|
* > Your Auth0 account may be pre-configured with a `google-oauth2` connection.
|
|
@@ -20,18 +90,17 @@ const utilities = require("./utilities");
|
|
|
20
90
|
* import * as pulumi from "@pulumi/pulumi";
|
|
21
91
|
* import * as auth0 from "@pulumi/auth0";
|
|
22
92
|
*
|
|
23
|
-
*
|
|
93
|
+
* // This is an example of a Google OAuth2 connection.
|
|
94
|
+
* const googleOauth2 = new auth0.Connection("google_oauth2", {
|
|
95
|
+
* name: "Google-OAuth2-Connection",
|
|
96
|
+
* strategy: "google-oauth2",
|
|
24
97
|
* options: {
|
|
98
|
+
* clientId: "<client-id>",
|
|
99
|
+
* clientSecret: "<client-secret>",
|
|
25
100
|
* allowedAudiences: [
|
|
26
101
|
* "example.com",
|
|
27
102
|
* "api.example.com",
|
|
28
103
|
* ],
|
|
29
|
-
* clientId: "<client-id>",
|
|
30
|
-
* clientSecret: "<client-secret>",
|
|
31
|
-
* nonPersistentAttrs: [
|
|
32
|
-
* "ethnicity",
|
|
33
|
-
* "gender",
|
|
34
|
-
* ],
|
|
35
104
|
* scopes: [
|
|
36
105
|
* "email",
|
|
37
106
|
* "profile",
|
|
@@ -39,24 +108,67 @@ const utilities = require("./utilities");
|
|
|
39
108
|
* "youtube",
|
|
40
109
|
* ],
|
|
41
110
|
* setUserRootAttributes: "on_each_login",
|
|
111
|
+
* nonPersistentAttrs: [
|
|
112
|
+
* "ethnicity",
|
|
113
|
+
* "gender",
|
|
114
|
+
* ],
|
|
42
115
|
* },
|
|
43
|
-
* strategy: "google-oauth2",
|
|
44
116
|
* });
|
|
45
117
|
* ```
|
|
46
|
-
*
|
|
118
|
+
*
|
|
119
|
+
* ### Google Apps
|
|
47
120
|
*
|
|
48
121
|
* ```typescript
|
|
49
122
|
* import * as pulumi from "@pulumi/pulumi";
|
|
50
123
|
* import * as auth0 from "@pulumi/auth0";
|
|
51
124
|
*
|
|
52
|
-
* const
|
|
125
|
+
* const googleApps = new auth0.Connection("google_apps", {
|
|
126
|
+
* name: "connection-google-apps",
|
|
127
|
+
* isDomainConnection: false,
|
|
128
|
+
* strategy: "google-apps",
|
|
129
|
+
* showAsButton: false,
|
|
53
130
|
* options: {
|
|
54
|
-
* clientId: "
|
|
55
|
-
* clientSecret: "
|
|
131
|
+
* clientId: "",
|
|
132
|
+
* clientSecret: "",
|
|
133
|
+
* domain: "example.com",
|
|
134
|
+
* tenantDomain: "example.com",
|
|
135
|
+
* domainAliases: [
|
|
136
|
+
* "example.com",
|
|
137
|
+
* "api.example.com",
|
|
138
|
+
* ],
|
|
139
|
+
* apiEnableUsers: true,
|
|
140
|
+
* scopes: [
|
|
141
|
+
* "ext_profile",
|
|
142
|
+
* "ext_groups",
|
|
143
|
+
* ],
|
|
144
|
+
* iconUrl: "https://example.com/assets/logo.png",
|
|
145
|
+
* upstreamParams: JSON.stringify({
|
|
146
|
+
* screen_name: {
|
|
147
|
+
* alias: "login_hint",
|
|
148
|
+
* },
|
|
149
|
+
* }),
|
|
150
|
+
* setUserRootAttributes: "on_each_login",
|
|
56
151
|
* nonPersistentAttrs: [
|
|
57
152
|
* "ethnicity",
|
|
58
153
|
* "gender",
|
|
59
154
|
* ],
|
|
155
|
+
* },
|
|
156
|
+
* });
|
|
157
|
+
* ```
|
|
158
|
+
*
|
|
159
|
+
* ### Facebook Connection
|
|
160
|
+
*
|
|
161
|
+
* ```typescript
|
|
162
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
163
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
164
|
+
*
|
|
165
|
+
* // This is an example of a Facebook connection.
|
|
166
|
+
* const facebook = new auth0.Connection("facebook", {
|
|
167
|
+
* name: "Facebook-Connection",
|
|
168
|
+
* strategy: "facebook",
|
|
169
|
+
* options: {
|
|
170
|
+
* clientId: "<client-id>",
|
|
171
|
+
* clientSecret: "<client-secret>",
|
|
60
172
|
* scopes: [
|
|
61
173
|
* "public_profile",
|
|
62
174
|
* "email",
|
|
@@ -64,77 +176,85 @@ const utilities = require("./utilities");
|
|
|
64
176
|
* "user_birthday",
|
|
65
177
|
* ],
|
|
66
178
|
* setUserRootAttributes: "on_each_login",
|
|
179
|
+
* nonPersistentAttrs: [
|
|
180
|
+
* "ethnicity",
|
|
181
|
+
* "gender",
|
|
182
|
+
* ],
|
|
67
183
|
* },
|
|
68
|
-
* strategy: "facebook",
|
|
69
184
|
* });
|
|
70
185
|
* ```
|
|
186
|
+
*
|
|
71
187
|
* ### Apple Connection
|
|
72
188
|
*
|
|
73
189
|
* ```typescript
|
|
74
190
|
* import * as pulumi from "@pulumi/pulumi";
|
|
75
191
|
* import * as auth0 from "@pulumi/auth0";
|
|
76
192
|
*
|
|
193
|
+
* // This is an example of an Apple connection.
|
|
77
194
|
* const apple = new auth0.Connection("apple", {
|
|
195
|
+
* name: "Apple-Connection",
|
|
196
|
+
* strategy: "apple",
|
|
78
197
|
* options: {
|
|
79
198
|
* clientId: "<client-id>",
|
|
80
199
|
* clientSecret: `-----BEGIN PRIVATE KEY-----
|
|
81
200
|
* MIHBAgEAMA0GCSqGSIb3DQEBAQUABIGsMIGpAgEAA
|
|
82
|
-
* -----END PRIVATE KEY
|
|
83
|
-
*
|
|
201
|
+
* -----END PRIVATE KEY-----`,
|
|
202
|
+
* teamId: "<team-id>",
|
|
84
203
|
* keyId: "<key-id>",
|
|
85
|
-
* nonPersistentAttrs: [
|
|
86
|
-
* "ethnicity",
|
|
87
|
-
* "gender",
|
|
88
|
-
* ],
|
|
89
204
|
* scopes: [
|
|
90
205
|
* "email",
|
|
91
206
|
* "name",
|
|
92
207
|
* ],
|
|
93
208
|
* setUserRootAttributes: "on_first_login",
|
|
94
|
-
*
|
|
209
|
+
* nonPersistentAttrs: [
|
|
210
|
+
* "ethnicity",
|
|
211
|
+
* "gender",
|
|
212
|
+
* ],
|
|
95
213
|
* },
|
|
96
|
-
* strategy: "apple",
|
|
97
214
|
* });
|
|
98
215
|
* ```
|
|
216
|
+
*
|
|
99
217
|
* ### LinkedIn Connection
|
|
100
218
|
*
|
|
101
219
|
* ```typescript
|
|
102
220
|
* import * as pulumi from "@pulumi/pulumi";
|
|
103
221
|
* import * as auth0 from "@pulumi/auth0";
|
|
104
222
|
*
|
|
223
|
+
* // This is an example of an LinkedIn connection.
|
|
105
224
|
* const linkedin = new auth0.Connection("linkedin", {
|
|
225
|
+
* name: "Linkedin-Connection",
|
|
226
|
+
* strategy: "linkedin",
|
|
106
227
|
* options: {
|
|
107
228
|
* clientId: "<client-id>",
|
|
108
229
|
* clientSecret: "<client-secret>",
|
|
109
|
-
*
|
|
110
|
-
* "ethnicity",
|
|
111
|
-
* "gender",
|
|
112
|
-
* ],
|
|
230
|
+
* strategyVersion: 2,
|
|
113
231
|
* scopes: [
|
|
114
232
|
* "basic_profile",
|
|
115
233
|
* "profile",
|
|
116
234
|
* "email",
|
|
117
235
|
* ],
|
|
118
236
|
* setUserRootAttributes: "on_each_login",
|
|
119
|
-
*
|
|
237
|
+
* nonPersistentAttrs: [
|
|
238
|
+
* "ethnicity",
|
|
239
|
+
* "gender",
|
|
240
|
+
* ],
|
|
120
241
|
* },
|
|
121
|
-
* strategy: "linkedin",
|
|
122
242
|
* });
|
|
123
243
|
* ```
|
|
244
|
+
*
|
|
124
245
|
* ### GitHub Connection
|
|
125
246
|
*
|
|
126
247
|
* ```typescript
|
|
127
248
|
* import * as pulumi from "@pulumi/pulumi";
|
|
128
249
|
* import * as auth0 from "@pulumi/auth0";
|
|
129
250
|
*
|
|
251
|
+
* // This is an example of an GitHub connection.
|
|
130
252
|
* const github = new auth0.Connection("github", {
|
|
253
|
+
* name: "GitHub-Connection",
|
|
254
|
+
* strategy: "github",
|
|
131
255
|
* options: {
|
|
132
256
|
* clientId: "<client-id>",
|
|
133
257
|
* clientSecret: "<client-secret>",
|
|
134
|
-
* nonPersistentAttrs: [
|
|
135
|
-
* "ethnicity",
|
|
136
|
-
* "gender",
|
|
137
|
-
* ],
|
|
138
258
|
* scopes: [
|
|
139
259
|
* "email",
|
|
140
260
|
* "profile",
|
|
@@ -142,34 +262,41 @@ const utilities = require("./utilities");
|
|
|
142
262
|
* "repo",
|
|
143
263
|
* ],
|
|
144
264
|
* setUserRootAttributes: "on_each_login",
|
|
265
|
+
* nonPersistentAttrs: [
|
|
266
|
+
* "ethnicity",
|
|
267
|
+
* "gender",
|
|
268
|
+
* ],
|
|
145
269
|
* },
|
|
146
|
-
* strategy: "github",
|
|
147
270
|
* });
|
|
148
271
|
* ```
|
|
272
|
+
*
|
|
149
273
|
* ### SalesForce Connection
|
|
150
274
|
*
|
|
151
275
|
* ```typescript
|
|
152
276
|
* import * as pulumi from "@pulumi/pulumi";
|
|
153
277
|
* import * as auth0 from "@pulumi/auth0";
|
|
154
278
|
*
|
|
279
|
+
* // This is an example of an SalesForce connection.
|
|
155
280
|
* const salesforce = new auth0.Connection("salesforce", {
|
|
281
|
+
* name: "Salesforce-Connection",
|
|
282
|
+
* strategy: "salesforce",
|
|
156
283
|
* options: {
|
|
157
284
|
* clientId: "<client-id>",
|
|
158
285
|
* clientSecret: "<client-secret>",
|
|
159
286
|
* communityBaseUrl: "https://salesforce.example.com",
|
|
160
|
-
* nonPersistentAttrs: [
|
|
161
|
-
* "ethnicity",
|
|
162
|
-
* "gender",
|
|
163
|
-
* ],
|
|
164
287
|
* scopes: [
|
|
165
288
|
* "openid",
|
|
166
289
|
* "email",
|
|
167
290
|
* ],
|
|
168
291
|
* setUserRootAttributes: "on_first_login",
|
|
292
|
+
* nonPersistentAttrs: [
|
|
293
|
+
* "ethnicity",
|
|
294
|
+
* "gender",
|
|
295
|
+
* ],
|
|
169
296
|
* },
|
|
170
|
-
* strategy: "salesforce",
|
|
171
297
|
* });
|
|
172
298
|
* ```
|
|
299
|
+
*
|
|
173
300
|
* ### OAuth2 Connection
|
|
174
301
|
*
|
|
175
302
|
* Also applies to following connection strategies: `dropbox`, `bitbucket`, `paypal`, `twitter`, `amazon`, `yahoo`, `box`, `wordpress`, `shopify`, `custom`
|
|
@@ -178,70 +305,125 @@ const utilities = require("./utilities");
|
|
|
178
305
|
* import * as pulumi from "@pulumi/pulumi";
|
|
179
306
|
* import * as auth0 from "@pulumi/auth0";
|
|
180
307
|
*
|
|
308
|
+
* // This is an example of an OAuth2 connection.
|
|
181
309
|
* const oauth2 = new auth0.Connection("oauth2", {
|
|
310
|
+
* name: "OAuth2-Connection",
|
|
311
|
+
* strategy: "oauth2",
|
|
182
312
|
* options: {
|
|
183
|
-
* authorizationEndpoint: "https://auth.example.com/oauth2/authorize",
|
|
184
313
|
* clientId: "<client-id>",
|
|
185
314
|
* clientSecret: "<client-secret>",
|
|
186
|
-
* iconUrl: "https://auth.example.com/assets/logo.png",
|
|
187
|
-
* nonPersistentAttrs: [
|
|
188
|
-
* "ethnicity",
|
|
189
|
-
* "gender",
|
|
190
|
-
* ],
|
|
191
|
-
* pkceEnabled: true,
|
|
192
315
|
* scopes: [
|
|
193
316
|
* "basic_profile",
|
|
194
317
|
* "profile",
|
|
195
318
|
* "email",
|
|
196
319
|
* ],
|
|
320
|
+
* tokenEndpoint: "https://auth.example.com/oauth2/token",
|
|
321
|
+
* authorizationEndpoint: "https://auth.example.com/oauth2/authorize",
|
|
322
|
+
* pkceEnabled: true,
|
|
323
|
+
* iconUrl: "https://auth.example.com/assets/logo.png",
|
|
197
324
|
* scripts: {
|
|
198
325
|
* fetchUserProfile: ` function fetchUserProfile(accessToken, context, callback) {
|
|
199
326
|
* return callback(new Error("Whoops!"));
|
|
200
327
|
* }
|
|
201
|
-
*
|
|
202
328
|
* `,
|
|
203
329
|
* },
|
|
204
330
|
* setUserRootAttributes: "on_each_login",
|
|
205
|
-
*
|
|
331
|
+
* nonPersistentAttrs: [
|
|
332
|
+
* "ethnicity",
|
|
333
|
+
* "gender",
|
|
334
|
+
* ],
|
|
206
335
|
* },
|
|
207
|
-
* strategy: "oauth2",
|
|
208
336
|
* });
|
|
209
337
|
* ```
|
|
210
|
-
* ### SMS Connection
|
|
211
338
|
*
|
|
212
|
-
*
|
|
339
|
+
* ### Active Directory (AD)
|
|
213
340
|
*
|
|
214
341
|
* ```typescript
|
|
215
342
|
* import * as pulumi from "@pulumi/pulumi";
|
|
216
343
|
* import * as auth0 from "@pulumi/auth0";
|
|
217
344
|
*
|
|
218
|
-
* const
|
|
219
|
-
*
|
|
345
|
+
* const ad = new auth0.Connection("ad", {
|
|
346
|
+
* name: "connection-active-directory",
|
|
347
|
+
* displayName: "Active Directory Connection",
|
|
348
|
+
* strategy: "ad",
|
|
349
|
+
* showAsButton: true,
|
|
220
350
|
* options: {
|
|
351
|
+
* disableSelfServiceChangePassword: true,
|
|
221
352
|
* bruteForceProtection: true,
|
|
222
|
-
*
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
*
|
|
228
|
-
*
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
*
|
|
237
|
-
*
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
-
*
|
|
353
|
+
* tenantDomain: "example.com",
|
|
354
|
+
* iconUrl: "https://example.com/assets/logo.png",
|
|
355
|
+
* domainAliases: [
|
|
356
|
+
* "example.com",
|
|
357
|
+
* "api.example.com",
|
|
358
|
+
* ],
|
|
359
|
+
* ips: [
|
|
360
|
+
* "192.168.1.1",
|
|
361
|
+
* "192.168.1.2",
|
|
362
|
+
* ],
|
|
363
|
+
* setUserRootAttributes: "on_each_login",
|
|
364
|
+
* nonPersistentAttrs: [
|
|
365
|
+
* "ethnicity",
|
|
366
|
+
* "gender",
|
|
367
|
+
* ],
|
|
368
|
+
* upstreamParams: JSON.stringify({
|
|
369
|
+
* screen_name: {
|
|
370
|
+
* alias: "login_hint",
|
|
371
|
+
* },
|
|
372
|
+
* }),
|
|
373
|
+
* useCertAuth: false,
|
|
374
|
+
* useKerberos: false,
|
|
375
|
+
* disableCache: false,
|
|
376
|
+
* },
|
|
377
|
+
* });
|
|
378
|
+
* ```
|
|
379
|
+
*
|
|
380
|
+
* ### Azure AD Connection
|
|
381
|
+
*
|
|
382
|
+
* ```typescript
|
|
383
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
384
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
385
|
+
*
|
|
386
|
+
* const azureAd = new auth0.Connection("azure_ad", {
|
|
387
|
+
* name: "connection-azure-ad",
|
|
388
|
+
* strategy: "waad",
|
|
389
|
+
* showAsButton: true,
|
|
390
|
+
* options: {
|
|
391
|
+
* identityApi: "azure-active-directory-v1.0",
|
|
392
|
+
* clientId: "123456",
|
|
393
|
+
* clientSecret: "123456",
|
|
394
|
+
* appId: "app-id-123",
|
|
395
|
+
* tenantDomain: "example.onmicrosoft.com",
|
|
396
|
+
* domain: "example.onmicrosoft.com",
|
|
397
|
+
* domainAliases: [
|
|
398
|
+
* "example.com",
|
|
399
|
+
* "api.example.com",
|
|
400
|
+
* ],
|
|
401
|
+
* iconUrl: "https://example.onmicrosoft.com/assets/logo.png",
|
|
402
|
+
* useWsfed: false,
|
|
403
|
+
* waadProtocol: "openid-connect",
|
|
404
|
+
* waadCommonEndpoint: false,
|
|
405
|
+
* maxGroupsToRetrieve: "250",
|
|
406
|
+
* apiEnableUsers: true,
|
|
407
|
+
* scopes: [
|
|
408
|
+
* "basic_profile",
|
|
409
|
+
* "ext_groups",
|
|
410
|
+
* "ext_profile",
|
|
411
|
+
* ],
|
|
412
|
+
* setUserRootAttributes: "on_each_login",
|
|
413
|
+
* shouldTrustEmailVerifiedConnection: "never_set_emails_as_verified",
|
|
414
|
+
* upstreamParams: JSON.stringify({
|
|
415
|
+
* screen_name: {
|
|
416
|
+
* alias: "login_hint",
|
|
417
|
+
* },
|
|
418
|
+
* }),
|
|
419
|
+
* nonPersistentAttrs: [
|
|
420
|
+
* "ethnicity",
|
|
421
|
+
* "gender",
|
|
422
|
+
* ],
|
|
241
423
|
* },
|
|
242
|
-
* strategy: "sms",
|
|
243
424
|
* });
|
|
244
425
|
* ```
|
|
426
|
+
*
|
|
245
427
|
* ### Email Connection
|
|
246
428
|
*
|
|
247
429
|
* > To be able to see this in the management dashboard as well, the name of the connection must be set to "email".
|
|
@@ -250,51 +432,245 @@ const utilities = require("./utilities");
|
|
|
250
432
|
* import * as pulumi from "@pulumi/pulumi";
|
|
251
433
|
* import * as auth0 from "@pulumi/auth0";
|
|
252
434
|
*
|
|
253
|
-
*
|
|
435
|
+
* // This is an example of an Email connection.
|
|
436
|
+
* const passwordlessEmail = new auth0.Connection("passwordless_email", {
|
|
437
|
+
* strategy: "email",
|
|
438
|
+
* name: "email",
|
|
254
439
|
* options: {
|
|
255
|
-
* authParams: {
|
|
256
|
-
* responseType: "code",
|
|
257
|
-
* scope: "openid email profile offline_access",
|
|
258
|
-
* },
|
|
259
|
-
* bruteForceProtection: true,
|
|
260
|
-
* disableSignup: false,
|
|
261
|
-
* from: "{{ application.name }} <root@auth0.com>",
|
|
262
440
|
* name: "email",
|
|
263
|
-
*
|
|
264
|
-
* setUserRootAttributes: "on_each_login",
|
|
441
|
+
* from: "{{ application.name }} <root@auth0.com>",
|
|
265
442
|
* subject: "Welcome to {{ application.name }}",
|
|
266
443
|
* syntax: "liquid",
|
|
267
444
|
* template: "<html>This is the body of the email</html>",
|
|
445
|
+
* disableSignup: false,
|
|
446
|
+
* bruteForceProtection: true,
|
|
447
|
+
* setUserRootAttributes: "on_each_login",
|
|
448
|
+
* nonPersistentAttrs: [],
|
|
449
|
+
* authParams: {
|
|
450
|
+
* scope: "openid email profile offline_access",
|
|
451
|
+
* response_type: "code",
|
|
452
|
+
* },
|
|
268
453
|
* totp: {
|
|
269
|
-
* length: 6,
|
|
270
454
|
* timeStep: 300,
|
|
455
|
+
* length: 6,
|
|
456
|
+
* },
|
|
457
|
+
* },
|
|
458
|
+
* });
|
|
459
|
+
* ```
|
|
460
|
+
*
|
|
461
|
+
* ### SAML Connection
|
|
462
|
+
*
|
|
463
|
+
* ```typescript
|
|
464
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
465
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
466
|
+
*
|
|
467
|
+
* // This is an example of a SAML connection.
|
|
468
|
+
* const samlp = new auth0.Connection("samlp", {
|
|
469
|
+
* name: "SAML-Connection",
|
|
470
|
+
* strategy: "samlp",
|
|
471
|
+
* options: {
|
|
472
|
+
* debug: false,
|
|
473
|
+
* signingCert: "<signing-certificate>",
|
|
474
|
+
* signInEndpoint: "https://saml.provider/sign_in",
|
|
475
|
+
* signOutEndpoint: "https://saml.provider/sign_out",
|
|
476
|
+
* disableSignOut: true,
|
|
477
|
+
* tenantDomain: "example.com",
|
|
478
|
+
* domainAliases: [
|
|
479
|
+
* "example.com",
|
|
480
|
+
* "alias.example.com",
|
|
481
|
+
* ],
|
|
482
|
+
* protocolBinding: "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST",
|
|
483
|
+
* requestTemplate: `<samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"
|
|
484
|
+
* @@AssertServiceURLAndDestination@@
|
|
485
|
+
* ID="@@ID@@"
|
|
486
|
+
* IssueInstant="@@IssueInstant@@"
|
|
487
|
+
* ProtocolBinding="@@ProtocolBinding@@" Version="2.0">
|
|
488
|
+
* <saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">@@Issuer@@</saml:Issuer>
|
|
489
|
+
* </samlp:AuthnRequest>`,
|
|
490
|
+
* userIdAttribute: "https://saml.provider/imi/ns/identity-200810",
|
|
491
|
+
* signatureAlgorithm: "rsa-sha256",
|
|
492
|
+
* digestAlgorithm: "sha256",
|
|
493
|
+
* iconUrl: "https://saml.provider/assets/logo.png",
|
|
494
|
+
* entityId: "<entity_id>",
|
|
495
|
+
* metadataXml: ` <?xml version="1.0"?>
|
|
496
|
+
* <md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" entityID="https://example.com">
|
|
497
|
+
* <md:IDPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
|
|
498
|
+
* <md:SingleLogoutService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://saml.provider/sign_out"/>
|
|
499
|
+
* <md:SingleSignOnService Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" Location="https://saml.provider/sign_in"/>
|
|
500
|
+
* </md:IDPSSODescriptor>
|
|
501
|
+
* </md:EntityDescriptor>
|
|
502
|
+
* `,
|
|
503
|
+
* metadataUrl: "https://saml.provider/imi/ns/FederationMetadata.xml",
|
|
504
|
+
* fieldsMap: JSON.stringify({
|
|
505
|
+
* name: [
|
|
506
|
+
* "name",
|
|
507
|
+
* "nameidentifier",
|
|
508
|
+
* ],
|
|
509
|
+
* email: [
|
|
510
|
+
* "emailaddress",
|
|
511
|
+
* "nameidentifier",
|
|
512
|
+
* ],
|
|
513
|
+
* family_name: "surname",
|
|
514
|
+
* }),
|
|
515
|
+
* signingKey: {
|
|
516
|
+
* key: `-----BEGIN PRIVATE KEY-----
|
|
517
|
+
* ...{your private key here}...
|
|
518
|
+
* -----END PRIVATE KEY-----`,
|
|
519
|
+
* cert: `-----BEGIN CERTIFICATE-----
|
|
520
|
+
* ...{your public key cert here}...
|
|
521
|
+
* -----END CERTIFICATE-----`,
|
|
522
|
+
* },
|
|
523
|
+
* decryptionKey: {
|
|
524
|
+
* key: `-----BEGIN PRIVATE KEY-----
|
|
525
|
+
* ...{your private key here}...
|
|
526
|
+
* -----END PRIVATE KEY-----`,
|
|
527
|
+
* cert: `-----BEGIN CERTIFICATE-----
|
|
528
|
+
* ...{your public key cert here}...
|
|
529
|
+
* -----END CERTIFICATE-----`,
|
|
530
|
+
* },
|
|
531
|
+
* idpInitiated: {
|
|
532
|
+
* clientId: "client_id",
|
|
533
|
+
* clientProtocol: "samlp",
|
|
534
|
+
* clientAuthorizeQuery: "type=code&timeout=30",
|
|
271
535
|
* },
|
|
272
536
|
* },
|
|
273
|
-
* strategy: "email",
|
|
274
537
|
* });
|
|
275
538
|
* ```
|
|
539
|
+
*
|
|
276
540
|
* ### WindowsLive Connection
|
|
277
541
|
*
|
|
278
542
|
* ```typescript
|
|
279
543
|
* import * as pulumi from "@pulumi/pulumi";
|
|
280
544
|
* import * as auth0 from "@pulumi/auth0";
|
|
281
545
|
*
|
|
546
|
+
* // This is an example of a WindowsLive connection.
|
|
282
547
|
* const windowslive = new auth0.Connection("windowslive", {
|
|
548
|
+
* name: "Windowslive-Connection",
|
|
549
|
+
* strategy: "windowslive",
|
|
283
550
|
* options: {
|
|
284
551
|
* clientId: "<client-id>",
|
|
285
552
|
* clientSecret: "<client-secret>",
|
|
553
|
+
* strategyVersion: 2,
|
|
554
|
+
* scopes: [
|
|
555
|
+
* "signin",
|
|
556
|
+
* "graph_user",
|
|
557
|
+
* ],
|
|
558
|
+
* setUserRootAttributes: "on_first_login",
|
|
559
|
+
* nonPersistentAttrs: [
|
|
560
|
+
* "ethnicity",
|
|
561
|
+
* "gender",
|
|
562
|
+
* ],
|
|
563
|
+
* },
|
|
564
|
+
* });
|
|
565
|
+
* ```
|
|
566
|
+
*
|
|
567
|
+
* ### OIDC Connection
|
|
568
|
+
*
|
|
569
|
+
* ```typescript
|
|
570
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
571
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
572
|
+
*
|
|
573
|
+
* // This is an example of an OIDC connection.
|
|
574
|
+
* const oidc = new auth0.Connection("oidc", {
|
|
575
|
+
* name: "oidc-connection",
|
|
576
|
+
* displayName: "OIDC Connection",
|
|
577
|
+
* strategy: "oidc",
|
|
578
|
+
* showAsButton: false,
|
|
579
|
+
* options: {
|
|
580
|
+
* clientId: "1234567",
|
|
581
|
+
* clientSecret: "1234567",
|
|
582
|
+
* domainAliases: ["example.com"],
|
|
583
|
+
* tenantDomain: "",
|
|
584
|
+
* iconUrl: "https://example.com/assets/logo.png",
|
|
585
|
+
* type: "back_channel",
|
|
586
|
+
* issuer: "https://www.paypalobjects.com",
|
|
587
|
+
* jwksUri: "https://api.paypal.com/v1/oauth2/certs",
|
|
588
|
+
* discoveryUrl: "https://www.paypalobjects.com/.well-known/openid-configuration",
|
|
589
|
+
* tokenEndpoint: "https://api.paypal.com/v1/oauth2/token",
|
|
590
|
+
* userinfoEndpoint: "https://api.paypal.com/v1/oauth2/token/userinfo",
|
|
591
|
+
* authorizationEndpoint: "https://www.paypal.com/signin/authorize",
|
|
592
|
+
* scopes: [
|
|
593
|
+
* "openid",
|
|
594
|
+
* "email",
|
|
595
|
+
* ],
|
|
596
|
+
* setUserRootAttributes: "on_first_login",
|
|
286
597
|
* nonPersistentAttrs: [
|
|
287
598
|
* "ethnicity",
|
|
288
599
|
* "gender",
|
|
289
600
|
* ],
|
|
601
|
+
* connectionSettings: {
|
|
602
|
+
* pkce: "auto",
|
|
603
|
+
* },
|
|
604
|
+
* attributeMap: {
|
|
605
|
+
* mappingMode: "use_map",
|
|
606
|
+
* userinfoScope: "openid email profile groups",
|
|
607
|
+
* attributes: JSON.stringify({
|
|
608
|
+
* name: "${context.tokenset.name}",
|
|
609
|
+
* email: "${context.tokenset.email}",
|
|
610
|
+
* email_verified: "${context.tokenset.email_verified}",
|
|
611
|
+
* nickname: "${context.tokenset.nickname}",
|
|
612
|
+
* picture: "${context.tokenset.picture}",
|
|
613
|
+
* given_name: "${context.tokenset.given_name}",
|
|
614
|
+
* family_name: "${context.tokenset.family_name}",
|
|
615
|
+
* }),
|
|
616
|
+
* },
|
|
617
|
+
* },
|
|
618
|
+
* });
|
|
619
|
+
* ```
|
|
620
|
+
*
|
|
621
|
+
* ### Okta Connection
|
|
622
|
+
*
|
|
623
|
+
* ```typescript
|
|
624
|
+
* import * as pulumi from "@pulumi/pulumi";
|
|
625
|
+
* import * as auth0 from "@pulumi/auth0";
|
|
626
|
+
*
|
|
627
|
+
* // This is an example of an Okta Workforce connection.
|
|
628
|
+
* const okta = new auth0.Connection("okta", {
|
|
629
|
+
* name: "okta-connection",
|
|
630
|
+
* displayName: "Okta Workforce Connection",
|
|
631
|
+
* strategy: "okta",
|
|
632
|
+
* showAsButton: false,
|
|
633
|
+
* options: {
|
|
634
|
+
* clientId: "1234567",
|
|
635
|
+
* clientSecret: "1234567",
|
|
636
|
+
* domain: "example.okta.com",
|
|
637
|
+
* domainAliases: ["example.com"],
|
|
638
|
+
* issuer: "https://example.okta.com",
|
|
639
|
+
* jwksUri: "https://example.okta.com/oauth2/v1/keys",
|
|
640
|
+
* tokenEndpoint: "https://example.okta.com/oauth2/v1/token",
|
|
641
|
+
* userinfoEndpoint: "https://example.okta.com/oauth2/v1/userinfo",
|
|
642
|
+
* authorizationEndpoint: "https://example.okta.com/oauth2/v1/authorize",
|
|
290
643
|
* scopes: [
|
|
291
|
-
* "
|
|
292
|
-
* "
|
|
644
|
+
* "openid",
|
|
645
|
+
* "email",
|
|
293
646
|
* ],
|
|
294
647
|
* setUserRootAttributes: "on_first_login",
|
|
295
|
-
*
|
|
648
|
+
* nonPersistentAttrs: [
|
|
649
|
+
* "ethnicity",
|
|
650
|
+
* "gender",
|
|
651
|
+
* ],
|
|
652
|
+
* upstreamParams: JSON.stringify({
|
|
653
|
+
* screen_name: {
|
|
654
|
+
* alias: "login_hint",
|
|
655
|
+
* },
|
|
656
|
+
* }),
|
|
657
|
+
* connectionSettings: {
|
|
658
|
+
* pkce: "auto",
|
|
659
|
+
* },
|
|
660
|
+
* attributeMap: {
|
|
661
|
+
* mappingMode: "basic_profile",
|
|
662
|
+
* userinfoScope: "openid email profile groups",
|
|
663
|
+
* attributes: JSON.stringify({
|
|
664
|
+
* name: "${context.tokenset.name}",
|
|
665
|
+
* email: "${context.tokenset.email}",
|
|
666
|
+
* email_verified: "${context.tokenset.email_verified}",
|
|
667
|
+
* nickname: "${context.tokenset.nickname}",
|
|
668
|
+
* picture: "${context.tokenset.picture}",
|
|
669
|
+
* given_name: "${context.tokenset.given_name}",
|
|
670
|
+
* family_name: "${context.tokenset.family_name}",
|
|
671
|
+
* }),
|
|
672
|
+
* },
|
|
296
673
|
* },
|
|
297
|
-
* strategy: "windowslive",
|
|
298
674
|
* });
|
|
299
675
|
* ```
|
|
300
676
|
*
|
|
@@ -304,7 +680,7 @@ const utilities = require("./utilities");
|
|
|
304
680
|
*
|
|
305
681
|
* #
|
|
306
682
|
*
|
|
307
|
-
*
|
|
683
|
+
* Example:
|
|
308
684
|
*
|
|
309
685
|
* ```sh
|
|
310
686
|
* $ pulumi import auth0:index/connection:Connection google "con_a17f21fdb24d48a0"
|