Authentification unique (single sign-on) dans JMap / SSO (single sign-on) in JMap

Produit concerné / Related product

JMap AdminVersions4.0, 5.0, 6.0

Jump to English version

Un nouveau gestionnaire d'utilisateurs a été intégré dans le correctif D JMap 4.0.2 : Active Directory.

Quoiqu'il était déjà possible de se connecter à Active Directory avec le gestionnaire d'utilisateurs LDAP, ce nouveau gestionnaire d'utilisateurs permet en plus d'activer l'authentification unique dans les applications déployées sur le réseau intranet. Par conséquent, l'ouverture d'une application JMap bien configurée ne requiert plus d'authentification, puisque l'authentification se fait par le système en utilisant le compte Windows courant via le mécanisme Kerberos *.

La procédure qui suit a été testée avec succès dans des environnements Windows Server 2003 et 2008 R2.

La configuration de l'authentification unique (SSO) dans JMap demande une série d'étapes essentielles pour son bon fonctionnement :

  1. Configuration d'un Service Principal Name et de son authentification Kerberos dans Active Directory.

  2. Configuration du gestionnaire d'utilisateurs dans JMapAdmin.

  3. Définition des permissions des utilisateurs dans les projets.

  4. Déploiement d'une application pour laquelle SSO est activé.

  5. Modification de la base de registres des clients potentiels.

  6. Ouverture de l'application avec SSO.

Guide étape par étape

1. Configuration d'un Service Principal Name et de son authentification Kerberos dans Active Directory.

1.1. Dans Active Directory, créez un nouvel utilisateur et faites en sorte que son mot de passe n'expire jamais. Exemple : utilisateur "jmap".

1.2. Dans une fenêtre d'invite de commandes, exécutez :

setspn -a service/server.domain.com@DOMAIN.COM server

où "service" est le nom du service à créer, "server.domain.com" est le nom complet du contrôleur de domaine, "DOMAIN.COM" est le nom complet du domaine, et "server" est le nom du contrôleur de domaine.

Exemple : 

setspn -a jmap_spn/osiriswinsrvr2@OSIRISLAB.NET osiriswinsrvr2

Registering ServicePrincipalNames for CN=OSIRISWINSRVR2,OU=Domain Controllers,DC=osirislab,DC=net

        jmap_spn/osiriswinsrvr2@OSIRISLAB.NET

Updated object

1.3. Dans une fenêtre d'invite de commandes, exécutez :

ktpass -princ service/server.domain.com@DOMAIN.COM -ptype KRB5_NT_PRINCIPAL -crypto All -mapuser "server"

où "service/server.domain.com@DOMAIN.COM" est le nom du SPN créé et où "server" est le nom de l'utilisateur créé dans Active Directory.

1.4. Dans un environnement Windows Server 2003, il est toutefois nécessaire de spécifier un type d'encryption, puisque la valeur "All" n'est pas supportée. Dans cet environnement, des tests concluants ont été effectués avec le type "DES-CBC-CRC".

Exemple : 

ktpass -princ jmap_spn/osiriswinsrvr2@OSIRISLAB.NET -ptype KRB5_NT_PRINCIPAL -crypto All -mapuser jmap

Targeting domain controller: OSIRISWINSRVR2.osirislab.net

Using legacy password setting method

Successfully mapped jmap_spn/osiriswinsrvr2 to jmap.

Référence de Microsoft sur les Service Principal Names : http://social.technet.microsoft.com/wik ... s/717.aspx


2.
 Configuration du gestionnaire d'utilisateurs dans JMapAdmin.

2.1. Dans JMapAdmin -> Utilisateurs/Groupes -> Gestionnaire, sélectionner "Gestionnaire d'utilisateurs Active Directory", configurez :

Adresse du serveur : L'adresse du serveur (Ex. : 192.168.0.207).

DN : le Distinguished Name de la configuration à utiliser dans LDAP (Ex. : dc=osirislab,dc=net).

Domaine : le nom complet du domaine (Ex. : OSIRISLAB.NET).

