Identity authentication method and system based on distributed single sign-on

By deploying digital identity smart contracts on the blockchain, decentralized single sign-on is solved, and the single point of failure and privacy leakage of central authentication servers in traditional single sign-on systems is improved, and interoperability between systems is improved. User experience ensures the security of identity information.

CN118890178APending Publication Date: 2024-11-01LINGSHU TECH CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410910895.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2024-11-01

AI Technical Summary

Technical Problem

Traditional single sign-on systems have the risk of single point failure and privacy leakage due to the central authentication server managing user information, and the difficulty of integration and interoperability between systems, which affects experience and efficiency.

Method used

Adopt a distributed single sign-in method based on blockchain, and deploy blockchain nodes and digital identity smart contracts to build a blockchain network to realize decentralized identity authentication. Users can authenticate through digital identity credentials and smart contracts. , generate a temporary public key string for subsequent authentication to ensure the security and reliability of identity information.

Benefits of technology

It realizes the security management and decentralized authentication of user identity information, avoids the risks of single point of failure and privacy leakage, and improves interoperability and user experience between systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118890178A_ABST
    Figure CN118890178A_ABST
Patent Text Reader

Abstract

The invention discloses an identity authentication method and system based on distributed single sign-on. The method comprises the following steps: deploying a block chain node, building a block chain network, and deploying a digital identity smart contract by communicating with the block chain node; the identity provider builds a control center for integrating a digital identity smart contract; an identity provider customizes a single sign-on protocol, a service user establishes a trust relationship with the identity provider, the custom single sign-on protocol is integrated, and an identity authentication authorization process and standard are agreed; when a user accesses resources of a service user, whether the user registers a digital identity or not is judged firstly, then identity authentication is performed, and a temporary public key string is returned, so that when the user subsequently accesses the resources of the service user, identity authentication is performed only through the temporary public key string; according to the method, the creation, storage, sharing and verification processes of identity information can be automatically executed and managed based on the digital identity of the smart contract, and the security and reliability of the user identity information are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and in particular to an identity authentication method and system based on distributed single sign-on. Background Art

[0002] Traditional single sign-on (SSO) has difficulties in system integration and interoperability due to different protocols and standards, and user identity information is difficult to share, affecting experience and efficiency. The central authentication server manages user information, which has the risk of single point failure and privacy leakage.

[0003] With regard to the problem of single point failure and privacy leakage risk in the management of user information by the central authentication server in the prior art, no effective solution has been proposed so far. Summary of the invention

[0004] The embodiment of the present invention provides an identity authentication method and system based on distributed single sign-on to solve the problem of single point failure and privacy leakage risk in the management of user information by a central authentication server in the prior art.

[0005] To achieve the above-mentioned purpose, on the one hand, the present invention provides an identity authentication method based on distributed single sign-on, which method includes: S1, deploying blockchain nodes and building a blockchain network, deploying digital identity smart contracts by communicating with blockchain nodes, and the blockchain nodes interacting with the digital identity smart contracts; S2, the identity provider builds a control center for integrating digital identity smart contracts; the identity provider customizes the single sign-on protocol, the service user establishes a trust relationship with the identity provider, integrates the customized single sign-on protocol, and agrees on the identity authentication authorization process and standards; S3, the user accesses the service user's resources to determine whether the user has registered a digital identity. If not, the user registers the digital identity through the control center; if so, the service user initiates an identity authentication request; the user enters the digital The identity credential is sent to the blockchain node through the identity provider; the identity authentication function of the digital identity smart contract is called to execute the identity authentication logic on the blockchain node to verify whether the digital identity credential input by the user matches the stored digital identity information, and the identity authentication result is obtained and returned to the identity provider; if the authentication is successful, the identity provider generates a response result and sends it to the service user so that the service provider grants the user authority; the service user sends a temporary public key string to the user so that when the user subsequently accesses the service user's resources, he only needs to use the temporary public key string for identity authentication; wherein, the digital identity credential includes: a certificate or a public key; the response result includes: a temporary public key string, authentication success or failure, user name, user authority; the temporary public key string includes: a public key and an expiration timestamp.

