Publish all managed application client credentials to the Keycloak collection
Update Kubernetes Services Wiki / Generate and Update K8s Wiki (push) Successful in 5s
Keycloak Terraform / Terraform (push) Successful in 19s

This commit is contained in:
Aleksandr Bogomiakov committed 2026-11-24 20:21:35 +02:00
1 parent 62480ceed7
commit 25284bb865
3 files changed
+12 -7

No files matched your search

+12 -5
View File
@@ -297,12 +297,19 @@ data "bitwarden_org_collection" "keycloak_apps" {
} }
} }
resource "bitwarden_item_login" "oauth2_app" { locals {
for_each = { for key, app in var.oauth2_applications : key => app if app.publish_to_vaultwarden } vaultwarden_clients = merge(keycloak_openid_client.oauth2_app, {
rsauth2-proxy = keycloak_openid_client.rsauth2_proxy
tsunagi-vector = keycloak_openid_client.tsunagi_vector
})
}
name = "keycloak/${each.key}" resource "bitwarden_item_login" "oauth2_app" {
username = keycloak_openid_client.oauth2_app[each.key].client_id for_each = local.vaultwarden_clients
password = keycloak_openid_client.oauth2_app[each.key].client_secret
name = "keycloak/${each.value.client_id}"
username = each.value.client_id
password = each.value.client_secret
organization_id = data.bitwarden_organization.homelab.id organization_id = data.bitwarden_organization.homelab.id
collection_ids = [data.bitwarden_org_collection.keycloak_apps.id] collection_ids = [data.bitwarden_org_collection.keycloak_apps.id]
} }
-1
View File
@@ -39,7 +39,6 @@ oauth2_applications = {
web_origins = ["https://repo.hexor.cy"] web_origins = ["https://repo.hexor.cy"]
post_logout_redirect_uris = ["https://repo.hexor.cy/login"] post_logout_redirect_uris = ["https://repo.hexor.cy/login"]
group_full_path = true group_full_path = true
publish_to_vaultwarden = true
} }
gitea = { gitea = {
redirect_uris = ["https://gt.hexor.cy/user/oauth2/Keycloak/callback"] redirect_uris = ["https://gt.hexor.cy/user/oauth2/Keycloak/callback"]
-1
View File
@@ -52,7 +52,6 @@ variable "oauth2_applications" {
extra_optional_scopes = optional(list(string), []) extra_optional_scopes = optional(list(string), [])
allowed_groups = optional(list(string), []) allowed_groups = optional(list(string), [])
group_full_path = optional(bool, false) group_full_path = optional(bool, false)
publish_to_vaultwarden = optional(bool, false)
access_token_lifespan = optional(string) # seconds; null keeps the realm default access_token_lifespan = optional(string) # seconds; null keeps the realm default
})) }))
default = {} default = {}