4.7. 通过 SSL 从 LDAP 迁移到 IdM

您可以使用 ipa migrate-ds 命令将身份验证和授权服务从 LDAP 服务器迁移到身份管理(IdM)。按照以下流程,在迁移过程中加密传输的数据。

警告

这是一个通用的迁移流程,可能在每个环境中不一定能正常工作。

强烈建议您在尝试迁移真实的 LDAP 环境前设置测试 LDAP 环境并测试迁移过程。在测试环境时,请执行以下操作:

  1. 在 IdM 中创建测试用户,并将迁移的用户的输出与测试用户的输出进行比较。
  2. 将迁移的用户的输出(如 IdM 上所示)与源用户进行比较,如原始 LDAP 服务器上所示。

有关更多的指导,请参见下面的 验证 部分。

先决条件

步骤

  1. 将签发远程 LDAP 服务器证书的 CA 证书存储在未来 IdM 服务器的文件中。例如: /tmp/remote.crt
  2. 按照将 将 LDAP 服务器迁移到 IdM 中描述的步骤操作。但是,对于在迁移过程中加密的 LDAP 连接,请使用 URL 中的 ldaps 协议,并将 --ca-cert-file 选项传给 ipa migrate-ds 命令。例如:

    # ipa migrate-ds --ca-cert-file=/tmp/remote.crt --your-other-options ldaps://ldap.example.com:636

验证

  1. 使用 ipa user-add 命令来在 IdM 中创建测试用户。将迁移的用户的输出与测试用户的输出进行比较。确保迁移的用户包含测试用户上存在的最小属性和对象类集合。例如:

    $ ipa user-show --all testing_user
    dn: uid=testing_user,cn=users,cn=accounts,dc=idm,dc=example,dc=com
    User login: testing_user
    First name: testing
    Last name: user
    Full name: testing user
    Display name: testing user
    Initials: tu
    Home directory: /home/testing_user
    GECOS: testing user
    Login shell: /bin/sh
    Principal name: testing_user@IDM.EXAMPLE.COM
    Principal alias: testing_user@IDM.EXAMPLE.COM
    Email address: testing_user@idm.example.com
    UID: 1689700012
    GID: 1689700012
    Account disabled: False
    Preserved user: False
    Password: False
    Member of groups: ipausers
    Kerberos keys available: False
    ipauniqueid: 843b1ac8-6e38-11ec-8dfe-5254005aad3e
    mepmanagedentry: cn=testing_user,cn=groups,cn=accounts,dc=idm,dc=example,dc=com
    objectclass: top, person, organizationalperson, inetorgperson, inetuser, posixaccount, krbprincipalaux, krbticketpolicyaux, ipaobject,
                 ipasshuser, ipaSshGroupOfPubKeys, mepOriginEntry
  2. 将迁移的用户的输出(如 IdM 上所示)与源用户进行比较,如原始 LDAP 服务器上所示。确保导入的属性不会复制两次,并且它们具有正确的值。