ce7cb702218693d08ea6d83464d2457c9250027c
This commit is contained in:
commit
34c5f8963c
1 changed files with 145336 additions and 0 deletions
47
terraform/internal/zitadel/frigate.tf
Normal file
47
terraform/internal/zitadel/frigate.tf
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
locals {
|
||||
frigate_oauth2_proxy_redirect_uri = "${trim(var.frigate_base_url, "/")}/oauth2/callback"
|
||||
|
||||
frigate_zitadel_roles = {
|
||||
frigate_viewer = {
|
||||
display_name = "Frigate viewer"
|
||||
group = "Frigate"
|
||||
}
|
||||
frigate_admin = {
|
||||
display_name = "Frigate administrator"
|
||||
group = "Frigate"
|
||||
}
|
||||
}
|
||||
|
||||
frigate_zitadel_role_keys = keys(local.frigate_zitadel_roles)
|
||||
}
|
||||
|
||||
resource "zitadel_project_role" "frigate" {
|
||||
for_each = local.frigate_zitadel_roles
|
||||
|
||||
org_id = zitadel_org.primary.id
|
||||
project_id = zitadel_project.services.id
|
||||
role_key = each.key
|
||||
display_name = each.value.display_name
|
||||
group = each.value.group
|
||||
}
|
||||
|
||||
resource "zitadel_application_oidc" "frigate" {
|
||||
org_id = zitadel_org.primary.id
|
||||
project_id = zitadel_project.services.id
|
||||
name = "Frigate"
|
||||
redirect_uris = [local.frigate_oauth2_proxy_redirect_uri]
|
||||
response_types = ["OIDC_RESPONSE_TYPE_CODE"]
|
||||
grant_types = ["OIDC_GRANT_TYPE_AUTHORIZATION_CODE", "OIDC_GRANT_TYPE_REFRESH_TOKEN"]
|
||||
post_logout_redirect_uris = [trim(var.frigate_base_url, "/")]
|
||||
app_type = "OIDC_APP_TYPE_WEB"
|
||||
auth_method_type = "OIDC_AUTH_METHOD_TYPE_BASIC"
|
||||
version = "OIDC_VERSION_1_0"
|
||||
clock_skew = "0s"
|
||||
dev_mode = false
|
||||
access_token_type = "OIDC_TOKEN_TYPE_BEARER"
|
||||
access_token_role_assertion = false
|
||||
id_token_role_assertion = true
|
||||
id_token_userinfo_assertion = true
|
||||
additional_origins = []
|
||||
skip_native_app_success_page = false
|
||||
}
|
||||
Loading…
Reference in a new issue