在 ThingWorx Foundation KeyStore 中存储 ThingWorx Flow 密钥
先决条件
◦ 从 PTC 支持网站下载安全管理工具。如需了解用法并初始化
ThingWorx Foundation KeyStore,请参阅
安全管理工具。
◦ 当 ThingWorx Flow 安装在与 ThingWorx Foundation 不同的计算机上时,ThingWorx Flow 安装程序会在之前复制 ThingWorx Foundation platform_settings.json 文件的相同位置创建 Flowkeys.tar 文件。Flowkeys.tar 文件包含以下文件:
▪ config.json
▪ keyfile-key
▪ keys.enc
记录 Flowkeys.tar 文件的位置。
步骤
完成以下步骤以将 ThingWorx Flow 机密导入 ThingWorx Foundation KeyStore:
1. 将 Flowkeys.tar 文件复制到 ThingWorx Foundation KeyStore 所在的计算机上。
2. 将 Flowkeys.tar 文件的内容解压缩至该计算机上的任何目录。
3. 修改 config.json 文件,以使 location 指向 keys.enc 文件,keyfile-key-location 指向 keyfile-key 文件。
....
"location": "./keys.enc",
"keyfile-key-location": "./keyfile-key"
....
4. 运行以下命令以将 ThingWorx Flow 机密导入 ThingWorx Foundation KeyStore:
security-common-cli <Path-to-ThingWorx-KeyStore-config> import <Full-path-to-ThingWorx-Flow-KeyStore-config.json-file>
例如:./security-common-cli keystore.conf import config.json
5. 如果已按照
旋转 ThingWorx Flow 加密密钥中的说明旋转
ThingWorx Flow 加密密钥,则请运行以下命令以更新
ThingWorx Foundation KeyStore 中
custom_active_encryption_key 的值:
security-common-cli <Path-to-ThingWorx-KeyStore-config> set custom_active_encryption_key "<Rotated-ThingWorx-Flow-encryption-key>"
6. 如果 ThingWorx Foundation 已在运行,请重新启动 ThingWorx Foundation 以重新加载 KeyStore。