HCL Commerce Version 9.1.5.0 or later

Activation de la sécurité à l'aide de référentiels fédérés

Pour utiliser HCL Commerce avec LDAP, vous devez activer la sécurité administrative de WebSphere Application Server à l'aide de référentiels fédérés. Les référentiels fédérés se composent d'un serveur LDAP et d'un référentiel de fichiers intégré.

Le référentiel de fichiers stocke l'administrateur principal de WebSphere Application Server. L'administrateur principal peut se connecter à la console d'administration de WebSphere Application Server, même lorsque le serveur LDAP n'est pas disponible.

Avant de commencer

Vous devez exécuter les tâches suivantes :

  • Vérifiez que la base de données est démarrée.
  • Assurez-vous que le serveur LDAP est démarré.
  • HCL Commerce DeveloperHCL Commerce Version 9.1.6.0 or laterVérifiez qu'WebSphere Application Server est en cours d'exécution.
  • HCL Commerce DeveloperHCL Commerce Version 9.1.6.0 or laterSi vous utilisez SSL avec le serveur LDAP, vérifiez que la sécurité administrative de WebSphere Application Server est activée via le registre basé sur les fichiers. Lorsque la sécurité administrative n'est pas activée, les scripts de configuration échouent.
  • Si vous envisagez de configurer HCL Commerce de sorte qu'il se connecte à plusieurs serveurs LDAP, consultez les étapes de configuration dans la rubrique Fédération de deux serveurs LDAP à l'aide d'une organisation racine commune.
Important :
  • HCL Commerce n'autorise pas l'annulation pour la réutilisation du référentiel de base de données une fois que vous avez configuré HCL Commerce en vue de l'utilisation d'un référentiel LDAP.
  • L'intégration LDAP pour HCL Commerce est implémentée dans la version 9.1.5. Assurez-vous que vous utilisez cette version ou une version supérieure de HCL Commerce.

Pourquoi et quand exécuter cette tâche

L'intégration LDAP HCL Commerce prend en charge les options de serveur LDAP suivantes :
  • IBM Security Directory Server
  • Serveur compatible v3 LDAP personnalisé

Procédure

