Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Produit concerné / Related product

JMap

Versions

7 Jakarta HF 5

Jump to English version

Cet article décrit la procédure pour créer et exporter un certificat client et l'importer dans le keystore JMap JRE à l'aide d'un serveur Windows 2016.

...

Utilisez les services de Active Directory Server pour créer un certificat à utiliser pour LDAPS. Si vous disposez déjà d'un certificat répondant aux exigences ci-dessus, vous pouvez ignorer ces étapes.

  1. Dans Active Directory (AD) Server, cliquez sur Start --> Server Manager --> Add Roles and Features. Cliquez sur Next.

  2. Sélectionnez l'installation basée sur les rôles ou les fonctionnalités. Cliquez sur Next.

  3. Sélectionnez le serveur LDAP dans l’ensemble de serveurs. Cliquez sur Next.

  4. Sélectionnez Active Directory Certificate Services dans la liste des rôles et cliquez sur Next.

  5. Ne sélectionnez rien dans la liste des fonctionnalités et cliquez sur Next.

  6. Ne sélectionnez rien dans Active Directory Certificate Services et cliquez sur Next.

  7. Marquez “Certificate Authority” dans la liste des rôles et cliquez sur Next.

  8. Cliquez sur Install pour confirmer l'installation.

  9. Une fois l'installation terminée, cliquez sur Close.

  10. Vous devez maintenant créer un certificat à l'aide de l'AD CS Configuration Wizard. Cliquez sur “Configure Active Directory Certificate Services” pour ouvrir l’assistant et cliquez sur Next.

  11. Sélectionnez Certification Authority dans la liste des rôles. Cliquez sur Next.

  12. Sélectionnez Standalone CA (autorité de certification autonome) si vous n'allez pas émettre ou gérer de certificats ou Enterprise CA (une autorité de certification d'entreprise) dans le cas contraire. Cliquez sur Next.

  13. Sélectionnez Root CA comme type de CA, cliquez sur Next.

  14. Si vous ne possédez pas de clé privée, vous devez en créer une nouvelle. Cliquez sur Next.

  15. Sélectionnez SHA1 comme algorithme Hash. Cliquez sur Next.

  16. Le nom de l'autorité de certification doit correspondre au Hostname (exigence numéro 2). Cliquez sur Next.

  17. Spécifiez la période de validité du certificat. Sélectionnez Default 5 year. Cliquez sur Next.

  18. Sélectionnez les emplacements par défaut des bases de données, cliquez sur Next.

  19. Cliquez sur Configure pour confirmer.

  20. Une fois la configuration réussie/terminée, cliquez sur Close.

  21. Maintenant, pour répondre à la troisième exigence, il faut s’assurer que le compte de la machine hôte a accès à la clé privée. À l'aide de l’outil Certutil, recherchez le Unique Container Name. Ouvrez le terminal de commandes en mode Administrateur et exécutez la commande suivante :

    Code Block
    certutil -verifystore MY
  22. La clé privée sera présente à l'emplacement suivant C:\ProgramData\Microsoft\Crypto\Keys<UniqueContainerName>

  23. Cliquez avec le bouton droit sur C:\ProgramData\Microsoft\Crypto\Keys\<UniqueContainerName> et cliquez sur properties --> Security et ajoutez des autorisations de lecture pour NETWORK SERVICE.

Exporter le certificat de Active Directory Server

Vous devez exporter le certificat que vous avez créé dans Active Directory (AD) Server.

  1. Cliquez sur Start --> Search “Manage Computer Certificates” et ouvrez-le. Avec clic droit sur le certificat cliquez sur “Export”.

  2. Le Certificate Export Wizard ouvre. Cliquez sur Next.

  3. N’exportez pas la clé privée. Cliquez sur Next.

  4. Sélectionnez le formar de fichier Base-64 encoded X .509. Cliquez sur Next.

  5. Exportez le .CER vers Destination path (ldapstest.cer). Cliquez sur Next.

  6. Cliquez sur Finish pour compléter l’exportation du certificat.

  7. Copiez ldapstest.cer dans la machine de JMap Server.

Importer le certificat dans JMap JRE

Le certificat SSL doit être importé dans le JMap java run time

  1. Dans la machine dans laquelle est installé JMap Server, ouvrez le terminal de commandes en mode administrateur et exécutez la commende suivante :

    Code Block
    cd JMAP_HOME\jre\bin

    JMAP_HOME est le chemin du dossier d’installation de JMap.

  2. Exécutez la commande suivante :

    Code Block
    languagenone
    keytool -importcert -alias "ldapstest" -keystore "C:\JMAP_HOME\jre\lib\security\cacerts" -storepass changeit -file "Path_to_the_exported_certificate\ldapstest.cer"
  3. Inscrivez yes dans le terminal de commandes.

  4. Une fois que le certificat est ajouté dans le JMap JRE keystore, vous pouvez vous connecter à LDAP server sur SSL.

