Active Directory Migration with Keycloak

Active Directory Migration with Keycloak

Migrazione di Active Directory con Keycloak

[Versione italiana di seguito]

Disclaimer: Many of our customers have confidentiality agreements safeguarding their brand names from commercial purposes. Hence, you may encounter references such as “Client name confidential”, or the customer’s industry instead of the customer’s brand name.


Popular Italian luxury brand, uses Keycloak as a Single Sign-On tool. Keycloak inherits and synchronizes users from an Active Directory, this harmony allows simple and secure access to company employees to many applications, almost the same system that Sorint uses.

The critical event for the customer was the migration to a new version of Active Directory, an operation that imperatively had to happen gradually and without any disruption to employees. A function of this kind, with the specificities requested by the customer, is not natively available via Keycloak but a solution absolutely had to be found.

Taking advantage of the interdisciplinarity of Sircle FULLAM, the affinity created with the customer and the experience of their infrastructure and the support of colleagues, I was able to build a script that involves 3 different technologies: SQL, LDAP and API

Without going into detail, I will summarize just a part of the operation: the migration of roles

  1. SQL query to extract a CSV with the correlations of users, roles and groups
  2. The CSV is processed inside a bash script that parameterizes the information
  3. A first API call generates the authentication token and also parameterizes this information
  4. IF - ELSE - FI makes a matching with the information collected, to identify who has been migrated and who has not. If they have not migrated, they do not proceed with any action, otherwise they continue.
  5. The next check involves inserting the filtered users into an LDAP query, which will return confirmation if it is present in the new Active Directory of the customer
  6. We return to interact with the Keycloak APIs, first with a GET for a check and then with a POST inserting the information obtained in the initial CSV to the correct users

It is a really cumbersome process but it works and is still doing its job today!

Full-AM and therefore Sorint.Lab has completed an entirely custom integration efficiently and in a short time, guaranteeing continuity of service to end users and therefore customer satisfaction

Written by: Michela Bonizzi


Nota informativa: Molti dei nostri clienti hanno sottoscritto accordi di riservatezza (NDA) per tutelare i propri marchi. Per questo motivo, in alcuni casi troverete la dicitura “Nome cliente riservato” o l’indicazione del settore merceologico al posto del nome dell’az

Un celebre brand del lusso italiano utilizza Keycloak come soluzione di Single Sign-On (SSO) per ereditare e sincronizzare le utenze da Active Directory. Questo sistema garantisce a tutti i dipendenti un accesso semplice e sicuro ai vari applicativi aziendali, in modo analogo a quanto avviene in SORINT.lab.

La sfida critica per il cliente è stata la migrazione a una nuova versione di Active Directory: un’operazione da eseguire gradualmente e in totale assenza di disservizi per gli utenti. Poiché Keycloak non offre nativamente una funzionalità simile con le specifiche richieste, siamo intervenuti con una soluzione su misura.

Sfruttando l’approccio interdisciplinare del nostro Sircle FULL-AM, la sinergia con il cliente e l’esperienza consolidata sulla sua infrastruttura, abbiamo sviluppato uno script custom basato sull’integrazione di tre tecnologie: SQL, LDAP e API.

Senza scendere eccessivamente nel tecnico, ecco una sintesi del flusso logico:

  1. Estrazione dati: Una query SQL genera un file CSV con le correlazioni tra utenti, ruoli e gruppi.
  2. Processamento: Il CSV viene elaborato da uno script Bash che ne parametrizza le informazioni.
  3. Autenticazione: Una prima chiamata API genera il token di accesso necessario per le operazioni successive.
  4. Logica di controllo (IF-ELSE): Il sistema confronta i dati per identificare gli utenti già migrati; se l'utente non risulta migrato, il processo si interrompe per quel profilo.
  5. Verifica LDAP: Le utenze filtrate vengono interrogate tramite query LDAP per confermarne l'effettiva presenza nel nuovo Active Directory.
  6. Sincronizzazione Keycloak: Si torna a interagire con le API di Keycloak: prima tramite una GET di verifica e, infine, con una POST per aggiornare i profili corretti con le informazioni estratte inizialmente.

Si tratta di un processo articolato ma estremamente solido, che ancora oggi risponde perfettamente alle necessità del cliente.

Grazie alla collaborazione tra Full-AM e SORINT.lab, abbiamo realizzato un’integrazione interamente personalizzata, efficiente e in tempi rapidi, garantendo la continuità operativa e la massima soddisfazione del cliente.

Autrice: Michela Bonizzi

Related Posts

Data Platform Enterprise su Azure per la Ricerca Oncologica

Data Platform Enterprise su Azure per la Ricerca Oncologica

Case Study

Supporto strategico per audit e piano di rientro

Supporto strategico per audit e piano di rientro

Teamwork e Competenza: Così Abbiamo Trasformato un'Audit Critica in un'Opportunità di Fiducia **In sole sei settimane, un team multidisciplinare ha supportato un cliente strategico nella gest

Machine Learning e Forecasting Energetico su Piattaforma Cloud-Native

Machine Learning e Forecasting Energetico su Piattaforma Cloud-Native

Case Study

Azure nel Banking - Architettura AKS di classe Enterprise

Azure nel Banking - Architettura AKS di classe Enterprise

Case Study

Azure VMware Solution - Network Design e Strategie di Migrazione

Azure VMware Solution - Network Design e Strategie di Migrazione

Case Study

Storia di un successo annunciato: un upgrade epocale portato a termine!

Storia di un successo annunciato: un upgrade epocale portato a termine!

5 production databases in Dataguard**, in 3DC configuration (PRI + BC + DR), for a total of 15 databases, going from version 11.2 to 19.22, with only 4 hours of overall downtime.

Entra ID - Provisioning utenti e SSO con GCP

Entra ID - Provisioning utenti e SSO con GCP

Case Study

SSO nel Luxury Retail - Un Progetto di Successo con Microsoft Entra ID

SSO nel Luxury Retail - Un Progetto di Successo con Microsoft Entra ID

Case Study