utilisateur / SPN : le nom de l'utilisateur créé dans Active Directory pour lequel un SPN a été créé (Ex. : jmap).

Mot de passe : le mot de passe de cet utilisateur.

et s'assurez-vous que la case à cocher Activer l'authentification unique est bien cochée.

2.2. Avant de sauvegarder cette configuration, assurez-vous que les deux ports utilisés pour communiquer avec le contrôleur de domaine et le service Kerberos sont ouverts. Par défaut, ces ports sont 389 (TCP) et 88 (TCP/UDP).


3. Définition des permissions des utilisateurs dans JMapAdmin et dans les projets.

3.1. Assurez vous qu'au moins un utilisateur pour lequel le mot de passe est connu est configuré comme administrateur de JMapServer.

3.2. Donnez la permission d'ouverture de projet à l'utilisateur créé dans Active Directory.

4. Déploiement d'une application pour laquelle SSO est activé.

4.1. Assurez vous que l'application sera utilisé sur le réseau intranet seulement. Une communication avec le contrôleur de domaine doit être possible. L'authentification unique ne fonctionne que pour les applications de type "applet" et "Java Web Start".

4.2. Lors du déploiement, cochez les cases Accès contrôlé et Activer l'authentification unique.


5. Modification de la base de registres des clients potentiels.

Par défaut, Windows ne permet pas aux applications d'obtenir le ticket Kerberos (TGT) enregistré dans le système. Dans le client JMap, il est nécessaire d'obtenir celui-ci pour valider l'authenticité de la session Windows en cours avec le serveur Kerberos (Active Directory), et pour éviter de refaire l'authentification dans le client JMap. Pour contourner cette limitation, il est nécessaire d'ajouter une valeur de type DWORD nommée allowtgtsessionkey dans la base de registres de chacun des postes, et de lui assigner la valeur 1.

Cette valeur doit être ajoutée à l'endroit suivant :

Windows XP
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\
Autres Windows
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters


Référence de Microsoft à ce sujet : 
http://support.microsoft.com/kb/308339


6. Ouverture de l'application avec SSO.

Une fois la configuration terminée, l'ouverture de l'application déployée ne devrait pas afficher d'authentification. Si une boite d'authentification est affichée :

6.1. Validez que l'ordinateur du client est enregistré sur le domaine configuré dans JMapAdmin et qu'une session Windows sur ce domaine a été initiée.

6.2. Validez que l'utilisateur a les permissions d'ouverture du projet en question.

6.3. Validez la configuration du gestionnaire d'utilisateurs Active Directory dans JMapAdmin.

6.4. Validez qu'il n'y a pas un grand écart entre l'heure affichée sur les postes clients et celle des serveurs.

6.5. Validez la configuration de l'utilisateur et du SPN dans Active Directory.

6.6. Consultez le support technique de JMap.


Légende :
* Le transfert du ticket Kerberos (TGT) entre le client JMap et JMapServer se fait de façon sécurisée.


English version

A new User Manager has been integrated into the patch D JMap 4.0.2 : Active Directory.
 

Although it was possible to connect to Active Directory with LDAP User Manager, this new User Manager allows to active the unique authentication in applications deployed on the intranet. Therefore, the opening of a well configured JMap application do not requires authentication, since authentication is done by the system using the current Windows account via Kerberos* mechanism.

The following procedure has been tested successfully in Windows Server 2003 and 2008 R2 environments.

Configuring single authentication (SSO) in JMap request a series of essential steps for proper operation: 

  1. Configuring a Service Principal Name and its Kerberos authentication in Active Directory
  2. Configuring the User Manager in JMapAdmin.
  3. Definition of user permissions on the projects.
  4.  Deploying an application for which SSO is enabled.
  5. Changing the registry database of potential customers.
  6. Opening the application with SSO.

Step-by-step guide

1. Configuring a Service Principal Name and its Kerberos authentication in Active Directory.

1.1. In Active Directory, create a new user and ensure that the password never expires. Ex: "jmap" user.

1.2. In a Command Prompt window, execute:

