Skip to content

Commit

Permalink
✨ Add Entra ID Auth0 connections (#2351)
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Woffenden <[email protected]>
  • Loading branch information
Jacob Woffenden authored Nov 14, 2023
1 parent d055310 commit c1558ad
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
resource "auth0_connection" "justiceuk_data_platform_auth0_ministryofjustice_development" {
name = "justiceuk-data-platform-auth0-ministryofjustice-development"
display_name = "Ministry of Justice"
strategy = "waad"

show_as_button = true

options {
identity_api = "microsoft-identity-platform-v2.0"
domain = "justiceuk.onmicrosoft.com"
tenant_domain = "justiceuk.onmicrosoft.com"
client_id = data.aws_secretsmanager_secret_version.entra_id_client_id.secret_string
client_secret = data.aws_secretsmanager_secret_version.entra_id_client_secret.secret_string
set_user_root_attributes = "on_each_login"
should_trust_email_verified_connection = "always_set_emails_as_verified"
waad_protocol = "openid-connect"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,15 @@ data "aws_secretsmanager_secret_version" "auth0_client_secret" {

secret_id = "auth0/ministryofjustice-data-platform-development/client-secret"
}

data "aws_secretsmanager_secret_version" "entra_id_client_id" {
provider = aws.analytical-platform-management-production

secret_id = "auth0/ministryofjustice-data-platform-development/entra-id/client-id"
}

data "aws_secretsmanager_secret_version" "entra_id_client_secret" {
provider = aws.analytical-platform-management-production

secret_id = "auth0/ministryofjustice-data-platform-development/entra-id/client-secret"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
resource "auth0_connection" "justiceuk_data_platform_auth0_ministryofjustice_production" {
name = "justiceuk-data-platform-auth0-ministryofjustice-production"
display_name = "Ministry of Justice"
strategy = "waad"

show_as_button = true

options {
identity_api = "microsoft-identity-platform-v2.0"
domain = "justiceuk.onmicrosoft.com"
tenant_domain = "justiceuk.onmicrosoft.com"
client_id = data.aws_secretsmanager_secret_version.entra_id_client_id.secret_string
client_secret = data.aws_secretsmanager_secret_version.entra_id_client_secret.secret_string
set_user_root_attributes = "on_each_login"
should_trust_email_verified_connection = "always_set_emails_as_verified"
waad_protocol = "openid-connect"
}
}
12 changes: 12 additions & 0 deletions terraform/auth0/ministryofjustice-data-platform/data.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,15 @@ data "aws_secretsmanager_secret_version" "auth0_client_secret" {

secret_id = "auth0/ministryofjustice-data-platform/client-secret"
}

data "aws_secretsmanager_secret_version" "entra_id_client_id" {
provider = aws.analytical-platform-management-production

secret_id = "auth0/ministryofjustice-data-platform/entra-id/client-id"
}

data "aws_secretsmanager_secret_version" "entra_id_client_secret" {
provider = aws.analytical-platform-management-production

secret_id = "auth0/ministryofjustice-data-platform/entra-id/client-secret"
}

0 comments on commit c1558ad

Please sign in to comment.