捕获外部连接信息
背景
要设置与外部端点的安全 MTLS 连接,请确保端点的基本 URL、URL 片段、客户端密钥证书和服务器证书等先决条件均可在 Windchill+ 中获得。此信息在 CCD 实用程序中用于生成 SSL 上下文。
按照以下步骤与 PTC 共享连接信息
1. 按照 wnc-plus-outbound-demo-api 信息库中提供的说明,设置 materialAPI (外部端点)。
设置 materialAPI 后,请确保您掌握以下信息:
基本 URL
client-keycertchain
server-certchain
此外,应获取 BLOB_SAS_URL 以及从 PTC 接收的加密公钥。
2. 准备 JSON 文件:将以下示例 JSON 文件中提及的占位符替换为实际参数。
MaterialAPI JSON
{
"blob_sas_url": "***replace with BLOB_SAS_URL received from PTC***",
"external_connections": {
"material_api": {
"baseurl": "***replace with your base-url***",
"secrets": {
"client_cert": "***replace with path to clientcertchain***",
"bearer_token": "Bearer ***replace with your bearer token***"
},
"server_cert": "***replace with path to server.certchain***",
"url_fragments": {
"get_material_number": "/api/material",
"get_material_data_stream": "/api/materialData/stream"
}
}
},
"public_key_for_encrypting_custom_secrets":"***replace with your public key for encryption received from PTC ***",
"apply_at":"***schedule atleast 1 hour after execution-time of utility***"
}
* 
bearer_token 不是保留关键字,因此示例实施中未对持有者令牌身份验证进行特定处理。本质上,它可能是自定义代码在构建相关外部端点的请求时,可以标识并利用的任何其他字符串。
3. 指定 JSON 文件的路径,然后通过 ${WT_HOME}/prog_examples/IntegrationsExample/captureExternalConnections.sh 执行 capturExternalConnections 实用程序。
./captureExternalConnections.sh -f <***path-to-your-json***>
如果成功捕获外部信息,则系统会显示以下消息:"Connection information submitted successfully."
这对您有帮助吗?