about summary refs log tree commit diff
path: root/ops/keycloak
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-12-27T14·33+0300
committertazjin <mail@tazj.in>2021-12-27T15·53+0000
commitfb7d45abc414c7b02e529b4b9e586dd986196d7b (patch)
treebd4226d4f944866037fb47c11cdc000328f0b143 /ops/keycloak
parent98be390576c4cd68f7bf879bcae2695a3b0917ba (diff)
feat(ops/keycloak): Import Gerrit OIDC client r/3472
This was previously configured in the UI.

Change-Id: Ib15b8ecca96d7814dc85d62199865b22bdb63f95
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4710
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'ops/keycloak')
-rw-r--r--ops/keycloak/main.tf21
1 files changed, 21 insertions, 0 deletions
diff --git a/ops/keycloak/main.tf b/ops/keycloak/main.tf
index f7dc0f27d1..90f3ca3610 100644
--- a/ops/keycloak/main.tf
+++ b/ops/keycloak/main.tf
@@ -85,3 +85,24 @@ resource "keycloak_openid_client" "grafana" {
     "https://status.tvl.su/*",
   ]
 }
+
+resource "keycloak_openid_client" "gerrit" {
+  realm_id                                 = keycloak_realm.tvl.id
+  client_id                                = "gerrit"
+  name                                     = "TVL Gerrit"
+  enabled                                  = true
+  access_type                              = "CONFIDENTIAL"
+  standard_flow_enabled                    = true
+  base_url                                 = "https://cl.tvl.fyi"
+  description                              = "TVL's code review tool"
+  direct_access_grants_enabled             = true
+  exclude_session_state_from_auth_response = false
+
+  valid_redirect_uris = [
+    "https://cl.tvl.fyi/*",
+  ]
+
+  web_origins = [
+    "https://cl.tvl.fyi",
+  ]
+}