setspn -a service/server.domain.com@DOMAIN.COM server

which "service" is the service name to create, , "server.domain.com" is the the domain controller full name, "DOMAIN.COM" is the domain full name, and "server" is the the domain controller name

Ex:

setspn -a jmap_spn/osiriswinsrvr2@OSIRISLAB.NET osiriswinsrvr2

Registering ServicePrincipalNames for CN=OSIRISWINSRVR2,OU=Domain Controllers,DC=osirislab,DC=net

        jmap_spn/osiriswinsrvr2@OSIRISLAB.NET

Updated object

1.3. In a Command Prompt window, execute:

ktpass -princ service/server.domain.com@DOMAIN.COM -ptype KRB5_NT_PRINCIPAL -crypto All -mapuser "server"

which "service/server.domain.com@DOMAIN.COM" is the SPN name created and "server" is the user name created in Active Directory.

1.4. In a Windows Server 2003 environment, however, it is necessary to specify an encryption type, since the value "All" is not supported. In this environment, conclusive tests were performed with the "DES-CBC-CRC" type.

Ex:

ktpass -princ jmap_spn/osiriswinsrvr2@OSIRISLAB.NET -ptype KRB5_NT_PRINCIPAL -crypto All -mapuser jmap

Targeting domain controller: OSIRISWINSRVR2.osirislab.net

Using legacy password setting method

Successfully mapped jmap_spn/osiriswinsrvr2 to jmap.

Reference on Microsoft Service Principal Names: http://social.technet.microsoft.com/wik ... s/717.aspx

2. Configuring the User Manager in JMap Admin

2.1. In JMapAdmin -> Utilisateurs / Groupes -> Gestionnaire, sélectionner "Gestionnaire d'utilisateurs Active Directory", configure:

Server address : Server address  (Ex. : 192.168.0.207).

DN : the Distinguished Name of the configuration to use in LDAP (Ex. : dc=osirislab,dc=net).

Domain : domain full name (Ex. : OSIRISLAB.NET).

user / SPN : user's name created in Active Directory for which a SPN was created (Ex. : jmap).

Password : user's password.

and ensure that the checkbox Enable SSO is checked.

2.2. Before you save this configuration, make sure that the two ports used to communicate with the domain controller and the Kerberos service are open. By default, these ports are 389 (TCP) and 88 (TCP / UDP).

3. Definition of user permissions in JMapAdmin and projects.

3.1. Ensure that at least one user for which the password is known is configured as JMapServer administrator.

3.2. Give the opening project permission to the user created in Active Directory.

4. Deploying an application for which SSO is enabled.

4.1. Ensure that the application will be used on the intranet only. Communication with the domain controller should be possible. SSO only works for applications "applet" type and "Java Web Start".

4.2. During deployment, check the boxes Controlled Access and Enable SSO. 


5. Changing the registry database of potential customers.

By default, Windows does not allow applications to obtain the Kerberos ticket (TGT) registered in the system. In JMap client, it is necessary to get it to validate the authenticity of the Windows session with the Kerberos (Active Directory) server, and to avoid repeating the authentication in the JMap client. To overcome this limitation, it is necessary to add a DWORD value named allowtgtsessionkey in the registry database of each item, and assign the value 1.

This value must be added to the following location:

Windows XP
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\
Autres Windows
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\Kerberos\Parameters

Microsoft reference to this topic: http://support.microsoft.com/kb/308339


6. Opening the application with SSO.

Once the setup is complete, the opening of the deployed application should not display the authentication. If an authentication box is displayed:

6.1. Validate that the client computer is logged to the configured domain in JMapAdmin and a Windows session on this area has been initiated.

6.2. Validate that the user has permission to open the project.

6.3. Validate the configuration of Active Directory User Manager in JMapAdmin.

6.4. Confirm that there is no significant difference between the time displayed on the clients and the servers.

6.5. Validate the user and the SPN configuration in Active Directory.

6.6. Consult the telephone technical support of JMap.


Legend:
* The Kerberos ticket (TGT) transfer between the JMap client and JMap JMapServer is made safely.