使用ConnectDirectCredentials.xml 文件为 "Connect:Direct映射证书

通过使用 Connect:Direct 网桥代理的缺省凭证映射功能,将 Managed File Transfer 中的用户凭证映射到 Connect:Direct® 节点上的用户凭证。 Managed File Transfer 提供了一个 XML 文件,您可以编辑该文件以包含凭证信息。

关于本任务

使用 fteCreateCDAgent 命令创建 Connect:Direct 网桥代理后,需要手动创建 ConnectDirectCredentials.xml 文件。 必须先编辑此文件以包含主机,用户和凭证信息,然后才能使用 Connect:Direct 网桥代理。 有关更多信息,请参阅 Connect:Direct 凭证文件格式。 缺省情况下,此文件从当前用户主目录(例如 /home/fteuser/ConnectDirectCredentials.xml)中装入。 要使用其他位置,请使用 ConnectDirectNodeProperties.xml 文件中的 <credentialsFile> 元素来指定该位置。

过程

  1. 确保元素 <tns:pnode name="Connect:Direct node host" pattern="wildcard"> 中的 name 属性包含 Connect:Direct 网桥代理连接到的 Connect:Direct 节点的名称值。 此值必须与您为 fteCreateCDAgent -cdNode 参数指定的值相同。
    pattern 属性的值可以是 wildcardregex。 如果未指定该属性,那么缺省值将为 wildcard
  2. 将用户标识和凭证信息作为 <tns:pnode>的子元素插入到文件中。
    您可以将以下 <tns:user> 元素的一个或多个实例插入该文件:
    <tns:user name="name" 
              pattern="pattern" 
              ignorecase="ignorecase" 
              cdUserId="cdUserId"  
              cdPassword="cdPassword"  
              pnodeUserId="pnodeUserId" 
              pnodePassword="pnodePassword">
    </tns:user>
    
    其中:
    • name 是一种模式,用于匹配与 MFT 传输请求关联的 MQMD 用户标识。
    • pattern 指定为 name 属性指定的模式是通配符表达式,还是 Java 正则表达式。 pattern 属性的值可以是 wildcardregex。 如果未指定该属性,那么缺省值将为 wildcard
    • ignorecase 指定 name 属性指定的模式是否区分大小写。 如果未指定该属性,那么缺省值将为 true
    • cdUserIdConnect:Direct 网桥代理用于连接到 <tns:pnode> 元素的 name 属性所指定的 Connect:Direct 节点的用户标识。 如果可能,请确保 cdUserIdConnect:Direct 管理员用户标识。 如果 cdUserId 不能是 Connect:Direct 管理员,请确保用户标识在 Connect:Direct 网桥节点上具有以下功能权限:

      • 对于 Windows 节点,请设置以下权限。 为了便于阅读,该示例使用回车符进行了格式化:
        View Processes in the  value: yes
         TCQ
        Issue the copy         value: yes
         receive, copy send,
         run job, and run task
         Process statements
        Issue the submit       value: yes
         Process statement
        Monitor, submit,       value: all
         change,and delete all
         Processes
        Access Process         value: all
         statistics
        Use the trace tool or  value: yes
         issue traceon and
         traceoff commands
        Override Process       value: yes
         options such as file
         attributes and remote
         node ID                                           
      • 对于 UNIX 节点,请在 userfile.cfg 文件中设置以下参数:
        pstmt.copy             value: y
        pstmt.upload           value: y
        pstmt.download         value: y
        pstmt.runjob           value: y
        pstmt.runtask          value: y
        cmd.submit             value: y
        pstmt.submit           value: y
        cmd.chgproc            value: y
        cmd.delproc            value: y
        cmd.flsproc            value: y
        cmd.selproc            value: a
        cmd.selstats           value: a
        cmd.trace              value: y
        snode.ovrd             value: y
    • cdPassword 是与 cdUserId 属性指定的用户标识相关联的密码。
    • 您可以选择性地指定 pnodeUserId 属性。 此属性的值是由 <tns:pnode> 元素的 name 属性指定的 Connect:Direct 节点用于提交 Connect:Direct 进程的用户标识。 如果未指定 pnodeUserId 属性,那么 Connect:Direct 节点将使用 cdUserId 属性指定的用户标识来提交 Connect:Direct 进程。
    • 您可以选择性地指定 pnodePassword 属性。 该属性的值是与 pnodeUserId 属性指定的用户标识相关联的密码。
    如果不存在与 MQMD 用户标识匹配的用户元素,那么传输将失败。
  3. 可选: 可以包含一个或多个 <tns:snode> 元素作为 <tns:user> 元素的子元素。 <tns:snode> 元素指定属于 Connect:Direct 网桥的 Connect:Direct 节点所使用的凭证。 这些凭证是 Connect:Direct 网桥节点用于连接到作为文件传输源或目标的 Connect:Direct 节点的用户标识和密码。
    将以下一个或多个元素插入该文件:
    <tns:snode name="name" 
               pattern="pattern" 
               userId="userId" 
               password="password"/>
    
    其中:
    • name 是一种模式,用于匹配作为文件传输源或目标的 Connect:Direct 节点的名称。
    • pattern 指定为 name 属性指定的模式是通配符表达式,还是 Java 正则表达式。 pattern 属性的值可以是 wildcardregex。 如果未指定该属性,那么缺省值将为 wildcard
    • userId 是由 <tns:pnode> 元素的 name 属性指定的 Connect:Direct 节点用于连接到与 <tns:snode>name 属性指定的模式相匹配的 Connect:Direct 节点的用户标识。
    • password 是与 userId 属性指定的用户标识相关联的密码。
    如果没有与文件传输的辅助节点匹配的 <tns:snode> 元素,那么这种情况不会导致传输失败。 传输将启动并且未指定与 snode 一起使用的用户标识和密码。

结果

在搜索用户名或 Connect:Direct 节点名的模式匹配时, Connect:Direct 网桥代理将从文件开头到文件结尾进行搜索。 找到的第一个匹配既是使用的匹配。