Disclosure of Invention
The invention aims at providing a unified authentication method for users under the environment of a self-organizing network under the condition of multiple nodes aiming at the technical defects in the prior art.
The technical scheme adopted for realizing the purpose of the invention is as follows:
A unified authentication method for users under multi-node condition in self-organizing network environment based on triple authentication of license authentication nodes in content chain when users register, reading equipment join and registration nodes join the content chain, so that users need to pass node authentication, equipment authentication and user authentication when obtaining content data in the content chain, realizing the safety of content chain operation and data transmission, comprising:
User authentication when a user registers in a content chain, namely, after the authentication node is permitted to pass the verification of identity information submitted by a registered user, returning a unique user id, and simultaneously generating a user identity public-private key for the registered user for automatic authentication in a mode of encrypting and decrypting the user identity public-private key in the processes of identity authentication, uploading and obtaining a content object;
The reading equipment in the content chain is to be added, an app program is submitted to a permission authentication node, then a test is carried out, the permission authentication node trusts the reading equipment after checking and passing, the permission authentication node distributes a public and private key of the equipment to be added to the reading equipment, the public and private key of the equipment is used for authenticating the equipment, the transmission data is encrypted by the public key of the equipment, and the private key is decrypted after the reading equipment obtains the transmission data;
The method comprises the steps of receiving registration information of a node from a root node, randomly generating a symmetric key as a password after the registration information of the node is filled in and submitted to the root node, returning the symmetric key to the registration node in a mail form, transmitting all information and the randomly generated password to a permission authentication node after the root node passes verification, generating a public and private key for the registration node after the permission authentication node receives the information, registering the type of the node to an information list of the permission authentication node, encrypting the public and private key of the node and the registration information of the node into an encryption packet by using the password transmitted by the root node, and transmitting the encryption packet to the registration node in a mail form, wherein the registration information of the node is used for confirming the current node information, and the public and private keys of the node are used for signature and signature verification when the content link is commonly known.
The license authentication node acts as a trusted CA organization, issues the CA certificate required in HTTPS transmission for the node requiring the CA certificate in the content chain, and the node requiring the CA certificate adds the CA certificate of the license authentication node into the trusted CA certificate of the node itself to trust all the CA certificates issued by the license authentication node.
The license authentication node comprises a main license authentication node and an auxiliary license authentication node, wherein the auxiliary license authentication node performs full backup on the content of the main license authentication node, and when the main license authentication node fails, the auxiliary license authentication node is switched to a working state.
The method comprises the steps of detecting heartbeats among a root node, a main license authentication node and an auxiliary license authentication node, switching the auxiliary license authentication node to a working state when the heartbeats of the main license authentication node are not detected, carrying out full-scale backup from the auxiliary license authentication node and operating with the identity of the auxiliary license authentication node after the main license authentication node is restored, repairing the auxiliary license authentication node when the heartbeats of the auxiliary license authentication node are not detected, and carrying out full-scale backup from the main license authentication node after the auxiliary license authentication node is restored to be normal.
When the auxiliary license authentication node is started, synchronizing data from the main license authentication node in a full-scale backup mode, and carrying out real-time incremental backup on the auxiliary license authentication node in order to enable the auxiliary license authentication node to be consistent with the data in the main license authentication node in the operation process; and when the primary license authentication node has data update, sending a synchronous message to the secondary license authentication node.
When the authenticated reading device is used for reading, the content chain sends an encrypted content object and a content license, wherein the content license is used for decrypting the content object, the content license is encrypted by the device public key and the user public key, and the authenticated reading device can use the device private key and the user private key to decrypt and read.
And when the user is authenticated and registered, the content chain is in butt joint with the release system, and the automatic association of the user account number of the user in the release system and the user account number in the content chain is realized through a user association mechanism.
The method comprises the following steps of automatically associating a user account in a release system with a user account in a content chain through a user association mechanism:
The method comprises the steps of storing login and registration information in two parts, storing one part in a release system, storing one part in a content chain and using a mailbox as a unique mark, firstly checking whether the user information exists in the release system when a new user is registered, if the user information does not exist in the release system, sending a request to a permission authentication node, checking the user information, if the permission authentication node does not exist, registering the user information at the permission authentication node and a local release end at the same time, if the user information exists in the permission authentication node, registering and associating the user on the content chain in the release system, inquiring the release system and the content chain when the user does not exist in the release system and sometimes, directly registering and associating the user in the release system in an implicit mode.
The invention reduces the safety requirement of other nodes in the content chain by the permission authentication node, and other nodes in the network do not store the content data and only store encrypted copies, thereby ensuring that the stored content is not lost after the nodes are attacked. When the content chain is accessed externally, other nodes are connected first, and then the other nodes access the license authentication node, so that the possibility of the license authentication node being attacked is further reduced.
Detailed Description
The invention is described in further detail below with reference to the drawings and the specific examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In the embodiment of the invention, the self-organizing network is a content chain taking a blockchain as an open source architecture, is a self-organizing network which absorbs the advantages of a distributed autonomous network and faces to content distribution, is a network combining mobile communication and a computer network, is a mobile computer network, and in the self-organizing network of the content chain, comprises a plurality of nodes, and the positions of all the nodes are equal, thus being a peer-to-peer network. Each node can join and leave the self-organizing network at any time, and the faults of any node can not influence the operation of the whole network, so that the self-organizing network has strong survivability. The content chain includes a license authentication node and other nodes, such as a content node for storing content object data, to which the transaction records are synchronized, the license authentication node verifying whether the user has content license rights based on the transaction records.
In the embodiment of the invention, the nodes represent a plurality of unit structures which are mutually communicated and connected to form a digital content chain network, and the unit structures which form the content chain are mutually communicated to form a network structure, and are different from the meanings of the nodes which are sequentially arranged in the traditional blockchain.
In the embodiment of the invention, the unified authentication of the user under the multi-node condition of the self-organizing network environment is shown in fig. 1, the authentication process is realized through the approval authentication node in the content chain self-organizing network, and triple authentication is performed through the approval authentication node when the user is registered, reading equipment is added and the registration node is added into the content chain, so that the operation safety of the content chain and the safety of data transmission are realized. The permission authentication node provides authentication function for the self-organizing network and ensures the security of the content data. The existence of the permission authentication node reduces the security requirement of other nodes, other nodes in the network do not store content data per se, only store encrypted copies, ensure that the stored content cannot be lost after the node is attacked, and when the content per se is acquired, the node authentication, the equipment authentication and the user authentication are required to be passed, and the design mode enables the other nodes to place the center of gravity on specific services, so that the pressure of the other nodes is reduced. When the content chain is accessed externally, other nodes are connected first, and then the other nodes access the license authentication node, so that the possibility of the license authentication node being attacked is further reduced.
In the embodiment of the invention, the license authentication node distributes keys of the following types:
The public key of the user identity is an asymmetric key, the public key in the public key of the user identity is called as the public key of the user, and the private key in the public key of the user identity is called as the private key of the user. The method is used for authenticating the identity of the reader when the user reads, authorizing the reader, using the public key of the user to encrypt the content encryption key, and if the reader has the right to use certain content object data, decrypting the content encryption key by using the private key of the user, and decrypting and reading the content object data.
The public key of the node is an asymmetric key, which consists of public key pairs of other nodes in the content chain, wherein the public key in the public key of the node is called the public key of the node, and the private key in the public key of the node is called the private key of the node. The public and private keys of the nodes are used for identity authentication of the content link nodes in the consensus process, and the public and private keys comprise the steps that the nodes sign and verify transactions, so that the nodes added into the content link are ensured to be safe and reliable.
The public keys of the equipment are asymmetric keys, the public keys in the public keys of the equipment are called as the public keys of the equipment, and the private keys in the public keys of the equipment are called as the private keys of the equipment. The public and private keys of the equipment are used for authenticating and authorizing the equipment used for reading the copyrighted content by the user, the authorized equipment can read the copyrighted content, unauthorized equipment is prevented from maliciously acquiring the copyrighted content, and the security of the copyrighted content is protected. When a reader reads by using the reading device, the device passing through the authentication is authenticated by the licensed authentication node, and the content encryption key can be decrypted by using the device private key.
The embodiment of the invention provides a user authentication mode, a license authentication node distributes a user identity public and private key for a content chain registered user, is used for solving the user identity authentication problem among all functional modules of a content chain, realizes user identity authentication in a decryption or signature verification mode, and provides a user association mechanism of the content chain user and other release system users.
When a user registers in a content chain, necessary information capable of proving identity is required to be provided according to prompt, the information is sent to a permission authentication node, after the permission authentication node checks and passes the identity information submitted by the registered user, the unique user id is returned, and meanwhile, the permission authentication node generates a user identity public and private key for the registered user and is used for carrying out identity authentication on each functional module of the content chain, and the user identity public and private key encryption and decryption modes are automatically authenticated in the processes of uploading and obtaining a content object.
In addition, the content chain may interface with the distribution system. At this time, the automatic association between the user account number of a certain user in the release system and the user account number in the content chain can be realized through a user association mechanism. The specific flow is shown in figure 2. The method comprises the steps of firstly checking whether the user information exists in a release system when a new user is registered, sending a request to a permission authentication node to check the user information if the user information does not exist, registering the user information at the permission authentication node and a local release end simultaneously if the permission authentication node does not exist, registering and associating the user information on a content chain in the release system if the user information exists in the permission authentication node, and inquiring the release system and the content chain in the same way when the user is not present in the release system and the content chain is sometimes registered and associated in the release system.
The embodiment of the invention provides a device authentication mode, which distributes a device public and private key for a device trusted by a content chain, all transmission data are encrypted by the device public key, the private key is decrypted after the device is acquired, illegal devices are prevented from maliciously acquiring the content, and in the content chain, different types of reading devices are allowed to join and read. In order to prevent illegal devices from maliciously acquiring content, for a new type of device to join a device in a content chain, an app program needs to be submitted to a license authentication node, then a test is performed, the device is trusted after passing manual verification, and the license authentication node distributes a device public and private key to the device to be joined.
The device public and private keys are used for authenticating the device, when a reader reads the device, the content chain sends an encrypted content object and a content license, the content license is used for decrypting the content object, the content license is also encrypted through the device public key and the user public key, and only the reading device authenticated by the license authentication node can use the device private key and the user private key to decrypt and read.
The user private key is not directly usable by the reading device, and the use flow is as follows:
Step 11, after the user logs in the device, the user basic information can be checked, and when the user obtains the content object, the (reading) device firstly checks whether the user key is encrypted or not. If not, the user private key is acquired to the CA mechanism (approved authentication node), the CA mechanism returns the encrypted user private key (the encrypted password is the user content chain password), and if yes, the user private key is not acquired any more.
And step 12, after the user requests the content object, the user agrees to the device to decrypt and read by using the private key for the first time, the user needs to input a content chain password of the user, the identity of the user is verified, the password is input on a page provided by the CA mechanism, the private key of the user is decrypted after the password is successful, and the content license is decrypted by using the private key of the user.
Step 13, the user selects whether to trust the equipment, if the equipment is trusted, the equipment does not need to input a password later, otherwise, the password is needed to be input every time.
The embodiment of the invention provides a node authentication method, which ensures the credibility of the node added into the content chain, namely, when a new node wants to be added into the content chain, the identity authentication of the node is needed, the node added into the content chain is ensured not to be a malicious node, and the safe and stable operation of the content chain is ensured. The flow of (registration) nodes joining the content chain is shown in fig. 3:
And 21, downloading a content chain installation program by a user, namely when a new node is to be added into the content chain, firstly downloading codes, and then installing the content chain.
Step 22, installing a content chain, namely automatically generating a configurable script in the process of installing codes, wherein the configurable script comprises basic configuration information:
license agreement-the user can continue to install after accepting or agreeing to the license agreement.
And setting the installation path, namely setting the catalog of the installation codes by the user.
User password, setting password of login manager configuration interface by user.
Ccnoder is used as a user name, a password input by a user is used as a user password to be written into a configuration file, so that the subsequent user can carry out identity authentication when logging in an administrator configuration interface, and the user password is encrypted and stored through the sha 256.
Step 23, starting the program
After the code is installed successfully, the user starts, at this time, an administrator configuration interface is started, and the user can apply for registration of the node on the interface.
Step 24, login
The user logs in by using the user name and the password generated in the installation process, and enters an administrator configuration interface after the identity authentication is passed.
Step 25, node registration
After entering the administrator configuration interface, corresponding information is filled in according to the prompt, and if related information is originally available, the corresponding information is directly filled in. If not, apply for. The application flow is as follows:
Step 251, filling basic information according to the requirement, including organization name, organization abbreviation, organization code, address, contact person telephone, mail, etc., after filling, submitting the information.
Step 252, the information is submitted to the root node, the root node receives the registration application, then randomly generates a symmetric key as a password, and returns the symmetric key to the registration node in the form of a mail, wherein the mail comprises the following contents that the information is submitted to the root node for verification, the information is waited for, the notification is carried out in the form of a mail after the verification is passed, and the encrypted package (the public and private keys of the node and the encrypted form of the registration information related to the node) can be checked by using the password contained in the mail after the notification is received.
Step 252, the root node performs manual verification, and after the verification is passed, all information and the password randomly generated in the previous step are sent to the permission authentication node together.
Step 253, after receiving the information, the license authentication node generates a public and private key for the node, registers the type of the node to an information list of the license authentication node, encrypts the public and private key of the node and the registration information related to the node into an encrypted packet by using a password transmitted by a root node, and transmits the encrypted packet to the registration node in a mail form, wherein the registration information related to the node is used for confirming the current node information, and the public and private key of the node is used for signing and checking signature when the content links are identified.
Furthermore, the embodiment of the invention provides a certificate issuing mechanism of HTTPS, which ensures the safety of data in the transmission process, and the HTTPS is required to be used for safety transmission in a content chain system. In conventional solutions, a self-visa needs to be generated, which is then used in HTTP SERVER. Since the browser does not trust the self-visa, in order to solve the problem of browser trust, the CA certificate used by the self-visa needs to be added to the trusted CA certificate of the system or browser, thereby avoiding the problem. Thus, in the content chain, the license authentication node acts as a trusted CA authority to issue the CA certificates required in HTTPS transmissions to other nodes that require the CA certificates. Other nodes requiring a CA certificate add the CA certificate of the license authentication node to their own trusted CA certificate, thereby trusting all CA certificates issued by the license authentication node.
In order to ensure that the normal operation of a content chain is not influenced when the license authentication node fails, a backup mechanism of a main license authentication node and a secondary license authentication node is provided, so that network paralysis caused by node failure can be prevented, and the survivability of the license authentication node is ensured. The auxiliary license authentication node performs full backup on the content of the main license authentication node, and the functions of the auxiliary license authentication node are the same except that the working states of the auxiliary license authentication node and the main license authentication node are different in the content chain network.
The backup mode comprises full backup and incremental backup, wherein the full backup refers to the backup of all data in the main permission authentication node, and the incremental backup refers to the backup of modified data on the basis of the last data backup.
Specifically, the backup flow of the primary license authentication node and the secondary license authentication node is as follows:
When the auxiliary node is started, the data is synchronized from the main node in a full-volume backup mode, and then, in order to ensure that the auxiliary node is consistent with the data in the main node to the greatest extent, the auxiliary node needs to perform real-time incremental backup. In the operation process, when the main node has data update, the synchronous message is sent to the auxiliary node.
Specifically, the switching process of the primary permission authentication node and the secondary permission authentication node is as follows:
When the primary permission authentication node fails, the secondary permission authentication node is switched to a working state in time, so that whether the primary permission authentication node and the secondary permission authentication node are in a normal state is monitored at any time. And ensuring that the primary license authentication node and the secondary license authentication node are in a normal state through heartbeat detection between a root node in the content chain and the primary license authentication node and the secondary license authentication node. When the heartbeat of the master license authentication node is not detected, the slave license authentication node is switched to a working state, and after the master license authentication node is recovered, full-scale backup is performed from the slave license authentication node, and then the slave license authentication node operates according to the identity of the slave license authentication node. When the heartbeat of the auxiliary license authentication node is not detected, the auxiliary license authentication node is repaired in time, and after the auxiliary license authentication node is recovered to be normal, the full-quantity backup is carried out from the main license authentication node.
In the embodiment of the application, the root node is the node with the highest management authority in the content chain, and can realize the control of backup switching of the primary and secondary permission authentication nodes, the verification of the joining node in the content chain, the generation of related keys and the like.
While the fundamental and principal features of the invention and advantages of the invention have been shown and described, it will be apparent to those skilled in the art that the invention is not limited to the details of the foregoing exemplary embodiments, but may be embodied in other specific forms without departing from the spirit or essential characteristics thereof;
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.
Furthermore, it should be understood that although the present disclosure describes embodiments, not every embodiment is provided with a separate embodiment, and that this description is provided for clarity only, and that the disclosure is not limited to the embodiments described in detail below, and that the embodiments described in the examples may be combined as appropriate to form other embodiments that will be apparent to those skilled in the art.