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
End to end sso service principal creation with required settings
This should also provide outputs necessary to configure the identity provider from meshcloud's side
Copy file name to clipboardExpand all lines: README.md
+20-4Lines changed: 20 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -142,6 +142,19 @@ provide the SPN with access to the function.
142
142
]
143
143
```
144
144
145
+
## Single Sign On (SSO) Integration
146
+
147
+
>While this does not belong to a meshplatform, you can enable sso using this module. This is subject to change and sso can be moved out in the future.
148
+
149
+
To login to meshStack with Microsoft Entra ID, you can create an SSO service principal by adding the following inputs when calling this module:
150
+
151
+
```hcl
152
+
sso_enabled = true
153
+
154
+
# This is required as it will construct the redirect uri. A default has been added only so that it's not mandatory to setup sso (i.e. when sso_enabled = false)
155
+
sso_meshstack_idp_domain = "sso.<domain>"
156
+
```
157
+
145
158
## Contributing Guide
146
159
147
160
Before opening a Pull Request, please do the following:
@@ -205,9 +218,11 @@ Before opening a Pull Request, please do the following:
205
218
| <aname="input_replicator_enabled"></a> [replicator\_enabled](#input\_replicator\_enabled)| Whether to create replicator Service Principal or not. |`bool`|`true`| no |
206
219
| <aname="input_replicator_rg_enabled"></a> [replicator\_rg\_enabled](#input\_replicator\_rg\_enabled)| Whether the created replicator Service Principal should be usable for Azure Resource Group based replication. Implicitly enables replicator\_enabled if set to true. |`bool`|`false`| no |
207
220
| <aname="input_replicator_service_principal_name"></a> [replicator\_service\_principal\_name](#input\_replicator\_service\_principal\_name)| Service principal for managing subscriptions. Replicator is the name of the meshStack component. Name must be unique per Entra ID. |`string`|`"replicator"`| no |
208
-
| <aname="input_sso_enabled"></a> [sso\_enabled](#input\_sso\_enabled)| Whether to create SSO Service Principal or not. |`bool`|`true`| no |
209
-
| <aname="input_sso_meshstack_redirect_uri"></a> [sso\_meshstack\_redirect\_uri](#input\_sso\_meshstack\_redirect\_uri)| Redirect URI that was provided by meshcloud. It is individual per meshStack. |`string`|`"<replace with uri>"`| no |
210
-
| <aname="input_sso_service_principal_name"></a> [sso\_service\_principal\_name](#input\_sso\_service\_principal\_name)| Service principal for Entra ID SSO. Name must be unique per Entra ID. |`string`|`"sso"`| no |
221
+
| <aname="input_sso_app_role_assignment_required"></a> [sso\_app\_role\_assignment\_required](#input\_sso\_app\_role\_assignment\_required)| Whether all users can login using the created application (false), or only assigned users (true) |`bool`|`false`| no |
222
+
| <aname="input_sso_enabled"></a> [sso\_enabled](#input\_sso\_enabled)| Whether to create SSO Service Principal. This service principal is used to integrate meshStack identity provider with your own identity provider. |`bool`|`false`| no |
223
+
| <aname="input_sso_identity_provider_alias"></a> [sso\_identity\_provider\_alias](#input\_sso\_identity\_provider\_alias)| Identity provider alias. This value needs to be passed to meshcloud to configure the identity provider. |`string`|`"oidc"`| no |
224
+
| <aname="input_sso_meshstack_idp_domain"></a> [sso\_meshstack\_idp\_domain](#input\_sso\_meshstack\_idp\_domain)| meshStack identity provider domain that was provided by meshcloud. It is individual per meshStack. In most cases it is sso.<portal-domain> |`string`|`"replaceme"`| no |
225
+
| <aname="input_sso_service_principal_name"></a> [sso\_service\_principal\_name](#input\_sso\_service\_principal\_name)| Service principal for Entra ID SSO. Name must be unique per Entra ID. |`string`|`"meshcloud SSO"`| no |
211
226
| <aname="input_workload_identity_federation"></a> [workload\_identity\_federation](#input\_workload\_identity\_federation)| Enable workload identity federation by creating federated credentials for enterprise applications. Usually you'd receive the required settings when attempting to configure a platform with workload identity federation in meshStack. |`object({ issuer = string, replicator_subject = string, kraken_subject = string })`|`null`| no |
212
227
213
228
## Outputs
@@ -221,6 +236,7 @@ Before opening a Pull Request, please do the following:
221
236
| <aname="output_metering_service_principal_password"></a> [metering\_service\_principal\_password](#output\_metering\_service\_principal\_password)| Password for Metering Service Principal. |
222
237
| <aname="output_replicator_service_principal"></a> [replicator\_service\_principal](#output\_replicator\_service\_principal)| Replicator Service Principal. |
223
238
| <aname="output_replicator_service_principal_password"></a> [replicator\_service\_principal\_password](#output\_replicator\_service\_principal\_password)| Password for Replicator Service Principal. |
224
-
| <aname="output_sso_service_principal"></a> [sso\_service\_principal](#output\_sso\_service\_principal)| SSO Service Principal. |
| <aname="output_sso_service_principal_client_id"></a> [sso\_service\_principal\_client\_id](#output\_sso\_service\_principal\_client\_id)| SSO Service Principal. |
225
241
| <aname="output_sso_service_principal_password"></a> [sso\_service\_principal\_password](#output\_sso\_service\_principal\_password)| Password for SSO Service Principal. |
|[azuread_application_published_app_ids.well_known](https://registry.terraform.io/providers/hashicorp/azuread/2.46.0/docs/data-sources/application_published_app_ids)| data source |
28
27
|[azuread_application_template.enterprise_app](https://registry.terraform.io/providers/hashicorp/azuread/2.46.0/docs/data-sources/application_template)| data source |
28
+
|[azuread_client_config.current](https://registry.terraform.io/providers/hashicorp/azuread/2.46.0/docs/data-sources/client_config)| data source |
29
29
|[azuread_service_principal.msgraph](https://registry.terraform.io/providers/hashicorp/azuread/2.46.0/docs/data-sources/service_principal)| data source |
30
30
31
31
## Inputs
32
32
33
33
| Name | Description | Type | Default | Required |
| <aname="input_meshstack_redirect_uri"></a> [meshstack\_redirect\_uri](#input\_meshstack\_redirect\_uri)| Redirect URI that was provided by meshcloud. It is individual per meshStack. |`string`| n/a | yes |
36
-
| <aname="input_service_principal_name"></a> [service\_principal\_name](#input\_service\_principal\_name)| Service principal name. |`string`| n/a | yes |
35
+
| <aname="input_app_role_assignment_required"></a> [app\_role\_assignment\_required](#input\_app\_role\_assignment\_required)| Whether all users can login using the created application (false), or only assigned users (true) |`bool`|`false`| no |
36
+
| <aname="input_identity_provider_alias"></a> [identity\_provider\_alias](#input\_identity\_provider\_alias)| Identity provider alias. This value needs to be passed to meshcloud to configure the identity provider. |`string`|`"oidc"`| no |
37
+
| <aname="input_meshstack_idp_domain"></a> [meshstack\_idp\_domain](#input\_meshstack\_idp\_domain)| meshStack identity provider domain that was provided by meshcloud. It is individual per meshStack. In most cases it is sso.<portal-domain> |`string`| n/a | yes |
38
+
| <aname="input_service_principal_name"></a> [service\_principal\_name](#input\_service\_principal\_name)| Service principal for Entra ID SSO. Name must be unique per Entra ID. |`string`|`"meshcloud SSO"`| no |
37
39
38
40
## Outputs
39
41
40
42
| Name | Description |
41
43
|------|-------------|
42
-
| <aname="output_application_client_secret"></a> [application\_client\_secret](#output\_application\_client\_secret)| Password for the application registration. |
43
-
| <aname="output_credentials"></a> [credentials](#output\_credentials)| Service Principal application id and object id |
description="Service principal for Entra ID SSO. Name must be unique per Entra ID."
4
5
}
5
6
6
-
variable"meshstack_redirect_uri" {
7
+
variable"meshstack_idp_domain" {
7
8
type=string
8
-
description="Redirect URI that was provided by meshcloud. It is individual per meshStack."
9
+
description="meshStack identity provider domain that was provided by meshcloud. It is individual per meshStack. In most cases it is sso.<portal-domain>"
10
+
}
11
+
12
+
variable"identity_provider_alias" {
13
+
type=string
14
+
default="oidc"
15
+
description="Identity provider alias. This value needs to be passed to meshcloud to configure the identity provider."
16
+
}
17
+
18
+
variable"app_role_assignment_required" {
19
+
type=bool
20
+
default=false
21
+
description="Whether all users can login using the created application (false), or only assigned users (true)"
description="Names or UUIDs of the Management Groups that kraken should collect costs for."
38
38
}
39
39
40
+
# SSO inputs
41
+
40
42
variable"sso_enabled" {
41
43
type=bool
42
-
default=true
43
-
description="Whether to create SSO Service Principal or not."
44
+
default=false
45
+
description="Whether to create SSO Service Principal. This service principal is used to integrate meshStack identity provider with your own identity provider."
44
46
}
45
47
46
48
variable"sso_service_principal_name" {
47
49
type=string
48
-
default="sso"
50
+
default="meshcloud SSO"
49
51
description="Service principal for Entra ID SSO. Name must be unique per Entra ID."
50
52
}
51
53
52
-
variable"sso_meshstack_redirect_uri" {
54
+
variable"sso_meshstack_idp_domain" {
53
55
type=string
54
-
default="<replace with uri>"
55
-
description="Redirect URI that was provided by meshcloud. It is individual per meshStack."
56
+
default="replaceme"
57
+
description="meshStack identity provider domain that was provided by meshcloud. It is individual per meshStack. In most cases it is sso.<portal-domain>"
0 commit comments