其他配置 > 在 Windchill 群集环境中配置 ThingWorx Navigate
  
在 Windchill 群集环境中配置 ThingWorx Navigate
可以将 ThingWorx Navigate 用于 Windchill 群集环境。通过负载均衡器的 URL 将 ThingWorx Navigate 连接到 Windchill。要使用的 URL 取决于以下条件:
ThingWorx Navigate 配置 - 单一登录或 Windchill 身份验证
Windchill 基本配置 - HTTP 或 HTTPS 协议
本主题包含有关群集环境和 ThingWorx Navigate 配置示例的基本概述。
* 
ThingWorx Navigate 配置中使用 Windchill 群集时,必须考虑安全注意事项。在生产中使用群集配置之前,请务必查看下面的详细信息。
使用 Windchill 群集配置的 ThingWorx Navigate 图
Windchill 群集背景知识
使用群集的主要优势是性能、可伸缩性和可靠性的提高。群集具有以下组件:
两个或多个应用程序层主机,连接到单一数据库实例并且以负载均衡路由器作为前端。
负载均衡路由器 - 接收来自客户端的请求,包括 Windchill 用户和 ThingWorx Navigate 用户。负载均衡器在 Windchill 实例之间分配请求。因此,如果服务器崩溃或通信流量很高,用户所受影响会降低。
对于网络剩余部分,此路由器表现为单一 Windchill 服务器。该服务器有自己的主机名,并且始终使用 HTTPS 协议。
有关群集的详细信息,请参阅 Windchill 帮助中心的“安装和配置 Windchill 群集环境”一章。
在随后的部分中,有四个示例分别说明如何配置 Windchill 群集用于各个 ThingWorx Navigate 身份验证配置。我们建议为 ThingWorx Navigate 配置单一登录;这是最安全的配置。其他配置需要额外的设置和安全注意事项,以确保端到端解决方案已配置。
ThingWorx Navigate 单一登录与配置了 HTTPS 和 OAuth 的 Windchill 群集 (推荐)
这是最安全的设置。您配置的详细信息如下所示:
ThingWorx Navigate 身份验证类型 - SSO
负载均衡器协议 - HTTPS
Windchill 服务器 - 配置了 HTTPS 和 OAuth。SAML 身份验证是可选项。
由于 Windchill 是 HTTPS,因此在负载均衡器上不会发生 SSL 证书终止。
ThingWorx Composer 中验证以下位置负载均衡器的 URL:
对于 ptc-windchill-integration-connector“基本 URL”[https]://[LB-host]:[port]/[windchill-web-app]/oauth
对于 ptc-windchill-integration-connector-proxy
“基本 URL”- [https]://[LB-host]
“测试连接 URL”- [https]://[LB-host]:[port]/[windchill-web-app]/oauth/servlet/WindchillAuthGW/wt.httpgw.HTTPServer/echo
ThingWorx Navigate 单一登录与配置了 HTTP 和 OAuth 的 Windchill 群集
您配置的详细信息如下所示:
ThingWorx Navigate 身份验证类型 - SSO
负载均衡器协议 - HTTPS
Windchill 服务器 - 配置了 HTTP 和 OAuth。SAML 身份验证是可选项。
由于 Windchill 是 HTTP,因此在负载均衡器上不会发生 SSL 证书终止。
验证 ThingWorx Composer 中的负载均衡器 URL。
对于 ptc-windchill-integration-connector“基本 URL”[https]://[LB-host]:[port]/[windchill-web-app]/oauth
对于 ptc-windchill-integration-connector-proxy
“基本 URL”- [https]://[LB-host]
“测试连接 URL”- [https]://[LB-host]:[port]/[windchill-web-app]/oauth/servlet/WindchillAuthGW/wt.httpgw.HTTPServer/echo
ThingWorx Navigate 与 Windchill 身份验证,且 Windchill 群集配置 HTTPS
* 
以双向 SSL 配置使用证书可确保加密和安全数据传输。这可以通过在两端进行验证来强制执行,以确认 ThingWorx/ThingWorx NavigateWindchill 之间的连接与通信。
因为我们只支持 Windchill 作为身份提供者,因此共享登录凭据仅限于 ThingWorxWindchill
您配置的详细信息如下所示:
ThingWorx Navigate 身份验证类型 - 采用双向 SSL 的 Windchill 身份验证
负载均衡器协议 - HTTPS
负载均衡器类型 - Layer 4
Windchill 服务器 - 配置了 HTTPS 和双向 SSL
由于 Windchill 是 HTTPS,因此在负载均衡器上不会发生 SSL 证书终止。
验证 ThingWorx Composer 中的负载均衡器 URL。对于 ptc-windchill-connectorptc-windchill-connector-proxy,这是正确的格式:
https://<loadbalancer_host>:port>/Windchill/sslClientAuth
* 
仅运行于 OSI Layer 4 的负载均衡器可支持此配置。
如果您正在使用运行于 OSI Layer 7 的负载均衡器,则必须通过受信任主机配置使用 Windchill 身份验证,如下所述。
ThingWorx Navigate 与 Windchill 身份验证,且 Windchill 群集配置 HTTP
* 
不建议使用此替代配置,只能将其用于演示和概念验证。该配置不使用 SSO 或 SSL 连接 ThingWorx NavigateWindchill。相反,受信任主机属性已配置。
使用受信任的主机将在 ThingWorx 平台和 Windchill 之间建立连接,并且允许来自所标识的受信任主机 IP 地址的所有通信。这会增加“中间人攻击”(MIM) 攻击的风险。敏感信息会在此连接中暴露。
此外,即使您的系统在防火墙之后,依然存在内部攻击和网络配置错误的风险。如果攻击破坏了这些网络边界之一,攻击者可直接看到共享的非加密信息。这会将风险引入现有的 Windchill 产品和 ThingWorx Navigate 配置。
请您自行决定是否接受使用此安装的风险。PTC 不建议使用此配置,并且对于使用受信任主机选项造成的安全漏洞和系统攻击不承担任何责任。
您配置的详细信息如下所示:
ThingWorx Navigate 身份验证类型 - Windchill 身份验证
负载均衡器协议 - HTTPS
Windchill 服务器 - 配置了 HTTP 和 trustedHost 属性。配置此属性的说明如下所示。
由于 Windchill 是 HTTP,因此在负载均衡器上不会发生 SSL 证书终止。
除了下面的步骤,请确保执行“设置 ThingWorx Navigate 使用 Windchill 身份验证”末尾的“完成 Windchill 群集配置”部分中所需的步骤。
“ThingWorx Navigate 配置”工具中,在 Windchill 字段中提供此 URL:
https://<loadbalancer_host>:port>/Windchill/trustedAuth
此外,在 Windchill 侧有几个步骤需要手动执行。我们需要将 ThingWorx 服务器和负载均衡器的 IP 地址设置为受信任的主机。这样,我们就可以保护使用负载均衡器的从 ThingWorx NavigateWindchill 的连接。
这也可以禁止不受信任客户端主机通过负载均衡器访问 Windchill/trustedAuth/ URL 模式,从而提高安全性。
请在 Windchill 侧执行下列步骤:
1. 停止 Windchill 方法服务器。
2. 转至 WT_HOME/codebase/WEB-INF/web.xml,然后在文本编辑器中打开它。
3. 查找 TrustedSSLAuthFilterTrustedAuthFilter 部分,然后将参数 clientHostHeader 添加到这两个部分,如下所示:例如:
<filter>
<description>Filter allowing a trusted SSL certificate to specify the remote user for the request</description>
<filter-name>TrustedSSLAuthFilter</filter-name>
<filter-class>wt.httpgw.filter.TrustedAuthFilter</filter-class>
<init-param>
<param-name>trustTrustedHosts</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>clientHostHeader</param-name>
<param-value>X-Forwarded-For</param-value>
</init-param>
</filter>
<filter>
<description>Filter allowing a trusted client to specify the remote user for the request</description>
<filter-name>TrustedAuthFilter</filter-name>
<filter-class>wt.httpgw.filter.TrustedAuthFilter</filter-class>
<init-param>
<param-name>clientHostHeader</param-name>
<param-value>X-Forwarded-For</param-value>
</init-param>
</filter>
4. 将参数 TrustedHostFilter 添加到同一文件中。例如:
<filter>
<description>Filter allowing a trusted client to specify the remote user for the request</description>
<filter-name>TrustedHostFilter</filter-name>
<filter-class>wt.servlet.TrustedHostFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>TrustedHostFilter</filter-name>
<url-pattern>/trustedAuth/*</url-pattern>
</filter-mapping>
5. 保存并关闭 web.xml
6. 现在,在命令提示符处打开 Windchill shell。
7. 如果尚未添加 wt.auth.trustedHosts,请讲以下属性添加到 xconf.properties
<Property name="wt.auth.trustedHosts" overridable="true"
targetFile="codebase/wt.properties"
value="<TWXHost_IP> <LBHost_IP>">
TWXHostThingWorx 主机名,LBHost 是负载均衡器的主机名。
8. 运行 xconfmanager -p
9. 如果 wt.auth.trustedHosts 未在 wt.properties 文件中设置,请使用以下 xconfmanager 命令设置该属性。或者,直接将其添加到 wtproperties
xconfmanager --set wt.auth.trustedHosts==<TWXHost_IP> <LBHost_IP> -t codebase/wt.properties -p
TWXHostThingWorx 主机名,LBHost 是负载均衡器的主机名。
10. 启动 Windchill 方法服务器。
Windchill 现在配置了 trustedHost 属性。
* 
如果您需要关于使用 xconfmanager 的更多帮助,请在Windchill 帮助中心搜索“使用 xconfmanager 实用工具”主题。