[0006] Optionally, when the user subsequently accesses the resources of the service user, he only needs to perform identity authentication through a temporary public key string, including: when the user subsequently accesses the resources of the service user, determine whether the user carries a request header with a temporary public key string; if not, return an error message, and authenticate the user through a control center to return a temporary public key string; if so, the service user forwards the temporary public key string to the identity provider through a secure channel for identity authentication, and the identity provider uses a specified private key to decrypt the temporary public key string through an asymmetric encryption algorithm based on the temporary public key string sent by the service user to obtain the user public key information and expiration timestamp, and determine whether the temporary public key string is expired and whether the user public key is registered. If it is expired or the public key is not registered, the authentication fails; if it is not expired and the public key is registered, a new temporary public key string carrying an expiration timestamp and the user public key is regenerated.

[0007] Optionally, after S3, the process further includes: when a user requests to log out of an account, the service user forwards the request to the identity provider in a secure manner, so that the identity provider cleans up the user authentication information and changes the user to an unauthenticated state.

[0008] Optionally, the determination of whether the user registers a digital identity, and if not, registering the user's digital identity through the control center includes: determining whether the user carries a request header with a temporary public key string; if not, the user inputs identity authentication attributes and calls the registration interface of the control center to transmit them to the identity provider; the identity provider encrypts the data in the authentication attributes and sends them to the blockchain node; calls the registration function of the digital identity smart contract to register and store evidence in the blockchain node, obtains the identity registration result and returns it to the identity provider; the identity provider sends the identity registration result to the service user, and the service user sends the temporary public key string to the user; wherein the identity authentication attributes include: user name, identity information and biometrics; the identity registration result includes: temporary public key string, authentication success or failure, user name, user authority.

[0009] Optionally, the control center provides a unified user registration interface, user authentication interface, user authority acquisition interface, user account logout interface and identity deregistration interface.

[0010] On the other hand, the present invention provides an identity authentication system based on distributed single sign-on, which includes: a deployment unit, which is used to deploy blockchain nodes and build a blockchain network, and deploy digital identity smart contracts by communicating with blockchain nodes, and the blockchain nodes interact with the digital identity smart contracts; a definition unit, which is used by identity providers to build a control center for integrating digital identity smart contracts; the identity provider customizes the single sign-on protocol, the service user establishes a trust relationship with the identity provider, integrates the customized single sign-on protocol, and agrees on the identity authentication authorization process and standards; an authentication unit, which is used for users to access the resources of the service user, determine whether the user has registered a digital identity, and if not, register the user's digital identity through the control center; if so, the service user initiates an identity authentication request; the user inputs The digital identity credential is sent to the blockchain node through the identity provider; the identity authentication function of the digital identity smart contract is called to execute the identity authentication logic on the blockchain node to verify whether the digital identity credential input by the user matches the stored digital identity information, and the identity authentication result is obtained and returned to the identity provider; if the authentication is successful, the identity provider generates a response result and sends it to the service user so that the service provider grants the user authority; the service user sends a temporary public key string to the user so that when the user subsequently accesses the service user's resources, he only needs to use the temporary public key string for identity authentication; wherein, the digital identity credential includes: a certificate or a public key; the response result includes: a temporary public key string, authentication success or failure, user name, user authority; the temporary public key string includes: a public key and an expiration timestamp.

[0011] Optionally, when the user subsequently accesses the resources of the service user, he only needs to perform identity authentication through a temporary public key string, including: when the user subsequently accesses the resources of the service user, determine whether the user carries a request header with a temporary public key string; if not, return an error message, and authenticate the user through a control center to return a temporary public key string; if so, the service user forwards the temporary public key string to the identity provider through a secure channel for identity authentication, and the identity provider uses a specified private key to decrypt the temporary public key string through an asymmetric encryption algorithm based on the temporary public key string sent by the service user to obtain the user public key information and expiration timestamp, and determine whether the temporary public key string is expired and whether the user public key is registered. If it is expired or the public key is not registered, the authentication fails; if it is not expired and the public key is registered, a new temporary public key string carrying an expiration timestamp and the user public key is regenerated.

