WO2021139338A1 - 一种数据访问权限验证方法、装置、计算机设备及存储介质 - Google Patents

一种数据访问权限验证方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2021139338A1
WO2021139338A1 PCT/CN2020/124726 CN2020124726W WO2021139338A1 WO 2021139338 A1 WO2021139338 A1 WO 2021139338A1 CN 2020124726 W CN2020124726 W CN 2020124726W WO 2021139338 A1 WO2021139338 A1 WO 2021139338A1
Authority
WO
WIPO (PCT)
Prior art keywords
server
access
result
data
generate
Prior art date
Application number
PCT/CN2020/124726
Other languages
English (en)
French (fr)
Inventor
赵亦杨
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021139338A1 publication Critical patent/WO2021139338A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Definitions

  • This application relates to the field of blockchain technology, in particular to a data access authority verification method, device, computer equipment and storage medium.
  • a data access authority verification method applied to a first server includes: obtaining an access rule generated in advance by a second server; and determining, based on the access rule, that the second server accesses resources Opening time; when the current time matches the opening time, obtain the public key of the second server; create permission to access the second server and obtain the private key of the first server; based on the public key pair of the second server Encrypting the authority access data to generate encrypted authority access data; digitally signing the encrypted authority access data according to the private key of the first server to generate an access message for the first server; A server access message is sent to the blockchain, and a data access request is sent to the second server.
  • a method for verifying data access authority applied to a second server, the method comprising: when a data access request of the first server is received, obtaining the access message of the first server from the blockchain; and obtaining the information of the first server
  • the public key and the private key of the second server verify the access message of the first server according to the public key of the first server to generate a first verification result; use the private key of the second server to verify the first verification result;
  • a server's access message is decrypted to generate a decrypted access message; the verification result and the decrypted access message are audited according to a preset audit mode, and an audit result is generated; the authorization result is determined according to the audit result;
  • the public key of the first server encrypts the authorization result and sends it to the blockchain, and sends a data access response to the first server.
  • a data access authority verification device applied to a first server, the device comprising: an access rule acquisition module for acquiring an access rule generated in advance by a second server; a time determination module for determining based on the access rule The opening time for the second server to access the resource; a public key acquisition module for obtaining the public key of the second server when the current time matches the opening time; a data creation module for creating access to the second server Access data and obtain the private key of the first server; a data encryption module for encrypting the permission access data based on the public key of the second server to generate encrypted permission access data; a data signature module for Digitally sign the encrypted permission access data according to the private key of the first server to generate an access message of the first server; a message sending module is used to send the access message of the first server to the blockchain .
  • a computer device includes a memory and a processor.
  • the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes a method for verifying data access rights, Wherein, the data access authority verification method is applied to the first server, and the method includes the following steps:
  • a computer device includes a memory and a processor.
  • the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes a method for verifying data access rights, Wherein, the data access authority verification method is applied to the second server, and the method includes the following steps:
  • the access message of the first server is decrypted by the private key of the second server to generate a decrypted access message ;
  • the identification identifier is an identification parameter added when the first server generates the access message;
  • the authorization result is encrypted by the public key of the first server and sent to the blockchain, and a data access response is sent to the first server.
  • a storage medium storing computer-readable instructions.
  • the one or more processors execute a method for verifying data access rights, wherein the data access
  • the permission verification method is applied to the first server, and the method includes the following steps:
  • a storage medium storing computer-readable instructions.
  • the one or more processors execute a method for verifying data access rights, wherein the data access
  • the permission verification method is applied to the second server, and the method includes the following steps:
  • the access message of the first server is decrypted by the private key of the second server to generate a decrypted access message ;
  • the identification identifier is an identification parameter added when the first server generates the access message;
  • the authorization result is encrypted by the public key of the first server and sent to the blockchain, and a data access response is sent to the first server.
  • This application releases the flow of data, authorization information, and usage records between the various servers on the blockchain, which separates the data from the shared access process, avoids illegal data leakage in data sharing, and reduces data. Security risks when sharing.
  • Figure 1 is an implementation environment diagram of a data access permission verification method provided in an embodiment of this application
  • Figure 2 is a schematic diagram of the internal structure of a computer device in an embodiment of the application
  • FIG. 3 is a schematic diagram of a method for verifying data access permissions provided in an embodiment of this application.
  • FIG. 4 is a schematic diagram of a method for generating an access request message in a method for verifying data access authority provided in an embodiment of this application;
  • FIG. 5 is a schematic diagram of a method for generating an access rule in a data access authority verification method provided in an embodiment of this application;
  • FIG. 6 is a schematic diagram of a method for viewing an authorization result in a data access authority verification method provided in an embodiment of the application
  • FIG. 7 is a schematic diagram of an implementation scenario of data access permission verification provided in an embodiment of this application.
  • FIG. 8 is a schematic diagram of a data access authority verification device provided by an embodiment of the present application.
  • Fig. 9 is a schematic diagram of another data access authority verification device provided by an embodiment of the present application.
  • first, second, etc. used in this application can be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element.
  • the first server can be the second server, and similarly, the second server can be the first server.
  • FIG. 1 is an implementation environment diagram of a data access permission verification method provided in an embodiment. As shown in FIG. 1, the implementation environment includes a first server 110, a second server 120, and a blockchain 130.
  • the first server 110 and the second server 120 are server devices.
  • the first server 110 is a server for company B to store platform data
  • the second server 120 is a server for company A to store platform data.
  • the blockchain 130 mainly records the access rules issued by each platform, as well as applications for data access rights and access authorizations of other platforms.
  • the second server 120 will verify the access authority of the first server 110. First, the first server 110 obtains the second server. The access rules generated by the server 120 in advance, the first server 110 creates an access message based on the acquired access rules, encrypts and digitally signs the access message, sends it to the blockchain 130 and sends a data access request to the second server.
  • the second server 120 When the second server 120 receives the first server data access request, it obtains the access message from the blockchain 130 and performs signature verification and decryption on the access message, generates a decrypted access message, and responds to the decrypted access message Perform permission review, generate authorization results, encrypt and digitally sign the authorization results and send them to the blockchain 130, and send a data access response to the first server. After receiving the response, the first server 110 obtains the authorization result from the blockchain 130, performs signature verification and decryption of the authorization result, generates a decrypted authorization result, and determines whether to perform data access based on the decrypted authorization result.
  • first server 110, the second server 120, and the blockchain 130 can be connected via Bluetooth, USB (Universal Serial Bus, Universal Serial Bus) or other communication connection methods. This application will not do it here. limit.
  • Figure 2 is a schematic diagram of the internal structure of a computer device in an embodiment.
  • the computer device includes a processor, a non-volatile storage medium, a memory, and a network interface connected through a system bus.
  • the non-volatile storage medium of the computer device stores an operating system, a database, and computer-readable instructions.
  • the database may store control information sequences.
  • the processor can realize a A method of data access authorization verification.
  • the processor of the computer equipment is used to provide calculation and control capabilities, and supports the operation of the entire computer equipment.
  • a computer-readable instruction may be stored in the memory of the computer device, and when the computer-readable instruction is executed by the processor, the processor may execute a data access permission verification method.
  • the network interface of the computer device is used to connect and communicate with the terminal.
  • FIG. 2 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • the specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • the method for verifying data access permissions provided by the embodiments of the present application will be described in detail below with reference to FIGS. 3 to 7.
  • the method can be implemented by relying on a computer program, and can be run on a data access authority verification device based on the von Neumann system.
  • the computer program can be integrated in the application or run as an independent tool application.
  • FIG. 3 provides a schematic flowchart of a data access permission verification method according to an embodiment of this application.
  • the method of the embodiment of the present application may include the following steps:
  • the server is the server where the company stores platform data, that is, it is responsible for storing data on the company platform.
  • Blockchain is a technology that is maintained by multiple parties, uses cryptography to ensure data transmission and data access security, and can achieve data consistency, tamper-proof, and non-repudiation technology.
  • the access message is generated by the first server.
  • FIG. 4 is a flow chart of the access message and access request generated by the first server.
  • the first server first obtains the second server's advance
  • the generated access rule determines the opening time for the second server to access the resource based on the access rule, and when the current time matches the opening time, the public key of the second server is obtained, and then the permission to access the second server is created and the access data is obtained.
  • the private key of the first server encrypts the permission access data based on the public key of the second server to generate the encrypted permission access data.
  • the encrypted permission access data is digitally signed according to the private key of the first server to generate
  • the access message of the first server is sent, and the access message of the first server is sent to the blockchain, and the data access request is sent to the second server.
  • the signature and verification can be implemented by using elliptic curve encryption and decryption, using the ECC-secp256k1 algorithm, that is, an asymmetric cryptographic algorithm.
  • the private key is used for signature and the public key is used for decryption.
  • the second server after sending the data access request to the second server, when the second server receives the access request of the first server, it parses the access request of the first server, and obtains the request identifier after the analysis.
  • the server matches the access message corresponding to the identifier from the blockchain according to the identifier. (That is, the access message of the first server).
  • the first server is the server of company B
  • the second server is the server of company A.
  • each company has its own public and private key pair, denoted by company A
  • the public key of the server is PK A
  • the private key is SK A
  • the public key of company B’s server is PK B
  • the private key is SK B.
  • the server of company B When the server of company B wants to access the data of the server of company A, the server of company B first obtains the access rules published by the server of company A in the blockchain, then analyzes the access rules, and queries the services of company A in the access rules
  • the access time set by the client if the current time matches the access time set by the server of company A, the application for access permission of the server of company B is encrypted with the public key of company A and signed with the private key of SK B to prevent forgery.
  • the signed message is Subsequently, Company B (ie, the first server) records the message on the blockchain and sends a data access request to the server of Company A (ie, the second server).
  • ID B is the identity of company B
  • Self_Condition B is a description of its own situation
  • Apply_Datasource B is the data resource to be accessed.
  • the server of company A receives the access request, and obtains the access message issued by company B from the blockchain, and then obtains the public key of company B and the private key of its own server.
  • S103 Verify the access message of the first server according to the public key of the first server, and generate a first verification result
  • step S102 after obtaining the public key of company B and the private key of its own server based on step S102, use the ECC-secp256k1 algorithm to verify the signature of the access message received in step S101 with the public key of company B
  • step S101 After determining the access message of Company B, use the ECC-secp256k1 algorithm to decrypt the access message through the private key of its own server to generate the decrypted access message.
  • the second server when the access rule is generated, as shown in Figure 5, for example, the second server first obtains its own public key and the second server parameter set, and then performs the second server parameter set based on the second server's private key. Digitally sign, generate access rules, and finally encrypt the access rules according to the public key of the second server and publish them to the blockchain.
  • Company A the second server
  • Company A will first publish on the blockchain all the conditions that other platforms that want to access its data should meet, that is, the access rules
  • the rule by the A's private key SK A signature usually including A company's own identity ID A, the other company qualification requirements Demands A, accessible data resources Datasource A, such as a statistical average of the data, open access Time A and so on.
  • step S103 Please refer to step S103, which will not be repeated here.
  • S105 Audit the verification result and the decrypted access message according to a preset audit mode, and generate an audit result
  • the preset review methods are several methods for the second server to perform authorization review after decrypting the access message sent by the first server.
  • the review methods in this application include manual review and automatic server review.
  • the server when it is a manual review, the server first sends the access application to the terminal of the review user for prompting, and receives the review instruction after the prompt, and generates the review result according to the instruction for feedback.
  • the server when the server is automatically audited, first obtain the preset authorized server set, and finally determine whether the requested server access message exists in the authorized server set, and generate an audit result after the judgment is completed .
  • smart contracts are used for automatic review. If Hyperledger Fabric is used for smart contract review, its smart contract is actually the chain code chaincode, which can automatically execute specific business rules and can be formulated as an access control type. Allow certain approved members, such as A and B companies to call. In the implementation, technologies such as virtual machines can be used. If it is on the Ethernet, the smart contract can be deployed through the Ethernet package or the console. There are many ways to implement it, not limited to this.
  • S106 Determine an authorization result according to the review result
  • the authorization result is the final result generated by the second server after auditing according to the access message of the first server, and the result includes passing the audit and not passing the audit.
  • an access denial notification is generated, and the access denial notification is encrypted by the public key of the first server to obtain the encrypted access denial notification, and the private key of the second server is used.
  • the encrypted access denied notification is digitally signed to generate an authorization result.
  • the access credential and access time are generated, and then the access credential and access time are encrypted by the public key of the first server to generate the encrypted access credential and access time , And finally digitally sign the encrypted access credential and access time through the private key of the second server to generate the authorization result.
  • S107 Encrypt the authorization result using the public key of the first server and send it to the blockchain, and send a data access response to the first server.
  • Token A_B is the token authorized and allocated by the server of Company A to the server of Company B.
  • Expiration is the validity period of the token. Any token beyond the validity period will not be used for data access, which effectively guarantees the access Backward security of data.
  • the message will also be encrypted with company B's public key PK B and signed by A.
  • company A will also record the tokens allocated to company B and the validity period of the tokens on the application server, as well as the resources that company B can access, so as to facilitate subsequent review.
  • the first server when receiving the second server data access response, the first server obtains the authorization result of the second server from the blockchain, and then obtains the public key of the second server and the first service Then, the authorization result is verified by the public key of the second server to generate a second verification result.
  • the second verification result is the verification result sent by the second server
  • the private key pair of the first server is used
  • the authorization result is decrypted to generate a decrypted authorization result, and finally, whether to perform data access is determined based on the decrypted authorization result.
  • the blockchain-based cross-platform application data security proposed in this application separates the data from the shared access process, where the data is still stored locally by each platform application server, and the block The chain only records the access rules issued by each platform, other platforms' applications for data access rights, and data owners' authorization records for applicants, etc.
  • the data ownership platform can clearly know who has accessed what data when, and avoids malicious staff inside the data applicant from causing illegality to the data applied for. leakage.
  • this application gives different tokens with different validity periods, which effectively guarantees the backward security of data, avoids illegal data leakage in data sharing, and reduces the security risks in data sharing.
  • FIG. 8 shows a schematic structural diagram of a data access authority verification device provided by an exemplary embodiment of the present application, which is applied to the first server.
  • the data access authority verification system can be implemented as all or a part of computer equipment through software, hardware or a combination of the two.
  • the device 1 includes an access rule acquisition module 10, a time determination module 20, a public key acquisition module 30, a data creation module 40, a data encryption module 50, a data signature module 60, and a message sending module 70.
  • the access rule obtaining module 10 is used to obtain the access rule generated in advance by the second server;
  • the time determining module 20 is configured to determine the open time for the second server to access the resource based on the access rule
  • the public key obtaining module 30 is configured to obtain the public key of the second server when the current time matches the opening time;
  • the data creation module 40 is configured to create access data with the authority to access the second server and obtain the private key of the first server;
  • the data encryption module 50 is configured to encrypt the authority access data based on the public key of the second server to generate encrypted authority access data
  • the data signature module 60 is configured to digitally sign the encrypted permission access data according to the private key of the first server to generate an access message for the first server;
  • the message sending module 70 is configured to send the access message of the first server to the blockchain.
  • FIG. 9 shows a schematic structural diagram of a data access authority verification device provided by an exemplary embodiment of the present application, which is applied to the second server.
  • the data access authority verification system can be implemented as all or a part of computer equipment through software, hardware or a combination of the two.
  • the device 2 includes a message acquisition module 10, a public key and secret key acquisition module 20, a result generation module 30, a decrypted message generation module 40, an audit result generation module 50, an authorization result determination module 60, and a response module 70.
  • the message obtaining module 10 is configured to obtain the access message of the first server from the blockchain when the data access request of the first server is received;
  • the public key and key obtaining module 20 is used to obtain the public key of the first server and the private key of the second server;
  • the result generation module 30 is configured to verify the access message of the first server according to the public key of the first server, and generate a first verification result
  • the decrypted message generating module 40 is configured to decrypt the access message of the first server by using the private key of the second server to generate a decrypted access message;
  • the audit result generation module 50 is configured to audit the verification result and the decrypted access message according to a preset audit mode, and generate an audit result;
  • the authorization result determination module 60 is configured to determine the authorization result according to the review result
  • the response module 70 is configured to encrypt the authorization result using the public key of the first server and send it to the blockchain, and send a data access response to the first server.
  • a computer device includes a memory, a processor, and a computer program that is stored on the memory and can run on the processor, and the processor executes the computer
  • the program implements the data access authority verification method shown in any of the above exemplary embodiments, and the data access authority verification method includes the following steps: the first server obtains the access rules pre-generated by the second server; the first server Determine the open time for the second server to access the resource based on the access rule; when the current time matches the open time, the first server obtains the public key of the second server; the first server creates and accesses the second service Access data and obtain the private key of the first server; the first server encrypts the permission access data based on the public key of the second server to generate encrypted permission access data; the first server according to the The private key of the first server digitally signs the encrypted permission access data to generate an access message of the first server; the first server sends the access message of the first server to the blockchain and sends it to the The second server sends a data access request
  • the second server When the second server receives the data access request of the first server, it obtains the access message of the first server from the blockchain; the second server obtains the public key of the first server and the private key of the second server; second The server verifies the access message of the first server according to the public key of the first server to generate a first verification result; the second server uses the private key of the second server to access the first server The message is decrypted to generate a decrypted access message; the second server verifies the verification result and the decrypted access message according to a preset review method, and generates an review result; the second server determines the authorization result according to the review result ; The second server encrypts the authorization result through the public key of the first server and sends it to the blockchain, and sends a data access response to the first server.
  • the first server When the first server receives the second server data access response, it obtains the authorization result of the second server from the blockchain; the first server obtains the public key of the second server and the private key of the first server; first The server verifies the authorization result through the public key of the second server to generate a second verification result; when the second verification result is the verification result sent by the second server, the first server passes The private key of the first server decrypts the authorization result to generate a decrypted authorization result; the first server determines whether to perform data access based on the decrypted authorization result.
  • a storage medium storing computer-readable instructions.
  • the computer-readable storage medium may be non-volatile or volatile.
  • the computer-readable instructions are stored by one or more When the processor is executed, one or more processors are caused to execute the data access authority verification method shown in any of the above exemplary embodiments, and the data access authority verification method includes the following steps: the first server obtains the second server Pre-generated access rules; the first server determines the opening time for the second server to access the resource based on the access rules; when the current time matches the opening time, the first server obtains the public key of the second server; A server creates the permission access data to access the second server and obtains the private key of the first server; the first server encrypts the permission access data based on the public key of the second server to generate the encrypted permission Access data; the first server digitally signs the encrypted permission access data according to the private key of the first server to generate the access message of the first server; the first server sends the access message of the first server Send to the blockchain, and send a data access request to
  • the second server When the second server receives the data access request of the first server, it obtains the access message of the first server from the blockchain; the second server obtains the public key of the first server and the private key of the second server; second The server verifies the access message of the first server according to the public key of the first server to generate a first verification result; the second server uses the private key of the second server to access the first server The message is decrypted to generate a decrypted access message; the second server verifies the verification result and the decrypted access message according to a preset review method, and generates an review result; the second server determines the authorization result according to the review result ; The second server encrypts the authorization result through the public key of the first server and sends it to the blockchain, and sends a data access response to the first server.
  • the first server When the first server receives the second server data access response, it obtains the authorization result of the second server from the blockchain; the first server obtains the public key of the second server and the private key of the first server; first The server verifies the authorization result through the public key of the second server to generate a second verification result; when the second verification result is the verification result sent by the second server, the first server passes The private key of the first server decrypts the authorization result to generate a decrypted authorization result; the first server determines whether to perform data access based on the decrypted authorization result.
  • the computer program can be stored in a computer readable storage medium, and the program can be stored in a computer readable storage medium. When executed, it may include the procedures of the above-mentioned method embodiments.
  • the aforementioned storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Storage Device Security (AREA)