Effectuez les étapes suivantes pour activer la sécurité WebSphere Application Server avec les référentiels fédérés :
  1. Copiez le fichier vmm.properties à partir de l'emplacement suivant dans le conteneur ts-app ou ts-utils.
    • Emplacement dans le conteneur ts-app : /SETUP/ldap/properties
    • Emplacement dans le conteneur ts-utils : /opt/WebSphere/CommerceServer90/components/ldap/properties
  2. Mettez à jour le fichier vmm.properties avec les informations LDAP requises.
    For example:
    #
    # -----------------------------------------------------------------
    # Licensed Materials - Property of HCL Technologies
    #
    # HCL Commerce
    #
    # (C) Copyright HCL Technologies Limited 1996, 2020
    # -----------------------------------------------------------------
    #
    # LDAP server type
    #     Accepted values: (IDS, DOMINO, SUNONE, AD, NDS, CUSTOM)
    #         IDS = IBM Security Directory Server
    #         DOMINO = IBM Lotus Domino
    #         SUNONE = Sun Java System Directory Server
    #         AD = Microsoft Windows Active Directory
    #         NDS = Novell Directory Services
    #         CUSTOM=A custom Directory Server
    #--------------------------------------------------------
    vmm.ldapType=IDS
    
    # Fully qualified LDAP server host name or IP address
    #--------------------------------------------------------
    vmm.ldapHost=123.456.789.210
    
    # LDAP server port number
    #--------------------------------------------------------
    vmm.ldapPort=389
    
    # Specifies whether the LDAP server requires an SSL connection
    
    # 	Accepted values are: (true, false)
    #--------------------------------------------------------
    vmm.ldapWithSSL=false
    
    # The keystore file path for SSL commnication to LDAP
    #--------------------------------------------------------
    vmm.keystorePath=
    
    # The keystore password 
    # (To avoid decrypting warnings in the log, it is strongly recommended to use 
    # the ASCII encrypted string generated from the <WCInstallDir>/bin/wcs_encrypt.bat 
    # command without the merchant key option.)
    #--------------------------------------------------------
    vmm.keystorePassword=
    
    # LDAP search base distinguished name, must be lower case
    #--------------------------------------------------------
    vmm.baseDN=o=root organization
    
    # LDAP bind distinguished name, must be lower case
    #--------------------------------------------------------
    vmm.bindDN=cn=root
    
    # LDAP bind password XOR encoded by WAS PropFilePasswordEncoder utility
    # For example: {xor}Lz4sLChvLTs=
    #
    # Needed for Runtime Environment.
    #--------------------------------------------------------
    vmm.xorBindPassword={xor}Lz4sLChvLTs=
    
    # LDAP bind password
    # (To avoid decrypting warnings in the log, it is strongly recommended to use 
    # the ASCII encrypted string generated from the <WCInstallDir>/bin/wcs_encrypt.bat 
    # command without the merchant key option.)
    #
    # Needed for Development Environment.
    #--------------------------------------------------------
    vmm.bindPassword=MVDKlJXqsnF6jaJjqJFu0+EaHcS1e7lZc1Iran+Ms8Q=
    
    # A full DN that maps to the HCL Commerce root organization; must be lower case.
    #--------------------------------------------------------
    vmm.rootOrgDN=o=root organization
    
    # A full DN that maps to the HCL Commerce default organization; must be lower case.
    #--------------------------------------------------------
    vmm.defaultOrgDN=o=default organization,o=root organization
    
    # Specifies the property names to use to log into the application server.
    # This field takes multiple login properties, delimited by a semicolon (;).
    # For example, uid;mail. All login properties are searched during login.
    # If multiple entries or no entries are found, an exception is thrown.
    # For example, if you specify the login properties as uid;mail and the login ID as Bob,
    # the search filter searches for uid=Bob or mail=Bob. When the search returns a single entry,
    # then authentication can proceed. Otherwise, an exception is thrown.
    #--------------------------------------------------------
    vmm.ldapLoginProp=uid
    
    # The realm name, default to WC_<instanceName>_Realm.
    #--------------------------------------------------------
    vmm.realmName=myrealm
    
    # The primary admin user id for the administrative security.
    # If global security is already enabled, input the primary user
    # currently using.
    # Otherwise, input a user which does not exist in the federated
    # repositories, the tool will create it into the WebSphere Application
    # Server built-in file base user repository.
    #--------------------------------------------------------
    vmm.primaryAdminId=configadmin
    
    # The primary admin user password for the administrative security.
    # (To avoid decrypting warnings in the log, it is strongly recommended to use 
    # the ASCII encrypted string generated from the <WCInstallDir>/bin/wcs_encrypt.bat 
    # command without the merchant key option.)
    #
    # This is used by Toolkit.  In Runtime, it's retrieved from a local file
    #--------------------------------------------------------
    vmm.primaryAdminPwd=Ntjz8goyUYB8qplNy78MOBiIbv9pKAviyQYk5S/O6xY=
    
    # The Commerce test server name on toolkit, 
    # Old name: WebSphere Commerce Test Server
    # New name: HCL Commerce Test Server 
    # The default name is HCL Commerce Test Server, if you use the old test server name, 
    # please set the property to the old name.
    #--------------------------------------------------------
    commerceTestServerName=WebSphere Commerce Test Server
    
    # LDAP user search filter, needed when vmm.ldapType=CUSTOM
    #--------------------------------------------------------
    vmm.ldapUserFilter=(&(uid=%v)(objectclass=inetOrgPerson))
    
    # LDAP user prefix, needed when vmm.ldapType=CUSTOM
    (for example, uid)
    #--------------------------------------------------------
    vmm.userPrefix=uid
    
    # LDAP organization prefix (for example, o)
    # Needed when vmm.ldapType=CUSTOM
    #--------------------------------------------------------
    vmm.orgPrefix=o
    
    # LDAP organizational unit prefix, needed when vmm.ldapType=CUSTOM
    # (for example, ou)
    #--------------------------------------------------------
    vmm.orgUnitPrefix=ou
    
    # LDAP user object class, needed when vmm.ldapType=CUSTOM
    # (for example, inetOrgPerson)
    #--------------------------------------------------------
    vmm.userObjClass=inetOrgPerson
    
    # LDAP organization object class, needed when vmm.ldapType=CUSTOM
    # (for example, organization)
    #--------------------------------------------------------
    vmm.orgObjClass=organization
    
    # LDAP organizational unit object class, needed when vmm.ldapType=CUSTOM
    # (for example, organizationalUnit)
    #--------------------------------------------------------
    vmm.orgUnitObjClass=organizationalUnit
    
    # LDAP administrator distinguished name 
    # @deprecated
    #--------------------------------------------------------
    vmm.ldapAdminDN=
    
    # LDAP administrator password
    # (To avoid decrypting warnings in the log, it is strongly recommended to use 
    # the ASCII encrypted string generated from the <WCInstallDir>/bin/wcs_encrypt.bat 
    # command without the merchant key option.)
    # @deprecated
    #--------------------------------------------------------
    vmm.ldapAdminPassword=
    
  3. Activez LDAP dans la base de données en effectuant les étapes suivantes :
    1. Copiez le fichier vmm.properties dans le conteneur d'utilitaires.
      For example:
      docker cp vmm.properties bvt_utils_1:/opt/WebSphere/CommerceServer90/components/ldap/properties

    2. Exécutez la commande suivante pour activer LDAP dans la base de données :
      ./config_ant.sh -buildfile ../components/common/xml/enableFeature.xml -DWCInstallDir=/opt/WebSphere/CommerceServer90 -DinstanceName=demo -DfeatureName=ldap   -DdbType=<dbType>  -DdbHostname=<dbHost>  -DdbName=<dbName> -DdbServerPort=<dbPort> -DdbUserName=<dbUserName> -DdbUserPassword=<dbUserPassword> -DdbaName=<dbaName> -DdbaPassword=<dbaPassword> -DschemaName=<schemaName> -DjdbcDriver=<jdbcDriver> -DjdbcDriverLocation=<jdbcDriverLocation> -DjdbcURL=<jdbcUrl> Dloggerconfigfile=/opt/WebSphere/CommerceServer90/instances/demo/xml/loader/WCALoggerConfig.xml -Derrordirectory=/opt/WebSphere/CommerceServer90/instances/demo/logs
      For example:
      ./config_ant.sh -buildfile ../components/common/xml/enableFeature.xml -DWCInstallDir=/opt/WebSphere/CommerceServer90 -DinstanceName=demo -DfeatureName=ldap   -DdbType=db2  -DdbHostname=db  -DdbName=mall -DdbServerPort=50000 -DdbUserName=wcs -DdbUserPassword=wcs1 -DdbaName=db2inst1 -DdbaPassword=diet4coke -DschemaName=wcs -DjdbcDriver=com.ibm.db2.jcc.DB2Driver -DjdbcDriverLocation=/opt/WebSphere/CommerceServer90/lib/db2jcc4-4.19.26.jar -DjdbcURL=jdbc:db2://db:50000/mall -Dloggerconfigfile=/opt/WebSphere/CommerceServer90/instances/demo/xml/loader/WCALoggerConfig.xml -Derrordirectory=/opt/WebSphere/CommerceServer90/instances/demo/logs
  4. Créez l'image Docker ts-app personnalisée pour activer LDAP en effectuant les étapes suivantes :
    1. Ajoutez enable LDAP à custConfiguration.sh.
      For example:
      #!/bin/bash
      /SETUP/bin/enableLDAP.sh
      
    2. Effectuez les modifications suivantes dans le fichier Docker :
      • Copiez le fichier vmm.properties sur /SETUP/ldap/properties.
      • Copiez custConfiguration.sh dans /SETUP/bin/custConfiguration.sh.
      • Remplacez les droits du nouveau fichier par 755.
      For example:
      COPY vmm.properties /SETUP/ldap/properties
      COPY custConfiguration.sh /SETUP/bin
      RUN chmod 755 /SETUP/bin/custConfiguration.sh
      
    3. Générez l'image Docker ts-app personnalisée.

Résultats

WebSphere Application Server La sécurité administrative à l'aide de référentiels fédérés est désormais configurée.