Skip to content

Commit

Permalink
fix: Pomerium scope permissions and groups claim (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
lholota authored Aug 15, 2023
1 parent f2f9fcb commit 980c0ee
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions terraform/azuread-app-pomerium.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,37 @@ resource "azuread_application" "pomerium" {
}

resource_access {
id = azuread_service_principal.msgraph.app_role_ids["User.Read.All"]
type = "Role"
id = azuread_service_principal.msgraph.oauth2_permission_scope_ids["User.Read.All"]
type = "Scope"
}

resource_access {
id = azuread_service_principal.msgraph.app_role_ids["Group.Read.All"]
type = "Role"
id = azuread_service_principal.msgraph.oauth2_permission_scope_ids["Group.Read.All"]
type = "Scope"
}

resource_access {
id = azuread_service_principal.msgraph.app_role_ids["Directory.Read.All"]
type = "Role"
id = azuread_service_principal.msgraph.oauth2_permission_scope_ids["Directory.Read.All"]
type = "Scope"
}
}

optional_claims {
access_token {
name = "groups"
}

id_token {
name = "groups"
}

saml2_token {
name = "groups"
}
}

group_membership_claims = ["SecurityGroup", "ApplicationGroup"]

api {
requested_access_token_version = "2"
}
Expand Down

0 comments on commit 980c0ee

Please sign in to comment.