更新时间:2025-11-13 GMT+08:00
分享

座席事件推送方式

推送回调地址采用https方式时,默认采用证书认证,需要需要上传第三方提供的事件推送证书。

如果eventpush.ssl.trustAll配置为true,则可跳过下述步骤。配置为true,即信任所有证书,可能会带来安全风险,请谨慎使用,建议使用缺省值false。

虚拟化CC-Gateway

  1. 将事件推送三方证书上传至/home/elpis/tomcat/keystore/3rdcert中。

    chmod 600 /home/elpis/tomcat/keystore/3rdcert/*
    chown elpis:elpis /home/elpis/tomcat/keystore/3rdcert/*

  2. 检查事件推送三方证书相关配置项,打开配置文件/home/elpis/tomcat/webapps/agentgateway/WEB-INF/config/basic.properties,查看以下配置项是否正确。

    eventpush.ssl.cert.file =/tomcat/keystore/3rdcert   //事件推送模式信任证书目录,只能配置用户home目录的相对路径
    eventpush.ssl.cert.type=   //证书类型,示例:JKS

  3. 根据使用AES128CBC/AES256CBC加密(可逆加密),加密事件推送三方的证书密码,得到加密后的证书密码和密钥。
  4. 打开配置文件/home/elpis/tomcat/webapps/agentgateway/WEB-INF/config/servicecloud.security.properties,填入加密后的证书密码和密钥。

    #加密后的证书密钥
    eventpush.ssl.keyStorePwd.encryptedKey=***
    #加密后的证书密码
    eventpush.ssl.keyStorePwd=***

  5. 打开配置文件/home/elpis/tomcat/webapps/agentgateway/WEB-INF/config/basic.properties,填入签入强制签入接口的入参callBackUri的值。

    #事件推送回调地址白名单
    EVENT_PUST_WHILTELIST_CALLBACKURI=https://ip:port/agentevent/pushresult;https://ip:port/agentevent/pushresult;

    有多个地址时,以英文逗号分隔。

  6. 重启CC-Gateway。

    su - elpis
    cd /home/elpis/icdcomm/bin/
    stopcomm
    icdcomm
    cd /home/elpis/tomcat/bin/
    ./shutdown.sh ;./startup.sh

使用AES128CBC/AES256CBC加密(可逆加密)

  1. 请从执行了一键式安装容器化应用的机器的/home/onekeyInstall/CertTool/encryption目录下,获取生成的加密工具包:encryption.zip。

    或者从“AICC_XX.XXX.X_ConfigPkg.zip\Tools\encrypt-tool”目录下,获取加密工具包:encryption.zip。

  2. 将加密工具包encryption.zip上传至执行加密命令的服务器,然后解压。
  3. 修改加密因子,加密工具的加密因子请与您需要配置密码的服务器的加密因子保持一致,否则会导致加密后的密码无法使用。

    请您从需要配置或修改密码的服务器的$HOME/conf/目录下(不同网元该目录存在差异,CC-Gateway与CC-HTV网元是$HOME/tomcat/conf,ODFS是$HOME/OpenAS_Tomcat/conf)获取配置文件kf.properties(加密因子是其项配置项encryption.key.factor), 替换OpenAS加密工具中的同名配置文件,目录为“encryption.zip/conf/kf.properties”

    例如:您需要修改CC-Gateway网元所在服务器的OpenProxy密码,请您从CC-Gateway的目录下/home/elpis/tomcat/conf/获取kf.properties。

  4. 执行加密脚本生成加密后的密文和密钥。

    ```bash
    SZX1000523647:/home/tools/encryption # ./openas_encrypt_interactive.sh
    openas_encrypt_interactive.sh: Missing file: /lib/tools.jar
    openas_encrypt_interactive.sh: Unexpected results may occur.  Make sure JAVA_HOME points to a JDK and not a JRE.
    This tool has two usages
    Usage 1:go to the command line input echo -e " <type> <mode> [user] <password>" |./openas_encrypt_interactive.sh
    0 <mode> [user] <password>
    2 <mode> [user] <password>
    3 <algorithm> <iterations> <saltLength> <keyLenth> <password>
    ...
    Usage 2:  press Enter to enter interactive form
    ...
    
    Please input parameters :[按回车进入交互模式]
    Please select type of service:
    1) 1 Encrypt password
    2) 2 RE-encrypt Work key with new root key
    3) 3 Update encrypted work key with new work key
    4) 4 Update encrypted password with new encrypted work key
    #? 1
    Please select type of reverse:
    1) 1 Reversible_AES128
    2) 2 Reversible_AES256
    3) 3 Irreversible_PBKDF2
    #? 1
    please input the mode of algorithm: ECB or CBC or GCM
    1)ECB AES/ECB/PKCS5Padding
    2)CBC AES/CBC/PKCS5Padding
    3)GCM AES/GCM/NoPadding
    CBC
    
    Please select userName encrypt mode: 1 Not Need/2 Need
    1) 1 Not Need
    2) 2 Need
    #? 1
    
    Please input password to encrypt:
    ************
    
    Please reenter password to encrypt:
    ************
    encryptedKey: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    encryptedPassword: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    ================================================================
    ```

    其中:

    • encryptedKey:加密包会自动产生16个随机字符并进行加密。命令运行输出的encryptedKey为加密后的加密密钥。
    • encryptedPassword:为加密后的密文。

    AES/ECB/PKCS5Padding加密算法不安全,建议您使用安全的AES/CBC/PKCS5Padding加密算法。

相关文档