Abstract

一种数据访问权限验证方法、装置、计算机设备及存储介质,涉及区块链领域,方法包括:第一服务端(110)创建访问消息并将访问消息加密并数字签名后发送至区块链(130),并向第二服务端(120)发送数据访问请求;第二服务端(120)接收请求后从区块链(130)中获取第一服务端(110)的访问消息并对访问消息进行签名验证和解密,生成解密后的访问消息,并针对解密后的访问消息进行权限审核,生成授权结果,并将授权结果进行加密并数字签名后发送至区块链(130)并向第一服务端(110)发送访问响应;第一服务端(110)接收响应后,从区块链(130)中获取授权结果并对授权结果进行签名验证和解密,生成解密的授权结果,并基于解密的授权结果确定是否进行数据访问。利用上述方法可以降低数据共享时存在的安全风险。

Description

一种数据访问权限验证方法、装置、计算机设备及存储介质
本申请要求于2020年7月31日提交中国专利局、申请号为202010760949.7,发明名称为“一种数据访问权限验证方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及区块链技术领域,特别涉及一种数据访问权限验证方法、装置、计算机设备及存储介质。
背景技术
随着信息时代的不断发展,同一公司的不同部门或者不同企业间的信息交流逐步增加,计算机网络技术的发展为数据传输提供了保障,实现数据共享。这使得更多的人能够更充分地使用已有的数据资源,减少了数据采集处理等重复劳动和相应费用。
发明人意识到,在当前的数据共享时,主要关注了数据交换格式等标准化问题,忽略了潜在的安全问题。例如,A公司将其客户数据交给公司B进行分析,由B公司帮其分析客户购买产品偏好,但出于获利的角度,B公司的数据分析人员可能将数据出售给A公司的竞争对手C公司。此时,在A公司不知道其数据已被C公司非法访问的基础上,损害了A公司的利益。由于当前数据共享存在数据流转的不受控问题,从而增加了数据共享时存在的安全风险。
技术问题
基于此,有必要针对当前数据共享存在数据流转的不受控问题,从而降低了数据共享时存在的安全风险,提供一种数据访问权限验证方法、装置、计算机设备及存储介质。
技术解决方案
一种数据访问权限验证方法,应用于第一服务端,所述数据访问权限验证方法包括:获取第二服务端预先生成的访问规则;基于所述访问规则确定所述第二服务端访问资源的开放时间;当前时间符合所述开放时间时,获取第二服务端的公钥;创建访问所述第二服务端的权限访问数据并获取第一服务端的私钥;基于所述第二服务端的公钥对所述权限访问数据进行加密,生成加密后的权限访问数据;根据所述第一服务端的私钥对所述加密后的权限访问数据进行数字签名,生成第一服务端的访问消息;将所述第一服务端的访问消息发送至区块链,并向所述第二服务端发送数据访问请求。
一种数据访问权限验证方法,应用于第二服务端,所述方法包括:当接收到第一服务端数据访问请求时,从区块链中获取第一服务端的访问消息;获取第一服务端的公钥以及第二服务端的私钥;根据所述第一服务端的公钥对所述第一服务端的访问消息进行验证,生成第一验证结果;通过所述第二服务端的私钥对所述第一服务端的访问消息进行解密,生成解密后的访问消息;根据预设审核方式对所述验证结果和解密后的访问消息进行审核,生成审核结果;根据所述审核结果确定授权结果;通过所述第一服务端的公钥将所述授权结果加密后发送至区块链,并向第一服务端发送数据访问响应。
一种数据访问权限验证装置,应用于第一服务端,所述装置包括:访问规则获取模块,用于获取第二服务端预先生成的访问规则;时间确定模块,用于基于所述访问规则确定所述第二服务端访问资源的开放时间;公钥获取模块,用于当前时间符合所述开放时间时,获取第二服务端的公钥;数据创建模块,用于创建访问所述第二服务端的权限访问数据并获取第一服务端的私钥;数据加密模块,用于基于所述第二服务端的公钥对所述权限访问数据进行加密,生成加密后的权限访问数据;数据签名模块,用于根据所述第一服务端的私钥对所述加密后的权限访问数据进行数字签名,生成第一服务端的访问消息;消息发送模块,用于将所述第一服务端的访问消息发送至区块链。
一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行一种数据访问权限验证方法,其中,所述数据访问权限验证方法应用于第一服务端,所述方法包括以下步骤:
获取第二服务端预先生成的访问规则;
基于所述访问规则确定所述第二服务端访问资源的开放时间;
当当前时间符合所述开放时间时,获取第二服务端的公钥;
创建访问所述第二服务端的权限访问数据并获取第一服务端的私钥;
基于所述第二服务端的公钥对所述权限访问数据进行加密,生成加密后的权限访问数据;
根据所述第一服务端的私钥对所述加密后的权限访问数据进行数字签名,生成第一服务端的访问消息;
将所述第一服务端的访问消息发送至区块链,并向所述第二服务端发送数据访问请求。
一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行一种数据访问权限验证方法,其中,所述数据访问权限验证方法应用于第二服务端,所述方法包括以下步骤:
当接收到第一服务端针对所述第二服务端发送的数据访问请求时,从区块链中获取所述第一服务端针对所述第二服务端发送的访问消息;
获取第一服务端的公钥以及第二服务端的私钥;
根据所述第一服务端的公钥对所述第一服务端的访问消息进行验证,生成第一验证结果;
当所述第一验证结果中的识别标识与所述第一服务端的识别标识相同时,通过所述第二服务端的私钥对所述第一服务端的访问消息进行解密,生成解密后的访问消息;其中,所述识别标识为所述第一服务端生成所述访问消息时添加的识别参数;
根据预设审核方式对所述验证结果和解密后的访问消息进行审核,生成审核结果;
根据所述审核结果确定授权结果;
通过所述第一服务端的公钥将所述授权结果加密后发送至区块链,并向第一服务端发送数据访问响应。
一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行一种数据访问权限验证方法,其中,所述数据访问权限验证方法应用于第一服务端,所述方法包括以下步骤:
获取第二服务端预先生成的访问规则;
基于所述访问规则确定所述第二服务端访问资源的开放时间;
当当前时间符合所述开放时间时,获取第二服务端的公钥;
创建访问所述第二服务端的权限访问数据并获取第一服务端的私钥;
基于所述第二服务端的公钥对所述权限访问数据进行加密,生成加密后的权限访问数据;
根据所述第一服务端的私钥对所述加密后的权限访问数据进行数字签名,生成第一服务端的访问消息;
将所述第一服务端的访问消息发送至区块链,并向所述第二服务端发送数据访问请求。
一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行一种数据访问权限验证方法,其中,所述数据访问权限验证方法应用于第二服务端,所述方法包括以下步骤:
当接收到第一服务端针对所述第二服务端发送的数据访问请求时,从区块链中获取所述第一服务端针对所述第二服务端发送的访问消息;
获取第一服务端的公钥以及第二服务端的私钥;
根据所述第一服务端的公钥对所述第一服务端的访问消息进行验证,生成第一验证结果;
当所述第一验证结果中的识别标识与所述第一服务端的识别标识相同时,通过所述第二服务端的私钥对所述第一服务端的访问消息进行解密,生成解密后的访问消息;其中,所述识别标识为所述第一服务端生成所述访问消息时添加的识别参数;
根据预设审核方式对所述验证结果和解密后的访问消息进行审核,生成审核结果;
根据所述审核结果确定授权结果;
通过所述第一服务端的公钥将所述授权结果加密后发送至区块链,并向第一服务端发送数据访问响应。
有益效果
本申请通过将各服务端之间数据的流向、授权信息以及使用记录等发布在区块链上, 使得将数据与共享访问过程相割裂,避免了数据共享中数据非法泄露,从而导致降低了数据共享时存在的安全风险。
附图说明
图1为本申请一个实施例中提供的数据访问权限验证方法的实施环境图;
图2为本申请一个实施例中计算机设备的内部结构示意图;
图3为本申请一个实施例中提供的数据访问权限验证方法的方法示意图;
图4为本申请一个实施例中提供的数据访问权限验证方法中访问请求消息生成方法的方法示意图;
图5为本申请一个实施例中提供的数据访问权限验证方法中访问规则生成方法的方法示意图;
图6为本申请一个实施例中提供的数据访问权限验证方法中授权结果查看方法的方法示意图;
图7为本申请一个实施例中提供的数据访问权限验证的实施场景示意图;
图8是本申请实施例提供的一种数据访问权限验证装置的装置示意图;
图9是本申请实施例提供的另一种数据访问权限验证装置的装置示意图。
本发明的最佳实施方式
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一服务端成为第二服务端,且类似地,可将第二服务端成为第一服务端。
图1为一个实施例中提供的数据访问权限验证方法的实施环境图,如图1所示,在该实施环境中,包括第一服务端110、第二服务端120以及区块链130。
第一服务端110和第二服务端120为服务器设备,例如第一服务端110为B公司存储平台数据的服务器,第二服务端120为A公司存储平台数据的服务器。区块链130其主要记录各个平台发布的访问规则,以及其他平台对数据的访问权限申请,访问授权等。
当第一服务端110(B公司服务器)访问第二服务端120(A公司服务器)时,第二服务端120会对第一服务端110进行访问权限验证,首先第一服务端110获取第二服务端120预先生成的访问规则,第一服务端110基于获取的访问规则创建访问消息加密并数字签名后发送至区块链130并向第二服务端发送数据访问请求。第二服务端120当接收到第一服务端数据访问请求时,从区块链130中获取访问消息并对访问消息进行签名验证和解密,生成解密后的访问消息,并针对解密后的访问消息进行权限审核,生成授权结果,并将授权结果进行加密并数字签名后发送至区块链130,并向第一服务端发送数据访问响应。第一服务端110接收到响应后从区块链130中获取授权结果并对授权结果进行签名验证和解密,生成解密的授权结果,并基于解密的授权结果确定是否进行数据访问。
需要说明的是,第一服务端110、第二服务端120以及区块链130可以通过蓝牙、USB(Universal Serial Bus,通用串行总线)或者其他通讯连接方式进行连接,本申请在此不做限制。
图2为一个实施例中计算机设备的内部结构示意图。如图2所示,该计算机设备包括通过系统总线连接的处理器、非易失性存储介质、存储器和网络接口。其中,该计算机设备的非易失性存储介质存储有操作系统、数据库和计算机可读指令,数据库中可存储有控件信息序列,该计算机可读指令被处理器执行时,可使得处理器实现一种数据访问权限验证方法。该计算机设备的处理器用于提供计算和控制能力,支撑整个计算机设备的运行。该计算机设备的存储器中可存储有计算机可读指令,该计算机可读指令被处理器执行时,可使得处理器执行一种数据访问权限验证方法。该计算机设备的网络接口用于与终端连接通信。本领域技术人员可以理解,图2中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
下面将结合附图3-附图7,对本申请实施例提供的数据访问权限验证方法进行详细介绍。该方法可依赖于计算机程序实现,可运行于基于冯诺依曼体系的数据访问权限验证装置上。该计算机程序可集成在应用中,也可作为独立的工具类应用运行。
请参见图3,为本申请实施例提供了一种数据访问权限验证方法的流程示意图。如图3 所示,本申请实施例的所述方法可以包括以下步骤:
S101,当接收到第一服务端针对所述第二服务端发送的数据访问请求时,从区块链中获取所述第一服务端针对所述第二服务端发送的访问消息;
其中,服务端是公司存储平台数据的服务器,即负责存储公司平台的数据。区块链是一种由多方维护,使用密码学保障数据传输和数据访问安全,能够实现数据一致性、防篡改、防抵赖的技术。访问消息是第一服务端生成的。
在本申请实施例中,例如图4所示,图4是第一服务端生成访问消息和访问请求的流程图,在生成访问消息和访问请求时,第一服务端首先获取第二服务端预先生成的访问规则,再基于访问规则确定第二服务端访问资源的开放时间,再当前时间符合所述开放时间时,获取第二服务端的公钥,然后创建访问第二服务端的权限访问数据并获取第一服务端的私钥,再基于第二服务端的公钥对权限访问数据进行加密,生成加密后的权限访问数据,最后根据第一服务端的私钥对加密后的权限访问数据进行数字签名,生成第一服务端的访问消息,并将第一服务端的访问消息发送至区块链,以及向第二服务端发送数据访问请求。
需要说明的是,在本申请实施例中,签名和验证可以使用椭圆曲线加解密,利用ECC-secp256k1算法实现,即一种非对称密码算法。其中私钥用于签名,公钥用于解密。
进一步地,在向第二服务端发送数据访问请求后,第二服务端当接收到第一服务端的访问请求时,对第一服务端的访问请求进行解析,解析后获取到请求的标识,第二服务端根据该标识从区块链中匹配该标识对应的访问消息。(即第一服务端的访问消息)。
S102,获取第一服务端的公钥以及第二服务端的私钥;
在一种可能的实现方式中,例如,第一服务端为B公司服务端,第二服务端为A公司服务端,为了保障安全性,每个公司分别拥有自己的公私钥对,记A公司服务端的公钥为PK A,私钥为SK A,且B公司服务端的公钥为PK B,私钥为SK B。当B公司服务端欲访问A公司服务端的数据时,B公司服务端首先获取A公司服务端发布在区块链中的访问规则,再对该访问规则进行解析,查询该访问规则中A公司服务端设定的访问时间,如果当前时刻符合A公司服务端设定的访问时间时,B公司服务端的访问权限申请用A公司的公钥PK A加密并用其私钥为SK B签名,防止伪造,签名后的消息为
Figure PCTCN2020124726-appb-000001
随后,B公司(即第一服务端)将消息记录在区块链上,并向A公司服务端(即第二服务端)发送数据访问请求。其中,ID B为B公司的身份标识,Self_Condition B为对自身情况的描述,Apply_Datasource B为申请访问的数据资源。A公司服务端(即第二服务端)接收访问请求,并从区块链上获取B公司发布的访问消息,然后获取B公司的公钥以及自身服务端的私钥。
S103,根据所述第一服务端的公钥对所述第一服务端的访问消息进行验证,生成第一验证结果;
在一种可能的实现方式中,在基于步骤S102获取到B公司的公钥以及自身服务端的私钥后,利用ECC-secp256k1算法对步骤S101中接收的访问消息通过B公司的公钥进行签名验证,当确定时B公司的访问消息时,利用ECC-secp256k1算法对访问消息通过自身服务端的私钥进行解密,生成解密后的访问消息。
进一步地的,在访问规则生成时,例如图5所示,第二服务端首先获取自身的公钥以及第二服务端参数集合,然后基于第二服务端的私钥将第二服务端参数集合进行数字签名,生成访问规则,最后根据第二服务端公钥将访问规则加密后发布至区块链。
例如,A公司(第二服务端)将首先在区块链上发布所有欲访问其数据的其他平台应满足的条件,即访问规则
Figure PCTCN2020124726-appb-000002
该规则由A公司的私钥SK A签名,通常包括A公司自身身份标识ID A,对方公司的资质要求Demands A,可供访问的数据资源Datasource A,如统计出的数据平均值,开放的访问时间Time A等。
S104,当所述第一验证结果中的识别标识与所述第一服务端的识别标识相同时,通过 所述第二服务端的私钥对所述第一服务端的访问消息进行解密,生成解密后的访问消息;其中,所述识别标识为所述第一服务端生成所述访问消息时添加的识别参数;
具体可参见步骤S103,此处不再赘述。
S105,根据预设审核方式对所述验证结果和解密后的访问消息进行审核,生成审核结果;
其中,预设审核方式是第二服务端对第一服务端发送的访问消息解密后进行权限审核的几种方式,在本申请中审核方式包括人工审核以及服务端自动审核。
在一种可能的实现方式中,当是人工审核时,服务端将访问申请首先发送到审核用户的终端进行提示,提示后接收审核的指令,根据指令生成审核结果进行反馈。
在另一种可能的实现方式中,当是服务端自动审核时,首先获取预设的授权服务端集合,最后判断请求的服务端访问消息是否存在授权服务端集合内,判断结束后生成审核结果。
具体的,在自动审核时,采用智能合约,若采用Hyperledger Fabric进行智能合约审核时,它的智能合约其实就是链上代码chaincode,其可以自动执行特定的业务规则,可以制定成访问控制类型,仅允许某些批准过的成员,如A,B公司调用。在实现中,可以采用虚拟机等技术。如果是在以太网上,可以通过以以太网包,或者控制台来部署智能合约。实现方式很多,不局限于此。
S106,根据所述审核结果确定授权结果;
其中,授权结果是第二服务端根据第一服务端的访问消息进行审核后生成的最终结果,该结果包括通过审核与不通过审核。
在一种可能的实现方式中,当审核结果为不通过时,生成拒绝访问通知,通过第一服务端的公钥将拒绝访问通知进行加密得到加密后的拒绝访问通知,通过第二服务端的私钥将加密后的拒绝访问通知进行数字签名,生成授权结果。
在另一种可能的实现方式中,当审核结果为通过时,生成访问凭据以及访问时间,再通过第一服务端的公钥将访问凭据以及访问时间进行加密,生成加密后的访问凭据以及访问时间,最后通过第二服务端的私钥将加密后的访问凭据以及访问时间进行数字签名,生成授权结果。
S107,通过所述第一服务端的公钥将所述授权结果加密后发送至区块链,并向第一服务端发送数据访问响应。
例如,若审核不通过,则直接终止交易,并在区块链上发布拒绝通知
Figure PCTCN2020124726-appb-000003
该通知用B公司服务端(第一服务端)的公钥PK B加密,并由A公司服务端(第二服务端)签名。否则,A公司(第二服务端)服务端将在区块链上发布消息并向B公司(第一服务端)发布数据访问响应,消息为:
Figure PCTCN2020124726-appb-000004
其中,Token A_B为A公司服务端向B公司服务端授权分配的令牌,作为访问凭据,Expiration为该令牌的有效期,任何超出有效期的令牌将不能用于数据访问,有效保证了被访问数据的后向安全性。同样,该消息也将用B公司的公钥PK B加密,并由A签名。此外,A公司还将在应用服务器上记录分配给B公司的令牌及令牌有效期,允许B公司访问的资源等,以便于后续审核。
进一步地,例如图6所示,当接收到第二服务端数据访问响应时,第一服务端从区块链中获取第二服务端的授权结果,再获取第二服务端的公钥以及第一服务端的私钥,然后通过第二服务端的公钥对所述授权结果进行验证,生成第二验证结果,当第二验证结果为第二服务端发送的验证结果时,通过第一服务端的私钥对授权结果进行解密,生成解密的授权结果,最后基于所述解密的授权结果确定是否进行数据访问。
在本申请实施例中,例如图7所示,本申请中提出的基于区块链的跨平台应用数据安全将数据与共享访问过程相割裂,其中数据仍由各个平台应用服务器本地保存,区块链上仅记录各个平台发布的访问规则,其他平台对数据的访问权限申请,数据所有者对申请者的授权记录等。通过为不同的数据申请者分配不同的令牌等访问凭据,数据拥有平台可以清楚地知道谁在何时访问了什么数据,避免了数据者申请者内部的恶意工作人员对所申请 数据造成的非法泄漏。同时,本申请为不同令牌赋予了不同的有效期,有效保证了数据的后向安全性,避免了数据共享中数据非法泄露,从而导致降低了数据共享时存在的安全风险。
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。
请参见图8,其示出了本申请一个示例性实施例提供的数据访问权限验证装置的结构示意图,应用于第一服务端。该数据访问权限验证系统可以通过软件、硬件或者两者的结合实现成为计算机设备的全部或一部分。该装置1包括访问规则获取模块10、时间确定模块20、公钥获取模块30、数据创建模块40、数据加密模块50、数据签名模块60、消息发送模块70。
访问规则获取模块10,用于获取第二服务端预先生成的访问规则;
时间确定模块20,用于基于所述访问规则确定所述第二服务端访问资源的开放时间;
公钥获取模块30,用于当前时间符合所述开放时间时,获取第二服务端的公钥;
数据创建模块40,用于创建访问所述第二服务端的权限访问数据并获取第一服务端的私钥;
数据加密模块50,用于基于所述第二服务端的公钥对所述权限访问数据进行加密,生成加密后的权限访问数据;
数据签名模块60,用于根据所述第一服务端的私钥对所述加密后的权限访问数据进行数字签名,生成第一服务端的访问消息;
消息发送模块70,用于将所述第一服务端的访问消息发送至区块链。
请参见图9,其示出了本申请一个示例性实施例提供的数据访问权限验证装置的结构示意图,应用于第二服务端。该数据访问权限验证系统可以通过软件、硬件或者两者的结合实现成为计算机设备的全部或一部分。该装置2包括消息获取模块10、公钥和密钥获取模块20、结果生成模块30、解密消息生成模块40、审核结果生成模块50、授权结果确定模块60、响应模块70。
消息获取模块10,用于当接收到第一服务端数据访问请求时,从区块链中获取第一服务端的访问消息;
公钥和密钥获取模块20,用于获取第一服务端的公钥以及第二服务端的私钥;
结果生成模块30,用于根据所述第一服务端的公钥对所述第一服务端的访问消息进行验证,生成第一验证结果;
解密消息生成模块40,用于通过所述第二服务端的私钥对所述第一服务端的访问消息进行解密,生成解密后的访问消息;
审核结果生成模块50,用于根据预设审核方式对所述验证结果和解密后的访问消息进行审核,生成审核结果;
授权结果确定模块60,用于根据所述审核结果确定授权结果;
响应模块70,用于通过所述第一服务端的公钥将所述授权结果加密后发送至区块链,并向第一服务端发送数据访问响应。
需要说明的是,上述实施例提供的数据访问权限验证系统在执行数据访问权限验证方法时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的数据访问权限验证系统与数据访问权限验证方法实施例属于同一构思,其体现实现过程详见方法实施例,这里不再赘述。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
在一个实施例中,提出了一种计算机设备,所述计算机设备包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述任一个示例性实施例所示出的数据访问权限验证方法,所述数据访问权限验证方法包括以下步骤:第一服务端获取第二服务端预先生成的访问规则;第一服务端基于所述访问规则确定所述第二服务端访问资源的开放时间;当前时间符合所述开放时间时,第一服务端获取第二服务端的公钥;第一服务端创建访问所述第二服务端的权限访问数据并获取第一服务端的私钥;第一服务端基于所述第二服务端的公钥对所述权限访问数据进行加密,生成加密后的权限访问数据;第一服务端根据所述第一服务端的私钥对所述加密 后的权限访问数据进行数字签名,生成第一服务端的访问消息;第一服务端将所述第一服务端的访问消息发送至区块链,并向所述第二服务端发送数据访问请求。第二服务端当接收到第一服务端数据访问请求时,从区块链中获取第一服务端的访问消息;第二服务端获取第一服务端的公钥以及第二服务端的私钥;第二服务端根据所述第一服务端的公钥对所述第一服务端的访问消息进行验证,生成第一验证结果;第二服务端通过所述第二服务端的私钥对所述第一服务端的访问消息进行解密,生成解密后的访问消息;第二服务端根据预设审核方式对所述验证结果和解密后的访问消息进行审核,生成审核结果;第二服务端根据所述审核结果确定授权结果;第二服务端通过所述第一服务端的公钥将所述授权结果加密后发送至区块链,并向第一服务端发送数据访问响应。第一服务端当接收到第二服务端数据访问响应时,从区块链中获取第二服务端的授权结果;第一服务端获取第二服务端的公钥以及第一服务端的私钥;第一服务端通过所述第二服务端的公钥对所述授权结果进行验证,生成第二验证结果;当所述第二验证结果为所述第二服务端发送的验证结果时,第一服务端通过所述第一服务端的私钥对所述授权结果进行解密,生成解密的授权结果;第一服务端基于所述解密的授权结果确定是否进行数据访问。
在一个实施例中,提出了一种存储有计算机可读指令的存储介质,所述计算机可读存储介质可以是非易失性,也可以是易失性,该计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行上述任一个示例性实施例所示出的数据访问权限验证方法,所述数据访问权限验证方法包括以下步骤:第一服务端获取第二服务端预先生成的访问规则;第一服务端基于所述访问规则确定所述第二服务端访问资源的开放时间;当前时间符合所述开放时间时,第一服务端获取第二服务端的公钥;第一服务端创建访问所述第二服务端的权限访问数据并获取第一服务端的私钥;第一服务端基于所述第二服务端的公钥对所述权限访问数据进行加密,生成加密后的权限访问数据;第一服务端根据所述第一服务端的私钥对所述加密后的权限访问数据进行数字签名,生成第一服务端的访问消息;第一服务端将所述第一服务端的访问消息发送至区块链,并向所述第二服务端发送数据访问请求。第二服务端当接收到第一服务端数据访问请求时,从区块链中获取第一服务端的访问消息;第二服务端获取第一服务端的公钥以及第二服务端的私钥;第二服务端根据所述第一服务端的公钥对所述第一服务端的访问消息进行验证,生成第一验证结果;第二服务端通过所述第二服务端的私钥对所述第一服务端的访问消息进行解密,生成解密后的访问消息;第二服务端根据预设审核方式对所述验证结果和解密后的访问消息进行审核,生成审核结果;第二服务端根据所述审核结果确定授权结果;第二服务端通过所述第一服务端的公钥将所述授权结果加密后发送至区块链,并向第一服务端发送数据访问响应。第一服务端当接收到第二服务端数据访问响应时,从区块链中获取第二服务端的授权结果;第一服务端获取第二服务端的公钥以及第一服务端的私钥;第一服务端通过所述第二服务端的公钥对所述授权结果进行验证,生成第二验证结果;当所述第二验证结果为所述第二服务端发送的验证结果时,第一服务端通过所述第一服务端的私钥对所述授权结果进行解密,生成解密的授权结果;第一服务端基于所述解密的授权结果确定是否进行数据访问。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,该计算机程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,前述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等非易失性存储介质,或随机存储记忆体(Random Access Memory,RAM)等。

