CN110855714A - 一种多租户设备的安全连接方法和系统 - Google Patents

一种多租户设备的安全连接方法和系统 Download PDF

Info

Publication number
CN110855714A
CN110855714A CN201911197180.6A CN201911197180A CN110855714A CN 110855714 A CN110855714 A CN 110855714A CN 201911197180 A CN201911197180 A CN 201911197180A CN 110855714 A CN110855714 A CN 110855714A
Authority
CN
China
Prior art keywords
equipment
certificate
server
key
tenant
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911197180.6A
Other languages
English (en)
Other versions
CN110855714B (zh
Inventor
王小青
曹连峰
何奎
杨雪鸿
陶洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Lubangtong IoT Co Ltd
Original Assignee
Guangzhou Lu Bangtong Networking Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Lu Bangtong Networking Technology Co Ltd filed Critical Guangzhou Lu Bangtong Networking Technology Co Ltd
Priority to CN201911197180.6A priority Critical patent/CN110855714B/zh
Publication of CN110855714A publication Critical patent/CN110855714A/zh
Application granted granted Critical
Publication of CN110855714B publication Critical patent/CN110855714B/zh
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0869Network architectures or network communication protocols for network security for authentication of entities for achieving mutual authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0435Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply symmetric encryption, i.e. same key used for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0807Network architectures or network communication protocols for network security for authentication of entities using tickets, e.g. Kerberos
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0823Network architectures or network communication protocols for network security for authentication of entities using certificates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3263Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements
    • H04L9/3268Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements using certificate validation, registration, distribution or revocation, e.g. certificate revocation list [CRL]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3271Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using challenge-response
    • H04L9/3273Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using challenge-response for mutual authentication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/16Implementing security features at a particular protocol layer
    • H04L63/168Implementing security features at a particular protocol layer above the transport layer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/321Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority
    • H04L9/3213Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority using tickets or tokens, e.g. Kerberos
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD

Abstract

本发明属于及通信技术领域,公开了一种多租户设备的安全连接方法,包括如下步骤:步骤1:设备端和服务器端进行证书双向认证,认证通过后建立ssl安全连接;步骤2:设备端发送包含设备SN码、请求时间戳、设备token的请求给服务器端;步骤3:服务器端将生成的设备token和设备端所发送的设备token进行比对,判断两个设备token是否一致,若一致则进行步骤4,若不一致,则停止连接;步骤4:服务器端将设备端的连接信息通过设备秘钥加密后发送给设备端;步骤5:设备端根据设备秘钥解密经过设备秘钥加密的连接信息,并根据连接信息连接服务器端。该方法可以使建立通信连接的数据的传输安全性得到显著的提高。同时,本发明还公开了一种系统。

Description

一种多租户设备的安全连接方法和系统
技术领域
本发明属于通信技术领域,具体涉及一种多租户设备的安全连接方法和系统。
背景技术
传统多租户和服务器端建立通信连接的方法为:
设备和服务器按照约定签名规则得到签名,服务器来比对签名是否一致,一致则设备连接认证通过。具体签名规则大致如下:
1、将所有参数按照参数名称默认排序规则
2、StringparamStr="参数0值0参数1值1……参数n值n";
3、处理paramStr,只留下a-zA-Z0-9的字符;
4、在paramStr首尾加上申请接入时服务提供的密钥secret,StringsourceStr=secret+paramStr+secret
5、MD5计算上一步得到的字符串,Stringsign=SignUtils.getSHA1Digest(paramStr);
6、将签名全部转为大写,sign=sign.toUpperCase();
现有技术缺点或不足:传统都是每个租户的密钥都是一样的,一旦密钥暴露则会存在被破解的风险,不能对设备的认证提供比较好的保障。
发明内容
本发明提供了一种多租户设备的安全连接方法,该方法通过SSL双向认证、动态token校验、以租户秘钥和设备SN码为基础的动态秘钥来进行认证、校验和数据加解密,可以使建立通信连接的数据的传输安全性得到显著的提高。同时,本发明还公开了一种系统。
为实现上述目的,本发明提供如下技术方案:
一种多租户设备的安全连接方法,所述方法包括设备端、服务器端,包括依次进行的如下步骤:
步骤1:设备端和服务器端进行证书双向认证,认证通过后建立ssl安全连接;
步骤2:设备端发送包含设备SN码、请求时间戳、设备token的请求给服务器端,所述服务器端、设备端均根据SN码、请求时间戳按照第一加密策略生成设备token;
步骤3:服务器端将生成的设备token和设备端所发送的设备token进行比对,判断两个设备token是否一致,若一致则进行步骤4,若不一致,则停止连接;
步骤4:服务器端将设备端的连接信息通过设备秘钥加密后发送给设备端;
所述设备秘钥根据预先分配给租户的租户秘钥、设备SN码经过第二加密策略加密后生成;
租户将租户秘钥导入到设备端,所述设备端根据租户秘钥、设备SN码经过第二加密策略加密后生成所述设备秘钥;
步骤5:设备端根据设备秘钥解密服务器端发送过来的经过设备秘钥加密的连接信息,并根据连接信息连接服务器端。
在上述的多租户设备的安全连接方法中,所述步骤1具体为:通过证书服务器生成根证书、二级证书、三级证书,所述二级证书颁发服务器端证书给服务器端,所述三级证书颁发设备端证书给设备端,所述设备端和服务器端通过设备端证书和服务器端证书进行双向认证,若认证通过,则进行步骤2,若认证不通过,则停止连接。
在上述的多租户设备的安全连接方法中,所述步骤2中,第一加密策略为:通过MD5信息摘要算法将SN码、请求时间戳拼成的字符串生成设备token。
在上述的多租户设备的安全连接方法中,所述步骤4中,第二加密策略为:将设备SN、租户秘钥拼成的字符串经过至少两轮MD5信息摘要算法加密并将加密后的数据转换为大写的操作。
在上述的多租户设备的安全连接方法中,所述步骤4中,通过设备秘钥加密或解密连接信息的方法为:通过256位AES加密算法采用设备秘钥对连接信息进行加密和解密。
在上述的多租户设备的安全连接方法中,所述连接信息包括服务器端的IP、端口、用户名、密码;所述设备端通过连接信息采用预设的协议与服务器端建立通信连接。
同时,本发明还公开了一种用于实现如上所述方法的多租户系统,包括多个设备端、一个或多个服务器端;
所述设备端包括:
第一认证模块:用于存储设备端证书、接收服务器端发送的服务器端证书并认证;
请求模块:用于将含有设备SN码、请求时间戳、设备token的请求发送给服务器端,所述设备token为请求模块根据SN码、请求时间戳按照第一加密策略生成;
第一设备秘钥生成模块:用于将预先分配和租户的租户秘钥、设备SN码经过第二加密策略加密后生成设备秘钥;
解密模块:根据第一设备秘钥生成模块所生成的设备秘钥解密服务器端发送的经过加密的连接信息;
连接模块:用于根据解密模块得到的连接信息连接服务器端,和服务器端建立通信连接;
服务器端包括:
第二认证模块:用于存储服务器端证书、接收设备端发送的设备端证书并认证;
设备token生成模块:用于根据设备端发送的设备SN码、请求时间戳按照第一加密策略生成设备token;
校验模块:用于将设备端发送的设备token和设备token生成模块生成的token进行比对,得到比对结果;
第二设备秘钥生成模块:用于将预先分配给租户的租户秘钥、设备SN码经过第二加密策略加密后生成设备秘钥;
加密模块:用于在校验模块校验通过后采用设备秘钥对连接信息进行加密并发送给设备端;
连接响应模块:用于对设备端的连接模块的连接请求进行响应,和设备端建立通信连接。
在上述的多租户系统中,还包括证书服务器,所述证书服务器用于生成根证书、二级证书、三级证书,并采用二级证书颁发服务器端证书给服务器端,采用三级证书颁发设备端证书给设备端。
本发明的优势在于:
该方法通过SSL双向认证、动态token校验、以租户秘钥和设备SN码为基础的动态秘钥来进行认证、校验和数据加解密,可以使建立通信连接的数据的传输安全性得到显著的提高
具体来说:
1、采用SSL证书双向认证,设备的证书只有平台的CA签发出来的证书才能认证通过,方可从平台获取连接信息,安全级别比数字签名更高一些。若设备的证书被破解,则可以在平台对设备的证书进行吊销,则设备也无法进行完成认证,保障设备证书的安全性。
2、采用动态的设备token校验,提高设备认证的安全性。
3、采用一租户一设备一密钥,减少了密钥暴露后导致的风险的大小。
4、返回的设备连接信息采用较高的AES256对称加密,保证设备连接信息的安全性。
附图说明
图1为本发明的实施例1的流程图;
图2为本发明的实施例1的结构方框图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
实施例1
参考图1,一种多租户设备的安全连接方法,所述方法包括设备端、服务器端,包括依次进行的如下步骤:
步骤1:设备端和服务器端进行证书双向认证,认证通过后建立ssl安全连接;
在ssl双向认证过程中,证书通过证书服务器颁发,具体来说,所述证书服务器用于生成根证书、二级证书、三级证书,并采用二级证书颁发服务器端证书给服务器端,采用三级证书颁发设备端证书给设备端,所述设备端和服务器端通过设备端证书和服务器端证书进行双向认证,若认证通过,则进行步骤2,若认证不通过,则停止连接。
服务器端采用二级证书的优势在于:采用SSL证书双向认证,设备的证书只有平台的CA签发出来的证书才能认证通过,方可从平台获取连接信息,安全级别比数字签名更高一些。若设备的证书被破解,则可以在平台对设备的证书进行吊销,则设备也无法进行完成认证,保障设备证书的安全性。
步骤2:设备端发送包含设备SN码、请求时间戳、设备token的请求给服务器端,所述服务器端、设备端均根据SN码、请求时间戳按照第一加密策略生成设备token;
加密策略预先在服务器端和设备端约定好,在实际应用中可采用多种加密手段。
但是在本实施例中,基于MD5加密手段(MD5Message-DigestAlgorithm),一种被广泛使用的密码散列函数,可以产生出一个128位(16字节)的散列值(hashvalue),用于确保信息传输完整一致。MD5由美国密码学家罗纳德·李维斯特(RonaldLinnRivest)设计,于1992年公开,用以取代MD4算法。这套算法的程序在RFC1321标准中被加以规范。
该加密策略相比其他策略的优势在于:1、压缩性:任意长度的数据,算出的MD5值长度都是固定的。2、容易计算:从原数据计算出MD5值很容易。3、抗修改性:对原数据进行任何改动,哪怕只修改1个字节,所得到的MD5值都有很大区别。4、弱抗碰撞:已知原数据和其MD5值,想找到一个具有相同MD5值的数据(即伪造数据)是非常困难的。5、强抗碰撞:想找到两个不同的数据,使它们具有相同的MD5值,是非常困难的。
其具体的加密流程为:将设备SN码、请求时间戳拼成一行字符串,然后根据MD5信息摘要算法进行加密。
步骤3:服务器端将生成的设备token和设备端发送的的设备token进行校验,判断两个设备token是否一致,若一致则进行步骤4,若不一致,则停止连接;
由于加密策略一致、设备SN码唯一、请求时间戳唯一,所以设备端、服务器端的设备token应该一模一样,若有不一致,则停止连接,或,设备端重新发送设备SN码、新的请求时间戳的请求给服务器端重复进行步骤2。
步骤4:服务器端将设备端的连接信息通过设备秘钥加密后发送给设备端;
所述设备秘钥根据预先分配给租户的租户秘钥、设备SN码经过第二加密策略加密后生成;
租户将租户秘钥导入到设备端,所述设备端根据租户秘钥、设备SN码经过第二加密策略加密后生成所述设备秘钥;
本实施例采用的是对称加密的方法进行加密和解密,服务器端和设备端采用相同的设备秘钥对数据进行加解密;
为了提高设备的加密安全性,避免在数据碰撞,提高密码破解难度,本实施例的设备秘钥生成过程为:
首先将设备SN码、租户秘钥(租户秘钥由服务器端在租户入住时生成,租户可以以任何方式如移动终端、PC端、设备端等登录服务器端界面查看租户秘钥,并将租户秘钥导入到设备端)排列成一个字符串paramStr,然后通过MD5信息摘要算法将该字符串转换为一32位的字符串MD5Value1,然后将字符串MD5Value1转换为大写,然后再用MD5信息摘要算法将MD5Value1转换为一32位的字符串MD5Value2,然后将字符串MD5Value2转换为大写即得设备秘钥。
该转换方法适用于设备端和服务器端。
设备端采用相同的加密策略、相同的设备SN、相同的租户秘钥,生产的设备秘钥应该一模一样。
服务器端采用设备秘钥对连接信息进行加密,加密的算法为256位AES加密算法,256位AES加密算法破解难度大,结合经过第二加密策略处理得到的设备秘钥,使连接信息的传输安全性得到显著的提高。
步骤5:设备端根据设备秘钥解密服务器端发送过来的经过设备秘钥加密的连接信息,并根据连接信息连接服务器端。
同理,设备端对连接信息进行解密时,采用相同的设备秘钥、256位AES加密算法进行解密,可以获得完整的、原始的连接信息,连接信息包括但不限于服务器端的IP、端口、用户名、密码。
本方法通过SSL双向认证、动态token校验、以租户秘钥和设备SN码为基础的动态秘钥来进行认证、校验和数据加解密,可以使建立通信连接的数据的传输安全性得到显著的提高
具体来说:
1、采用SSL证书双向认证,设备的证书只有平台的CA签发出来的证书才能认证通过,方可从平台获取连接信息,安全级别比数字签名更高一些。若设备的证书被破解,则可以在平台对设备的证书进行吊销,则设备也无法进行完成认证,保障设备证书的安全性。
2、采用动态的设备token校验,提高设备认证的安全性。
3、采用一租户一设备一密钥,减少了密钥暴露后导致的风险的大小。
4、返回的设备连接信息采用较高的AES256对称加密,保证设备连接信息的安全性。
实施例2
参考图2,本实施例的目的是提供一个用于实现实施例1的方法的系统,该系统涉及多个租户的设备端、一个或多个服务器端、一个证书服务器;具体连接关系可参考附图2。
所述设备端包括:
第一认证模块:用于存储设备端证书、接收服务器端发送的服务器证书并认证;
请求模块:用于将含有设备SN码、请求时间戳、设备token的请求发送给服务器端,所述设备token为请求模块根据SN码、请求时间戳按照第一加密策略生成;
第一设备秘钥生成模块:用于将预先分配给租户的租户秘钥、设备SN码经过第二加密策略加密后生成设备秘钥;
解密模块:根据第一设备秘钥生成模块所生成的设备秘钥解密服务器端发送的经过加密的连接信息;
连接模块:用于根据解密模块得到的连接信息连接服务器端,和服务器端建立通信连接;
服务器端包括:
第二认证模块:用于存储服务器端证书、接收设备端发送的证书并认证;
设备token生成模块:用于根据设备端发送的设备SN码、请求时间戳按照第一加密策略生成设备token;
校验模块:用于将设备端发送的设备token和设备token生成模块:生成的token进行比对,得到比对结果;
第二设备秘钥生成模块:用于将预先分配给租户的租户秘钥、设备SN码经过第二加密策略加密后生成设备秘钥;预先分配给租户的租户秘钥是在服务器端生成的,所以在服务器端都有存储租户秘钥。
加密模块:用于在校验模块校验通过后采用设备秘钥对连接信息进行加密并发送给设备端;
连接响应模块:用于对设备端的连接模块的连接请求进行响应,和设备端建立通信连接。
所述证书服务器用于生成根证书、二级证书、三级证书,并采用二级证书颁发服务器端证书给服务器端,采用三级证书颁发设备端证书给设备端。
其具体的工作配合过程为:
当租户入住本平台时,证书服务器针对每一个设备生成一组根证书、二级证书、三级证书,并通过二级证书颁发服务器端证书给服务器端的第二认证模块、通过三级证书颁发设备端证书给设备端的第一认证模块。
当租户的设备需要建立和服务器端的连接时,第二认证模块发送服务器端证书给第一认证模块,第一认证模块发送设备端证书给第二认证模块,经过ssl双向认证成功后,设备token生成模块生成设备token,并将设备SN码、请求时间戳、设备token发送给服务器端;服务器端通过设备token生成模块生成相同的设备token。然后服务器端校验模块校验两个设备token,若一模一样,则第一设备秘钥生成模块生成设备秘钥,第二设备秘钥生成模块生成设备秘钥。服务器端将连接信息通过加密模块加密后发送给设备端的解密模块,加密规则等参考实施例1。设备端的解密模块解密后通过连接模块利用连接信息和服务器端的连接响应模块进行连接,建立设备端和服务器端的通信连接。
上述实施例为本发明较佳的实施方式,但本发明的实施方式并不受上述实施例的限制,其它的任何未背离本发明的精神实质与原理下所作的改变、修饰、替代、组合、简化,均应为等效的置换方式,都包含在本发明的保护范围之内。

Claims (8)

1.一种多租户设备的安全连接方法,所述方法包括设备端、服务器端,其特征在于,包括依次进行的如下步骤:
步骤1:设备端和服务器端进行证书双向认证,认证通过后建立ssl安全连接;
步骤2:设备端发送包含设备SN码、请求时间戳、设备token的请求给服务器端,所述服务器端、设备端均根据SN码、请求时间戳按照第一加密策略生成设备token;
步骤3:服务器端将生成的设备token和设备端所发送的设备token进行比对,判断两个设备token是否一致,若一致则进行步骤4,若不一致,则停止连接;
步骤4:服务器端将设备端的连接信息通过设备秘钥加密后发送给设备端;
所述设备秘钥根据预先分配给租户的租户秘钥、设备SN码经过第二加密策略加密后生成;
租户将租户秘钥导入到设备端,所述设备端根据租户秘钥、设备SN码经过第二加密策略加密后生成所述设备秘钥;
步骤5:设备端根据设备秘钥解密经过设备秘钥加密的连接信息,并根据连接信息连接服务器端。
2.根据权利要求1所述的多租户设备的安全连接方法,其特征在于,所述步骤1具体为:通过证书服务器生成根证书、二级证书、三级证书,所述二级证书颁发服务器端证书给服务器端,所述三级证书颁发设备端证书给设备端,所述设备端和服务器端通过设备端证书和服务器端证书进行双向认证,若认证通过,则进行步骤2,若认证不通过,则停止连接。
3.根据权利要求1所述的多租户设备的安全连接方法,其特征在于,所述步骤2中,第一加密策略为:通过MD5信息摘要算法将SN码、请求时间戳拼成的字符串生成设备token。
4.根据权利要求1所述的多租户设备的安全连接方法,其特征在于,所述步骤4中,第二加密策略为:将设备SN、租户秘钥拼成的字符串经过至少两轮MD5信息摘要算法加密并将加密后的数据转换为大写的操作。
5.根据权利要求1所述的多租户设备的安全连接方法,其特征在于,所述步骤4中,通过设备秘钥加密或解密连接信息的方法为:通过256位AES加密算法采用设备秘钥对连接信息进行加密和解密。
6.根据权利要求1所述的多租户设备的安全连接方法,其特征在于,所述连接信息包括服务器端的IP、端口、用户名、密码;所述设备端通过连接信息采用预设的协议与服务器端建立通信连接。
7.一种用于实现权利要求1-6任一所述方法的多租户系统,其特征在于,包括多个设备端、一个或多个服务器端;
所述设备端包括:
第一认证模块:用于存储设备端证书、接收服务器端发送的服务器端证书并认证;
请求模块:用于将含有设备SN码、请求时间戳、设备token的请求发送给服务器端,所述设备token为请求模块根据SN码、请求时间戳按照第一加密策略生成;
第一设备秘钥生成模块:用于将预先分配和租户的租户秘钥、设备SN码经过第二加密策略加密后生成设备秘钥;
解密模块:根据第一设备秘钥生成模块所生成的设备秘钥解密服务器端发送的经过加密的连接信息;
连接模块:用于根据解密模块得到的连接信息连接服务器端,和服务器端建立通信连接;
服务器端包括:
第二认证模块:用于存储服务器端证书、接收设备端发送的设备端证书并认证;
设备token生成模块:用于根据设备端发送的设备SN码、请求时间戳按照第一加密策略生成设备token;
校验模块:用于将设备端发送的设备token和设备token生成模块生成的token进行比对,得到比对结果;
第二设备秘钥生成模块:用于将预先分配给租户的租户秘钥、设备SN码经过第二加密策略加密后生成设备秘钥;
加密模块:用于在校验模块校验通过后采用设备秘钥对连接信息进行加密并发送给设备端;
连接响应模块:用于对设备端的连接模块的连接请求进行响应,和设备端建立通信连接。
8.根据权利要求7所述的多租户系统,其特征在于,还包括证书服务器,所述证书服务器用于生成根证书、二级证书、三级证书,并采用二级证书颁发服务器端证书给服务器端,采用三级证书颁发设备端证书给设备端。
CN201911197180.6A 2019-11-29 2019-11-29 一种多租户设备的安全连接方法和系统 Active CN110855714B (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911197180.6A CN110855714B (zh) 2019-11-29 2019-11-29 一种多租户设备的安全连接方法和系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911197180.6A CN110855714B (zh) 2019-11-29 2019-11-29 一种多租户设备的安全连接方法和系统

Publications (2)

Publication Number Publication Date
CN110855714A true CN110855714A (zh) 2020-02-28
CN110855714B CN110855714B (zh) 2021-09-14

Family

ID=69606115

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911197180.6A Active CN110855714B (zh) 2019-11-29 2019-11-29 一种多租户设备的安全连接方法和系统

Country Status (1)

Country Link
CN (1) CN110855714B (zh)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101674304A (zh) * 2009-10-15 2010-03-17 浙江师范大学 一种网络身份认证系统及方法
CN103457939A (zh) * 2013-08-19 2013-12-18 飞天诚信科技股份有限公司 一种实现智能密钥设备双向认证的方法
CN103685187A (zh) * 2012-09-14 2014-03-26 华耀(中国)科技有限公司 一种按需转换ssl认证方式以实现资源访问控制的方法
CN104320258A (zh) * 2014-10-24 2015-01-28 西安未来国际信息股份有限公司 一种云计算服务接入网关的方法
CN104539620A (zh) * 2014-12-29 2015-04-22 飞天诚信科技股份有限公司 一种安全的双向ssl认证方法和中间件
CN104735087A (zh) * 2015-04-16 2015-06-24 国家电网公司 一种基于公钥算法和SSL协议的多集群Hadoop系统安全优化方法
CN104769908A (zh) * 2012-09-07 2015-07-08 甲骨文国际公司 基于ldap的多租户云中身份管理系统
US20150288514A1 (en) * 2014-04-08 2015-10-08 Cloudflare, Inc. Secure session capability using public-key cryptography without access to the private key
CN106462717A (zh) * 2014-06-23 2017-02-22 甲骨文国际公司 用于在多租户应用服务器环境中支持安全性的系统和方法
CN106790091A (zh) * 2016-12-23 2017-05-31 深圳市深信服电子科技有限公司 一种云安全防护系统以及流量清洗方法
CN106911814A (zh) * 2017-05-11 2017-06-30 成都四象联创科技有限公司 大规模数据分布式存储方法
CN109565443A (zh) * 2016-08-04 2019-04-02 微软技术许可有限责任公司 基于范围的证书部署

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101674304A (zh) * 2009-10-15 2010-03-17 浙江师范大学 一种网络身份认证系统及方法
CN104769908A (zh) * 2012-09-07 2015-07-08 甲骨文国际公司 基于ldap的多租户云中身份管理系统
CN103685187A (zh) * 2012-09-14 2014-03-26 华耀(中国)科技有限公司 一种按需转换ssl认证方式以实现资源访问控制的方法
CN103457939A (zh) * 2013-08-19 2013-12-18 飞天诚信科技股份有限公司 一种实现智能密钥设备双向认证的方法
US20150288514A1 (en) * 2014-04-08 2015-10-08 Cloudflare, Inc. Secure session capability using public-key cryptography without access to the private key
CN106462717A (zh) * 2014-06-23 2017-02-22 甲骨文国际公司 用于在多租户应用服务器环境中支持安全性的系统和方法
CN104320258A (zh) * 2014-10-24 2015-01-28 西安未来国际信息股份有限公司 一种云计算服务接入网关的方法
CN104539620A (zh) * 2014-12-29 2015-04-22 飞天诚信科技股份有限公司 一种安全的双向ssl认证方法和中间件
CN104735087A (zh) * 2015-04-16 2015-06-24 国家电网公司 一种基于公钥算法和SSL协议的多集群Hadoop系统安全优化方法
CN109565443A (zh) * 2016-08-04 2019-04-02 微软技术许可有限责任公司 基于范围的证书部署
CN106790091A (zh) * 2016-12-23 2017-05-31 深圳市深信服电子科技有限公司 一种云安全防护系统以及流量清洗方法
CN106911814A (zh) * 2017-05-11 2017-06-30 成都四象联创科技有限公司 大规模数据分布式存储方法

Also Published As

Publication number Publication date
CN110855714B (zh) 2021-09-14

Similar Documents

Publication Publication Date Title
US8130961B2 (en) Method and system for client-server mutual authentication using event-based OTP
WO2020087805A1 (zh) 基于双密值和混沌加密的可信测控网络认证方法
US9253162B2 (en) Intelligent card secure communication method
CN111435913B (zh) 一种物联网终端的身份认证方法、装置和存储介质
CN103051628A (zh) 基于服务器获取认证令牌的方法及系统
WO2005025125A1 (ja) 機器認証システム
CN108809633B (zh) 一种身份认证的方法、装置及系统
CN109905384B (zh) 数据迁移方法及系统
CN111181723B (zh) 物联网设备间离线安全认证的方法和装置
CN107306246A (zh) 基于访问密钥的数据获取方法
CN108737323A (zh) 一种数字签名方法、装置及系统
CN110912877B (zh) 变电站内基于iec61850模型的数据发送、接收方法及装置
CN103916363A (zh) 加密机的通讯安全管理方法和系统
CN111884811A (zh) 一种基于区块链的数据存证方法和数据存证平台
CN110891065A (zh) 一种基于Token的用户身份辅助加密的方法
CN114697040A (zh) 一种基于对称密钥的电子签章方法和系统
CN113868684A (zh) 一种签名方法、装置、服务端、介质以及签名系统
CN111224784B (zh) 一种基于硬件可信根的角色分离的分布式认证授权方法
CN104394532A (zh) 移动端防暴力破解的安全登录方法
CN112242993A (zh) 双向认证方法及系统
CN110855714B (zh) 一种多租户设备的安全连接方法和系统
CN112422289B (zh) 一种NB-IoT终端设备的数字证书离线安全分发方法和系统
CN108323231B (zh) 一种传输密钥的方法、接收终端和分发终端
CN107171784B (zh) 突发环境事件应急指挥调度方法及系统
CN105471916B (zh) 防范安全套接层潜信道密钥恢复的方法

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 511356 Room 501, building 2, No. 63, Yong'an Avenue, Huangpu District, Guangzhou, Guangdong

Patentee after: Guangzhou lubangtong Internet of things Technology Co.,Ltd.

Address before: 510653 3rd floor, building F, kehuiyuan, 95 Daguan Road, Tianhe District, Guangzhou City, Guangdong Province

Patentee before: GUANGZHOU ROBUSTEL TECHNOLOGIES Co.,Ltd.

CP03 Change of name, title or address