@pulumi/auth0 3.3.1 → 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 +3 -3
- package/attackProtection.d.ts +17 -19
- package/attackProtection.js +17 -19
- package/attackProtection.js.map +1 -1
- package/branding.d.ts +0 -21
- package/branding.js +0 -21
- package/branding.js.map +1 -1
- package/brandingTheme.d.ts +0 -83
- package/brandingTheme.js +0 -83
- package/brandingTheme.js.map +1 -1
- package/client.d.ts +47 -49
- package/client.js +42 -44
- package/client.js.map +1 -1
- package/clientCredentials.d.ts +0 -72
- package/clientCredentials.js +0 -54
- package/clientCredentials.js.map +1 -1
- package/connection.d.ts +457 -111
- package/connection.js +454 -108
- package/connection.js.map +1 -1
- package/connectionClient.d.ts +6 -5
- package/connectionClient.js +6 -5
- package/connectionClient.js.map +1 -1
- package/connectionClients.d.ts +7 -6
- package/connectionClients.js +7 -6
- package/connectionClients.js.map +1 -1
- package/customDomain.d.ts +1 -3
- package/customDomain.js +1 -3
- package/customDomain.js.map +1 -1
- package/customDomainVerification.d.ts +0 -8
- package/customDomainVerification.js.map +1 -1
- package/emailProvider.d.ts +0 -38
- package/emailProvider.js +0 -38
- package/emailProvider.js.map +1 -1
- package/emailTemplate.d.ts +3 -4
- package/emailTemplate.js +3 -4
- package/emailTemplate.js.map +1 -1
- package/getAttackProtection.d.ts +0 -4
- package/getAttackProtection.js +0 -4
- package/getAttackProtection.js.map +1 -1
- package/getBranding.d.ts +0 -4
- package/getBranding.js +0 -4
- package/getBranding.js.map +1 -1
- package/getBrandingTheme.d.ts +0 -4
- package/getBrandingTheme.js +0 -4
- package/getBrandingTheme.js.map +1 -1
- package/getClient.d.ts +16 -4
- package/getClient.js +4 -4
- package/getClient.js.map +1 -1
- package/getConnection.d.ts +10 -4
- package/getConnection.js +4 -4
- package/getConnection.js.map +1 -1
- package/getOrganization.d.ts +4 -4
- package/getOrganization.js +4 -4
- package/getPages.d.ts +0 -4
- package/getPages.js +0 -4
- package/getPages.js.map +1 -1
- package/getResourceServer.d.ts +4 -4
- package/getResourceServer.js +4 -4
- package/getRole.d.ts +10 -4
- package/getRole.js +4 -4
- package/getRole.js.map +1 -1
- package/getTenant.d.ts +0 -4
- package/getTenant.js +0 -4
- package/getTenant.js.map +1 -1
- package/getUser.d.ts +2 -4
- package/getUser.js +2 -4
- package/getUser.js.map +1 -1
- package/guardian.d.ts +17 -19
- package/guardian.js +17 -19
- package/guardian.js.map +1 -1
- package/hook.d.ts +7 -9
- package/hook.js +7 -9
- package/hook.js.map +1 -1
- package/logStream.d.ts +12 -12
- package/logStream.js +12 -12
- package/organization.d.ts +5 -6
- package/organization.js +5 -6
- package/organization.js.map +1 -1
- package/organizationConnection.d.ts +9 -5
- package/organizationConnection.js +9 -5
- package/organizationConnection.js.map +1 -1
- package/organizationConnections.d.ts +12 -5
- package/organizationConnections.js +12 -5
- package/organizationConnections.js.map +1 -1
- package/organizationMember.d.ts +5 -4
- package/organizationMember.js +5 -4
- package/organizationMember.js.map +1 -1
- package/organizationMemberRole.d.ts +7 -6
- package/organizationMemberRole.js +7 -6
- package/organizationMemberRole.js.map +1 -1
- package/organizationMemberRoles.d.ts +8 -7
- package/organizationMemberRoles.js +8 -7
- package/organizationMemberRoles.js.map +1 -1
- package/organizationMembers.d.ts +7 -6
- package/organizationMembers.js +7 -6
- package/organizationMembers.js.map +1 -1
- package/package.json +1 -1
- package/pages.d.ts +9 -11
- package/pages.js +9 -11
- package/pages.js.map +1 -1
- package/prompt.d.ts +2 -4
- package/prompt.js +2 -4
- package/prompt.js.map +1 -1
- package/promptCustomText.d.ts +0 -2
- package/promptCustomText.js +0 -2
- package/promptCustomText.js.map +1 -1
- package/promptPartials.d.ts +5 -7
- package/promptPartials.js +5 -7
- package/promptPartials.js.map +1 -1
- package/provider.d.ts +4 -4
- package/resourceServer.d.ts +4 -5
- package/resourceServer.js +4 -5
- package/resourceServer.js.map +1 -1
- package/resourceServerScope.d.ts +6 -5
- package/resourceServerScope.js +6 -5
- package/resourceServerScope.js.map +1 -1
- package/resourceServerScopes.d.ts +5 -4
- package/resourceServerScopes.js +5 -4
- package/resourceServerScopes.js.map +1 -1
- package/role.d.ts +4 -3
- package/role.js +4 -3
- package/role.js.map +1 -1
- package/rule.d.ts +3 -5
- package/rule.js +3 -5
- package/rule.js.map +1 -1
- package/ruleConfig.d.ts +4 -6
- package/ruleConfig.js +4 -6
- package/ruleConfig.js.map +1 -1
- package/tenant.d.ts +11 -13
- package/tenant.js +11 -13
- package/tenant.js.map +1 -1
- package/triggerAction.d.ts +3 -4
- package/triggerAction.js +3 -4
- package/triggerAction.js.map +1 -1
- package/triggerActions.d.ts +5 -5
- package/triggerActions.js +5 -5
- package/types/input.d.ts +30 -39
- package/types/output.d.ts +30 -39
- package/user.d.ts +4 -5
- package/user.js +4 -5
- package/user.js.map +1 -1
- package/userRole.d.ts +6 -4
- package/userRole.js +6 -4
- package/userRole.js.map +1 -1
- package/userRoles.d.ts +6 -4
- package/userRoles.js +6 -4
- package/userRoles.js.map +1 -1
package/connection.js
CHANGED
|
@@ -13,27 +13,94 @@ const utilities = require("./utilities");
|
|
|
13
13
|
*
|
|
14
14
|
* ## Example Usage
|
|
15
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
|
+
*
|
|
16
85
|
* ### Google OAuth2 Connection
|
|
17
86
|
*
|
|
18
87
|
* > Your Auth0 account may be pre-configured with a `google-oauth2` connection.
|
|
19
88
|
*
|
|
20
|
-
* <!--Start PulumiCodeChooser -->
|
|
21
89
|
* ```typescript
|
|
22
90
|
* import * as pulumi from "@pulumi/pulumi";
|
|
23
91
|
* import * as auth0 from "@pulumi/auth0";
|
|
24
92
|
*
|
|
25
|
-
*
|
|
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",
|
|
26
97
|
* options: {
|
|
98
|
+
* clientId: "<client-id>",
|
|
99
|
+
* clientSecret: "<client-secret>",
|
|
27
100
|
* allowedAudiences: [
|
|
28
101
|
* "example.com",
|
|
29
102
|
* "api.example.com",
|
|
30
103
|
* ],
|
|
31
|
-
* clientId: "<client-id>",
|
|
32
|
-
* clientSecret: "<client-secret>",
|
|
33
|
-
* nonPersistentAttrs: [
|
|
34
|
-
* "ethnicity",
|
|
35
|
-
* "gender",
|
|
36
|
-
* ],
|
|
37
104
|
* scopes: [
|
|
38
105
|
* "email",
|
|
39
106
|
* "profile",
|
|
@@ -41,27 +108,67 @@ const utilities = require("./utilities");
|
|
|
41
108
|
* "youtube",
|
|
42
109
|
* ],
|
|
43
110
|
* setUserRootAttributes: "on_each_login",
|
|
111
|
+
* nonPersistentAttrs: [
|
|
112
|
+
* "ethnicity",
|
|
113
|
+
* "gender",
|
|
114
|
+
* ],
|
|
44
115
|
* },
|
|
45
|
-
* strategy: "google-oauth2",
|
|
46
116
|
* });
|
|
47
117
|
* ```
|
|
48
|
-
* <!--End PulumiCodeChooser -->
|
|
49
118
|
*
|
|
50
|
-
* ###
|
|
119
|
+
* ### Google Apps
|
|
51
120
|
*
|
|
52
|
-
* <!--Start PulumiCodeChooser -->
|
|
53
121
|
* ```typescript
|
|
54
122
|
* import * as pulumi from "@pulumi/pulumi";
|
|
55
123
|
* import * as auth0 from "@pulumi/auth0";
|
|
56
124
|
*
|
|
57
|
-
* const
|
|
125
|
+
* const googleApps = new auth0.Connection("google_apps", {
|
|
126
|
+
* name: "connection-google-apps",
|
|
127
|
+
* isDomainConnection: false,
|
|
128
|
+
* strategy: "google-apps",
|
|
129
|
+
* showAsButton: false,
|
|
58
130
|
* options: {
|
|
59
|
-
* clientId: "
|
|
60
|
-
* 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",
|
|
61
151
|
* nonPersistentAttrs: [
|
|
62
152
|
* "ethnicity",
|
|
63
153
|
* "gender",
|
|
64
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>",
|
|
65
172
|
* scopes: [
|
|
66
173
|
* "public_profile",
|
|
67
174
|
* "email",
|
|
@@ -69,86 +176,85 @@ const utilities = require("./utilities");
|
|
|
69
176
|
* "user_birthday",
|
|
70
177
|
* ],
|
|
71
178
|
* setUserRootAttributes: "on_each_login",
|
|
179
|
+
* nonPersistentAttrs: [
|
|
180
|
+
* "ethnicity",
|
|
181
|
+
* "gender",
|
|
182
|
+
* ],
|
|
72
183
|
* },
|
|
73
|
-
* strategy: "facebook",
|
|
74
184
|
* });
|
|
75
185
|
* ```
|
|
76
|
-
* <!--End PulumiCodeChooser -->
|
|
77
186
|
*
|
|
78
187
|
* ### Apple Connection
|
|
79
188
|
*
|
|
80
|
-
* <!--Start PulumiCodeChooser -->
|
|
81
189
|
* ```typescript
|
|
82
190
|
* import * as pulumi from "@pulumi/pulumi";
|
|
83
191
|
* import * as auth0 from "@pulumi/auth0";
|
|
84
192
|
*
|
|
193
|
+
* // This is an example of an Apple connection.
|
|
85
194
|
* const apple = new auth0.Connection("apple", {
|
|
195
|
+
* name: "Apple-Connection",
|
|
196
|
+
* strategy: "apple",
|
|
86
197
|
* options: {
|
|
87
198
|
* clientId: "<client-id>",
|
|
88
199
|
* clientSecret: `-----BEGIN PRIVATE KEY-----
|
|
89
200
|
* MIHBAgEAMA0GCSqGSIb3DQEBAQUABIGsMIGpAgEAA
|
|
90
|
-
* -----END PRIVATE KEY
|
|
91
|
-
*
|
|
201
|
+
* -----END PRIVATE KEY-----`,
|
|
202
|
+
* teamId: "<team-id>",
|
|
92
203
|
* keyId: "<key-id>",
|
|
93
|
-
* nonPersistentAttrs: [
|
|
94
|
-
* "ethnicity",
|
|
95
|
-
* "gender",
|
|
96
|
-
* ],
|
|
97
204
|
* scopes: [
|
|
98
205
|
* "email",
|
|
99
206
|
* "name",
|
|
100
207
|
* ],
|
|
101
208
|
* setUserRootAttributes: "on_first_login",
|
|
102
|
-
*
|
|
209
|
+
* nonPersistentAttrs: [
|
|
210
|
+
* "ethnicity",
|
|
211
|
+
* "gender",
|
|
212
|
+
* ],
|
|
103
213
|
* },
|
|
104
|
-
* strategy: "apple",
|
|
105
214
|
* });
|
|
106
215
|
* ```
|
|
107
|
-
* <!--End PulumiCodeChooser -->
|
|
108
216
|
*
|
|
109
217
|
* ### LinkedIn Connection
|
|
110
218
|
*
|
|
111
|
-
* <!--Start PulumiCodeChooser -->
|
|
112
219
|
* ```typescript
|
|
113
220
|
* import * as pulumi from "@pulumi/pulumi";
|
|
114
221
|
* import * as auth0 from "@pulumi/auth0";
|
|
115
222
|
*
|
|
223
|
+
* // This is an example of an LinkedIn connection.
|
|
116
224
|
* const linkedin = new auth0.Connection("linkedin", {
|
|
225
|
+
* name: "Linkedin-Connection",
|
|
226
|
+
* strategy: "linkedin",
|
|
117
227
|
* options: {
|
|
118
228
|
* clientId: "<client-id>",
|
|
119
229
|
* clientSecret: "<client-secret>",
|
|
120
|
-
*
|
|
121
|
-
* "ethnicity",
|
|
122
|
-
* "gender",
|
|
123
|
-
* ],
|
|
230
|
+
* strategyVersion: 2,
|
|
124
231
|
* scopes: [
|
|
125
232
|
* "basic_profile",
|
|
126
233
|
* "profile",
|
|
127
234
|
* "email",
|
|
128
235
|
* ],
|
|
129
236
|
* setUserRootAttributes: "on_each_login",
|
|
130
|
-
*
|
|
237
|
+
* nonPersistentAttrs: [
|
|
238
|
+
* "ethnicity",
|
|
239
|
+
* "gender",
|
|
240
|
+
* ],
|
|
131
241
|
* },
|
|
132
|
-
* strategy: "linkedin",
|
|
133
242
|
* });
|
|
134
243
|
* ```
|
|
135
|
-
* <!--End PulumiCodeChooser -->
|
|
136
244
|
*
|
|
137
245
|
* ### GitHub Connection
|
|
138
246
|
*
|
|
139
|
-
* <!--Start PulumiCodeChooser -->
|
|
140
247
|
* ```typescript
|
|
141
248
|
* import * as pulumi from "@pulumi/pulumi";
|
|
142
249
|
* import * as auth0 from "@pulumi/auth0";
|
|
143
250
|
*
|
|
251
|
+
* // This is an example of an GitHub connection.
|
|
144
252
|
* const github = new auth0.Connection("github", {
|
|
253
|
+
* name: "GitHub-Connection",
|
|
254
|
+
* strategy: "github",
|
|
145
255
|
* options: {
|
|
146
256
|
* clientId: "<client-id>",
|
|
147
257
|
* clientSecret: "<client-secret>",
|
|
148
|
-
* nonPersistentAttrs: [
|
|
149
|
-
* "ethnicity",
|
|
150
|
-
* "gender",
|
|
151
|
-
* ],
|
|
152
258
|
* scopes: [
|
|
153
259
|
* "email",
|
|
154
260
|
* "profile",
|
|
@@ -156,177 +262,417 @@ const utilities = require("./utilities");
|
|
|
156
262
|
* "repo",
|
|
157
263
|
* ],
|
|
158
264
|
* setUserRootAttributes: "on_each_login",
|
|
265
|
+
* nonPersistentAttrs: [
|
|
266
|
+
* "ethnicity",
|
|
267
|
+
* "gender",
|
|
268
|
+
* ],
|
|
159
269
|
* },
|
|
160
|
-
* strategy: "github",
|
|
161
270
|
* });
|
|
162
271
|
* ```
|
|
163
|
-
* <!--End PulumiCodeChooser -->
|
|
164
272
|
*
|
|
165
273
|
* ### SalesForce Connection
|
|
166
274
|
*
|
|
167
|
-
* <!--Start PulumiCodeChooser -->
|
|
168
275
|
* ```typescript
|
|
169
276
|
* import * as pulumi from "@pulumi/pulumi";
|
|
170
277
|
* import * as auth0 from "@pulumi/auth0";
|
|
171
278
|
*
|
|
279
|
+
* // This is an example of an SalesForce connection.
|
|
172
280
|
* const salesforce = new auth0.Connection("salesforce", {
|
|
281
|
+
* name: "Salesforce-Connection",
|
|
282
|
+
* strategy: "salesforce",
|
|
173
283
|
* options: {
|
|
174
284
|
* clientId: "<client-id>",
|
|
175
285
|
* clientSecret: "<client-secret>",
|
|
176
286
|
* communityBaseUrl: "https://salesforce.example.com",
|
|
177
|
-
* nonPersistentAttrs: [
|
|
178
|
-
* "ethnicity",
|
|
179
|
-
* "gender",
|
|
180
|
-
* ],
|
|
181
287
|
* scopes: [
|
|
182
288
|
* "openid",
|
|
183
289
|
* "email",
|
|
184
290
|
* ],
|
|
185
291
|
* setUserRootAttributes: "on_first_login",
|
|
292
|
+
* nonPersistentAttrs: [
|
|
293
|
+
* "ethnicity",
|
|
294
|
+
* "gender",
|
|
295
|
+
* ],
|
|
186
296
|
* },
|
|
187
|
-
* strategy: "salesforce",
|
|
188
297
|
* });
|
|
189
298
|
* ```
|
|
190
|
-
* <!--End PulumiCodeChooser -->
|
|
191
299
|
*
|
|
192
300
|
* ### OAuth2 Connection
|
|
193
301
|
*
|
|
194
302
|
* Also applies to following connection strategies: `dropbox`, `bitbucket`, `paypal`, `twitter`, `amazon`, `yahoo`, `box`, `wordpress`, `shopify`, `custom`
|
|
195
303
|
*
|
|
196
|
-
* <!--Start PulumiCodeChooser -->
|
|
197
304
|
* ```typescript
|
|
198
305
|
* import * as pulumi from "@pulumi/pulumi";
|
|
199
306
|
* import * as auth0 from "@pulumi/auth0";
|
|
200
307
|
*
|
|
308
|
+
* // This is an example of an OAuth2 connection.
|
|
201
309
|
* const oauth2 = new auth0.Connection("oauth2", {
|
|
310
|
+
* name: "OAuth2-Connection",
|
|
311
|
+
* strategy: "oauth2",
|
|
202
312
|
* options: {
|
|
203
|
-
* authorizationEndpoint: "https://auth.example.com/oauth2/authorize",
|
|
204
313
|
* clientId: "<client-id>",
|
|
205
314
|
* clientSecret: "<client-secret>",
|
|
206
|
-
* iconUrl: "https://auth.example.com/assets/logo.png",
|
|
207
|
-
* nonPersistentAttrs: [
|
|
208
|
-
* "ethnicity",
|
|
209
|
-
* "gender",
|
|
210
|
-
* ],
|
|
211
|
-
* pkceEnabled: true,
|
|
212
315
|
* scopes: [
|
|
213
316
|
* "basic_profile",
|
|
214
317
|
* "profile",
|
|
215
318
|
* "email",
|
|
216
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",
|
|
217
324
|
* scripts: {
|
|
218
325
|
* fetchUserProfile: ` function fetchUserProfile(accessToken, context, callback) {
|
|
219
326
|
* return callback(new Error("Whoops!"));
|
|
220
327
|
* }
|
|
221
|
-
*
|
|
222
328
|
* `,
|
|
223
329
|
* },
|
|
224
330
|
* setUserRootAttributes: "on_each_login",
|
|
225
|
-
*
|
|
331
|
+
* nonPersistentAttrs: [
|
|
332
|
+
* "ethnicity",
|
|
333
|
+
* "gender",
|
|
334
|
+
* ],
|
|
226
335
|
* },
|
|
227
|
-
* strategy: "oauth2",
|
|
228
336
|
* });
|
|
229
337
|
* ```
|
|
230
|
-
* <!--End PulumiCodeChooser -->
|
|
231
338
|
*
|
|
232
|
-
* ###
|
|
339
|
+
* ### Active Directory (AD)
|
|
233
340
|
*
|
|
234
|
-
* > To be able to see this in the management dashboard as well, the name of the connection must be set to "sms".
|
|
235
|
-
*
|
|
236
|
-
* <!--Start PulumiCodeChooser -->
|
|
237
341
|
* ```typescript
|
|
238
342
|
* import * as pulumi from "@pulumi/pulumi";
|
|
239
343
|
* import * as auth0 from "@pulumi/auth0";
|
|
240
344
|
*
|
|
241
|
-
* const
|
|
242
|
-
*
|
|
345
|
+
* const ad = new auth0.Connection("ad", {
|
|
346
|
+
* name: "connection-active-directory",
|
|
347
|
+
* displayName: "Active Directory Connection",
|
|
348
|
+
* strategy: "ad",
|
|
349
|
+
* showAsButton: true,
|
|
243
350
|
* options: {
|
|
351
|
+
* disableSelfServiceChangePassword: true,
|
|
244
352
|
* bruteForceProtection: true,
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
*
|
|
259
|
-
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
*
|
|
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
|
+
* ],
|
|
264
423
|
* },
|
|
265
|
-
* strategy: "sms",
|
|
266
424
|
* });
|
|
267
425
|
* ```
|
|
268
|
-
* <!--End PulumiCodeChooser -->
|
|
269
426
|
*
|
|
270
427
|
* ### Email Connection
|
|
271
428
|
*
|
|
272
429
|
* > To be able to see this in the management dashboard as well, the name of the connection must be set to "email".
|
|
273
430
|
*
|
|
274
|
-
* <!--Start PulumiCodeChooser -->
|
|
275
431
|
* ```typescript
|
|
276
432
|
* import * as pulumi from "@pulumi/pulumi";
|
|
277
433
|
* import * as auth0 from "@pulumi/auth0";
|
|
278
434
|
*
|
|
279
|
-
*
|
|
435
|
+
* // This is an example of an Email connection.
|
|
436
|
+
* const passwordlessEmail = new auth0.Connection("passwordless_email", {
|
|
437
|
+
* strategy: "email",
|
|
438
|
+
* name: "email",
|
|
280
439
|
* options: {
|
|
281
|
-
* authParams: {
|
|
282
|
-
* responseType: "code",
|
|
283
|
-
* scope: "openid email profile offline_access",
|
|
284
|
-
* },
|
|
285
|
-
* bruteForceProtection: true,
|
|
286
|
-
* disableSignup: false,
|
|
287
|
-
* from: "{{ application.name }} <root@auth0.com>",
|
|
288
440
|
* name: "email",
|
|
289
|
-
*
|
|
290
|
-
* setUserRootAttributes: "on_each_login",
|
|
441
|
+
* from: "{{ application.name }} <root@auth0.com>",
|
|
291
442
|
* subject: "Welcome to {{ application.name }}",
|
|
292
443
|
* syntax: "liquid",
|
|
293
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
|
+
* },
|
|
294
453
|
* totp: {
|
|
295
|
-
* length: 6,
|
|
296
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",
|
|
297
535
|
* },
|
|
298
536
|
* },
|
|
299
|
-
* strategy: "email",
|
|
300
537
|
* });
|
|
301
538
|
* ```
|
|
302
|
-
* <!--End PulumiCodeChooser -->
|
|
303
539
|
*
|
|
304
540
|
* ### WindowsLive Connection
|
|
305
541
|
*
|
|
306
|
-
* <!--Start PulumiCodeChooser -->
|
|
307
542
|
* ```typescript
|
|
308
543
|
* import * as pulumi from "@pulumi/pulumi";
|
|
309
544
|
* import * as auth0 from "@pulumi/auth0";
|
|
310
545
|
*
|
|
546
|
+
* // This is an example of a WindowsLive connection.
|
|
311
547
|
* const windowslive = new auth0.Connection("windowslive", {
|
|
548
|
+
* name: "Windowslive-Connection",
|
|
549
|
+
* strategy: "windowslive",
|
|
312
550
|
* options: {
|
|
313
551
|
* clientId: "<client-id>",
|
|
314
552
|
* clientSecret: "<client-secret>",
|
|
553
|
+
* strategyVersion: 2,
|
|
554
|
+
* scopes: [
|
|
555
|
+
* "signin",
|
|
556
|
+
* "graph_user",
|
|
557
|
+
* ],
|
|
558
|
+
* setUserRootAttributes: "on_first_login",
|
|
315
559
|
* nonPersistentAttrs: [
|
|
316
560
|
* "ethnicity",
|
|
317
561
|
* "gender",
|
|
318
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",
|
|
319
592
|
* scopes: [
|
|
320
|
-
* "
|
|
321
|
-
* "
|
|
593
|
+
* "openid",
|
|
594
|
+
* "email",
|
|
322
595
|
* ],
|
|
323
596
|
* setUserRootAttributes: "on_first_login",
|
|
324
|
-
*
|
|
597
|
+
* nonPersistentAttrs: [
|
|
598
|
+
* "ethnicity",
|
|
599
|
+
* "gender",
|
|
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",
|
|
643
|
+
* scopes: [
|
|
644
|
+
* "openid",
|
|
645
|
+
* "email",
|
|
646
|
+
* ],
|
|
647
|
+
* setUserRootAttributes: "on_first_login",
|
|
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
|
+
* },
|
|
325
673
|
* },
|
|
326
|
-
* strategy: "windowslive",
|
|
327
674
|
* });
|
|
328
675
|
* ```
|
|
329
|
-
* <!--End PulumiCodeChooser -->
|
|
330
676
|
*
|
|
331
677
|
* ## Import
|
|
332
678
|
*
|