[0012] Optionally, it also includes: a logout cleaning unit, which is used for forwarding the request of the user to the identity provider in a secure manner when the user requests to log out of the account, so that the identity provider cleans up the user authentication information and changes the user to an unauthenticated state.

[0013] Optionally, the determination of whether the user registers a digital identity, and if not, registering the user's digital identity through the control center includes: determining whether the user carries a request header with a temporary public key string; if not, the user inputs identity authentication attributes and calls the registration interface of the control center to transmit them to the identity provider; the identity provider encrypts the data in the authentication attributes and sends them to the blockchain node; calls the registration function of the digital identity smart contract to register and store evidence in the blockchain node, obtains the identity registration result and returns it to the identity provider; the identity provider sends the identity registration result to the service user, and the service user sends the temporary public key string to the user; wherein the identity authentication attributes include: user name, identity information and biometrics; the identity registration result includes: temporary public key string, authentication success or failure, user name, user authority.

[0014] Optionally, the control center provides a unified user registration interface, user authentication interface, user authority acquisition interface, user account logout interface and identity deregistration interface.

[0015] Beneficial effects of the present invention:

[0016] The present invention provides an identity authentication method and system based on distributed single sign-on, wherein the method deploys blockchain nodes and builds a blockchain network, and deploys digital identity smart contracts by communicating with blockchain nodes. The digital identity based on the smart contract can automatically execute and manage the creation, storage, sharing and verification process of identity information, thereby ensuring the security and reliability of user identity information. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a flow chart of an identity authentication method based on distributed single sign-on provided by an embodiment of the present invention;

[0018] Figure 2 It is a structural diagram of an identity authentication system based on distributed single sign-on provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0020] Figure 1 is a flow chart of an identity authentication method based on distributed single sign-on provided by an embodiment of the present invention, such as Figure 1 As shown, the method includes:

[0021] S1. Deploy blockchain nodes and build a blockchain network, deploy digital identity smart contracts by communicating with blockchain nodes, and the blockchain nodes interact with the digital identity smart contracts;

[0022] Specifically, the identity provider designs the data structure, contract functions and contract events of the digital identity smart contract. The data structure includes: user name, user password, encrypted identity information, public and private key information, etc.; the contract functions include: identity registration, identity authentication, authority authorization, authentication cancellation and other functions.

[0023] Deploy this digital identity smart contract on the chain as a decentralized tool for managing digital identities.

[0024] In the alliance chain, the authority authentication agency needs to deploy a blockchain node to provide identity authentication services. The blockchain node will interact with the digital identity smart contract to verify the user's identity.

[0025] S2. The identity provider builds a control center for integrating digital identity smart contracts. The identity provider customizes the single sign-on protocol. The service user establishes a trust relationship with the identity provider, integrates the customized single sign-on protocol, and agrees on the identity authentication authorization process and standards.

[0026] Specifically, the identity provider builds a control center (DApp) to integrate the digital identity smart contract. The control center (DApp) provides a unified user registration interface, user authentication interface, user permission acquisition interface, user account exit interface and identity cancellation interface. It is used to enable users to register their identities, authenticate their identities, obtain permissions, and exit their accounts and cancel their identities.

[0027] The identity provider customizes the single sign-on protocol, which includes:

[0028] 1) Define a unified request and response format;

[0029] 2) The temporary public key string returned after successful login is used in the request header when the user subsequently accesses the resources of the service user;

[0030] 3) Transfer partial identity information (user name, public key) and permission information owned by the user for permission control;

[0031] 4) Ensure the security of secure login and provide an expiration logout mechanism to prevent forged login;

[0032] 5) Ensure the compatibility of services to support open protocols (OAuth, OpenId).

[0033] The service user establishes a trust relationship with the identity provider, integrates a custom single sign-on protocol, and agrees on the identity authentication and authorization process and standards.

