Skip to content

Commit 08a1e4b

Browse files
Terraform Team Automationvarakali
authored andcommitted
Added - Support for Implicit JIT and Group Membership Support in OIDC Flow
1 parent 2432b37 commit 08a1e4b

18 files changed

+6223
-31
lines changed

examples/identity_domains/identity_provider.tf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,10 @@ variable "identity_provider_urnietfparamsscimschemasoracleidcsextensionsocial_id
213213
default = "authzUrl"
214214
}
215215

216+
variable "identity_provider_urnietfparamsscimschemasoracleidcsextensionsocial_identity_provider_auto_redirect_enabled" {
217+
default = false
218+
}
219+
216220
variable "identity_provider_urnietfparamsscimschemasoracleidcsextensionsocial_identity_provider_client_credential_in_payload" {
217221
default = false
218222
}
@@ -237,6 +241,18 @@ variable "identity_provider_urnietfparamsscimschemasoracleidcsextensionsocial_id
237241
default = "idAttribute"
238242
}
239243

244+
variable "identity_provider_urnietfparamsscimschemasoracleidcsextensionsocial_identity_provider_jit_prov_assigned_groups_value" {
245+
default = "value"
246+
}
247+
248+
variable "identity_provider_urnietfparamsscimschemasoracleidcsextensionsocial_identity_provider_jit_prov_group_static_list_enabled" {
249+
default = false
250+
}
251+
252+
variable "identity_provider_urnietfparamsscimschemasoracleidcsextensionsocial_identity_provider_social_jit_provisioning_enabled" {
253+
default = false
254+
}
255+
240256
variable "identity_provider_urnietfparamsscimschemasoracleidcsextensionsocial_identity_provider_profile_url" {
241257
default = "profileUrl"
242258
}
@@ -416,10 +432,13 @@ resource "oci_identity_domains_identity_provider" "test_identity_provider" {
416432
access_token_url = var.identity_provider_urnietfparamsscimschemasoracleidcsextensionsocial_identity_provider_access_token_url
417433
admin_scope = var.identity_provider_urnietfparamsscimschemasoracleidcsextensionsocial_identity_provider_admin_scope
418434
authz_url = var.identity_provider_urnietfparamsscimschemasoracleidcsextensionsocial_identity_provider_authz_url
435+
auto_redirect_enabled = var.identity_provider_urnietfparamsscimschemasoracleidcsextensionsocial_identity_provider_auto_redirect_enabled
419436
client_credential_in_payload = var.identity_provider_urnietfparamsscimschemasoracleidcsextensionsocial_identity_provider_client_credential_in_payload
420437
clock_skew_in_seconds = var.identity_provider_urnietfparamsscimschemasoracleidcsextensionsocial_identity_provider_clock_skew_in_seconds
421438
discovery_url = var.identity_provider_urnietfparamsscimschemasoracleidcsextensionsocial_identity_provider_discovery_url
422439
id_attribute = var.identity_provider_urnietfparamsscimschemasoracleidcsextensionsocial_identity_provider_id_attribute
440+
jit_prov_group_static_list_enabled = var.identity_provider_urnietfparamsscimschemasoracleidcsextensionsocial_identity_provider_jit_prov_group_static_list_enabled
441+
social_jit_provisioning_enabled = var.identity_provider_urnietfparamsscimschemasoracleidcsextensionsocial_identity_provider_social_jit_provisioning_enabled
423442
profile_url = var.identity_provider_urnietfparamsscimschemasoracleidcsextensionsocial_identity_provider_profile_url
424443
redirect_url = var.identity_provider_urnietfparamsscimschemasoracleidcsextensionsocial_identity_provider_redirect_url
425444
scope = var.identity_provider_urnietfparamsscimschemasoracleidcsextensionsocial_identity_provider_scope
Lines changed: 322 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,322 @@
1+
// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
2+
// Licensed under the Mozilla Public License v2.0
3+
4+
variable "social_identity_provider_social_identity_provider_count" {
5+
default = 10
6+
}
7+
8+
variable "social_identity_provider_social_identity_provider_filter" {
9+
default = "socialIdentityProviderFilter"
10+
}
11+
12+
variable "social_identity_provider_access_token_url" {
13+
default = "https://something1.com/token"
14+
}
15+
16+
variable "social_identity_provider_account_linking_enabled" {
17+
default = false
18+
}
19+
20+
variable "social_identity_provider_admin_scope" {
21+
default = []
22+
}
23+
24+
variable "social_identity_provider_authorization" {
25+
default = "authorization"
26+
}
27+
28+
variable "social_identity_provider_authz_url" {
29+
default = "https://something1.com"
30+
}
31+
32+
variable "social_identity_provider_auto_redirect_enabled" {
33+
default = false
34+
}
35+
36+
variable "social_identity_provider_client_credential_in_payload" {
37+
default = false
38+
}
39+
40+
variable "social_identity_provider_clock_skew_in_seconds" {
41+
default = 10
42+
}
43+
44+
variable "social_identity_provider_compartment_ocid" {
45+
default = "compartmentOcid"
46+
}
47+
48+
variable "social_identity_provider_consumer_key" {
49+
default = "consumerKey"
50+
}
51+
52+
variable "social_identity_provider_consumer_secret" {
53+
default = "consumerSecret"
54+
}
55+
56+
variable "social_identity_provider_delete_in_progress" {
57+
default = false
58+
}
59+
60+
variable "social_identity_provider_description" {
61+
default = "description"
62+
}
63+
64+
# variable "social_identity_provider_discovery_url" {
65+
# default = "discoveryUrl"
66+
# }
67+
68+
variable "social_identity_provider_domain_ocid" {
69+
default = "domainOcid"
70+
}
71+
72+
variable "social_identity_provider_enabled" {
73+
default = false
74+
}
75+
76+
# variable "social_identity_provider_icon_url" {
77+
# default = "iconUrl"
78+
# }
79+
80+
variable "social_identity_provider_id" {
81+
default = "id"
82+
}
83+
84+
variable "social_identity_provider_id_attribute" {
85+
default = "idAttribute"
86+
}
87+
88+
variable "social_identity_provider_idcs_created_by__ref" {
89+
default = "ref"
90+
}
91+
92+
variable "social_identity_provider_idcs_created_by_display" {
93+
default = "display"
94+
}
95+
96+
variable "social_identity_provider_idcs_created_by_ocid" {
97+
default = "ocid"
98+
}
99+
100+
variable "social_identity_provider_idcs_created_by_type" {
101+
default = "User"
102+
}
103+
104+
variable "social_identity_provider_idcs_created_by_value" {
105+
default = "value"
106+
}
107+
108+
variable "social_identity_provider_idcs_endpoint" {
109+
default = "idcsEndpoint"
110+
}
111+
112+
variable "social_identity_provider_idcs_last_modified_by_ref" {
113+
default = "ref"
114+
}
115+
116+
variable "social_identity_provider_idcs_last_modified_by_display" {
117+
default = "display"
118+
}
119+
120+
variable "social_identity_provider_idcs_last_modified_by_ocid" {
121+
default = "ocid"
122+
}
123+
124+
variable "social_identity_provider_idcs_last_modified_by_type" {
125+
default = "User"
126+
}
127+
128+
variable "social_identity_provider_idcs_last_modified_by_value" {
129+
default = "value"
130+
}
131+
132+
variable "social_identity_provider_idcs_last_upgraded_in_release" {
133+
default = "idcsLastUpgradedInRelease"
134+
}
135+
136+
variable "social_identity_provider_idcs_prevented_operations" {
137+
default = []
138+
}
139+
140+
variable "social_identity_provider_jit_prov_assigned_groups_ref" {
141+
default = "ref"
142+
}
143+
144+
variable "social_identity_provider_jit_prov_assigned_groups_display" {
145+
default = "display"
146+
}
147+
148+
variable "social_identity_provider_jit_prov_assigned_groups_value" {
149+
default = "value"
150+
}
151+
152+
variable "social_identity_provider_jit_prov_group_static_list_enabled" {
153+
default = false
154+
}
155+
156+
variable "social_identity_provider_meta_created" {
157+
default = "created"
158+
}
159+
160+
variable "social_identity_provider_meta_last_modified" {
161+
default = "lastModified"
162+
}
163+
164+
variable "social_identity_provider_meta_location" {
165+
default = "location"
166+
}
167+
168+
variable "social_identity_provider_meta_resource_type" {
169+
default = "resourceType"
170+
}
171+
172+
variable "social_identity_provider_meta_version" {
173+
default = "version"
174+
}
175+
176+
variable "social_identity_provider_name" {
177+
default = "name"
178+
}
179+
180+
variable "social_identity_provider_ocid" {
181+
default = "ocid"
182+
}
183+
184+
variable "social_identity_provider_profile_url" {
185+
default = "https://something.com/profileUrl1.png"
186+
}
187+
188+
variable "social_identity_provider_redirect_url" {
189+
default = "https://redirectUrl1.com"
190+
}
191+
192+
variable "social_identity_provider_refresh_token_url" {
193+
default = "https://refreshTokenUrl1.com"
194+
}
195+
196+
variable "social_identity_provider_registration_enabled" {
197+
default = false
198+
}
199+
200+
variable "social_identity_provider_relay_idp_param_mappings_relay_param_key" {
201+
default = "relayParamKey"
202+
}
203+
204+
variable "social_identity_provider_relay_idp_param_mappings_relay_param_value" {
205+
default = "relayParamValue"
206+
}
207+
208+
209+
variable "social_identity_provider_schemas" {
210+
default = []
211+
}
212+
213+
variable "social_identity_provider_scope" {
214+
default = []
215+
}
216+
217+
variable "social_identity_provider_service_provider_name" {
218+
default = "Google"
219+
}
220+
221+
variable "social_identity_provider_show_on_login" {
222+
default = false
223+
}
224+
225+
variable "social_identity_provider_social_jit_provisioning_enabled" {
226+
default = false
227+
}
228+
229+
variable "social_identity_provider_start_index" {
230+
default = 1
231+
}
232+
233+
variable "social_identity_provider_status" {
234+
default = "created"
235+
}
236+
237+
variable "social_identity_provider_tags_key" {
238+
default = "key"
239+
}
240+
241+
variable "social_identity_provider_tags_value" {
242+
default = "value"
243+
}
244+
245+
variable "social_identity_provider_tenancy_ocid" {
246+
default = "tenancyOcid"
247+
}
248+
249+
250+
251+
# provider "oci" {
252+
# tenancy_ocid = var.tenancy_ocid
253+
# user_ocid = var.user_ocid
254+
# fingerprint = var.fingerprint
255+
# private_key_path = var.private_key_path
256+
# region = var.region
257+
# }
258+
259+
resource "oci_identity_domains_social_identity_provider" "test_social_identity_provider" {
260+
#Required
261+
account_linking_enabled = var.social_identity_provider_account_linking_enabled
262+
consumer_key = var.social_identity_provider_consumer_key
263+
consumer_secret = var.social_identity_provider_consumer_secret
264+
enabled = var.social_identity_provider_enabled
265+
idcs_endpoint = data.oci_identity_domain.test_domain.url
266+
name = var.social_identity_provider_name
267+
registration_enabled = var.social_identity_provider_registration_enabled
268+
schemas = ["urn:ietf:params:scim:schemas:oracle:idcs:SocialIdentityProvider"]
269+
service_provider_name = var.social_identity_provider_service_provider_name
270+
show_on_login = var.social_identity_provider_show_on_login
271+
272+
#Optional
273+
access_token_url = var.social_identity_provider_access_token_url
274+
admin_scope = var.social_identity_provider_admin_scope
275+
authorization = var.social_identity_provider_authorization
276+
authz_url = var.social_identity_provider_authz_url
277+
auto_redirect_enabled = var.social_identity_provider_auto_redirect_enabled
278+
client_credential_in_payload = var.social_identity_provider_client_credential_in_payload
279+
clock_skew_in_seconds = var.social_identity_provider_clock_skew_in_seconds
280+
description = var.social_identity_provider_description
281+
# discovery_url = var.social_identity_provider_discovery_url
282+
# icon_url = var.social_identity_provider_icon_url
283+
id_attribute = var.social_identity_provider_id_attribute
284+
# jit_prov_assigned_groups {
285+
# #Required
286+
# value = var.social_identity_provider_jit_prov_assigned_groups_value
287+
# }
288+
jit_prov_group_static_list_enabled = var.social_identity_provider_jit_prov_group_static_list_enabled
289+
ocid = var.social_identity_provider_ocid
290+
profile_url = var.social_identity_provider_profile_url
291+
redirect_url = var.social_identity_provider_redirect_url
292+
refresh_token_url = var.social_identity_provider_refresh_token_url
293+
relay_idp_param_mappings {
294+
#Required
295+
relay_param_key = var.social_identity_provider_relay_idp_param_mappings_relay_param_key
296+
297+
#Optional
298+
relay_param_value = var.social_identity_provider_relay_idp_param_mappings_relay_param_value
299+
}
300+
#resource_type_schema_version = var.social_identity_provider_resource_type_schema_version
301+
scope = var.social_identity_provider_scope
302+
social_jit_provisioning_enabled = var.social_identity_provider_social_jit_provisioning_enabled
303+
status = var.social_identity_provider_status
304+
tags {
305+
#Required
306+
key = var.social_identity_provider_tags_key
307+
value = var.social_identity_provider_tags_value
308+
}
309+
}
310+
311+
data "oci_identity_domains_social_identity_providers" "test_social_identity_providers" {
312+
#Required
313+
idcs_endpoint = data.oci_identity_domain.test_domain.url
314+
315+
#Optional
316+
social_identity_provider_count = var.social_identity_provider_social_identity_provider_count
317+
#social_identity_provider_filter = var.social_identity_provider_social_identity_provider_filter
318+
social_identity_provider_filter = ""
319+
authorization = var.social_identity_provider_authorization
320+
# resource_type_schema_version = var.social_identity_provider_resource_type_schema_version
321+
start_index = var.social_identity_provider_start_index
322+
}

0 commit comments

Comments
 (0)