Claims (20)

  1. 一种数据访问权限验证方法,应用于第一服务端,其中,所述方法包括:
    获取第二服务端预先生成的访问规则;
    基于所述访问规则确定所述第二服务端访问资源的开放时间;
    当当前时间符合所述开放时间时,获取第二服务端的公钥;
    创建访问所述第二服务端的权限访问数据并获取第一服务端的私钥;
    基于所述第二服务端的公钥对所述权限访问数据进行加密,生成加密后的权限访问数据;
    根据所述第一服务端的私钥对所述加密后的权限访问数据进行数字签名,生成第一服务端的访问消息;
    将所述第一服务端的访问消息发送至区块链,并向所述第二服务端发送数据访问请求。
  2. 根据权利要求1所述的方法,其中,所述将所述第一服务端的访问消息发送至区块链之后,还包括:
    当接收到所述第二服务端针对所述数据访问请求生成的数据访问响应时,从区块链中获取所述第二服务端针对所述数据访问请求生成的授权结果;其中,所述授权结果为所述第二服务端接收到所述访问请求时从区块链中获取所述访问消息进行审核后生成的结果;所述数据访问响应是所述第二服务端生成所述授权结果后针对所述第一服务端发出的响应;
    获取第二服务端的公钥以及第一服务端的私钥;
    通过所述第二服务端的公钥对所述授权结果进行验证,生成第二验证结果;
    当所述第二验证结果中的识别标识与所述第二服务端的识别标识相同时,通过所述第一服务端的私钥对所述授权结果进行解密,生成解密的授权结果;其中,所述识别标识为所述第二服务端生成所述授权结果时添加的识别参数;
    基于所述解密的授权结果确定是否进行数据访问。
  3. 一种数据访问权限验证方法,应用于第二服务端,其中,所述方法包括:
    当接收到第一服务端针对所述第二服务端发送的数据访问请求时,从区块链中获取所述第一服务端针对所述第二服务端发送的访问消息;
    获取第一服务端的公钥以及第二服务端的私钥;
    根据所述第一服务端的公钥对所述第一服务端的访问消息进行验证,生成第一验证结果;
    当所述第一验证结果中的识别标识与所述第一服务端的识别标识相同时,通过所述第二服务端的私钥对所述第一服务端的访问消息进行解密,生成解密后的访问消息;其中,所述识别标识为所述第一服务端生成所述访问消息时添加的识别参数;
    根据预设审核方式对所述验证结果和解密后的访问消息进行审核,生成审核结果;
    根据所述审核结果确定授权结果;
    通过所述第一服务端的公钥将所述授权结果加密后发送至区块链,并向第一服务端发送数据访问响应。
  4. 根据权利要求3所述的方法,其中,所述从区块链中获取第一服务端的访问消息之前,还包括:
    获取第二服务端的公钥以及第二服务端参数集合;
    基于所述第二服务端的私钥将所述第二服务端参数集合进行数字签名,生成访问规则;
    根据所述第二服务端公钥将所述访问规则加密后发布至区块链。
  5. 根据权利要求3所述的方法,其中,所述预设审核方式包括人工审核方式以及服务端审核方式;
    所述根据预设审核方式对所述验证结果和解密后的访问消息进行审核,生成审核结果包括:
    当所述审核方式为人工审核且所述验证结果为所述第一服务端发送的访问消息时,接收审核结果的指令并基于所述审核结果的指令生成审核结果;或
    当所述审核方式为服务端审核且所述验证结果为所述第一服务端发送的访问消息时,获取预设的授权服务端集合;
    判断所述第一服务端是否存在所述授权服务端集合内,生成审核结果。
  6. 根据权利要求3所述的方法,其中,所述根据所述审核结果 确定授权结果,包括:
    当所述审核结果为不通过时,生成拒绝访问通知;
    通过所述第一服务端的公钥将所述拒绝访问通知进行加密得到加密后的拒绝访问通知;
    通过所述第二服务端的私钥将所述加密后的拒绝访问通知进行数字签名,生成授权结果。
  7. 根据权利要求3所述的方法,其中,所述根据所述审核结果确定授权结果,包括:
    当所述审核结果为通过时,生成访问凭据以及访问时间;
    通过所述第一服务端的公钥将所述访问凭据以及访问时间进行加密,生成加密后的访问凭据以及访问时间;
    通过所述第二服务端的私钥将所述加密后的访问凭据以及访问时间进行数字签名,生成授权结果。
  8. 一种数据访问权限验证装置,应用于第一服务端,其中,所述装置包括:
    访问规则获取模块,用于获取第二服务端预先生成的访问规则;
    时间确定模块,用于基于所述访问规则确定所述第二服务端访问资源的开放时间;
    公钥获取模块,用于当前时间符合所述开放时间时,获取第二服务端的公钥;
    数据创建模块,用于创建访问所述第二服务端的权限访问数据并获取第一服务端的私钥;
    数据加密模块,用于基于所述第二服务端的公钥对所述权限访问数据进行加密,生成加密后的权限访问数据;
    数据签名模块,用于根据所述第一服务端的私钥对所述加密后的权限访问数据进行数字签名,生成第一服务端的访问消息;
    消息发送模块,用于将所述第一服务端的访问消息发送至区块链。
  9. 一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行一种数据访问权限验证方法:
    其中,所述数据访问权限验证方法应用于第一服务端,所述方法包括以下步骤:
    获取第二服务端预先生成的访问规则;
    基于所述访问规则确定所述第二服务端访问资源的开放时间;
    当当前时间符合所述开放时间时,获取第二服务端的公钥;
    创建访问所述第二服务端的权限访问数据并获取第一服务端的私钥;
    基于所述第二服务端的公钥对所述权限访问数据进行加密,生成加密后的权限访问数据;
    根据所述第一服务端的私钥对所述加密后的权限访问数据进行数字签名,生成第一服务端的访问消息;
    将所述第一服务端的访问消息发送至区块链,并向所述第二服务端发送数据访问请求。
  10. 根据权利要求9所述的计算机设备,其中,所述将所述第一服务端的访问消息发送至区块链之后,还包括:
    当接收到所述第二服务端针对所述数据访问请求生成的数据访问响应时,从区块链中获取所述第二服务端针对所述数据访问请求生成的授权结果;其中,所述授权结果为所述第二服务端接收到所述访问请求时从区块链中获取所述访问消息进行审核后生成的结果;所述数据访问响应是所述第二服务端生成所述授权结果后针对所述第一服务端发出的响应;
    获取第二服务端的公钥以及第一服务端的私钥;
    通过所述第二服务端的公钥对所述授权结果进行验证,生成第二验证结果;
    当所述第二验证结果中的识别标识与所述第二服务端的识别标识相同时,通过所述第一服务端的私钥对所述授权结果进行解密,生成解密的授权结果;其中,所述识别标识为所述第二服务端生成所述授权结果时添加的识别参数;
    基于所述解密的授权结果确定是否进行数据访问。
  11. 一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述处理器执行一种数据访问权限验证方法:
    其中,所述数据访问权限验证方法应用于第二服务端,所述方法包括以下步骤:
    当接收到第一服务端针对所述第二服务端发送的数据访问请求 时,从区块链中获取所述第一服务端针对所述第二服务端发送的访问消息;
    获取第一服务端的公钥以及第二服务端的私钥;
    根据所述第一服务端的公钥对所述第一服务端的访问消息进行验证,生成第一验证结果;
    当所述第一验证结果中的识别标识与所述第一服务端的识别标识相同时,通过所述第二服务端的私钥对所述第一服务端的访问消息进行解密,生成解密后的访问消息;其中,所述识别标识为所述第一服务端生成所述访问消息时添加的识别参数;
    根据预设审核方式对所述验证结果和解密后的访问消息进行审核,生成审核结果;
    根据所述审核结果确定授权结果;
    通过所述第一服务端的公钥将所述授权结果加密后发送至区块链,并向第一服务端发送数据访问响应。
  12. 根据权利要求11所述的计算机设备,其中,所述从区块链中获取第一服务端的访问消息之前,还包括:
    获取第二服务端的公钥以及第二服务端参数集合;
    基于所述第二服务端的私钥将所述第二服务端参数集合进行数字签名,生成访问规则;
    根据所述第二服务端公钥将所述访问规则加密后发布至区块链。
  13. 根据权利要求11所述的计算机设备,其中,所述预设审核 方式包括人工审核方式以及服务端审核方式;
    所述根据预设审核方式对所述验证结果和解密后的访问消息进行审核,生成审核结果包括:
    当所述审核方式为人工审核且所述验证结果为所述第一服务端发送的访问消息时,接收审核结果的指令并基于所述审核结果的指令生成审核结果;或
    当所述审核方式为服务端审核且所述验证结果为所述第一服务端发送的访问消息时,获取预设的授权服务端集合;
    判断所述第一服务端是否存在所述授权服务端集合内,生成审核结果。
  14. 根据权利要求11所述的计算机设备,其中,所述根据所述审核结果确定授权结果,包括:
    当所述审核结果为不通过时,生成拒绝访问通知;
    通过所述第一服务端的公钥将所述拒绝访问通知进行加密得到加密后的拒绝访问通知;
    通过所述第二服务端的私钥将所述加密后的拒绝访问通知进行数字签名,生成授权结果。
  15. 根据权利要求11所述的计算机设备,其中,所述根据所述审核结果确定授权结果,包括:
    当所述审核结果为通过时,生成访问凭据以及访问时间;
    通过所述第一服务端的公钥将所述访问凭据以及访问时间进行加密,生成加密后的访问凭据以及访问时间;
    通过所述第二服务端的私钥将所述加密后的访问凭据以及访问时间进行数字签名,生成授权结果。
  16. 一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行一种数据访问权限验证方法,其中,所述数据访问权限验证方法应用于第一服务端,所述方法包括以下步骤:
    获取第二服务端预先生成的访问规则;
    基于所述访问规则确定所述第二服务端访问资源的开放时间;
    当当前时间符合所述开放时间时,获取第二服务端的公钥;
    创建访问所述第二服务端的权限访问数据并获取第一服务端的私钥;
    基于所述第二服务端的公钥对所述权限访问数据进行加密,生成加密后的权限访问数据;
    根据所述第一服务端的私钥对所述加密后的权限访问数据进行数字签名,生成第一服务端的访问消息;
    将所述第一服务端的访问消息发送至区块链,并向所述第二服务端发送数据访问请求。
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述将所述第一服务端的访问消息发送至区块链之后,还包括:
    当接收到所述第二服务端针对所述数据访问请求生成的数据访问响应时,从区块链中获取所述第二服务端针对所述数据访问请求生成的授权结果;其中,所述授权结果为所述第二服务端接收到所 述访问请求时从区块链中获取所述访问消息进行审核后生成的结果;所述数据访问响应是所述第二服务端生成所述授权结果后针对所述第一服务端发出的响应;
    获取第二服务端的公钥以及第一服务端的私钥;
    通过所述第二服务端的公钥对所述授权结果进行验证,生成第二验证结果;
    当所述第二验证结果中的识别标识与所述第二服务端的识别标识相同时,通过所述第一服务端的私钥对所述授权结果进行解密,生成解密的授权结果;其中,所述识别标识为所述第二服务端生成所述授权结果时添加的识别参数;
    基于所述解密的授权结果确定是否进行数据访问。
  18. 一种存储有计算机可读指令的存储介质,所述计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行一种数据访问权限验证方法,其中,所述数据访问权限验证方法应用于第二服务端,所述方法包括以下步骤:
    当接收到第一服务端针对所述第二服务端发送的数据访问请求时,从区块链中获取所述第一服务端针对所述第二服务端发送的访问消息;
    获取第一服务端的公钥以及第二服务端的私钥;
    根据所述第一服务端的公钥对所述第一服务端的访问消息进行验证,生成第一验证结果;
    当所述第一验证结果中的识别标识与所述第一服务端的识别标 识相同时,通过所述第二服务端的私钥对所述第一服务端的访问消息进行解密,生成解密后的访问消息;其中,所述识别标识为所述第一服务端生成所述访问消息时添加的识别参数;
    根据预设审核方式对所述验证结果和解密后的访问消息进行审核,生成审核结果;
    根据所述审核结果确定授权结果;
    通过所述第一服务端的公钥将所述授权结果加密后发送至区块链,并向第一服务端发送数据访问响应。
  19. 根据权利要求18所述的计算机可读存储介质,其中,所述从区块链中获取第一服务端的访问消息之前,还包括:
    获取第二服务端的公钥以及第二服务端参数集合;
    基于所述第二服务端的私钥将所述第二服务端参数集合进行数字签名,生成访问规则;
    根据所述第二服务端公钥将所述访问规则加密后发布至区块链。
  20. 根据权利要求18所述的计算机可读存储介质,其中,所述预设审核方式包括人工审核方式以及服务端审核方式;
    所述根据预设审核方式对所述验证结果和解密后的访问消息进行审核,生成审核结果包括:
    当所述审核方式为人工审核且所述验证结果为所述第一服务端发送的访问消息时,接收审核结果的指令并基于所述审核结果的指令生成审核结果;或
    当所述审核方式为服务端审核且所述验证结果为所述第一服务端发送的访问消息时,获取预设的授权服务端集合;
    判断所述第一服务端是否存在所述授权服务端集合内,生成审核结果。