[0034] S3. The user accesses the resources of the service user to determine whether the user has registered a digital identity. If not, the user will be registered for a digital identity through the control center. If so, the service user initiates an identity authentication request. The user enters the digital identity credential and sends it to the blockchain node through the identity provider. The identity authentication function of the digital identity smart contract is called to execute the identity authentication logic on the blockchain node to verify whether the digital identity credential entered by the user matches the stored digital identity information, and the identity authentication result is obtained and returned to the identity provider. If the authentication is successful, the identity provider generates a response result and sends it to the service user so that the service provider grants the user authority. The service user sends a temporary public key string to the user so that when the user subsequently accesses the resources of the service user, he only needs to use the temporary public key string for identity authentication. The digital identity credential includes: a certificate or a public key. The response result includes: a temporary public key string, authentication success or failure, user name, user authority; the temporary public key string includes: a public key and an expiration timestamp.

[0035] Specifically, when a user accesses a resource of a service user, it is first determined whether the user has registered a digital identity; the determination of whether the user has registered a digital identity, and if not, registering the digital identity of the user through the control center includes:

[0036] Determine whether the user carries a request header with a temporary public key string; if not, the user enters the identity authentication attributes and calls the registration interface of the control center to transmit them to the identity provider; the identity provider encrypts the data in the authentication attributes and sends them to the blockchain node; calls the registration function of the digital identity smart contract to register and store the evidence in the blockchain node, obtains the identity registration result and returns it to the identity provider; the identity provider sends the identity registration result to the service user, and the service user sends the temporary public key string to the user.

[0037] The identity authentication attributes include: user name, identity information and biometrics; the identity registration result includes: temporary public key string, authentication success or failure, user name, and user authority.

[0038] If the user has registered a digital identity, the user has a temporary public key string. At this time, the user access authentication control:

[0039] a. The user enters a digital identity credential; the digital identity credential includes: a certificate or a public key; the identity provider calls the identity authentication function of the digital identity smart contract and sends the digital identity credential provided by the user to the blockchain node;

[0040] b. The digital identity smart contract executes the identity authentication logic on the blockchain node to verify whether the digital identity credentials (such as public keys) entered by the user match the stored digital identity information (such as the temporary public key string previously registered and stored) to obtain the identity authentication result; the authentication result includes: authentication success or failure, user name, and user permissions;

[0041] c. The identity provider receives the identity authentication result returned by the digital identity smart contract. If the authentication is successful, the identity provider generates a response result containing the user's identity attributes and sends it to the service user; the response result includes: a temporary public key string (user identity attributes), authentication success or failure, user name, and user permissions.

[0042] d. The service user receives and verifies the response sent by the identity provider, parses the user identity attributes contained in the response, and grants the user corresponding access rights based on the predefined user rights or those in the response;

[0043] e. The service user sends a temporary public key string to the user, so that when the user subsequently accesses the service user's resources, he only needs to use the temporary public key string for identity authentication.

[0044] Furthermore, when the user subsequently accesses the resources of the service user, he only needs to use the temporary public key string for identity authentication, including:

[0045] When the user subsequently accesses the resources of the service user, it is determined whether the user carries a request header with a temporary public key string; if not, an error message is returned, and the user is authenticated through the control center to return a temporary public key string; if so, the service user forwards the temporary public key string to the identity provider through a secure channel for identity authentication. The identity provider uses the specified private key to decrypt the temporary public key string through an asymmetric encryption algorithm based on the temporary public key string sent by the service user to obtain the user's public key information and expiration timestamp, and determines whether the temporary public key string is expired and whether the user's public key is registered. If it is expired or the public key is not registered, the authentication fails. If it is not expired and the public key is registered, the authentication passes and a new temporary public key string carrying the expiration timestamp and the user's public key is regenerated.

[0046] This application sets the preset time length to 10 minutes. For example, if the current time is 10:20, the expiration timestamp of the generated temporary public key string is 10:30. At this time, at 10:31, the user accesses the resources of the service user. The service user passes the temporary public key string to the identity provider, which uses the specified private key to decrypt the user public key and expiration timestamp through the asymmetric encryption algorithm, namely the RSA algorithm, and calls the identity authentication function of the digital identity smart contract for verification. If the block time obtained by the digital identity smart contract is greater than the expiration time at this time, it means that the temporary public key string at this time has expired, and the authentication fails; if the current time is 10:28, it means that the temporary public key string has not expired, and the corresponding authority is granted after the authentication is passed, and the identity provider needs to regenerate a temporary public key string with a new expiration timestamp, that is, the expiration timestamp carried by the temporary public key string is 10:38. When accessing the resources of the service user again, the authentication can be passed as long as it is within 10:38.

