创建 PingFederate 连接
在 PingFederate 中,您可以创建客户端端点,在获取或验证访问令牌或验证用户时,您的 SSO 解决方案中的应用程序会连接到这些客户端端点。建议您为应用程序在您的 SSO 解决方案中担任的每一个角色创建一个单独的客户端。这样您就可以微调该角色所对应客户端中的设置。
对于 ThingWorx SSO,需要在 PingFederate 中创建以下客户端:
• 用于 ThingWorx 并作为服务提供工具的 SP 连接
• 用于 ThingWorx 并作为服务提供工具的 OAuth 客户端
有关创建和配置 PingFederate 连接的详细信息,请参阅 PingFederate 文档或寻求 PingIdentity 客户支持。以下过程包含 ThingWorx SSO 所需的设置,但是您企业的 SSO 解决方案可能会需要其他设置。
用于 ThingWorx 并作为服务提供工具的 SP 连接
此连接可用于 SAML 身份验证。ThingWorx 会将用户登录请求指向 PingFederate。
1. 在 IDP Configuration 页面,选择 SP Connections,然后单击 Create New。
2. 在 Connection Type 部分,选择 Browser SSO Profiles 以指定 SAML 2.0 协议。
3. 在 Connection Options 部分,选择 Browser SSO。
4. 在 General Info 部分,执行以下操作:
a. 将 Partner’s Entity ID (Connection ID) 设置为唯一值。请记下此 ID 以便后续用于配置 sso-settings.json 文件。
b. 为 Connection Name 字段添加描述性名称。该名称将显示在 SP 连接列表中。
c. 将 Base URL 设置为托管 web 应用程序 (ThingWorx) 服务提供工具的 URL。
5. 在 Protocol Settings 部分,将 Assertion Consumer Service URL Endpoint 设置为 URL:/Thingworx/saml/SSO。
6. 在 Credentials 部分,将 Digital Signature Settings 设置为 Selected Certificate。
7. 在 Signature Verification 部分,为以下内容添加许可证:
◦ Signature Verification Certificate: Selected Certificate
◦ Signature Verification Certificate: Selected Encryption Certificate
◦ Select XML Encryption Certificate: Selected Encryption Certificate
8. 确认新服务提供工具处于激活状态。查看 SP 连接。Activation & Summary 页面顶部的单选按钮指示符应设置为 Active。
9. 单击 Save。
PingFederate 使用名为策略合约的机制来桥接 PingFederate 所依赖的服务提供工具和标识提供工具。您将需要为此 SP 连接创建策略合约。在创建过程中,请列出应在 SAML 断言中交换的所有属性。
用于 ThingWorx 并作为服务提供工具的 OAuth 客户端
OAuth 客户端是 PingFederate 向 ThingWorx 提供访问令牌的连接点。ThingWorx 会使用这些访问令牌向资源提供者请求受 OAuth 保护的资源。
1. 在 OAuth Settings 页面上,选择 Clients 部分,然后单击 Create New。
2. 在 Client ID 字段中,输入一个值。该值会被用作配置 sso-settings.json 文件时使用的 AuthorizationServersSettings.<AuthServerId>.clientId 参数值。
3. 选择 Client Secret 并输入客户端密钥值。请记下此值,因为该值会被用作配置 sso-settings.json 文件时使用的 AuthorizationServersSettings.<AuthServerId>.clientSecret 参数值。
4. 在 Name 字段中,输入一个值。此值会显示在 PingFederate 客户端列表中。
5. 在 Description 字段中,输入说明。
6. 在 Redirect URIS 部分,输入 ThingWorx 服务器重定向 URI。例如:http://<我的服务器>:<我的端口>/Thingworx/oauth2_authorization_code_redirect.,其中 <我的服务器> 是您的 ThingWorx 服务器。
|
如果您在配置为 SSO 的 ThingWorx Foundation 实例上安装 ,请将此值指定为 https://<ThingWorx Flow Nginx 主机名>:<ThingWorx Flow Nginx 端口号>/Thingworx/oauth2_authorization_code_redirect。
|
7. 在 Allow Grant Types 部分,选择 Refresh Token 和 Authorization Code。
8. 在 Persistent Grants Expiration 部分,选择 Grants Do Not Expire。
9. 在 Refresh Token Rolling Policy 部分,选择 Roll。