PCT/CN2020/124726 2020-07-31 2020-10-29 一种数据访问权限验证方法、装置、计算机设备及存储介质 WO2021139338A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010760949.7 2020-07-31
CN202010760949.7A CN111914293B (zh) 2020-07-31 2020-07-31 一种数据访问权限验证方法、装置、计算机设备及存储介质

Publications (1)

Publication Number Publication Date
WO2021139338A1 true WO2021139338A1 (zh) 2021-07-15

Family

ID=73287992

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/124726 WO2021139338A1 (zh) 2020-07-31 2020-10-29 一种数据访问权限验证方法、装置、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN111914293B (zh)
WO (1) WO2021139338A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113704210A (zh) * 2021-09-03 2021-11-26 维沃移动通信有限公司 数据共享方法和电子设备

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113609221A (zh) * 2021-07-27 2021-11-05 卓尔智联(武汉)研究院有限公司 数据存储方法、数据访问方法、装置和存储介质
CN114039753B (zh) * 2021-10-27 2024-03-12 中国联合网络通信集团有限公司 一种访问控制方法、装置、存储介质及电子设备
CN114679264B (zh) * 2022-03-16 2023-12-08 亚信科技(成都)有限公司 一种密码生成方法、装置及存储介质
CN115037521B (zh) * 2022-05-11 2024-02-02 广州小马智卡科技有限公司 服务数据验证方法、装置、计算机设备和存储介质
CN115052011B (zh) * 2022-07-25 2024-05-10 深圳前海环融联易信息科技服务有限公司 基于区块链的信息交互方法、装置、存储介质及电子设备
CN115514578B (zh) * 2022-11-01 2023-03-21 中国信息通信研究院 基于区块链的数据授权方法和装置、电子设备和存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108471350A (zh) * 2018-03-28 2018-08-31 电子科技大学成都研究院 基于区块链的可信数据计算方法
CN109981665A (zh) * 2019-04-01 2019-07-05 北京纬百科技有限公司 资源提供方法及装置、资源访问方法及装置和系统
CN110569666A (zh) * 2019-09-03 2019-12-13 深圳前海微众银行股份有限公司 一种基于区块链的数据统计的方法及装置
US20200084037A1 (en) * 2017-11-02 2020-03-12 Tencent Technology (Shenzhen) Company Limited Data sharing method, client, server, computing device, and storage medium
US20200169387A1 (en) * 2019-07-31 2020-05-28 Alibaba Group Holding Limited Blockchain-based data authorization method and apparatus
CN111327643A (zh) * 2020-05-15 2020-06-23 支付宝(杭州)信息技术有限公司 一种多方数据共享方法和装置
CN111461883A (zh) * 2020-03-31 2020-07-28 杭州溪塔科技有限公司 一种基于区块链的交易处理方法、装置和电子设备

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107918731A (zh) * 2016-10-11 2018-04-17 百度在线网络技术(北京)有限公司 用于控制对开放接口进行访问的权限的方法和装置
US10205709B2 (en) * 2016-12-14 2019-02-12 Visa International Service Association Key pair infrastructure for secure messaging
JP7090903B2 (ja) * 2018-11-09 2022-06-27 国立大学法人東北大学 情報処理システム、データ提供方法、および情報処理システムの製造方法
CN111046427A (zh) * 2019-12-13 2020-04-21 北京启迪区块链科技发展有限公司 基于区块链的数据访问控制方法、装置、设备和介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200084037A1 (en) * 2017-11-02 2020-03-12 Tencent Technology (Shenzhen) Company Limited Data sharing method, client, server, computing device, and storage medium
CN108471350A (zh) * 2018-03-28 2018-08-31 电子科技大学成都研究院 基于区块链的可信数据计算方法
CN109981665A (zh) * 2019-04-01 2019-07-05 北京纬百科技有限公司 资源提供方法及装置、资源访问方法及装置和系统
US20200169387A1 (en) * 2019-07-31 2020-05-28 Alibaba Group Holding Limited Blockchain-based data authorization method and apparatus
CN110569666A (zh) * 2019-09-03 2019-12-13 深圳前海微众银行股份有限公司 一种基于区块链的数据统计的方法及装置
CN111461883A (zh) * 2020-03-31 2020-07-28 杭州溪塔科技有限公司 一种基于区块链的交易处理方法、装置和电子设备
CN111327643A (zh) * 2020-05-15 2020-06-23 支付宝(杭州)信息技术有限公司 一种多方数据共享方法和装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113704210A (zh) * 2021-09-03 2021-11-26 维沃移动通信有限公司 数据共享方法和电子设备
WO2023030450A1 (zh) * 2021-09-03 2023-03-09 维沃移动通信有限公司 数据共享方法和电子设备

