From 1a9dc2ff81e828fc56467efd2007049c9293e0ce Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Thu, 20 Mar 2025 12:44:48 +0100 Subject: [PATCH] feat: Add tsw-timetable-frontend client and update CSP --- terraform/keycloak.tf | 14 ++++++++++++++ terraform/variables.tf | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/terraform/keycloak.tf b/terraform/keycloak.tf index b3374cc..12135bf 100644 --- a/terraform/keycloak.tf +++ b/terraform/keycloak.tf @@ -27,6 +27,10 @@ resource "keycloak_realm" "twomartens_realm" { brute_force_detection { max_login_failures = 5 } + + headers { + content_security_policy = "frame-src 'self'; frame-ancestors 'self' http://localhost:4200; object-src 'none';" + } } default_signature_algorithm = "ES256" @@ -111,3 +115,13 @@ resource "keycloak_openid_client" "twomartens_nextcloud" { "https://cloud.2martens.de/*" ] } + +resource "keycloak_openid_client" "twomartens_timetable_frontend" { + realm_id = keycloak_realm.twomartens_realm.id + name = "Timetable Frontend" + enabled = true + access_type = "PUBLIC" + client_id = "tsw-timetable-frontend" + standard_flow_enabled = true + use_refresh_tokens = false +} \ No newline at end of file diff --git a/terraform/variables.tf b/terraform/variables.tf index b528cec..3954d3b 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -120,4 +120,4 @@ variable "nextcloud_client_secret" { description = "Client Secret of the Nextcloud OpenID client" type = string sensitive = true -} \ No newline at end of file +}