Kevin Veen-Birkenbach eb781dbf8b
fix(keycloak/ldap): make userObjectClasses JSON-safe and exclude posixAccount
- Render userObjectClasses via `tojson` (and trim) to avoid invalid control
  characters and ensure valid realm import parsing.
- Introduce KEYCLOAK_LDAP_USER_OBJECT_CLASSES in vars; exclude `posixAccount`
  for Keycloak’s LDAP config while keeping it for Ansible-managed UNIX users.
- Update UserStorageProvider template to use the new variable.

Rationale:
Keycloak must not require `posixAccount` on every LDAP user. We keep
`posixAccount` structural for Ansible provisioning, but filter it out for
Keycloak to prevent sync/import errors on entries without POSIX attributes.

Touched:
- roles/web-app-keycloak/templates/import/components/org.keycloak.storage.UserStorageProvider.json.j2
- roles/web-app-keycloak/vars/main.yml

Refs: conversation https://chatgpt.com/share/68aa1ef0-3658-800f-bdf4-5b57131d03b4
2025-08-23 22:05:26 +02:00
..
2025-07-09 02:26:50 +02:00
2025-07-15 17:10:32 +02:00

Keycloak

Description

Step into a secure future with Keycloak! This opensource identity and access management solution offers powerful single sign-on (SSO), multi-factor authentication, and user federation capabilities. With support for industry standards such as SAML and OpenID Connect, Keycloak helps you protect and streamline access to your applications.

Overview

This role deploys Keycloak in a Docker environment, integrating it with a PostgreSQL database and enabling operation behind a reverse proxy such as NGINX. It manages container orchestration and configuration via Docker Compose and environment variable templates, ensuring a secure and scalable identity management solution.

Features

  • Comprehensive Identity Management: Manage users, roles, and permissions across your applications with robust SSO and user federation.
  • Advanced Security Options: Benefit from multi-factor authentication, configurable password policies, and secure session management.
  • Standards Support: Seamlessly integrate with SAML, OpenID Connect, and OAuth2 to support various authentication flows.
  • Scalable and Customizable: Easily tailor settings and scale your Keycloak instance to meet growing demands.

Further Resources

Credits

Developed and maintained by Kevin Veen-Birkenbach.
Learn more at veen.world.

Part of the Infinito.Nexus Project
Licensed under Infinito.Nexus NonCommercial License.