Also Published As

Publication number Publication date
CN111914293B (zh) 2024-05-24
CN111914293A (zh) 2020-11-10

Similar Documents

Publication Publication Date Title
WO2021139338A1 (zh) 一种数据访问权限验证方法、装置、计算机设备及存储介质
CN111316278B (zh) 安全身份和档案管理系统
US10554393B2 (en) Universal secure messaging for cryptographic modules
US8843415B2 (en) Secure software service systems and methods
US7797544B2 (en) Attesting to establish trust between computer entities
US7526649B2 (en) Session key exchange
EP2755162B1 (en) Identity controlled data center
US20070250904A1 (en) Privacy protection system
David et al. Cloud Security Service for Identifying Unauthorized User Behaviour.
JP2004537095A (ja) 情報セキュリティシステム
US7266705B2 (en) Secure transmission of data within a distributed computer system
KR101817152B1 (ko) 신뢰된 권한 정보 제공 방법, 신뢰된 권한 정보를 포함하는 사용자 크리덴셜 발급 방법 및 사용자 크리덴셜 획득 방법
JP5992535B2 (ja) 無線idプロビジョニングを実行するための装置及び方法
CN116192481A (zh) 云计算服务器模型间安全通信机制分析方法
CN115021927B (zh) 一种面向密码机集群的管理员身份管控方法及系统
JP2004140636A (ja) 電子文書の署名委任システム、署名委任サーバ及び署名委任プログラム
WO2022144024A1 (en) Attribute-based encryption keys as key material for key-hash message authentication code user authentication and authorization
CN108345801B (zh) 一种面向密文数据库的中间件动态用户认证方法及系统
CN114978771B (zh) 一种基于区块链技术的数据安全共享方法及系统
US11954672B1 (en) Systems and methods for cryptocurrency pool management
US20230376574A1 (en) Information processing device and method, and information processing system
US20240048361A1 (en) Key Management for Cryptography-as-a-service and Data Governance Systems
US20240048532A1 (en) Data exchange protection and governance system
KR101893758B1 (ko) 암호화된 트래픽 분석을 통한 내부 정보 유출 모니터링 시스템 및 방법
CN116506180A (zh) 基于加密授权的招聘软件隐私保护方法及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20911877

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20911877

Country of ref document: EP

Kind code of ref document: A1