You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/resources/sso_settings.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,6 +114,8 @@ Optional:
114
114
-`login_attribute_path` (String) JMESPath expression to use for user login lookup from the user ID token. Only applicable to Generic OAuth.
115
115
-`name` (String) Helpful if you use more than one identity providers or SSO protocols.
116
116
-`name_attribute_path` (String) JMESPath expression to use for user name lookup from the user ID token. This name will be used as the user’s display name. Only applicable to Generic OAuth.
117
+
-`org_attribute_path` (String) JMESPath expression to use for the organization mapping lookup from the user ID token. The extracted list will be used for the organization mapping (to match "Organization" in the "org_mapping"). Only applicable to Generic OAuth and Okta.
118
+
-`org_mapping` (String) List of comma- or space-separated Organization:OrgIdOrOrgName:Role mappings. Organization can be * meaning “All users”. Role is optional and can have the following values: None, Viewer, Editor or Admin.
117
119
-`role_attribute_path` (String) JMESPath expression to use for Grafana role lookup.
118
120
-`role_attribute_strict` (Boolean) If enabled, denies user login if the Grafana role cannot be extracted using Role attribute path.
119
121
-`scopes` (String) List of comma- or space-separated OAuth2 scopes.
Copy file name to clipboardExpand all lines: internal/resources/grafana/resource_sso_settings.go
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -204,6 +204,16 @@ var oauth2SettingsSchema = &schema.Resource{
204
204
Optional: true,
205
205
Description: "Prevent synchronizing users’ organization roles from your IdP.",
206
206
},
207
+
"org_mapping": {
208
+
Type: schema.TypeString,
209
+
Optional: true,
210
+
Description: "List of comma- or space-separated Organization:OrgIdOrOrgName:Role mappings. Organization can be * meaning “All users”. Role is optional and can have the following values: None, Viewer, Editor or Admin.",
211
+
},
212
+
"org_attribute_path": {
213
+
Type: schema.TypeString,
214
+
Optional: true,
215
+
Description: `JMESPath expression to use for the organization mapping lookup from the user ID token. The extracted list will be used for the organization mapping (to match "Organization" in the "org_mapping"). Only applicable to Generic OAuth and Okta.`,
216
+
},
207
217
"define_allowed_groups": {
208
218
Type: schema.TypeBool,
209
219
Optional: true,
@@ -685,6 +695,7 @@ var validationsByProvider = map[string][]validateFunc{
685
695
ssoValidateNotEmpty("auth_url"),
686
696
ssoValidateNotEmpty("token_url"),
687
697
ssoValidateEmpty("api_url"),
698
+
ssoValidateEmpty("org_attribute_path"),
688
699
ssoValidateURL("auth_url"),
689
700
ssoValidateURL("token_url"),
690
701
},
@@ -695,6 +706,7 @@ var validationsByProvider = map[string][]validateFunc{
0 commit comments