Skip to content

Commit 86edeed

Browse files
oarbusipierwillAgustinBettati
authored
doc: Change documentation for new attributes to support OIDC Identity providers (#1883)
* docs * mention feature is in preview * add oidc example * Update website/docs/d/federated_settings_identity_provider.html.markdown Co-authored-by: pierwill <[email protected]> * Update website/docs/d/federated_settings_identity_providers.html.markdown Co-authored-by: pierwill <[email protected]> * Update website/docs/guides/1.15.0-upgrade-guide.html.markdown Co-authored-by: pierwill <[email protected]> * Update website/docs/r/federated_settings_identity_provider.html.markdown Co-authored-by: pierwill <[email protected]> * Update website/docs/r/federated_settings_identity_provider.html.markdown Co-authored-by: pierwill <[email protected]> * Update website/docs/r/federated_settings_identity_provider.html.markdown Co-authored-by: pierwill <[email protected]> * Update website/docs/r/federated_settings_identity_provider.html.markdown Co-authored-by: pierwill <[email protected]> * Update website/docs/r/federated_settings_identity_provider.html.markdown Co-authored-by: pierwill <[email protected]> * Update website/docs/r/federated_settings_identity_provider.html.markdown Co-authored-by: Agustin Bettati <[email protected]> --------- Co-authored-by: pierwill <[email protected]> Co-authored-by: Agustin Bettati <[email protected]>
1 parent 2bcc0c5 commit 86edeed

5 files changed

+46
-11
lines changed

examples/mongodbatlas_federated_settings_org_role_mapping/main.tf

+15-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ resource "mongodbatlas_federated_settings_org_config" "org_connections_import" {
3838
post_auth_role_grants = ["ORG_MEMBER"]
3939
}
4040

41-
resource "mongodbatlas_federated_settings_identity_provider" "identity_provider" {
41+
resource "mongodbatlas_federated_settings_identity_provider" "saml_identity_provider" {
4242
federation_settings_id = data.mongodbatlas_federated_settings.federated_settings.id
4343
name = var.name
4444
associated_domains = ["yourdomain.com"]
@@ -48,4 +48,18 @@ resource "mongodbatlas_federated_settings_identity_provider" "identity_provider"
4848
issuer_uri = "http://www.okta.com/exk1f716hf7f750h8"
4949
request_binding = "HTTP-POST"
5050
response_signature_algorithm = "SHA-256"
51+
protocol = "SAML"
52+
}
53+
54+
resource "mongodbatlas_federated_settings_identity_provider" "oidc_identity_provider" {
55+
federation_settings_id = data.mongodbatlas_federated_settings.federated_settings.id
56+
name = var.name
57+
associated_domains = ["yourdomain.com"]
58+
issuer_uri = "http://www.okta.com/exk1f716hf7f750h8"
59+
client_id = "clientId"
60+
audience_claim = ["audience"]
61+
requested_scopes = ["profiles"]
62+
user_claim = "sub"
63+
groups_claim = "groups"
64+
protocol = "OIDC"
5165
}

website/docs/d/federated_settings_identity_provider.html.markdown

+8-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ description: |-
1010

1111
`mongodbatlas_federated_settings_identity_provider` provides a federated settings identity provider data source. Atlas federated settings identity provider provides federated settings outputs for the configured identity provider.
1212

13+
-> **NOTE:** OIDC Workforce IdP is currently in preview. To learn more about OIDC and existing limitations see the [OIDC Authentication Documentation](https://www.mongodb.com/docs/atlas/security-oidc/)
1314

1415
## Example Usage
1516

@@ -38,7 +39,7 @@ data "mongodbatlas_federated_settings_identity_provider" "identity_provider_ds"
3839
* `federation_settings_id` - (Required) Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
3940
* `identity_provider_id` - (Required) Unique 20-hexadecimal or 24-hexadecimal digit string that identifies the IdP.
4041

41-
**WARNING:** Starting at terraform provider 1.16.0 the allowed format for `identity_provider_id` will only be 24-hexadecimal digit string. See more [here](../guides/1.15.0-upgrade-guide.html.markdown)
42+
**WARNING:** Starting from terraform provider version 1.16.0, the only allowed format for `identity_provider_id` will be 24-hexadecimal digit string. See more [here](../guides/1.15.0-upgrade-guide.html.markdown)
4243

4344
## Attributes Reference
4445

@@ -55,6 +56,12 @@ In addition to all arguments above, the following attributes are exported:
5556
* `org_id` - Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
5657
* `post_auth_role_grants` - List that contains the default roles granted to users who authenticate through the IdP in a connected organization. If you provide a postAuthRoleGrants field in the request, the array that you provide replaces the current postAuthRoleGrants.
5758
* `idp_id` - Unique 24-hexadecimal digit string that identifies the IdP
59+
* `protocol` - The protocol of the identity provider. Either SAML or OIDC.
60+
* `audience_claim` - Identifier of the intended recipient of the token.
61+
* `client_id` - Client identifier that is assigned to an application by the Identity Provider.
62+
* `groups_claim` - Identifier of the claim which contains IdP Group IDs in the token.
63+
* `requested_scopes` - Scopes that MongoDB applications will request from the authorization endpoint.
64+
* `user_claim` - Identifier of the claim which contains the user ID in the token.
5865

5966
### Role_mappings
6067
* `external_group_name` - Unique human-readable label that identifies the identity provider group to which this role mapping applies.

website/docs/d/federated_settings_identity_providers.html.markdown

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ description: |-
1010

1111
`mongodbatlas_federated_settings_identity_providers` provides an Federated Settings Identity Providers datasource. Atlas Cloud Federated Settings Identity Providers provides federated settings outputs for the configured Identity Providers.
1212

13+
-> **NOTE:** OIDC Workforce IdP is currently in preview. To learn more about OIDC and existing limitations see the [OIDC Authentication Documentation](https://www.mongodb.com/docs/atlas/security-oidc/).
1314

1415
## Example Usage
1516

@@ -55,6 +56,11 @@ In addition to all arguments above, the following attributes are exported:
5556
* `post_auth_role_grants` - List that contains the default roles granted to users who authenticate through the IdP in a connected organization. If you provide a postAuthRoleGrants field in the request, the array that you provide replaces the current postAuthRoleGrants.
5657
* `protocol` - The protocol of the identity provider
5758
* `idp_id` - Unique 24-hexadecimal digit string that identifies the IdP
59+
* `audience_claim` - Identifier of the intended recipient of the token.
60+
* `client_id` - Client identifier that is assigned to an application by the Identity Provider.
61+
* `groups_claim` - Identifier of the claim which contains IdP Group IDs in the token.
62+
* `requested_scopes` - Scopes that MongoDB applications will request from the authorization endpoint.
63+
* `user_claim` - Identifier of the claim which contains the user ID in the token.
5864

5965
### Role_mappings
6066
* `external_group_name` - Unique human-readable label that identifies the identity provider group to which this role mapping applies.

website/docs/guides/1.15.0-upgrade-guide.html.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The Terraform MongoDB Atlas Provider version 1.15.0 has a number of new and exci
2020
- Removal of `page_num` and `items_per_page` attributes in `mongodbatlas_search_indexes` data source.
2121
- Format of IdP Id that uniquely identifies the identity provider when importing [`mongodbatlas_federated_settings_identity_provider`](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/resources/federated_settings_identity_provider) resource and [`mongodbatlas_federated_settings_identity_provider`](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/data-sources/federated_settings_identity_provider) data source now accepts a different format to align with the Atlas Admin API. Details and upgrade guide can be found below:
2222

23-
Both the current and new IdP Id format are accepted in terraform-provider 1.15.0 version. New features for `mongodbatlas_federated_settings_identity_provider` resource and data source will only be available when using the new Id format.
23+
Both the current and new IdP Id format are accepted in `terraform-provider` version 1.15.x. New features for `mongodbatlas_federated_settings_identity_provider` resource and data source will only be available when using the new Id format.
2424

2525
***WARNING:*** Old IdP Id format will no longer be accepted starting in terraform-provider 1.16.0 version and onwards. We recommend to update to the new format as soon as possible. A warning will appear if old Id is still being used. Follow the guide below to start using the new Id format.
2626

website/docs/r/federated_settings_identity_provider.html.markdown

+16-8
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ description: |-
99
# Resource: mongodbatlas_federated_settings_identity_provider
1010

1111
`mongodbatlas_federated_settings_identity_provider` provides an Atlas federated settings identity provider resource provides a subset of settings to be maintained post import of the existing resource.
12+
13+
-> **NOTE:** OIDC Workforce IdP is currently in preview. To learn more about OIDC and existing limitations see the [OIDC Authentication Documentation](https://www.mongodb.com/docs/atlas/security-oidc/).
1214
## Example Usage
1315

1416
~> **IMPORTANT** You **MUST** import this resource before you can manage it with this provider.
@@ -31,15 +33,21 @@ resource "mongodbatlas_federated_settings_identity_provider" "identity_provider"
3133

3234
* `federation_settings_id` - (Required) Unique 24-hexadecimal digit string that identifies the federated authentication configuration.
3335
* `name` - (Required) Human-readable label that identifies the identity provider.
34-
* `associated_domains` - (Required) List that contains the domains associated with the identity provider.
35-
* `sso_debug_enabled` - (Required) Flag that indicates whether the identity provider has SSO debug enabled.
36-
* `status`- (Required) String enum that indicates whether the identity provider is active or not. Accepted values are ACTIVE or INACTIVE.
37-
* `issuer_uri` - (Required) Unique string that identifies the issuer of the SAML
38-
* `sso_url` - (Required) Unique string that identifies the intended audience of the SAML assertion.
39-
* `request_binding` - (Required) SAML Authentication Request Protocol HTTP method binding (POST or REDIRECT) that Federated Authentication uses to send the authentication request. Atlas supports the following binding values:
36+
* `associated_domains` - List that contains the domains associated with the identity provider.
37+
* `sso_debug_enabled` - Flag that indicates whether the identity provider has SSO debug enabled.
38+
* `status`- String enum that indicates whether the identity provider is active or not. Accepted values are ACTIVE or INACTIVE.
39+
* `issuer_uri` - (Required) Unique string that identifies the issuer of the IdP.
40+
* `sso_url` - Unique string that identifies the intended audience of the SAML assertion.
41+
* `request_binding` - SAML Authentication Request Protocol HTTP method binding (`POST` or `REDIRECT`) that Federated Authentication uses to send the authentication request. Atlas supports the following binding values:
4042
- HTTP POST
4143
- HTTP REDIRECT
42-
* `response_signature_algorithm` - (Required) Signature algorithm that Federated Authentication uses to encrypt the identity provider signature. Valid values include SHA-1 and SHA-256.
44+
* `response_signature_algorithm` - Signature algorithm that Federated Authentication uses to encrypt the identity provider signature. Valid values include `SHA-1 `and `SHA-256`.
45+
* `protocol` - The protocol of the identity provider. Either `SAML` or `OIDC`.
46+
* `audience_claim` - Identifier of the intended recipient of the token.
47+
* `client_id` - Client identifier that is assigned to an application by the Identity Provider.
48+
* `groups_claim` - Identifier of the claim which contains IdP Group IDs in the token.
49+
* `requested_scopes` - Scopes that MongoDB applications will request from the authorization endpoint.
50+
* `user_claim` - Identifier of the claim which contains the user ID in the token.
4351

4452
## Attributes Reference
4553

@@ -59,6 +67,6 @@ Identity Provider **must** be imported before using federation_settings_id-idp_i
5967
$ terraform import mongodbatlas_federated_settings_identity_provider.identity_provider 6287a663c660f52b1c441c6c-0oad4fas87jL5Xnk1297
6068
```
6169

62-
**WARNING:** Starting from terraform provider version 1.16.0, to import Identity Provider, `id` a 24-hexadecimal digit string that identifies the IdP, will have to be used instead of `okta_idp_id`. See more [here](../guides/1.15.0-upgrade-guide.html.markdown)
70+
**WARNING:** Starting from terraform provider version 1.16.0, to import the resource a 24-hexadecimal digit string that identifies the IdP (`idp_id`) will have to be used instead of `okta_idp_id`. See more [here](../guides/1.15.0-upgrade-guide.html.markdown)
6371

6472
For more information see: [MongoDB Atlas API Reference.](https://www.mongodb.com/docs/atlas/reference/api/federation-configuration/)

0 commit comments

Comments
 (0)