[0047] Furthermore, after S3, the following is further included:

[0048] When a user requests to log out of an account, the service consumer forwards the request to the identity provider in a secure manner so that the identity provider can clean up the user's authentication information and change the user to an unauthenticated state.

[0049] Specifically, the identity provider provides a unified identity authentication logout function. When a user clicks to log out of an account, the service user forwards the logout request to the identity provider in a secure manner. The service provider receives the request to clean up the user authentication information and changes the user to an unauthenticated state. When the user subsequently accesses any service user with the cleaned temporary public key string, the user will be prompted that the temporary public key string is invalid.

[0050] When the service user connects to the identity provider for a long time without sending an authentication request, it will automatically expire after 10 minutes and the user authentication status will be automatically cleared. Subsequent access requires re-entering the identity provider login page for unified login.

[0051] It should be noted that in this application, different identity providers perform identity authentication on different blockchain nodes one by one.

[0052] Figure 2 is a schematic diagram of the structure of an identity authentication system based on distributed single sign-on provided by an embodiment of the present invention, such as Figure 2 As shown, the system includes:

[0053] A deployment unit 201 is used to deploy blockchain nodes and build a blockchain network, and to deploy a digital identity smart contract by communicating with the blockchain nodes, wherein the blockchain nodes interact with the digital identity smart contract;

[0054] Specifically, the identity provider designs the data structure, contract functions and contract events of the digital identity smart contract. The data structure includes: user name, user password, encrypted identity information, public and private key information, etc.; the contract functions include: identity registration, identity authentication, authority authorization, authentication cancellation and other functions.

[0055] Deploy this digital identity smart contract on the chain as a decentralized tool for managing digital identities.

[0056] In the alliance chain, the authority authentication agency needs to deploy a blockchain node to provide identity authentication services. The blockchain node will interact with the digital identity smart contract to verify the user's identity.

[0057] Definition unit 202, used for the identity provider to build a control center for integrating digital identity smart contracts; the identity provider customizes the single sign-on protocol, the service user establishes a trust relationship with the identity provider, integrates the customized single sign-on protocol, and agrees on the identity authentication authorization process and standards;

[0058] Specifically, the identity provider builds a control center (DApp) to integrate the digital identity smart contract. The control center (DApp) provides a unified user registration interface, user authentication interface, user permission acquisition interface, user account exit interface and identity cancellation interface. It is used to enable users to register their identities, authenticate their identities, obtain permissions, and exit their accounts and cancel their identities.

[0059] The identity provider customizes the single sign-on protocol, which includes:

[0060] 1) Define a unified request and response format;

[0061] 2) The temporary public key string returned after successful login is used in the request header when the user subsequently accesses the resources of the service user;

[0062] 3) Transfer partial identity information (user name, public key) and permission information owned by the user for permission control;

[0063] 4) Ensure the security of secure login and provide an expiration logout mechanism to prevent forged login;

[0064] 5) Ensure the compatibility of services to support open protocols (OAuth, OpenId).

[0065] The service user establishes a trust relationship with the identity provider, integrates a custom single sign-on protocol, and agrees on the identity authentication and authorization process and standards.

[0066] The authentication unit 203 is used for the user to access the resources of the service user, determine whether the user has registered a digital identity, and if not, register the digital identity of the user through the control center; if so, the service user initiates an identity authentication request; the user enters the digital identity credential and sends it to the blockchain node through the identity provider; the identity authentication function of the digital identity smart contract is called to execute the identity authentication logic on the blockchain node to verify whether the digital identity credential entered by the user matches the stored digital identity information, obtain the identity authentication result and return it to the identity provider; if the authentication is successful, the identity provider generates a response result and sends it to the service user so that the service provider grants the user authority; the service user sends a temporary public key string to the user so that when the user subsequently accesses the resources of the service user, he only needs to use the temporary public key string for identity authentication; wherein, the digital identity credential includes: a certificate or a public key; the response result includes: a temporary public key string, authentication success or failure, user name, user authority; the temporary public key string includes: a public key and an expiration timestamp.

