From 811ad238012b58b80d6cb86acb2d45b56f0fead1 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Sat, 26 Jul 2025 14:05:09 +0200 Subject: [PATCH] fix: Add authorization support to wahlrecht backend client --- terraform/keycloak.tf | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/terraform/keycloak.tf b/terraform/keycloak.tf index 038cec4..0292113 100644 --- a/terraform/keycloak.tf +++ b/terraform/keycloak.tf @@ -172,14 +172,19 @@ resource "keycloak_openid_client" "twomartens_wahlrecht_frontend" { } resource "keycloak_openid_client" "twomartens_wahlrecht_backend" { - realm_id = keycloak_realm.twomartens_realm.id - name = "Wahlrecht Backend" - enabled = true - access_type = "CONFIDENTIAL" - client_id = "wahlrecht" - standard_flow_enabled = true - use_refresh_tokens = false - full_scope_allowed = false + realm_id = keycloak_realm.twomartens_realm.id + name = "Wahlrecht Backend" + enabled = true + access_type = "CONFIDENTIAL" + client_id = "wahlrecht" + standard_flow_enabled = true + service_accounts_enabled = true + use_refresh_tokens = false + full_scope_allowed = false + + authorization { + policy_enforcement_mode = "ENFORCING" + } valid_redirect_uris = [ "http://localhost:12000/*",