Configurer LDAPS dans l’administrateur de comptes en JMap Admin

  1. Dans la machine de JMap Server dans C:\Windows\System32\drivers\etc éditez le fichier hosts avec un éditeur de texte en ayant des privilèges d’administrateur. Ajoutez cette ligne :

    Code Block
    [AD_Server_IP] WIN-7MJ9E398DQ9.k2.com

    WIN-7MJ9E398DQ9.k2.com est le nom du Active Directory Server.
    AD_Server_IP est l'ip du Active Directory Server (192.168.4.24 ou 10.194.31.93).

  2. Démarrez le serveur JMap et ouvrez la section Utilisateurs / Groupes dans JMap Admin.

  3. Accédez à l'onglet Gestionnaire d'utilisateurs et sélectionnez Gestionnaire d'utilisateurs LDAP.

  4. Tapez le nom du serveur AD dans l'hôte avec le port SSL (636). Exemple : WIN-7MJ9E398DQ9.k2.com:636.

  5. Complétez les autres champs. Exemple : DN: DC=k2,DC=com, user:K2\administrator

  6. Sélectionnez l’option SSL et sauvegardez.Un message de SUCCESS doit s’afficher.

  7. Accédez à l'onglet Utilisateurs et validez que tous les utilisateurs d'AD s’affichent dans la table.

...

Anchor
English
English

English version

...

Use Active Directory Certificate Services to create a certificate to be used for LDAPS. If you already have a certificate satisfying the above requirements, you can skip this steps.

  1. In the Active Directory (AD) Server, Click on Start --> Server Manager --> Add Roles and Features. Click Next.

  2. Select Role-based or feature-based installation. Click Next.

  3. Select ldaps server from the server pool. Click Next.

  4. Select Active Directory Certificate Services from the list of roles and click Next.

  5. Select nothing from the list of features and click Next.

  6. Select nothing from the Active Directory Certificate Services and click Next.

  7. Mark “Certificate Authority” from the list of roles and click Next.

  8. Click Install to confirm installation.

  9. Once installation is complete, Click Close.

  10. Now let’s create a certificate using AD CS Configuration Wizard. To open the wizard, click on “Configure Active Directory Certificate Services” and click Next.

  11. Select Certification Authority from the list of roles. Click Next.

  12. Select a Standalone CA if you are not going to issue or manage certificates or Enterprise CA otherwise . Click Next.

  13. Select Root CA as the type of CA, click Next.

  14. Since you do not possess a private key – let’s create a new one. Click Next.

  15. Select SHA1 as the Hash algorithm. Click Next.

  16. The name of the CA must match the Hostname (requirement number 2). Click Next.

  17. Specify a validity period of the certificate. Select Default 5 years. Click Next.

  18. Select default database locations, click Next.

  19. Click Configure to confirm.

  20. Once the configuration is successful/complete, click Close.

  21. Now to fulfill the third requirement, let us ensure that the host machine account has access to the private key. Using the Certutil utility, find the Unique Container Name. Open Command Prompt in Administrator mode and run the following command:

    Code Block
    certutil -verifystore MY
  22. The private key will be present in the following location C:\ProgramData\Microsoft\Crypto\Keys\<UniqueContainerName>

  23. Right Click C:\ProgramData\Microsoft\Crypto\Keys\<UniqueContainerName> and click properties --> Security and add read permissions for NETWORK SERVICE.

Export the certificate from the Active Directory Server

  1. In the Active Directory (AD) Server, client need to export the certificate previously created. Click Start --> Search “Manage Computer Certificates” and open it. Open personal, right click over the certificate and click “Export”.

  2. This opens the Certificate Export Wizard. Click Next.

  3. Do not export the private key. Click Next.

  4. Select Base-64 encoded X .509 file format. Click Next.

  5. Export the .CER to the Destination path (ldapstest.cer). Click Next.

  6. Click Finish to complete the certificate export.

  7. Copy ldapstest.cer to JMap Server machine.

Import the certificate in JMap JRE

The SSL certificate need to be imported in JMap java run time.

  1. In JMap Server machine open Command Prompt in administrator mode and execute this command:

    Code Block
    cd JMAP_HOME\jre\bin

    JMap Home is the JMap installation folder path.

  2. Execute this command:

    Code Block
    keytool -importcert -alias "ldapstest" -keystore "C:\JMAP_HOME\jre\lib\security\cacerts" -storepass changeit -file "Path_to_the_exported_certificate\ldapstest.cer"
  3. Type yes in the Command Prompt.

  4. Once the certificate is successfully added to the JMap JRE keystore, you can connect to the LDAP server over SSL.

Configure LDAPS in JMap Admin user manager

  1. In JMap Server machine go to C:\Windows\System32\drivers\etc and edit the hosts file with text editor with administrator privileges. Add this line:

    Code Block
    [AD_Server_IP] WIN-7MJ9E398DQ9.k2.com

    WIN-7MJ9E398DQ9.k2.com is the name of the Active Directory Server.
    AD_Server_IP is the ip of the Active Directory Server (192.168.4.24 or 10.194.31.93).

  2. Start JMap server and open the User / Groups section in JMap Admin.

  3. Go to the User Manager Tab and select JMap LDAP user manager.

  4. Type the name of the AD Server in the host along with the SSL port (636). Ex: WIN-7MJ9E398DQ9.k2.com:636.

  5. Fill the rest of the fields. Ex: DN: DC=k2,DC=com, user:K2\administrator.

  6. Select SSL option and Save.A SUCCESS message should be shown.

  7. Go to user tab and Notice all users from AD are there correctly.