[0067] Specifically, when a user accesses a resource of a service user, it is first determined whether the user has registered a digital identity; the determination of whether the user has registered a digital identity, and if not, registering the digital identity of the user through the control center includes:

[0068] Determine whether the user carries a request header with a temporary public key string; if not, the user enters the identity authentication attribute and calls the registration interface of the control center to transmit it to the identity provider; the identity provider encrypts the data in the authentication attribute and sends it to the blockchain node; calls the registration function of the digital identity smart contract to register and store the evidence in the blockchain node, obtains the identity registration result and returns it to the identity provider; the identity provider sends the identity registration result to the service user, and the service user sends the temporary public key string to the user;

[0069] The identity authentication attributes include: user name, identity information and biometrics; the identity registration result includes: temporary public key string, authentication success or failure, user name, and user authority.

[0070] If the user has registered a digital identity, the user has a temporary public key string. At this time, the user access authentication control:

[0071] a. The user enters a digital identity credential; the digital identity credential includes: a certificate or a public key; the identity provider calls the identity authentication function of the digital identity smart contract and sends the digital identity credential provided by the user to the blockchain node;

[0072] b. The digital identity smart contract executes the identity authentication logic on the blockchain node to verify whether the digital identity credentials (such as public keys) entered by the user match the stored digital identity information (such as the temporary public key string previously registered and stored) to obtain the identity authentication result; the authentication result includes: authentication success or failure, user name, and user permissions;

[0073] c. The identity provider receives the identity authentication result returned by the digital identity smart contract. If the authentication is successful, the identity provider generates a response result containing the user's identity attributes and sends it to the service user; the response result includes: a temporary public key string (user identity attributes), authentication success or failure, user name, and user permissions.

[0074] d. The service user receives and verifies the response sent by the identity provider, parses the user identity attributes contained in the response, and grants the user corresponding access rights based on the predefined user rights or those in the response;

[0075] e. The service user sends a temporary public key string to the user, so that when the user subsequently accesses the service user's resources, he only needs to use the temporary public key string for identity authentication.

[0076] Furthermore, when the user subsequently accesses the resources of the service user, he only needs to use the temporary public key string for identity authentication, including:

[0077] When the user subsequently accesses the resources of the service user, it is determined whether the user carries a request header with a temporary public key string; if not, an error message is returned, and the user is authenticated through the control center to return a temporary public key string; if so, the service user forwards the temporary public key string to the identity provider through a secure channel for identity authentication. The identity provider uses the specified private key to decrypt the temporary public key string through an asymmetric encryption algorithm based on the temporary public key string sent by the service user to obtain the user's public key information and expiration timestamp, and determines whether the temporary public key string is expired and whether the user's public key is registered. If it is expired or the public key is not registered, the authentication fails. If it is not expired and the public key is registered, the authentication passes and a new temporary public key string carrying the expiration timestamp and the user's public key is regenerated.

[0078] This application sets the preset time length to 10 minutes. For example, if the current time is 10:20, the expiration timestamp of the generated temporary public key string is 10:30. At 10:31, the user accesses the service user's resources. The service user passes the temporary public key string to the identity provider, uses the specified private key to decrypt the user's public key and expiration timestamp through the asymmetric encryption algorithm, namely the RSA algorithm, and calls the identity authentication function of the digital identity smart contract for verification. If the block time obtained by the digital identity smart contract is greater than the expiration time, it means that the temporary public key string has expired, and the authentication fails; if the current time is 10:28, it means that the temporary public key string has not expired. After the authentication is passed, the corresponding authority is granted, and the identity provider needs to regenerate a temporary public key string with a new expiration timestamp, that is, the expiration timestamp carried by the temporary public key string is 10:38. When accessing the service user's resources again, the authentication can be passed as long as it is within 10:38. .

