招商地产的项目

wwd b357f1f8a1 made the app uat_env and update the newest init on kafka of ZS Cloud 3 年之前
.mvn 41106881fb zhaoshang project data enrypt and decode data init 3 年之前
config 14b2e1d4cd kafka ssl uat 3 年之前
src b357f1f8a1 made the app uat_env and update the newest init on kafka of ZS Cloud 3 年之前
.gitignore 41106881fb zhaoshang project data enrypt and decode data init 3 年之前
LICENSE 8c041ffe05 Initial commit 3 年之前
README.md 47f323f171 Update uat zhaoshang datecer 3 年之前
img.png 294abe5ed3 update readme 3 年之前
mvnw 41106881fb zhaoshang project data enrypt and decode data init 3 年之前
mvnw.cmd 41106881fb zhaoshang project data enrypt and decode data init 3 年之前
pom.xml 682b3280ae V.0.0.2 update proxy server by zhaoshang 3 年之前

README.md

ztk-encryptdecodedata

概述

招商地产的项目 本项目实现 Edge侧和Cloud云端数据传输过程的通道加密和数据加密,通道使用ssl证书加密,数据实现RSA公钥私钥加密解密过程,该项目在部署过程中不建议暴露配置文件,因为密钥在配置文件中,方便进行运维部署。

img.png

部署

dev环境 请参照配置文件applocaltion.yml中, spring:

profiles:
    active: dev
location: Edge  # Edge 边缘测 or Cloud 云端

若在Edge侧部署,则将配置文件location位置设置成Edge, 若云端部署,则localtion写成Cloud,请注意大小写。 项目地址:http://39.106.8.246:3003/wangwendong/ztk-encryptdacodedata.git

备注

dev配置文件中公钥私钥,均为开发使用,UAT环境和prod环境请另换密钥,kafka集群环境在dev环境中无配置。 云边服务部署端口请按applicaltion-dev现有格式进行对应添加。

server:

port: 8090

listener:

port: 1:iot-collect:192.168.2.128:30009,2:iot-control:192.168.2.128:30010,3:iot-project:192.168.2.128:30017,4:zkt-control:192.168.2.128:30087,5:zkt-alarm:192.168.2.128:30090,6:zkt-proj-alarm:192.168.2.128:30091,7:zkt-proj-alarm:192.168.2.128:30092

rsa:

encrypt:

    open: true #是否开启加密 true  or  false
    showLog: true  # 是否打印加密日志 true  or  false
    publicKey: **********MIIBCgKCAQEAobhGH4WMwMvJRUlTxWrCVIOQtsHijA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rLZfVe7BfYQjN5n+gLGDF5xFfnpgWp5nxt1ckJ/IafVyK/6OhyqmFLuZ3zj6uOVi4rX4zvsT0uB9pl++skXSMYRC313iCBZBecqlJ5cy7ojJKVJRdj70eDmJNg4rDfSjgZVWQCF36Ysyeuar1tpi/0Covbj2Ivsf6/f3kcjl+6QKBgQCwCbgb6hxSi/F+aTusJpKK1z51VU/mDtFtfAxzxapPTwR9mncfw4d8+NV4y/kMblmNUJ+CGXX/FbQl2X9KZ6qJPqGmux5OqE6JB+A+4ONRJYMgoj/tHh7Nk1muFU4iIqE/oOP1jaKurGs1NP1CIjt1DRZlNsqYIvv9MuujW5xsFQKBgQCg9SVz0SHXRZw2/8jdoUHicNEtNmg1KSRtkOOtNUG365DI+UnO09vN8Vl/KcMwjsMwMl2roKdALjwhkwFQhITWByDgEjLCGnjCi4tdrk+/I7VztguNNXFj/sg88Qip3yF44yH6YB+h3Lja8YwWe5Bzx074A2VOD/Tiza9VCPBc8QKBgAXcbPrQ8px0+FdjHY9/wUVKIVQ6wOxB9gsVJDz+icsWMGoWKH0wP2STzFe3QtV9HxIrawQj4N/bUyIneat6hB0JrswkUr//ro21a2vshOUAwLrnbAVzCUeC7mtzXiSYzpGVw8E7M/1o1DDzULNQ/HXLN8Gq71fdYlJtzZakyDJ5AoGAM07wrtjfErCmSX3K3Jys9+2mfWiUy/XxM8UWaZq6mx416X6J+m9fruObf7cqZMOthirF3FqLidMcImujnE9LgKj7wBfSTmxQelEyU4RY9xyVC37xmtKpVh2BQGsTCrZWIiqjJggalayQSTht1HEe/Xf/kQvshu0+m484M2FmFnw= # RSA私钥

spring:

kafka:

    bootstrap-servers:  192.168.2.128:9092,192.168.2.128:9093,192.168.2.128:9094
producer:
    retries: 10000
    batch-size: 16384
    buffer-memory: 33554432
    acks: all
    client-id: edge_clent_dev
    key-serializer: org.apache.kafka.common.serialization.IntegerSerializer
    value-serializer: org.apache.kafka.common.serialization.StringSerializer 
consumer:
    bootstrap-servers: 192.168.2.128:9092,192.168.2.128:9093,192.168.2.128:9094
    group-id: cloud_consumer_dev
    auto-offset-reset: earliest
    key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
    value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
    fetch-min-size: 10
    fetch-max-wait: 500
    enable-auto-commit: true
    max-poll-records: 1000

alibaba:

iot:

    accessKey: "略"
    accessSecret: "略"
    consumerGroupId: "DEFAULT_GROUP"
    iotInstanceId: ""
    clientId: "xlink-ali-iot"
    host: "*********4283785446.iot-amqp.cn-shanghai.aliyuncs.com"

如有问题请联系wangwendong@persagy.com

更新

2021年7月23日更新 新增从阿里iot订阅消息的功能 集成阿里云Iot实现数据订阅,入门文档见 https://help.aliyun.com/document_detail/189346.html