Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra attributes saml support #21624

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/13183.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
iam: added `AZURE_AD_GROUPS_ID` field to `google_iam_workforce_pool_provider.extra_attributes_oauth2_client.attributes_type` resource
```
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,20 @@ supported with SAML and OIDC protocol.`,
"attributes_type": {
Type: schema.TypeString,
Required: true,
ValidateFunc: verify.ValidateEnum([]string{"AZURE_AD_GROUPS_MAIL"}),
ValidateFunc: verify.ValidateEnum([]string{"AZURE_AD_GROUPS_MAIL", "AZURE_AD_GROUPS_ID"}),
Description: `Represents the IdP and type of claims that should be fetched.
* AZURE_AD_GROUPS_MAIL: Used to get the user's group claims from the Azure AD identity provider using configuration provided
in ExtraAttributesOAuth2Client and 'mail' property of the 'microsoft.graph.group' object is used for claim mapping.
See https://learn.microsoft.com/en-us/graph/api/resources/group?view=graph-rest-1.0#properties for more details on
'microsoft.graph.group' properties. The attributes obtained from idntity provider are mapped to 'assertion.groups'. Possible values: ["AZURE_AD_GROUPS_MAIL"]`,
'microsoft.graph.group' properties. The attributes obtained from idntity provider are mapped to 'assertion.groups'.
* AZURE_AD_GROUPS_ID: Used to get the user's group claims from the Azure AD identity provider
using configuration provided in ExtraAttributesOAuth2Client and 'id'
property of the 'microsoft.graph.group' object is used for claim mapping. See
https://learn.microsoft.com/en-us/graph/api/resources/group?view=graph-rest-1.0#properties
for more details on 'microsoft.graph.group' properties. The
group IDs obtained from Azure AD are present in 'assertion.groups' for
OIDC providers and 'assertion.attributes.groups' for SAML providers for
attribute mapping. Possible values: ["AZURE_AD_GROUPS_MAIL", "AZURE_AD_GROUPS_ID"]`,
},
"client_id": {
Type: schema.TypeString,
Expand Down Expand Up @@ -264,9 +272,9 @@ See https://learn.microsoft.com/en-us/graph/api/resources/group?view=graph-rest-
"filter": {
Type: schema.TypeString,
Optional: true,
Description: `The filter used to request specific records from IdP. In case of attributes type as AZURE_AD_GROUPS_MAIL, it represents the
Description: `The filter used to request specific records from IdP. In case of attributes type as AZURE_AD_GROUPS_MAIL and AZURE_AD_GROUPS_ID, it represents the
filter used to request specific groups for users from IdP. By default, all of the groups associated with the user are fetched. The
groups should be mail enabled and security enabled. See https://learn.microsoft.com/en-us/graph/search-query-parameter for more details.`,
groups should be security enabled. See https://learn.microsoft.com/en-us/graph/search-query-parameter for more details.`,
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ resource "google_iam_workforce_pool_provider" "example" {
plain_text = "client-secret"
}
}
attributes_type = "AZURE_AD_GROUPS_MAIL"
attributes_type = "AZURE_AD_GROUPS_ID"
query_parameters {
filter = "mail:gcp"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ resource "google_iam_workforce_pool_provider" "my_provider" {
plain_text = "new-client-secret"
}
}
attributes_type = "AZURE_AD_GROUPS_MAIL"
attributes_type = "AZURE_AD_GROUPS_ID"
query_parameters {
filter = "displayName:gcp"
}
Expand Down
16 changes: 12 additions & 4 deletions website/docs/r/iam_workforce_pool_provider.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ resource "google_iam_workforce_pool_provider" "example" {
plain_text = "client-secret"
}
}
attributes_type = "AZURE_AD_GROUPS_MAIL"
attributes_type = "AZURE_AD_GROUPS_ID"
query_parameters {
filter = "mail:gcp"
}
Expand Down Expand Up @@ -517,7 +517,15 @@ The following arguments are supported:
in ExtraAttributesOAuth2Client and `mail` property of the `microsoft.graph.group` object is used for claim mapping.
See https://learn.microsoft.com/en-us/graph/api/resources/group?view=graph-rest-1.0#properties for more details on
`microsoft.graph.group` properties. The attributes obtained from idntity provider are mapped to `assertion.groups`.
Possible values are: `AZURE_AD_GROUPS_MAIL`.
* AZURE_AD_GROUPS_ID: Used to get the user's group claims from the Azure AD identity provider
using configuration provided in ExtraAttributesOAuth2Client and `id`
property of the `microsoft.graph.group` object is used for claim mapping. See
https://learn.microsoft.com/en-us/graph/api/resources/group?view=graph-rest-1.0#properties
for more details on `microsoft.graph.group` properties. The
group IDs obtained from Azure AD are present in `assertion.groups` for
OIDC providers and `assertion.attributes.groups` for SAML providers for
attribute mapping.
Possible values are: `AZURE_AD_GROUPS_MAIL`, `AZURE_AD_GROUPS_ID`.

* `query_parameters` -
(Optional)
Expand Down Expand Up @@ -547,9 +555,9 @@ The following arguments are supported:

* `filter` -
(Optional)
The filter used to request specific records from IdP. In case of attributes type as AZURE_AD_GROUPS_MAIL, it represents the
The filter used to request specific records from IdP. In case of attributes type as AZURE_AD_GROUPS_MAIL and AZURE_AD_GROUPS_ID, it represents the
filter used to request specific groups for users from IdP. By default, all of the groups associated with the user are fetched. The
groups should be mail enabled and security enabled. See https://learn.microsoft.com/en-us/graph/search-query-parameter for more details.
groups should be security enabled. See https://learn.microsoft.com/en-us/graph/search-query-parameter for more details.

## Attributes Reference

Expand Down