From 3245216061cbc1f689671c00c0edbae6255aa335 Mon Sep 17 00:00:00 2001 From: Jim Martens Date: Sun, 2 Feb 2025 09:58:22 +0100 Subject: [PATCH] Add nextcloud client --- terraform/keycloak.tf | 18 ++++++++++++++++++ terraform/variables.tf | 6 ++++++ 2 files changed, 24 insertions(+) diff --git a/terraform/keycloak.tf b/terraform/keycloak.tf index 9a37533..ac0eea5 100644 --- a/terraform/keycloak.tf +++ b/terraform/keycloak.tf @@ -73,3 +73,21 @@ resource "keycloak_openid_client" "twomartens_gitea" { "https://git.2martens.de/user/oauth2/keycloak/callback" ] } + +resource "keycloak_openid_client" "twomartens_nextcloud" { + realm_id = keycloak_realm.twomartens_realm.id + name = "cloud.2martens.de" + enabled = true + access_type = "CONFIDENTIAL" + client_id = "nextcloud" + client_secret = var.nextcloud_client_secret + standard_flow_enabled = true + use_refresh_tokens = false + + + consent_required = true + base_url = "https://cloud.2martens.de" + valid_redirect_uris = [ + "https://cloud.2martens.de/index.php/apps/sociallogin/custom_oidc/keycloak" + ] +} diff --git a/terraform/variables.tf b/terraform/variables.tf index f722ba8..b528cec 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -114,4 +114,10 @@ variable "gitea_client_secret" { description = "Client Secret of the Gitea OpenID client" type = string sensitive = true +} + +variable "nextcloud_client_secret" { + description = "Client Secret of the Nextcloud OpenID client" + type = string + sensitive = true } \ No newline at end of file