[0079] Furthermore, it also includes: a logout cleaning unit, which is used for forwarding the request of the user to the identity provider in a secure manner when the user requests to log out of the account, so that the identity provider cleans up the user authentication information and changes the user to an unauthenticated state.

[0080] Specifically, the identity provider provides a unified identity authentication logout function. When a user clicks to log out of an account, the service user forwards the logout request to the identity provider in a secure manner. The service provider receives the request to clean up the user authentication information and changes the user to an unauthenticated state. When the user subsequently accesses any service user with the cleaned temporary public key string, the user will be prompted that the temporary public key string is invalid.

[0081] When the service user connects to the identity provider for a long time without sending an authentication request, it will automatically expire after 10 minutes and the user authentication status will be automatically cleared. Subsequent access requires re-entering the identity provider login page for unified login.

[0082] It should be noted that in this application, different identity providers perform identity authentication on different blockchain nodes one by one.

[0083] Beneficial effects of the present invention:

[0084] The present invention provides an identity authentication method and system based on distributed single sign-on, wherein the method deploys blockchain nodes and builds a blockchain network, and deploys digital identity smart contracts by communicating with blockchain nodes. The digital identity based on the smart contract can automatically execute and manage the creation, storage, sharing and verification process of identity information, thereby ensuring the security and reliability of user identity information.

[0085] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An identity authentication method based on distributed single sign-on, characterized in that: include: S1. Deploy blockchain nodes and build a blockchain network, deploy digital identity smart contracts by communicating with blockchain nodes, and the blockchain nodes interact with the digital identity smart contracts; S2. The identity provider builds a control center for integrating digital identity smart contracts. The identity provider customizes the single sign-on protocol. The service user establishes a trust relationship with the identity provider, integrates the customized single sign-on protocol, and agrees on the identity authentication authorization process and standards. S3. The user accesses the resources of the service user to determine whether the user has registered a digital identity. If not, the user is registered for a digital identity through the control center. If yes, the service user initiates an identity authentication request. The user enters the digital identity credential and sends it to the blockchain node through the identity provider. The identity authentication function of the digital identity smart contract is called to execute the identity authentication logic on the blockchain node to verify whether the digital identity credential entered by the user matches the stored digital identity information, and the identity authentication result is obtained and returned to the identity provider. If the authentication is successful, the identity provider generates a response result and sends it to the service user so that the service user can grant the user permissions; the service user sends a temporary public key string to the user so that when the user subsequently accesses the service user's resources, he only needs to use the temporary public key string for identity authentication; wherein, the digital identity credential includes: a certificate or a public key; the response result includes: a temporary public key string, authentication success or failure, user name, user permissions; the temporary public key string includes: a public key and an expiration timestamp.

2. The method according to claim 1, characterized in that When the user subsequently accesses the resources of the service user, he only needs to use the temporary public key string for identity authentication, including: When the user subsequently accesses the resources of the service user, it is determined whether the user carries a request header with a temporary public key string; if not, an error message is returned, and the user is authenticated through the control center to return a temporary public key string; if so, the service user forwards the temporary public key string to the identity provider through a secure channel for identity authentication. The identity provider uses the specified private key to decrypt the temporary public key string through an asymmetric encryption algorithm based on the temporary public key string sent by the service user to obtain the user's public key information and expiration timestamp, and determines whether the temporary public key string is expired and whether the user's public key is registered. If it is expired or the public key is not registered, the authentication fails. If it is not expired and the public key is registered, the authentication passes and a new temporary public key string carrying the expiration timestamp and the user's public key is regenerated.

3. The method according to claim 1, characterized in that After S3, it also includes: When a user requests to log out of an account, the service consumer forwards the request to the identity provider in a secure manner so that the identity provider can clean up the user's authentication information and change the user to an unauthenticated state.

4. The method according to claim 1, characterized in that: The determining whether the user has registered a digital identity, and if not, registering the user's digital identity through the control center includes: Determine whether the user carries a request header with a temporary public key string; if not, the user enters the identity authentication attribute and calls the registration interface of the control center to transmit it to the identity provider; the identity provider encrypts the data in the authentication attribute and sends it to the blockchain node; calls the registration function of the digital identity smart contract to register and store the evidence in the blockchain node, obtains the identity registration result and returns it to the identity provider; the identity provider sends the identity registration result to the service user, and the service user sends the temporary public key string to the user; The identity authentication attributes include: user name, identity information and biometrics; the identity registration result includes: temporary public key string, authentication success or failure, user name, and user authority.

