A method, device, computer equipment and storage medium for authentication
By directly processing authentication requests from application clients through the cloud server, generating signature keys, and interacting with the identity and access management terminal, the problem of long access paths and resource waste caused by gateway processing in existing technologies is solved, and a more efficient authentication process is achieved.
Patent Information
- Application Number
- CN202010772839.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-04
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2040-11-26
AI Technical Summary
The current cloud service authentication process requires intermediate processing through a gateway, resulting in a long access path and wasting network resources.
The cloud server directly receives access requests from application clients, generates a signing key based on authentication parameter information, and interacts with the identity and access management terminal to obtain the signing key, directly performing signing and authentication, omitting gateway processing.
It shortens the access path, improves client access efficiency, and saves gateway and network resources.
Smart Images

Figure CN111949974B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of cloud service technology, and in particular to an authentication method, apparatus, computer device and storage medium. Background Art
[0002] Cloud service refers to a shared service provided to a wide range of users. Live broadcast cloud service can provide a service for sharing live broadcast data for a wide range of users. Considering service security and user rights, the cloud platform can set up accounts for a certain type of user. Only accounts with relevant rights can access the corresponding shared service content, which requires authentication of the client.
[0003] During the authentication process, the client sends a request to access the cloud server to the gateway, and then the gateway sends an authentication request to the Identity and Access Management (IAM) end and receives the authentication result. After the authentication is successful, the gateway initiates an access request to the cloud server again.
[0004] The above authentication process needs to be processed by the gateway, which results in a long access path and wastes network resources. Summary of the invention
[0005] The embodiments of the present disclosure at least provide an authentication method, apparatus, computer device, and storage medium.
[0006] In a first aspect, an embodiment of the present disclosure provides an authentication method, which is applied to a cloud service end, including:
[0007] Receiving an access request sent by an application client; the access request carries authentication parameter information;
[0008] Based on the authentication parameter information, obtaining a signature key from the identity and access management terminal;
[0009] Generate a string to be signed based on the authentication parameter information, and sign the string to be signed using the acquired signature key to obtain a signed string;
[0010] The signed character string is compared with the signature information in the authentication parameter information to determine the authentication result.
[0011] In a possible implementation manner, before obtaining the signature key from the identity and access management end based on the authentication parameter information, the method further includes:
[0012] Based on the first static key in the authentication parameter information, searching from the cache for a signature key corresponding to the first static key;
[0013] The obtaining a signature key from an identity and access management terminal based on the authentication parameter information includes:
[0014] If the signature key corresponding to the first static key is not found in the cache, obtaining the signature key from the identity and access management terminal based on the authentication parameter information;
[0015] After obtaining the signature key from the identity and access management terminal, the method further includes:
[0016] The signature key and the first static key in the authentication parameter information are stored in a cache in correspondence.
[0017] In a possible implementation, storing the signature key and the first static key in the authentication parameter information in a cache correspondingly includes:
[0018] Based on a least recently used algorithm, the signature key and the first static key in the authentication parameter information are stored in a cache in correspondence.
[0019] In a possible implementation, obtaining a signature key from an identity and access management terminal based on the authentication parameter information includes:
[0020] Sending the first static key and token information in the authentication parameter information to the identity and access management end; the first static key and token information are used by the identity and access management end to perform a legitimacy check;
[0021] Obtain the signature key generated by the identity and access management end after passing the legality verification.
[0022] In a possible implementation, generating a character string to be signed based on the authentication parameter information includes:
[0023] A character string to be signed is generated based on the relevant service information of the target application and the request time information in the authentication parameter information.
[0024] In a second aspect, an embodiment of the present disclosure provides an authentication method, which is applied to an identity and access management terminal, including:
[0025] Receive a signature key acquisition request sent by a cloud server; the signature key acquisition request carries part of the authentication parameter information received by the cloud server from the application client;
[0026] Generate a signing key based on the partial authentication parameter information;
[0027] The signing key is sent to the cloud service end.
[0028] In a possible implementation manner, the partial authentication parameter information includes a first static key and token information;
[0029] Based on the partial authentication parameter information, generating a signature key includes:
[0030] The first static key and token information are subjected to a legitimacy check, and after the legitimacy check passes, the signature key is generated.
[0031] In a possible implementation, after the legality check is passed, generating the signature key includes:
[0032] Based on the token information, a second static key is parsed and obtained, and the signature key is generated based on the second static key.
[0033] In a third aspect, the present disclosure also provides an authentication device, which is applied to a cloud service end, including:
[0034] A receiving module, used to receive an access request sent by an application client; the access request carries authentication parameter information;
[0035] A key acquisition module, used to obtain a signature key from an identity and access management terminal based on the authentication parameter information;
[0036] A signature module, used to generate a character string to be signed based on the authentication parameter information, and use the acquired signature key to sign the character string to obtain a signed character string;
[0037] The authentication module is used to compare the signed character string with the signature information in the authentication parameter information to determine the authentication result.
[0038] In a possible implementation manner, the key acquisition module, before acquiring the signature key from the identity and access management terminal based on the authentication parameter information, is further configured to:
[0039] Based on the first static key in the authentication parameter information, searching from the cache for a signature key corresponding to the first static key;
[0040] The obtaining a signature key from an identity and access management terminal based on the authentication parameter information includes:
[0041] If the signature key corresponding to the first static key is not found in the cache, obtaining the signature key from the identity and access management terminal based on the authentication parameter information;
[0042] After obtaining the signature key from the identity and access management terminal, the method further includes:
[0043] The signature key and the first static key in the authentication parameter information are stored in a cache in correspondence.
[0044] In a possible implementation manner, the key acquisition module, when storing the signature key and the first static key in the authentication parameter information in the cache in correspondence with each other, is used to:
[0045] Based on a least recently used algorithm, the signature key and the first static key in the authentication parameter information are stored in a cache in correspondence.
[0046] In a possible implementation manner, when the key acquisition module acquires the signature key from the identity and access management terminal based on the authentication parameter information, it is configured to:
[0047] Sending the first static key and token information in the authentication parameter information to the identity and access management end; the first static key and token information are used by the identity and access management end to perform a legitimacy check;
[0048] Obtain the signature key generated by the identity and access management end after passing the legality verification.
[0049] In a possible implementation, the signature module, when generating a character string to be signed based on the authentication parameter information, is used to:
[0050] A character string to be signed is generated based on the relevant service information of the target application and the request time information in the authentication parameter information.
[0051] In a fourth aspect, an embodiment of the present disclosure further provides an authentication device, which is applied to an identity and access management terminal, including:
[0052] A receiving module, configured to receive a signature key acquisition request sent by a cloud server, wherein the signature key acquisition request carries part of the authentication parameter information received by the cloud server from the application client;
[0053] A key generation module, used to generate a signature key based on the partial authentication parameter information;
[0054] The sending module is used to send the signing key to the cloud service end.
[0055] In a possible implementation manner, the partial authentication parameter information includes a first static key and token information;
[0056] The key generation module, when generating a signature key based on the partial authentication parameter information, is used to:
[0057] The first static key and token information are subjected to a legitimacy check, and after the legitimacy check passes, the signature key is generated.
[0058] In a possible implementation manner, the key generation module, when generating the signing key after the legitimacy verification is passed, is used to:
[0059] Based on the token information, a second static key is parsed and obtained, and the signature key is generated based on the second static key.
[0060] In a fifth aspect, an optional implementation of the present disclosure further provides a computer device, a processor, and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor is used to execute the machine-readable instructions stored in the memory, and when the machine-readable instructions are executed by the processor, the machine-readable instructions execute the above-mentioned first aspect, or the steps in any possible implementation of the first aspect, or execute the above-mentioned second aspect, or the steps in any possible implementation of the second aspect.
[0061] In a sixth aspect, an optional implementation of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is run, it executes the above-mentioned first aspect, or the steps in any possible implementation of the first aspect, or executes the above-mentioned second aspect, or the steps in any possible implementation of the second aspect.
[0062] In the authentication method, device, computer device and computer-readable storage medium provided by the embodiment of the present disclosure, the cloud service end first receives the access request sent by the application client, the access request carries the authentication parameter information, and then based on the authentication parameter information, sends a signature key acquisition request carrying part of the authentication parameter information to the identity and access management end, and then the identity and access management end generates a signature key based on the part of the authentication parameter information here, and sends the signature key to the cloud service end, and the cloud service end then generates a string to be signed based on the relevant information in the authentication parameter information, and uses the acquired signature key to sign the string to be signed to obtain the signed string. Finally, the cloud service end compares the signed string with the signature information in the authentication parameter information to determine the authentication result. It can be seen that since the cloud service end can directly receive the access request of the application client in the embodiment of the present disclosure, compared with first receiving the access request after gateway authentication, the access path is shortened, thereby improving the access efficiency of the client, while saving gateway resources and other network resources.
[0063] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0065] Figure 1 A flowchart of an authentication method provided by an embodiment of the present disclosure is shown;
[0066] Figure 2 The following is a flowchart showing the execution logic of the cloud service end in the authentication process in the authentication method provided by the embodiment of the present disclosure;
[0067] Figure 3 The following is a flowchart showing the execution logic of the identity and access management (IAM) terminal in the authentication process in the authentication method provided by the embodiment of the present disclosure;
[0068] Figure 4 A schematic diagram of an authentication device 400 provided in an embodiment of the present disclosure is shown;
[0069] Figure 5 A schematic diagram of another authentication device 500 provided in an embodiment of the present disclosure is shown;
[0070] Figure 6 A schematic diagram of the structure of a computer device 600 provided in an embodiment of the present disclosure is shown;
[0071] Figure 7 A schematic diagram of the structure of a computer device 700 provided in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0072] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure is not intended to limit the scope of the present disclosure claimed for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0073] Research has found that application clients need to go through an authentication process to access cloud services, and the authentication process requires the participation of the gateway. That is, the application client's access request first reaches the gateway, and the gateway then initiates authentication to IAM and receives the authentication result. Only after the authentication is successful will it initiate an access request to the cloud server. The entire access authentication process is relatively cumbersome, resulting in a longer access path and a waste of network resources.
[0074] Based on the above research, the embodiments of the present disclosure provide an authentication method, apparatus, computer device and storage medium, which complete the authentication of the application client signature information without passing through the gateway, simplifying the authentication process, thereby improving access efficiency and saving network resources.
[0075] The defects existing in the above solutions are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the present disclosure for the above problems below should be the contributions made by the inventor to the present disclosure during the disclosure process.
[0076] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0077] To facilitate understanding of the present embodiment, a method for authentication disclosed in the embodiment of the present disclosure is first introduced in detail. The execution subject of the method for authentication provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or a server or other processing device, and the terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the method for authentication may be implemented by a processor calling a computer-readable instruction stored in a memory.
[0078] See also Figure 1 As shown, it is a flowchart of the authentication method provided by the embodiment of the present disclosure, and the method includes steps S101 to S106, wherein:
[0079] S101: The cloud service end receives an access request sent by the application client, wherein the access request carries authentication parameter information.
[0080] Here, when the application client needs to use the cloud service, it will send an access request carrying authentication information to the cloud server, that is, a Hypertext Transfer Protocol (HTTP) request. The access request carries authentication parameter information, which includes signature information and other authentication parameters, such as the first static key (Access Key, AK) in the Security Token Service (STS), service region information (Region), token information (Session Token) generated by the encryption algorithm using the AK and the second static key (Secret Access Key, SK) in the STS, and the specific time (Data Time) for constructing the signature.
[0081] In a specific implementation, the signature information carried in the above access request can be generated by the application client based on the STS after obtaining the STS from the application server. Here, there is no method of pre-setting the STS in the client or requesting the cloud server to obtain the STS every time the client needs to sign. Instead, the application server of the APP directly generates a dynamically updated STS for the application client based on the pre-stored account information, which can improve security and access efficiency. Specifically, the application server can pre-acquire and store the account information that is valid for a long time within the agreed period provided by the cloud server for the user of the target application. The account information contains the static key pair (the above AK and SK) for generating the STS. In this way, the application server can respond to the STS acquisition request of the application client, generate a dynamic STS based on the stored static key pair and return it to the application client. After obtaining the STS, the application client generates a signature key based on the STS, and finally generates signature information based on the signature key.
[0082] After generating the signature information, the application client carries the signature information in the above access request and sends it directly to the cloud server, and simultaneously sends the above other authentication parameter information.
[0083] The disclosed embodiment is different from the method in which the client accesses the cloud service through the gateway. The access request is directly sent to the real provider of the cloud service (i.e., the cloud server), which reduces the waste of machine resources and network resources in high-traffic request scenarios, improves access efficiency, and avoids compatibility issues of the entire authentication system caused by different cloud service terminals initiating authentication requests to the gateway.
[0084] S102: The cloud service end sends a signature key acquisition request to the IAM end based on the authentication parameter information.
[0085] Here, after receiving the access request from the application client, the cloud service extracts the authentication parameter information therein, and sends the extracted part of the authentication parameter information to the IAM end to obtain the corresponding signature key (Signed Key). The part of the authentication parameter information here includes the above-mentioned AK and Session Token.
[0086] In a possible implementation, before obtaining the signature key from the IAM end based on the authentication parameter information, the signature key may be searched from the cache first. Specifically, based on the AK in the authentication parameter information, the signature key corresponding to the AK may be searched from the cache.
[0087] Here, the correspondence between the AK and the signature key can be cached in the IAM for a certain period of time. In this way, when the signature key corresponding to the searched AK is stored in the cache, the corresponding signature key can be directly obtained from the cache, thereby improving access efficiency and avoiding the access burden on the IAM.
[0088] In addition, if the signature key corresponding to the AK is not found in the cache, it is necessary to request the IAM end to obtain the signature key based on the authentication parameter information;
[0089] In a specific implementation, due to the large amount of account information of different users and the limited cache space of the device, the corresponding relationship between the AK and the signature key cannot be stored in the cache indefinitely, so there is a situation where the signature key corresponding to the AK cannot be found from the cache. When the signature key corresponding to the AK cannot be found from the cache, the signature key can be requested from the IAM end storing the account information based on the authentication parameter information.
[0090] In addition, after obtaining the signature key from the IAM end, the signature key and the AK in the authentication parameter information can be stored in a cache in correspondence, and when an access request is subsequently initiated, the signature key can be directly found from the cache.
[0091] In a possible implementation, when the signature key and the first static key in the authentication parameter information are stored in a cache corresponding to each other, the cache may be updated based on a cache policy corresponding to a Least Recently Used (LRU) algorithm.
[0092] Here, a least recently used cache (Least Recently Used Cache, LRU-Cache) can be established based on the LRU algorithm, and the signature key and the AK in the authentication parameter information are stored in the cache accordingly. The LRU algorithm can eliminate cache data based on historical access records, and its core idea is that "if the data has been accessed recently, it is more likely to be accessed in the future."
[0093] Exemplarily, the LRU-Cache can store cache data by using a linked list, and the specific process is as follows:
[0094] New data is inserted into the head of the linked list;
[0095] Whenever the cache hits (i.e. the cached data is accessed), the data is moved to the head of the linked list;
[0096] When the linked list is full, the data at the end of the linked list is discarded.
[0097] In this way, the hit rate of cache data is improved by using the LRU-Cache.
[0098] S103: The IAM terminal generates a signing key based on part of the authentication parameter information in the signing key acquisition request, and sends the signing key to the cloud service terminal.
[0099] Here, the authentication parameter information in the signature key acquisition request may include some authentication parameters in the access request initiated by the application client: AK, token information, service region information (Region), etc. The token information is also a session control token (Session Token).
[0100] In a possible implementation, obtaining a signature key from the IAM end includes:
[0101] Sending the AK, Session Token and Region in the authentication parameter information to the IAM end; the AK, Session Token and Region are used by the IAM end to perform a legitimacy check;
[0102] Obtain the signature key that is decrypted by the IAM end after passing the legality verification.
[0103] Here, the IAM end verifies the legitimacy of the AK, Session Token and Region, and when the verification result is legal, decrypts the signature key.
[0104] In a specific implementation, the Session Token includes the authentication parameter information and is used together with the Region for legitimacy verification. When the verification result is legal, the signature key can be determined (i.e., decrypted) based on the correspondence between the AK and the signature key stored on the IAM end.
[0105] S104: The cloud server generates a character string to be signed based on the authentication parameter information, and signs the character string to be signed using the acquired signature key to obtain a signed character string.
[0106] Here, the cloud service end may generate a character string to be signed based on the relevant service information of the target application in the authentication parameter information and the request time information.
[0107] The relevant service information includes, for example: the service region information (Region) where the application client is located, the application identification (APP ID), etc.; the request time can be the current specific time point, and the expression format is not limited.
[0108] Furthermore, the cloud server signs the string to be signed based on the signature key obtained in S103 according to an agreed method. Here, the agreed method may be one of a variety of open source encryption algorithms, such as the sha256 algorithm.
[0109] Exemplarily, the above APP ID, Region, and DateTime can be used to construct a string to be signed (ToSign), such as: Region: = "cn-north-1"; DateTime: = "20200119T153002Z"; APP ID: = "1001"; ToSign: = Region + "\n" + DateTime + "\n" + Room ID. Each part is separated by a line break "\n", and the generated string to be signed is used for signing. The cloud server signs the string to be signed with the signing key to obtain the signed string.
[0110] S105: The cloud server compares the signed character string with the signature information in the authentication parameter information to determine the authentication result.
[0111] Here, the cloud server compares the signature information carried by the application client in the access request with the signed string calculated by the cloud server. If the comparison result is consistent, the authentication is successful.
[0112] S106: After successful authentication, the cloud server returns access data to the application client.
[0113] Here, after successfully authenticating the application client, the cloud server can return the requested access data to the application client. If the authentication fails, a notification message indicating the authentication failure can be returned to the application client, and no access data will be returned.
[0114] The following describes the above authentication method of the embodiment of the present disclosure from the cloud service side and the IAM side respectively.
[0115] like Figure 2 The following is a flowchart of the execution logic of the IAM end in the authentication process, including:
[0116] S201: receiving a signature key acquisition request sent by a cloud server, wherein the signature key acquisition request carries part of the authentication parameter information received by the cloud server from the application client.
[0117] S202: Generate a signature key based on the partial authentication parameter information.
[0118] S203: Send the signing key to the cloud service end.
[0119] like Figure 3 The following is a logical flow chart of the cloud server's execution in the authentication process, including:
[0120] S301: receiving an access request sent by an application client, wherein the access request carries authentication parameter information.
[0121] S302: Based on the authentication parameter information, obtain a signature key from the identity and access management IAM terminal.
[0122] S303: Generate a character string to be signed based on the authentication parameter information, and use the acquired signature key to sign the character string to obtain a signed character string.
[0123] S304: Compare the signed character string with the signature information in the authentication parameter information to determine the authentication result.
[0124] For details about the above cloud service and IAM related content, please refer to the above Figure 1 The description of the relevant content will not be repeated here.
[0125] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0126] Based on the same inventive concept, an authentication device corresponding to the authentication method is also provided in the embodiment of the present disclosure. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned authentication method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0127] Reference Figure 4 As shown, it is a schematic diagram of an authentication device 400 provided in an embodiment of the present disclosure, and the device can be deployed on a cloud service end, including: a receiving module 401, a key acquisition module 402, a signature module 403, and an authentication module 404; wherein,
[0128] The receiving module 401 is used to receive an access request sent by an application client, wherein the access request carries authentication parameter information;
[0129] A key acquisition module 402 is used to obtain a signature key from an identity and access management terminal based on the authentication parameter information;
[0130] The signature module 403 is used to generate a character string to be signed based on the authentication parameter information, and use the acquired signature key to sign the character string to obtain a signed character string;
[0131] The authentication module 404 is used to compare the signed character string with the signature information in the authentication parameter information to determine the authentication result.
[0132] In a possible implementation manner, the key acquisition module 402 is specifically configured to:
[0133] Based on the first static key in the authentication parameter information, searching from the cache for a signature key corresponding to the first static key;
[0134] If the signature key corresponding to the first static key is not found in the cache, obtaining the signature key from the identity and access management terminal based on the authentication parameter information;
[0135] The signature key and the first static key in the authentication parameter information are stored in a cache in correspondence.
[0136] In a possible implementation manner, the key acquisition module 402 is further configured to:
[0137] Based on a least recently used algorithm, the signature key and the first static key in the authentication parameter information are stored in a cache in correspondence.
[0138] Furthermore, the key acquisition module 402 is specifically used for:
[0139] Sending the first static key and token information in the authentication parameter information to the identity and access management end, wherein the first static key and token information are used by the identity and access management end to perform a legitimacy check;
[0140] Obtain the signature key generated by the identity and access management end after passing the legality verification.
[0141] In a possible implementation manner, the signature module 403 is specifically configured to:
[0142] A character string to be signed is generated based on the relevant service information of the target application and the request time information in the authentication parameter information.
[0143] Reference Figure 5 As shown, it is a schematic diagram of another authentication device 500 provided in an embodiment of the present disclosure, and the device can be deployed on an identity and access management terminal, including: a receiving module 501, a key generation module 502, and a sending module 503; wherein:
[0144] The receiving module 501 is used to receive a signature key acquisition request sent by the cloud server, wherein the signature key acquisition request carries part of the authentication parameter information received by the cloud server from the application client;
[0145] A key generation module 502, configured to generate a signature key based on the partial authentication parameter information;
[0146] The sending module 503 is used to send the signing key to the cloud service end.
[0147] In a possible implementation manner, the receiving module 501 is specifically configured to:
[0148] Receive the first static key and token information included in the partial authentication parameter information.
[0149] In a possible implementation manner, the key generation module 502 is specifically configured to:
[0150] The first static key and token information are subjected to a legitimacy check, and after the legitimacy check passes, the signature key is generated.
[0151] Furthermore, the key generation module 502 is specifically used for:
[0152] Based on the token information, a second static key is parsed and obtained, and the signature key is generated based on the second static key.
[0153] In the authentication method, device, computer equipment and storage medium provided by the embodiment of the present disclosure, the cloud service end first receives the access request sent by the application client, the access request carries the authentication parameter information, and then based on the authentication parameter information, sends a signature key acquisition request carrying part of the authentication parameter information to the identity and access management end, and then the identity and access management end generates a signature key based on the part of the authentication parameter information here, and sends the signature key to the cloud service end, and the cloud service end then generates a string to be signed based on the relevant information in the authentication parameter information, and uses the acquired signature key to sign the string to be signed to obtain the signed string. Finally, the cloud service end compares the signed string with the signature information in the authentication parameter information to determine the authentication result. It can be seen that since the cloud service end can directly receive the access request of the application client in the embodiment of the present disclosure, compared with first receiving the access request after gateway authentication, the access path is shortened, thereby improving the access efficiency of the client, while saving gateway resources and other network resources.
[0154] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0155] Based on the same technical concept, the embodiment of the present disclosure also provides a computer device. Figure 6 As shown, it is a schematic diagram of the structure of a computer device 600 provided in an embodiment of the present disclosure, including a processor 601, a memory 602, and a bus 603. Among them, the memory 602 is used to store execution instructions, including a memory 6021 and an external memory 6022; the memory 6021 here is also called an internal memory, which is used to temporarily store the operation data in the processor 601, and the data exchanged with the external memory 6022 such as a hard disk. The processor 601 exchanges data with the external memory 6022 through the memory 6021. When the computer device 600 is running, the processor 601 communicates with the memory 602 through the bus 603, so that the processor 601 executes the following instructions:
[0156] Receiving an access request sent by an application client; the access request carries authentication parameter information;
[0157] Based on the authentication parameter information, obtaining a signature key from the identity and access management end;
[0158] Generate a string to be signed based on the authentication parameter information, and sign the string to be signed using the acquired signature key to obtain a signed string;
[0159] The signed character string is compared with the signature information in the authentication parameter information to determine the authentication result.
[0160] In a possible implementation manner, the instructions executed by the processor 601, before obtaining the signing key from the identity and access management terminal based on the authentication parameter information, further include:
[0161] Based on the first static key in the authentication parameter information, searching from the cache for a signature key corresponding to the first static key;
[0162] The obtaining a signature key from an identity and access management terminal based on the authentication parameter information includes:
[0163] If the signature key corresponding to the first static key is not found in the cache, obtaining the signature key from the identity and access management terminal based on the authentication parameter information;
[0164] After obtaining the signature key from the identity and access management terminal, the method further includes:
[0165] The signature key and the first static key in the authentication parameter information are stored in a cache in correspondence.
[0166] In a possible implementation, the instructions executed by the processor 601 include storing the signature key and the first static key in the authentication parameter information in a cache in correspondence with each other, including:
[0167] Based on a least recently used algorithm, the signature key and the first static key in the authentication parameter information are stored in a cache in correspondence.
[0168] In a possible implementation manner, the instructions executed by the processor 601, based on the authentication parameter information, obtaining a signature key from the identity and access management terminal, include:
[0169] Sending the first static key and token information in the authentication parameter information to the identity and access management end; the first static key and token information are used by the identity and access management end to perform a legitimacy check;
[0170] Obtain the signature key generated by the identity and access management end after passing the legality verification.
[0171] In a possible implementation, the instructions executed by the processor 601, generating a character string to be signed based on the authentication parameter information, includes:
[0172] A character string to be signed is generated based on the relevant service information of the target application and the request time information in the authentication parameter information.
[0173] Based on the same technical concept, the embodiment of the present disclosure also provides a computer device. Figure 7As shown, it is a schematic diagram of the structure of a computer device 700 provided in an embodiment of the present disclosure, including a processor 701, a memory 702, and a bus 703. Among them, the memory 702 is used to store execution instructions, including a memory 7021 and an external memory 7022; the memory 7021 here is also called an internal memory, which is used to temporarily store the operation data in the processor 701, and the data exchanged with the external memory 7022 such as a hard disk. The processor 701 exchanges data with the external memory 7022 through the memory 7021. When the computer device 700 is running, the processor 701 communicates with the memory 702 through the bus 703, so that the processor 701 executes the following instructions:
[0174] Receive a signature key acquisition request sent by the cloud server, wherein the signature key acquisition request carries part of the authentication parameter information received by the cloud server from the application client;
[0175] Generate a signing key based on the partial authentication parameter information;
[0176] The signing key is sent to the cloud service end.
[0177] In a possible implementation, in the instruction executed by the processor 701, the partial authentication parameter information includes the first static key and token information;
[0178] Based on the partial authentication parameter information, generating a signature key includes:
[0179] The first static key and token information are subjected to a legitimacy check, and after the legitimacy check passes, the signature key is generated.
[0180] In a possible implementation manner, the instructions executed by the processor 701, after the legality check passes, generate the signing key, including:
[0181] Based on the token information, a second static key is parsed and obtained, and the signature key is generated based on the second static key.
[0182] The specific execution process of the above instructions can refer to the steps of the authentication method described in the embodiment of the present disclosure, which will not be repeated here.
[0183] The present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the authentication method described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0184] The computer program product of the authentication method provided in the embodiment of the present disclosure includes a computer-readable storage medium storing program code, and the instructions included in the program code can be used to execute the steps of the authentication method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.
[0185] The present disclosure also provides a computer program, which implements any one of the methods of the aforementioned embodiments when executed by a processor. The computer program product can be implemented in hardware, software, or a combination thereof. In an optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK), etc.
[0186] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0187] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0188] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0189] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0190] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.
Claims
1. A method of authentication, characterized in that: Applied to cloud servers, including: Receiving an access request sent by an application client; the access request carries authentication parameter information; Based on the authentication parameter information, obtaining a signature key from the identity and access management terminal; Generate a character string to be signed based on the authentication parameter information, and sign the character string to be signed using the acquired signature key to obtain a signed character string; Compare the signed string with the signature information in the authentication parameter information to determine the authentication result, The cloud service end is the provider of cloud services. Before obtaining the signature key from the identity and access management terminal based on the authentication parameter information, the method further includes: Based on the first static key in the authentication parameter information, a signature key corresponding to the first static key is searched from a cache.
2. The authentication method according to claim 1, characterized in that: The obtaining a signature key from an identity and access management terminal based on the authentication parameter information includes: If the signature key corresponding to the first static key is not found in the cache, obtaining the signature key from the identity and access management terminal based on the authentication parameter information; After obtaining the signature key from the identity and access management terminal, the method further includes: The signature key and the first static key in the authentication parameter information are stored in a cache in correspondence.
3. The authentication method according to claim 2, characterized in that: The step of storing the signature key and the first static key in the authentication parameter information in a cache in correspondence with each other includes: Based on a least recently used algorithm, the signature key and the first static key in the authentication parameter information are stored in a cache in correspondence.
4. The authentication method according to any one of claims 1 to 3, characterized in that: Based on the authentication parameter information, obtaining a signature key from the identity and access management terminal includes: Sending the first static key and token information in the authentication parameter information to the identity and access management end; the first static key and token information are used by the identity and access management end to perform a legitimacy check; Obtain the signature key generated by the identity and access management end after passing the legality verification.
5. The authentication method according to claim 1, characterized in that: Generating a character string to be signed based on the authentication parameter information includes: A character string to be signed is generated based on the relevant service information of the target application and the request time information in the authentication parameter information.
6. A method of authentication, characterized in that: Applied to identity and access management, including: Receive a signature key acquisition request sent by a cloud server; the signature key acquisition request carries part of the authentication parameter information received by the cloud server from the application client; Generate a signing key based on the partial authentication parameter information; The signature key is sent to the cloud service end, so that the cloud service end signs the character string to be signed based on the signature key to obtain the signed character string, and compares the signed character string with the signature information in the authentication parameter information to determine the authentication result, wherein the cloud service end is the provider of the cloud service, The partial authentication parameter information includes a first static key, and the method further includes: The correspondence between the first static key and the signature key is cached within a preset time.
7. The method according to claim 6, characterized in that The partial authentication parameter information also includes token information; Based on the partial authentication parameter information, generating a signature key includes: The first static key and token information are subjected to a legitimacy check, and after the legitimacy check passes, the signature key is generated.
8. The method according to claim 7, characterized in that After the legality check is passed, the signature key is generated, including: Based on the token information, a second static key is parsed and obtained, and the signature key is generated based on the second static key.
9. An authentication device, characterized in that: Applied to cloud servers, including: A receiving module, used to receive an access request sent by an application client; the access request carries authentication parameter information; A key acquisition module, used to obtain a signature key from an identity and access management terminal based on the authentication parameter information; A signature module, used to generate a character string to be signed based on the authentication parameter information, and use the acquired signature key to sign the character string to obtain a signed character string; An authentication module is used to compare the signed string with the signature information in the authentication parameter information to determine the authentication result, The cloud service end is a cloud service provider, and before obtaining the signature key from the identity and access management end based on the authentication parameter information, the method further includes: Based on the first static key in the authentication parameter information, a signature key corresponding to the first static key is searched from a cache.
10. An authentication device, characterized in that: Applied to identity and access management, including: A receiving module, configured to receive a signature key acquisition request sent by a cloud server; the signature key acquisition request carries part of the authentication parameter information received by the cloud server from the application client; A key generation module, used to generate a signature key based on the partial authentication parameter information; a sending module, configured to send the signature key to the cloud service end, so that the cloud service end signs the character string to be signed based on the signature key to obtain a signed character string, and compares the signed character string with the signature information in the authentication parameter information to determine an authentication result, wherein the cloud service end is a provider of cloud services, The partial authentication parameter information includes a first static key, and the device further includes a cache module, which is used to cache the corresponding relationship between the first static key and the signature key within a preset time.
11. A computer device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor is used to execute the machine-readable instructions stored in the memory. When the machine-readable instructions are executed by the processor, the processor executes the steps of the authentication method as described in any one of claims 1 to 5, or executes the steps of the authentication method as described in any one of claims 6 to 8.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program. When the computer program is executed by a computer device, the computer device executes the steps of the authentication method as described in any one of claims 1 to 5, or executes the steps of the authentication method as described in any one of claims 6 to 8.