5. The method according to claim 1, characterized in that: The control center provides a unified user registration interface, user authentication interface, user authority acquisition interface, user account logout interface and identity deregistration interface.

6. An identity authentication system based on distributed single sign-on, characterized in that: include: A deployment unit, used to deploy blockchain nodes and build a blockchain network, deploy a digital identity smart contract by communicating with the blockchain nodes, and the blockchain nodes interact with the digital identity smart contract; Definition unit, used by identity providers to build a control center for integrating digital identity smart contracts; identity providers customize single sign-on protocols, service users establish a trust relationship with identity providers, integrate customized single sign-on protocols, and agree on identity authentication and authorization processes and standards; The authentication unit is used for users to access the resources of the service user, determine whether the user has registered a digital identity, and if not, register the user's digital identity through the control center; if so, the service user initiates an identity authentication request; the user enters the digital identity credential and sends it to the blockchain node through the identity provider; the identity authentication function of the digital identity smart contract is called to execute the identity authentication logic on the blockchain node to verify whether the digital identity credential entered by the user matches the stored digital identity information, and the identity authentication result is obtained and returned to the identity provider; If the authentication is successful, the identity provider generates a response result and sends it to the service user so that the service user can grant the user permissions; the service user sends a temporary public key string to the user so that when the user subsequently accesses the service user's resources, he only needs to use the temporary public key string for identity authentication; wherein, the digital identity credential includes: a certificate or a public key; the response result includes: a temporary public key string, authentication success or failure, user name, user permissions; the temporary public key string includes: a public key and an expiration timestamp.

7. The system according to claim 6, characterized in that When the user subsequently accesses the resources of the service user, he only needs to use the temporary public key string for identity authentication, including: When the user subsequently accesses the resources of the service user, it is determined whether the user carries a request header with a temporary public key string; if not, an error message is returned, and the user is authenticated through the control center to return a temporary public key string; if so, the service user forwards the temporary public key string to the identity provider through a secure channel for identity authentication. The identity provider uses the specified private key to decrypt the temporary public key string through an asymmetric encryption algorithm based on the temporary public key string sent by the service user to obtain the user's public key information and expiration timestamp, and determines whether the temporary public key string is expired and whether the user's public key is registered. If it is expired or the public key is not registered, the authentication fails. If it is not expired and the public key is registered, a new temporary public key string carrying the expiration timestamp and the user's public key is regenerated.

8. The system according to claim 6, characterized in that Also includes: The logout cleaning unit is used to forward the request of the user to the identity provider in a secure manner when the user requests to log out of the account, so that the identity provider cleans up the user authentication information and changes the user to an unauthenticated state.

9. The system according to claim 6, characterized in that The determining whether the user has registered a digital identity, and if not, registering the user's digital identity through the control center includes: Determine whether the user carries a request header with a temporary public key string; if not, the user enters the identity authentication attribute and calls the registration interface of the control center to transmit it to the identity provider; the identity provider encrypts the data in the authentication attribute and sends it to the blockchain node; calls the registration function of the digital identity smart contract to register and store the evidence in the blockchain node, obtains the identity registration result and returns it to the identity provider; the identity provider sends the identity registration result to the service user, and the service user sends the temporary public key string to the user; The identity authentication attributes include: user name, identity information and biometrics; the identity registration result includes: temporary public key string, authentication success or failure, user name, and user authority.

10. The system according to claim 6, characterized in that: The control center provides a unified user registration interface, user authentication interface, user authority acquisition interface, user account logout interface and identity deregistration interface.

Citation Information

Cited By

  • Login method and device of service system, storage medium and electronic equipment

    CN119520124A

  • Login method and device of business system, storage medium and electronic equipment

    CN119520124B

  • Decentralized single sign-on method based on alliance chain

    CN119728219A