Terminal authentication method, device and equipment, storage medium and program product
By generating tokens and signature keys by a unified authentication server, the terminal can use them directly, solving the problem of core network element resource occupation caused by multiple authentications between the terminal and NAF, and reducing the access pressure of core network elements.
Patent Information
- Application Number
- CN202411230973.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2024-12-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In a communication network, the GBA authentication process between the terminal and the application server requires multiple interactions, occupying a large amount of core network element resources, resulting in greater pressure on core network element access.
The terminal sends an authentication request to the unified authentication server. After receiving the token, it encapsulates it in an access request and sends it to the NAF. The NAF authenticates based on the token's signature key and algorithm, avoiding the direct authentication process between the terminal and each NAF. , saving core network element resources.
By generating and distributing signature keys and algorithms by a unified authentication server, the terminal can use them directly, reducing the number of authentication interactions with NAF and reducing the access pressure of core network elements.
Smart Images

Figure CN119094136A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of security authentication technology, and in particular, relates to a method, device, equipment, storage medium and program product for terminal authentication. Background Art
[0002] The Network Application Function (NAF) is used to provide the terminal with access resources for the corresponding application. Therefore, when the terminal uses local applications, it needs to perform Generic Bootstrapping Architecture (GBA) authentication with the NAF corresponding to each application. If the NAF passes the GBA authentication of the terminal, the subsequent interaction process between the terminal and the NAF is executed.
[0003] In the communication network, each NAF is deployed independently, that is, the terminal needs to complete GBA authentication with each NAF before it can obtain access resources corresponding to the application from the NAF that has completed authentication. Since the GBA authentication process between the terminal and a NAF requires multiple interactions, a large number of core network element resources are occupied, and the core network elements are under great access pressure. Summary of the invention
[0004] The embodiments of the present application provide a method, apparatus, device, storage medium and program product for terminal authentication, which can save core network element resources and reduce the access pressure of core network elements.
[0005] In a first aspect, an embodiment of the present application provides a terminal authentication method, which is applied to a terminal, and the method includes:
[0006] Sending an authentication request to a unified authentication server, wherein the authentication request is used to request a token for accessing the application server NAF from the unified authentication server;
[0007] Receiving a feedback response sent by the unified authentication server, wherein the feedback response carries the token;
[0008] Sending an access request encapsulating the token to the NAF, where the access request is used to instruct each NAF to locally search for a signature key and a signature algorithm corresponding to the token based on the token, and the NAF authenticates the access request using the signature key and the signature algorithm, wherein the signature key and the signature algorithm are sent by the unified authentication server to the NAF;
[0009] Receive the authentication result response sent by the NAF.
[0010] In a possible implementation, the authentication request includes an authentication mode field; before sending the authentication request to the unified authentication server, the method further includes:
[0011] Obtaining a parameter value in the authentication method field;
[0012] The sending of the authentication request to the unified authentication server includes:
[0013] When the parameter value is a preset value, the authentication request is sent to the unified authentication server.
[0014] In a possible implementation manner, the token includes a valid flag bit field, and the valid flag bit field is used to instruct the NAF to determine whether the token is valid.
[0015] In a possible implementation, the token further includes a key identifier; the key identifier is used to instruct the NAF to locally search for the signature key and the signature algorithm according to the key identifier, and to authenticate the token using the signature key and the signature algorithm.
[0016] In a possible implementation, the token further includes a token protection window time, and the token protection window time is used to instruct the NAF to determine that the token is a valid token when the local time of the NAF is within the token protection window time.
[0017] In a possible implementation, the authentication result response includes an update token generated by the NAF using the signature key and the signature algorithm when the NAF determines that the token is invalid;
[0018] In a second aspect, an embodiment of the present application provides a terminal authentication method, which is applied to a unified authentication server, and the method includes:
[0019] Upon receiving the authentication request sent by the terminal and the terminal authentication pass instruction sent by the boot server BSF, a token is generated according to the signature algorithm;
[0020] The token is sent to the terminal, so that the terminal sends an access request encapsulated with the token to each application server NAF, the NAF locally searches for the signature key and the signature algorithm corresponding to the token based on the token, and the NAF authenticates the access request using the signature key and the signature algorithm, wherein the signature key and the signature algorithm are sent to the NAF by the unified authentication server.
[0021] In a possible implementation, the unified authentication server includes a dynamic key table, the dynamic key table includes keys and creation times of the keys, and the keys in the dynamic key table are updated at preset time intervals;
[0022] The generating of a token according to the signature algorithm comprises:
[0023] Determine the latest key in the dynamic key table according to the creation time of each key;
[0024] Obtaining the signature algorithm corresponding to the latest key;
[0025] The token is generated using the signature algorithm and the latest key.
[0026] In a third aspect, an embodiment of the present application provides a terminal authentication method, which is applied to an application server NAF, and the method includes:
[0027] Receiving an access request sent by a terminal, wherein the access request includes a token of the terminal;
[0028] Based on the token, locally search for a signature key and a signature algorithm corresponding to the token, where the signature key and the signature algorithm are sent to the NAF after the unified authentication server generates the token according to the signature algorithm;
[0029] authenticating the token using the signing key and the signing algorithm;
[0030] An authentication result response is sent to the terminal.
[0031] In a possible implementation, the token includes token data and signature data; and authenticating the token using the signature key and the signature algorithm includes:
[0032] Signing the token data using the signature key to obtain target signature data;
[0033] In the case where the target signature data and the signature data are identical, it is determined that the token authentication is successful.
[0034] In a fourth aspect, an embodiment of the present application provides a terminal authentication device, which is applied to a terminal, and the device includes:
[0035] A sending module, used to send an authentication request to a unified authentication server, wherein the authentication request is used to request a token for accessing an application server NAF from the unified authentication server;
[0036] A receiving module, configured to receive a feedback response sent by the unified authentication server, wherein the feedback response carries the token;
[0037] The sending module is further used to send an access request encapsulating the token to the NAF, where the access request is used to instruct each NAF to locally search for a signature key and a signature algorithm corresponding to the token based on the token, and the NAF authenticates the access request using the signature key and the signature algorithm, wherein the signature key and the signature algorithm are sent by the unified authentication server to the NAF;
[0038] The receiving module is further used to receive the authentication result response sent by the NAF.
[0039] In a fifth aspect, an embodiment of the present application provides a terminal authentication device, which is applied to a unified authentication server, and the device includes:
[0040] A generation module is used to generate a token according to a signature algorithm when receiving an authentication request sent by a terminal and receiving a terminal authentication pass instruction sent by a boot server BSF;
[0041] A sending module is used to send the token to the terminal, so that the terminal sends an access request encapsulated with the token to each application server NAF, the NAF locally searches for the signature key and the signature algorithm corresponding to the token based on the token, and the NAF authenticates the access request using the signature key and the signature algorithm, wherein the signature key and the signature algorithm are sent by the unified authentication server to the NAF.
[0042] In a sixth aspect, an embodiment of the present application provides a terminal authentication device, which is applied to an application server NAF, and the device includes:
[0043] A receiving module, configured to receive an access request sent by a terminal, wherein the access request includes a token of the terminal;
[0044] A search module, configured to locally search for a signature key and a signature algorithm corresponding to the token based on the token, wherein the signature key and the signature algorithm are sent to the NAF after the unified authentication server generates the token according to the signature algorithm;
[0045] An authentication module, used to authenticate the token using the signature key and the signature algorithm;
[0046] The sending module is used to send an authentication result response to the terminal.
[0047] In a seventh aspect, an embodiment of the present application provides an electronic device, the device comprising: a processor and a memory storing computer program instructions;
[0048] When the processor executes the computer program instructions, it implements the terminal authentication method as described in any one of the first aspects, or implements the terminal authentication method as described in any one of the second aspects, or implements the terminal authentication method as described in any one of the third aspects.
[0049] In an eighth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the terminal authentication method as described in any one of the first aspect, or the terminal authentication method as described in any one of the second aspect, or the terminal authentication method as described in any one of the third aspect is implemented.
[0050] In a ninth aspect, an embodiment of the present application provides a computer program product, the computer product comprising a computer program, and when the computer program is executed by a processor, the terminal authentication method described in any one of the first aspect, the second aspect and the third aspect is implemented.
[0051] The terminal authentication method, apparatus, device, storage medium and program product provided in the embodiments of the present application. The terminal sends an authentication request to the unified authentication server, and the authentication request is used to instruct the unified authentication server to authenticate the terminal. If the terminal is authenticated successfully, a token is returned to the terminal. After receiving the token, the terminal encapsulates the token in an access request and sends an access request to the NAF, and the access request is used to instruct the NAF to search for the signature algorithm and signature key corresponding to the token locally, so as to authenticate the token using the signature algorithm and signature key found, wherein the signature algorithm and signature key are sent to each NAF by the unified authentication server when the terminal is authenticated successfully. The NAF feeds back the authentication result response to the terminal according to the authentication result. In this way, if the unified authentication server authenticates the terminal successfully, the unified authentication server sends the signature algorithm and signature key to each NAF, and the terminal can access each NAF, avoiding the terminal from having to perform an authentication process with each NAF, saving core network element resources such as BSF and HSS, and reducing the access pressure of the core network element. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0053] Figure 1 The present application embodiment provides an exemplary schematic diagram of a terminal authentication method;
[0054] Figure 2 The present application embodiment provides an exemplary schematic diagram of a system framework for terminal authentication;
[0055] Figure 3 The present application embodiment provides a flow chart of a method for terminal authentication applied to a terminal;
[0056] Figure 4 The present application embodiment provides a flowchart of a method for terminal authentication applied to a unified authentication server.
[0057] Figure 5 The present application embodiment provides a flowchart of a method for generating a token;
[0058] Figure 6 The embodiment of the present application provides an exemplary schematic diagram of a feedback response;
[0059] Figure 7 The present application embodiment provides a flow chart of a method for terminal authentication applied to an application server;
[0060] Figure 8 An exemplary schematic diagram of an access request is provided in an embodiment of the present application;
[0061] Fig. 9 The present application embodiment provides a flowchart of a token verification method;
[0062] Fig.10 The embodiment of the present application provides an exemplary schematic diagram of another terminal authentication method;
[0063] Fig.11 It is a structural diagram of a terminal authentication device applied to a terminal provided in an embodiment of the present application;
[0064] Fig.12 This is a schematic diagram of a terminal authentication device for a unified authentication server provided in an embodiment of the present application.
[0065] Fig.13 It is a structural diagram of a terminal authentication device applied to an application server provided in an embodiment of the present application;
[0066] Fig.14 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0067] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0068] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0069] Currently, before a terminal accesses each NAF for the first time, it needs to complete terminal authentication through BSF and HSS. After the terminal passes the authentication, the terminal can access relevant resources from the NAF. Figure 1 As shown, Figure 1 The method for a terminal to access a NAF in the prior art is exemplarily shown, and specifically includes:
[0070] S101: A user initiates a Hypertext Transfer Protocol (HTTP) related service operation on a terminal.
[0071] Among them, the user can trigger the terminal to request the application's access resources from the NAF by clicking on the application in the terminal. Before the terminal accesses the NAF for the first time, the terminal initiates identity authentication to the BSF and HSS. After the BSF and HSS pass the terminal's identity authentication, the terminal can request access resources from the NAF.
[0072] S102: The terminal and the NAF establish a Transport Layer Security Handshake (TLS handshake).
[0073] S103: The terminal sends an HTTP GET request to the NAF.
[0074] The HTTP GET request is used by the NAF to determine whether the terminal has passed the identity authentication.
[0075] S104. NAF returns a 401 Unauthorized response to the terminal.
[0076] Among them, 401Unauthorized means that the identity authentication information of the terminal is not stored in the NAF, and the GBA authentication process needs to be completed for the terminal to authenticate the terminal.
[0077] S105. The terminal sends an HTTP GET request to the proxy gateway.
[0078] The proxy gateway has a built-in BSF. The HTTP GET request is used to initiate the GBA authentication process. The HTTP GET request carries an application identifier.
[0079] S106. The proxy gateway sends a MAR to the HSS.
[0080] The Mobile Access Gateway to HSS Authentication Request (MAR) is the proxy gateway HTTP GET request carrying the application identifier forwarded by the proxy gateway to the HSS.
[0081] S107. The HSS feeds back the MAA to the proxy gateway.
[0082] The Mobile Access Authentication (MAA) includes an encryption key, a random number, an integrity protection key, an authentication token, and an expected response generated by the HSS.
[0083] S108. The proxy gateway sends 401 to the terminal.
[0084] Among them, 401 is the response code of the proxy gateway, indicating that the proxy gateway has a feedback response to the HTTP GET request initiated by the terminal. The feedback response carries the random number and authentication token sent by the HSS.
[0085] S109: The terminal authenticates the network and calculates and generates RES.
[0086] The terminal uses the first encryption algorithm preset locally and the random number in the feedback response to calculate the target token, and then determines whether the target token is consistent with the authentication token in the feedback response. If the target token is consistent with the authentication token in the feedback response, the terminal successfully authenticates the network, thereby calculating and generating a Resident Identity Card Electronic (RES).
[0087] The RES is calculated by the terminal using the second encryption algorithm and a random number, wherein the second encryption algorithm is consistent with the encryption algorithm used to calculate the expected response in the HSS.
[0088] It should be noted that the preset encryption algorithm is the same as the encryption algorithm used to generate the authentication token in the HSS. Therefore, if the HSS is a legitimate server, the random number and the encryption algorithm used to generate the token in the HSS and the terminal are the same, then the target token generated by the terminal is the same as the authentication token in the feedback response.
[0089] S110. The terminal sends an HTTP GET request to the proxy gateway.
[0090] The HTTP GET request carries the RES.
[0091] S111. The proxy gateway authenticates the terminal and generates a KS.
[0092] The proxy gateway compares the RES sent by the terminal with the expected response in the MAA. If the expected response in the RES and MAA are consistent, the proxy gateway authenticates the terminal. Then the proxy gateway concatenates the encryption key and integrity protection key in the above MAA to obtain KS.
[0093] S112. The proxy gateway sends a 200OK message to the terminal.
[0094] 200 is the response code of the proxy gateway, indicating that the proxy gateway has successfully authenticated the terminal. The 200 OK message carries a temporary identifier (B-TID) and the validity period of the key.
[0095] S113. The terminal saves the authentication information.
[0096] The authentication information is the B-TID and the key validity period.
[0097] S114. The terminal sends an HTTP GET request to the NAF.
[0098] The HTTP GET request includes the above-mentioned B-TID.
[0099] S115. NAF sends a BIR to the proxy gateway.
[0100] The bootstrapping information request (Bootstrapping Information Request, BIR) includes the above-mentioned B-TID and application identifier.
[0101] S116. The proxy gateway checks the B-TID and generates a KS-NAF.
[0102] The proxy gateway uses the B-TID in the BIR to search for the corresponding temporary identifier locally. When the corresponding temporary identifier is found, KS-NAF is generated. Specifically, KS-NAF is used to encrypt the subsequent interactive data between the terminal and NAF. The proxy gateway splices the encryption key and integrity protection key in the above MAA to obtain KS-NAF.
[0103] S117. The proxy gateway sends the BIA to the NAF.
[0104] The Bootstrapping Information Answer (BIA) carries the KS-NAF and the application identifier.
[0105] S118. NAF verifies the response and user identity.
[0106] Among them, the NAF stores the temporary identifier and the application identifier corresponding to the temporary identifier. The NAF can use the B-TID and the application identifier in the received BIA to compare the locally stored temporary identifier and the application identifier corresponding to the temporary identifier to verify the BIA.
[0107] S119. NAF sends a 200OK message to the terminal.
[0108] The 200OK message includes the above-mentioned B-TID, application identifier and KS-NAF.
[0109] S120, NAF and the terminal perform subsequent service interactions.
[0110] Depend on Figure 1 It can be seen from the process shown that the terminal needs to interact with the NAF and the BSF in the proxy gateway multiple times for a GBA authentication, which leads to a long terminal authentication process and a long authentication time. If GBA authentication is performed with multiple NAFs at the same time, a large amount of core network element resources will be occupied, resulting in greater access pressure on the core network elements.
[0111] In order to solve the problems of the prior art, the embodiments of the present application provide a method, apparatus, device, storage medium and program product for terminal authentication. The following first illustrates the framework of the terminal authentication method provided by the embodiments of the present application. Figure 2 As shown, the framework of the terminal authentication method provided in the embodiment of the present application includes a terminal, a proxy gateway, a unified authentication server, and n NAFs. The n NAFs include NAF1 to NAFn.
[0112] First, the terminal performs service initialization process corresponding to Figure 1 S101 to S104 of the illustrated embodiment.
[0113] Specifically, after the terminal sends an HTTP request to the unified authentication server, the unified authentication server establishes a connection with the terminal and determines whether the identity authentication information corresponding to the terminal is stored locally. If the identity authentication information corresponding to the terminal is not stored locally, a 401 Unauthorized response is fed back to the terminal.
[0114] Secondly, the terminal initiates the terminal authentication process corresponding to Figure 1 S105 to S112 of the illustrated embodiment.
[0115] Specifically, after receiving the 401 Unauthorized response, the terminal sends an HTTP GET request to the BSF. The subsequent method for the BSF to authenticate the terminal is described in the above embodiment and will not be repeated here.
[0116] Finally, the method in which the terminal sends an authentication request to the unified authentication server and the unified authentication server performs identity authentication with the proxy gateway corresponds to Figure 1 In the embodiment shown in S113 to S120, the unified authentication server executes the above Figure 1 Actions performed by the NAF in S114 to S119. If the terminal authentication is successful, the subsequent terminal can access each NAF with the token issued by the unified authentication server.
[0117] After receiving the access request sent by the terminal, NAF authenticates the token carried in the access request. After the terminal is authenticated, it determines the access rights of the terminal and sends the relevant resources of the business service to the terminal.
[0118] The following combination Figure 3 A terminal authentication method provided in an embodiment of the present application is introduced, and the method is applied to a terminal, such as Figure 3 As shown, the method includes:
[0119] S301: Send an authentication request to a unified authentication server.
[0120] The authentication request is used to instruct the unified authentication server to authenticate the terminal, and return a token for accessing the application server NAF to the terminal if the authentication is successful.
[0121] Specifically, the terminal first sends an authentication request to the BSF. After the BSF authenticates the terminal, if the terminal passes the authentication, the BSF sends a terminal authentication pass instruction to the unified authentication server. The terminal authentication pass instruction is used to indicate that the terminal identity authentication passes.
[0122] Then, upon receiving the authentication request sent by the terminal and the terminal authentication pass instruction sent by the BSF, the unified authentication server generates a token corresponding to the terminal according to the locally preset signature algorithm and signature key.
[0123] Finally, after the unified authentication server generates a token, the signature algorithm corresponding to the token and the signature key corresponding to the signature algorithm are broadcast to each NAF, so that after receiving the access request carrying the token, the NAF can use the signature algorithm and signature key to authenticate the token, thereby determining the access rights of the terminal corresponding to the access request.
[0124] S302: Receive a feedback response sent by the unified authentication server, where the feedback response carries a token.
[0125] Specifically, the unified authentication server encapsulates the generated token in the header field of the feedback response and sends the feedback response to the terminal. For example, if the authentication request sent by the terminal is an HTTP request, the feedback response is an HTTP feedback response. The unified authentication server encapsulates the generated token in the header field Uni-Token of the HTTP feedback response and sends the HTTP feedback response to the terminal.
[0126] S303: Send an access request encapsulated with a token to the NAF.
[0127] The access request is used to instruct each NAF to locally search for the signature key and signature algorithm corresponding to the token based on the token. The NAF uses the signature key and signature algorithm to authenticate the access request. The signature key and signature algorithm are sent to each NAF by the unified authentication server.
[0128] It should be noted that NAF can provide services for multiple terminals at the same time, and each terminal corresponds to a token. Therefore, after the unified authentication server generates a token corresponding to each terminal, it broadcasts the signature key and signature algorithm corresponding to the token to each NAF. That is, NAF stores the signature key and signature algorithm corresponding to each terminal that has passed identity authentication. The terminal sends an access request to NAF. After receiving the access request from each terminal, NAF verifies the token in the access request according to the signature key and signature algorithm corresponding to the token, thereby determining the access rights of the terminal.
[0129] S304: Receive the authentication result response sent by NAF.
[0130] With the above method, the terminal sends an authentication request to the unified authentication server, which is used to instruct the unified authentication server to authenticate the terminal. If the terminal is authenticated successfully, a token is returned to the terminal. After receiving the token, the terminal encapsulates the token in an access request and sends an access request to the NAF, which is used to instruct the NAF to search for the signature algorithm and signature key corresponding to the token locally, so as to authenticate the token using the signature algorithm and signature key found, wherein the signature algorithm and signature key are sent to each NAF by the unified authentication server when the terminal is authenticated successfully. The NAF feeds back the authentication result response to the terminal based on the authentication result. In this way, if the unified authentication server authenticates the terminal successfully, the unified authentication server sends the signature algorithm and signature key to each NAF, and the terminal can access each NAF, avoiding the terminal from having to perform an authentication process with each NAF, saving core network element resources such as BSF and HSS, and reducing the access pressure of the core network elements.
[0131] It should be noted that the above authentication request includes an authentication method field, and the authentication method corresponding to the terminal can be determined by configuring the parameter value in the authentication method field. After determining that the terminal adopts the terminal authentication method provided in the embodiment of the present application according to the parameter value of the authentication method field, the terminal sends an authentication request to the unified authentication server.
[0132] Specifically, before sending the authentication request to the unified authentication server in S301, the terminal obtains the parameter value in the authentication mode field, and then sends the authentication request to the unified authentication server when the parameter value is a preset value.
[0133] The authentication method of the terminal is configured by adding a configuration parameter httpUniAuth to the authentication request. Specifically, whether the terminal adopts the terminal authentication method provided by the embodiment of the present application is determined by setting the parameter value of the configuration parameter httpUniAuth. The configuration parameter httpUniAuth is the authentication method field.
[0134] In one example, if the terminal adopts the terminal authentication method provided in the embodiment of the present application, the httpUniAuth in the above authentication request is set to the first value; if the terminal does not adopt the terminal authentication method provided in the embodiment of the present application, the httpUniAuth in the above authentication request is set to the second value. As shown in Table 1:
[0135] Table 1
[0136]
[0137] Wherein, when the value of httpUniAuth is empty or 0, the terminal does not use the terminal authentication method provided in the embodiment of the present application; when the value of httpUniAuth is 1, the terminal uses the terminal authentication method provided in the embodiment of the present application. Wherein, the first value is 0 and the second value is 1.
[0138] Accordingly, in actual application, you can configure the parameters of httpUniAuth through the following commands:
[0139] <parm name="httpUniAuth"value="1" / > ;
[0140] The above command line indicates that the value of httpUniAuth is 1.
[0141] Thus, by configuring the parameter value of the authentication mode field, the terminal authentication mode can be selected. Thus, the terminal authentication mode can be selected according to the actual application scenario, and the terminal authentication requirements in different scenarios can be flexibly adapted.
[0142] In some embodiments of the present application, when the terminal sends an access request encapsulated with a token to each NAF, each NAF can authenticate the terminal based on the parameters in the token, thereby determining the access rights of the terminal. Specifically, the token includes a valid flag bit field. The valid flag bit field is used to instruct the NAF to determine whether the token is valid.
[0143] The NAF parses the token carried in the access request, reads the valid flag field in the token, and then determines whether the token is valid according to the value of the valid flag field.
[0144] When the valid flag field is the first preset value, the NAF searches locally for the signature key and signature algorithm corresponding to the token.
[0145] When the valid flag bit field is the second preset value, the NAF determines that the authentication of the terminal fails, and feeds back an authentication failure response to the terminal.
[0146] Among them, the correspondence between the preset value and whether the token is within the validity period can be set based on experience, that is, the embodiment of the present application does not limit the value of the first preset value, and the correspondence between the first preset value and whether the token is within the validity period.
[0147] In one example, the Authorization parameter in the token header field is used to carry the authentication method of the terminal. When the authentication method is a unified authentication method, the terminal is authenticated using the terminal authentication method provided in the embodiment of the present application.
[0148] The token also includes a token protection window time, and the token protection window time is used to instruct the NAF to determine that the token is a valid token when the local time of the NAF is within the token protection window time.
[0149] Wherein, when the valid flag field is the first preset value, the current time is obtained and it is determined whether the current time is within the token protection window time carried in the valid time field of the token.
[0150] The token protection window time is a time range, for example, from 12:00 on July 24, 2024 to 12:00 on July 31, 2024. If the current time is within the token protection window time, it means that the token is valid.
[0151] The token also includes a key identifier. When the token is determined to be a valid token using the valid flag field and the token protection window time, the NAF can also use the key identifier to find the corresponding signature algorithm and signature key. The key identifier is used to instruct the NAF to find the signature key and signature algorithm locally according to the key identifier, and use the signature key and signature algorithm to authenticate the token.
[0152] Specifically, when the valid flag field is the first preset value and the current time is within the token protection window time, the NAF searches locally for the signature key and signature algorithm corresponding to the key identifier according to the key identifier in the token.
[0153] In this way, NAF first verifies the validity period of the token. If the token is still within the validity period, it can continue to perform the subsequent action of searching for the signature key and signature algorithm corresponding to the token. Accordingly, if the token is not within the validity period, NAF can directly determine that the terminal authentication has failed and feedback the authentication failure response to the terminal, thereby saving NAF resources.
[0154] The terminal sends an access request to the NAF, and the NAF responds to the access request by sending an authentication result response to the terminal. The authentication result response includes an update token generated by the NAF using the signature key and the signature algorithm when the token is judged to be invalid.
[0155] Specifically, when the NAF authenticates the token, the NAF updates the token protection window time carried in the valid time field of the token according to the current time. Specifically, the NAF can update the token using the signature validity period and the token survival time in the token, thereby encapsulating the updated token in the authentication result response sent by the NAF to the terminal.
[0156] Among them, NAF recalculates the token expiration time using the current time and the preset token lifetime. And uses the signature algorithm corresponding to the key and the key to sign the token data in the updated token. Specifically, the token includes token data and signature data, and the token data includes token identification, token issuance time, token validity time, user identification, key identification, and token validity flag. The unified authentication server encrypts the above token data using the key, and then signs the token data using the signature algorithm to obtain signature data. Then the signature data is connected to the token data to obtain the token.
[0157] In one example, the NAF obtains the token validity period through the exp field in the token, and updates the exp field with the updated token validity period. The NAF obtains the signature algorithm corresponding to the key using the kid field in the token, and then signs the token data in the updated token using the signature algorithm and the key.
[0158] If the key corresponding to the token is within the validity period, determine whether the current time is within the token protection window time. If the current time has exceeded the token protection window time, re-sign the token data according to the signature algorithm and signature key corresponding to the token data to update the token.
[0159] In one example, the NAF obtains the token protection window time from the pwt field of the locally stored dynamic key table, and then determines whether the current time is within the token protection time based on the current time of the NAF. If the current time is not within the token protection time, the val field in the token data is set to false, indicating that the token has expired. The kid field in the token data is used to obtain the signature key identifier, and the signature key and signature algorithm are obtained using the identifier, the token data is re-signed, and the token is updated, and the updated token is encapsulated in the authentication result response sent by the NAF to the terminal.
[0160] Based on the same concept, an embodiment of the present application provides a terminal authentication method, which is applied to a unified authentication server, such as Figure 4 As shown, the method includes:
[0161] S401. When receiving an authentication request sent by a terminal and receiving a terminal authentication pass instruction sent by a boot server BSF, a token is generated according to a signature algorithm.
[0162] The signature algorithm is preset based on experience and actual application requirements. For example, the signature algorithm can be a symmetric encryption algorithm and a public key cryptographic algorithm. The specific method of generating a token is described in detail in the subsequent embodiments.
[0163] S402: Send a token to the terminal, so that the terminal sends an access request encapsulated with the token to each application server NAF. The NAF locally searches for a signature key and a signature algorithm corresponding to the token based on the token, and the NAF authenticates the access request using the signature key and the signature algorithm.
[0164] The signature key and signature algorithm are sent by the unified authentication server to the NAF.
[0165] With the above method, after receiving the authentication request sent by the terminal, the unified authentication server authenticates the terminal. If the terminal is authenticated successfully, a token is generated according to the signature algorithm and the token is sent to the terminal. In addition, the unified authentication service module also sends the signature algorithm and signature key to the NAF. After the terminal receives the token, it uses the token to access the NAF. The NAF can use the signature algorithm and signature key to authenticate the token. If the authentication is successful, the access rights of the terminal are determined, and access resources can be fed back to the terminal. In this way, if the terminal is authenticated successfully, the unified authentication server sends the signature algorithm and signature key to each NAF, and the terminal can access each NAF, avoiding the terminal from having to perform an authentication process with each NAF, saving core network element resources such as BSF and HSS, and reducing the access pressure of the core network elements.
[0166] It should be noted that before the unified authentication server receives the terminal authentication pass instruction sent by the boot server BSF, the terminal initiates authentication to the BSF. After the BSF and HSS complete the authentication of the terminal, the BSF sends the terminal authentication pass instruction to the unified authentication server. Specifically, before generating a token according to the signature algorithm in the above S401, the method further includes:
[0167] After receiving the authentication pass instruction sent by the BSF, the BSF and the home subscriber server HSS complete the identity authentication of the terminal.
[0168] The method for BSF and the home subscriber server HSS to authenticate the terminal is as follows: Figure 1 In the embodiment shown, the unified authentication server executes Figure 1 The actions performed by the NAF in the illustrated embodiment are not described in detail here.
[0169] In this way, after the terminal passes the BSF authentication, the BSF sends an authentication pass instruction to the unified authentication server. After the terminal completes one authentication, the unified authentication server can send the signature algorithm and signature key to each NAF to facilitate the terminal to access the resources in each NAF. The number of terminal authentications is reduced, thereby reducing the access pressure of the core network element.
[0170] In some embodiments of the present application, the unified authentication server includes a dynamic key table, and the dynamic key table includes a key and a creation time of the key, and the dynamic key table updates the key at a preset time interval.
[0171] Specifically, multiple signature algorithms can be pre-set in the unified authentication server, a signature algorithm is randomly selected every preset time, and then a key is generated according to the selected signature algorithm, and then the generated key and the creation time of the key are saved in the dynamic key table.
[0172] In one example, the dynamic key table includes the following fields, as shown in Table 2:
[0173] Table 2
[0174]
[0175]
[0176] Among them, the key validity period and the token protection window size are set based on experience. The token protection window time refers to the validity period of the token. The token protection window time indicates the validity period of the token, which is used by the NAF to authenticate the token sent by the terminal. For the specific method of the NAF authenticating the token using the token protection window time, refer to the relevant description in the above embodiment.
[0177] like Figure 5 As shown, the method by which the unified authentication server generates a token based on the signature algorithm and the key in the dynamic key table is as follows:
[0178] S501. Determine the latest key in the dynamic key table according to the creation time of each key.
[0179] It can be understood that the dynamic key table stores the creation time of each key, so the latest key can be determined according to the creation time.
[0180] The dynamic key table also includes the key validity period corresponding to the key. The above method of determining the latest key in the dynamic key table according to the creation time of each key can be specifically implemented as follows:
[0181] The target key is determined in the dynamic key table according to the creation time of each key; when the target key is within the key validity period corresponding to the target key, the target key is used as the latest key.
[0182] In this way, the unified authentication server can determine the valid keys in the dynamic key table according to the current time, and determine the latest key among the valid keys. In this way, the unified authentication server dynamically updates the keys in the dynamic key table, which can ensure the security of the keys.
[0183] S502: Obtain the signature algorithm corresponding to the latest key.
[0184] When the unified authentication server generates a key using a signature algorithm and updates the dynamic key table, it constructs a corresponding relationship between the key and the signature algorithm, and determines the signature algorithm corresponding to the latest key based on the corresponding relationship between the signature algorithm and the key.
[0185] S503: Generate a token using the signature algorithm and the latest key.
[0186] Specifically, the token includes token data and signature data. The token data includes token identification, token issuance time, token validity time, user identification, latest key identification, and token validity flag. The token data is encrypted using the latest key, and then the token data is signed using a signature algorithm to obtain signature data. The signature data is then concatenated to the token data to obtain a token.
[0187] In an example, the format of the token can be expressed as Data.Signature. Data represents the token data, and Signature represents the signature data. The content in the token is shown in Table 3:
[0188] Table 3
[0189]
[0190] Specifically, Data is in json format and can be expressed as:
[0191] {
[0192] "tid":"123456789",
[0193] "iat":xxxxxxxxxxxxx,
[0194] "exp":xxxxxxxxxxxxx,
[0195] "uid":"sip:+1111111111111@xxx.com",
[0196] "kid":"123456789",
[0197] "val":true
[0198] }
[0199] By adopting the method provided in the embodiment of the present application, the keys in the dynamic key table are updated at preset intervals, and the unified authentication server can generate tokens in real time according to the signature algorithm and the latest key obtained from the dynamic key table. Since the keys in the dynamic key table are updated periodically, the tokens generated according to the signature algorithm and the latest key are also updated periodically, thereby improving the security of the tokens.
[0200] It should be noted that after the token is generated, when the unified authentication server feeds back the token to the terminal, the token in JSON format is encoded to obtain a token in string format.
[0201] In one example, the unified authentication server uses base64URL to encode the token. The token includes token data and signature data. After encoding the token data and signature data respectively, the encoded string data are connected to obtain a token in string format. The token in string format is then encapsulated in a feedback response, such as Figure 6 As shown, Figure 6 An exemplary schematic diagram of a feedback response provided for an embodiment of the present application, the feedback response is a 200OK response of HTTP, indicating that the unified authentication server has authenticated the terminal and fed back a token. Among them, the Uni-Token field is used to carry the generated string format token. For example, the string format token is Aaaaaaaabbbbbbbbbbbbbbbccccccccccccccccddddddddddddddddddddeeeeeeee eeffffffffffffffgggggggggggggghhhhhhhhhhhhhiiiiiiiiiiii.
[0202] In some embodiments of the present application, after receiving the token sent by the unified authentication server, the terminal can use the token to access each NAF in the network. After the NAF authenticates the received access request, if the terminal authentication is successful, the NAF can feedback the resources requested by the terminal to the terminal. Based on this, an embodiment of the present application provides a method for terminal authentication applied to NAF, such as Figure 7 As shown, the method includes:
[0203] S701: Receive an access request sent by a terminal.
[0204] The access request includes a token of the terminal.
[0205] In one example, the access request is an HTTP request, and the header field Authorization in the HTTP request carries the above token. Figure 8 As shown, Figure 8 An HTTP request provided in an embodiment of the present application is used by a terminal to request application resources from a NAF. In the Authorization, the token in the string format generated above and the authentication method field are carried. When the authentication method field is UniAuth, it indicates that the terminal adopts a unified authentication method.
[0206] S702: Search locally for the signature key and signature algorithm corresponding to the token based on the token.
[0207] The signature key and signature algorithm are sent to the NAF after the unified authentication server generates a token according to the signature algorithm.
[0208] The token includes a key identifier, and the unified authentication server stores the corresponding relationship between the key identifier, the signature algorithm, and the signature key. When the unified authentication server sends the signature algorithm and the signature key to the NAF, it also sends the key identifier corresponding to the signature key to the NAF. That is, the NAF stores the corresponding relationship between the signature algorithm, the signature key, and the key identifier. Based on the corresponding relationship, the signature key and signature algorithm corresponding to the token are searched.
[0209] S703: Authenticate the token using the signature key and signature algorithm.
[0210] Among them, depending on the different signature algorithms, the authentication method of the token corresponding to the signature algorithm is different. The embodiment of the present application does not make specific restrictions on the signature algorithm, and accordingly, does not make specific restrictions on the method of authenticating the token.
[0211] S704: Send an authentication result response to the terminal.
[0212] The authentication result responses are respectively authentication success response and authentication failure response. When the authentication result response is an authentication success response, the authentication result response may also carry a request resource for access rights corresponding to the terminal.
[0213] According to the method provided in the embodiment of the present application, after the NAF receives the access request sent by the terminal, the corresponding signature key and signature algorithm are searched locally according to the token in the access request, wherein the unified authentication server authenticates the terminal after receiving the authentication request sent by the terminal, generates a token according to the signature algorithm when the terminal is authenticated, and sends the token to the terminal. In addition, the unified authentication service module also sends the signature algorithm and signature key corresponding to the token to the NAF. The NAF can authenticate the token using the signature algorithm and signature key, and when the authentication is successful, it is determined that the terminal has access rights, and access resources can be fed back to the terminal. In this way, when the terminal is authenticated, each NAF receives the signature algorithm and signature key sent by the unified authentication server, and the terminal can access each NAF, avoiding the terminal from having to perform an authentication process with each NAF, saving core network element resources such as BSF and HSS, and reducing the access pressure of the core network elements.
[0214] The above token includes token data and signature data. On this basis, combined with Fig. 9 This section describes how NAF authenticates tokens. Fig. 9 As shown, the method specifically includes:
[0215] S901. Sign the token data using the signature key to obtain target signature data.
[0216] The signature key is the signature key corresponding to the key identifier. When the terminal is a legal terminal, the signature key is the same as the signature key corresponding to the key identifier in the unified authentication server.
[0217] S902: When the target signature data and the signature data are identical, determine that the token authentication is successful.
[0218] It can be understood that, since the locally stored signature key and signature algorithm are the same as the signature key and signature algorithm in the unified authentication server, the generated target signature data is the same as the signature data in the token.
[0219] In one example, when the signature algorithm is a public key cryptographic algorithm, the public key sk corresponding to the public key cryptographic algorithm is used to verify the signature data; when the signature algorithm is a symmetric cryptographic algorithm, the shared key pk is used to verify the signature data.
[0220] By adopting the method provided in the embodiment of the present application, a verification key is generated according to the signature algorithm, and then the token data in the token is obtained by parsing the token. Based on the signature algorithm, since the signature algorithm and the signature algorithm corresponding to the key identifier are consistent, and the signature key and the signature key corresponding to the key identifier are consistent, when the terminal is a legitimate terminal, the target signature data and the signature data in the token are consistent. In this way, the NAF can accurately authenticate the terminal through the token.
[0221] The following combination Fig.10 An exemplary schematic diagram of a terminal authentication method provided in an embodiment of the present application is introduced, such as Fig.10 As shown, the method specifically includes:
[0222] S1001. The terminal initiates an HTTP request.
[0223] The HTTP request is used to initiate terminal authentication to the unified authentication server. S1001 corresponds to Figure 1 For S101 to S104 of the illustrated embodiment, the specific contents refer to the relevant description in the above embodiment, which will not be repeated here.
[0224] S1002. The unified authentication server completes the authentication of the user based on GBA.
[0225] The unified authentication server's user authentication process refers to Figure 1 S105 to S119 in the illustrated embodiment.
[0226] S1003: The unified authentication server generates a token after the terminal passes authentication.
[0227] Among them, after the terminal authentication is passed, the unified authentication server uses the locally stored signature algorithm to generate a token. The specific method of generating the token refers to the relevant description in the above embodiment and will not be repeated here.
[0228] S1004. The unified authentication server distributes the new signature key to each NAF.
[0229] The new signature key is the latest key. The unified authentication server periodically updates the signature key in the dynamic key table according to the preset time. After the terminal generates a token using the latest key, the latest key and the signature algorithm corresponding to the latest key are broadcast to each NAF.
[0230] S1005. The unified authentication server returns a token to the terminal.
[0231] S1006: The terminal subsequently sends a service request carrying the token to the NAF.
[0232] S1007. NAF performs token authentication, verifies the token validity period and performs service processing after the authentication is successful.
[0233] The method for NAF to authenticate based on token refers to the method for NAF to verify the token in the above embodiment, which will not be described in detail here.
[0234] S1008. NAF returns an HTTP response to the terminal.
[0235] The HTTP response includes a terminal authentication result response. If the terminal authentication result response is passed, the HTTP response also includes resources within the access permission requested by the terminal.
[0236] With the above method, after receiving the authentication request sent by the terminal, the unified authentication server authenticates the terminal. If the terminal is authenticated successfully, a token is generated according to the signature algorithm and the token is sent to the terminal. In this way, after the terminal completes identity authentication through the unified authentication server, the terminal can interact with each NAF for business. The number of interactions between the terminal and the NAF is reduced. Thus, the access pressure of the core network element is reduced. In addition, the unified authentication service module also sends the signature algorithm and signature key to the NAF. The token generated by the unified authentication server based on the signature algorithm and the periodically updated signature key has high security and timeliness. When the terminal receives the token, it uses the token to access the NAF. The NAF can authenticate the token using the signature algorithm and signature key. If the authentication is successful, the access rights of the terminal are determined, and the access resources can be fed back to the terminal. In this way, if the terminal is authenticated successfully, the unified authentication server sends the signature algorithm and signature key to each NAF, and the terminal can access each NAF, avoiding the authentication process between the terminal and each NAF, saving core network element resources such as BSF and HSS, and reducing the access pressure of the core network element.
[0237] Based on the same concept, the embodiment of the present application provides a terminal authentication device, which is applied to a terminal, such as Fig.11 As shown, the device comprises:
[0238] The sending module 1101 is used to send an authentication request to a unified authentication server, where the authentication request is used to instruct the unified authentication server to authenticate the terminal, and return a token for accessing the application server NAF to the terminal if the authentication is successful;
[0239] The receiving module 1102 is configured to receive a feedback response sent by the unified authentication server, wherein the feedback response carries the token;
[0240] The sending module 1101 is further configured to send an access request encapsulating the token to the NAF, where the access request is used to instruct each NAF to locally search for a signature key and a signature algorithm corresponding to the token based on the token, and the NAF authenticates the access request using the signature key and the signature algorithm, wherein the signature key and the signature algorithm are sent by the unified authentication server to each NAF;
[0241] The receiving module 1102 is further configured to receive an authentication result response sent by the NAF.
[0242] In a possible implementation manner, the authentication request includes an authentication mode field; and the device further includes:
[0243] An acquisition module, used to acquire a parameter value in the authentication method field;
[0244] The sending module 1101 is specifically used for:
[0245] When the parameter value is a preset value, the authentication request is sent to the unified authentication server.
[0246] In a possible implementation manner, the token includes a valid flag bit field, and the valid flag bit field is used to instruct the NAF to determine whether the token is valid.
[0247] In a possible implementation, the token further includes a key identifier; the key identifier is used to instruct the NAF to locally search for the signature key and the signature algorithm according to the key identifier, and to authenticate the token using the signature key and the signature algorithm.
[0248] In a possible implementation, the token further includes a token protection window time, and the token protection window time is used to instruct the NAF to determine that the token is a valid token when the local time of the NAF is within the token protection window time.
[0249] In a possible implementation, the authentication result response includes an update token generated by the NAF using the signature key and the signature algorithm when the NAF determines that the token is invalid.
[0250] It should be noted that the terminal authentication device is a device corresponding to the above-mentioned terminal authentication method, and all implementation methods in the above-mentioned method embodiment are applicable to the embodiment of the device and can achieve the same technical effect.
[0251] Based on the same concept, the embodiment of the present application also provides a terminal authentication device, which is applied to a unified authentication server, such as Fig.12 As shown, the device comprises:
[0252] The generating module 1201 is used to generate a token according to the signature algorithm when receiving the authentication request sent by the terminal and receiving the terminal authentication pass instruction sent by the boot server BSF;
[0253] The sending module 1202 is used to send the token to the terminal, so that the terminal sends an access request encapsulated with the token to each application server NAF, and the NAF locally searches for the signature key and the signature algorithm corresponding to the token based on the token, and the NAF authenticates the access request using the signature key and the signature algorithm, wherein the signature key and the signature algorithm are sent by the unified authentication server to the NAF.
[0254] In one possible implementation,
[0255] The unified authentication server includes a dynamic key table, the dynamic key table includes keys and key creation time, and the keys in the dynamic key table are updated at preset time intervals;
[0256] The generating module 1201 is specifically used for:
[0257] Determine the latest key in the dynamic key table according to the creation time of each key;
[0258] Obtaining the signature algorithm corresponding to the latest key;
[0259] The token is generated using the signature algorithm and the latest key.
[0260] It should be noted that the terminal authentication device is a device corresponding to the above-mentioned terminal authentication method, and all implementation methods in the above-mentioned method embodiment are applicable to the embodiment of the device and can achieve the same technical effect.
[0261] Based on the same concept, the embodiment of the present application also provides a terminal authentication device, which is applied to the application server NAF, such as Fig.13 As shown, the device comprises:
[0262] The receiving module 1301 is used to receive an access request sent by a terminal, wherein the access request includes a token of the terminal;
[0263] A search module 1302 is configured to locally search for a signature key and a signature algorithm corresponding to the token based on the token, where the signature key and the signature algorithm are sent to the NAF after the unified authentication server generates the token according to the signature algorithm;
[0264] An authentication module 1303, configured to authenticate the token using the signature key and the signature algorithm;
[0265] The sending module 1304 is used to send an authentication result response to the terminal.
[0266] In a possible implementation, the token includes token data and signature data; the authentication module 1303 is specifically configured to:
[0267] Signing the token data using the signature key to obtain target signature data;
[0268] In the case where the target signature data and the signature data are identical, it is determined that the token authentication is successful.
[0269] It should be noted that the terminal authentication device is a device corresponding to the above-mentioned terminal authentication method, and all implementation methods in the above-mentioned method embodiment are applicable to the embodiment of the device and can achieve the same technical effect.
[0270] Fig.14 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0271] The terminal device may include a processor 1401 and a memory 1402 storing computer program instructions.
[0272] Specifically, the processor 1401 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0273] The memory 1402 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 1402 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 1402 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 1402 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 1402 is a non-volatile solid-state memory.
[0274] In certain embodiments, the memory 1402 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0275] The processor 1401 implements any one of the terminal authentication methods in the above embodiments by reading and executing computer program instructions stored in the memory 1402 .
[0276] In one example, the electronic device may further include a communication interface 1403 and a bus 1404. Fig.14 As shown, the processor 1401, the memory 1402, and the communication interface 1403 are connected via a bus 1404 and communicate with each other.
[0277] The communication interface 1403 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0278] Bus 1404 includes hardware, software or both, and the parts of electronic equipment are coupled to each other.For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 1404 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.
[0279] In addition, in combination with the terminal authentication method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any terminal authentication method in the above embodiment is implemented.
[0280] In combination with the terminal authentication method in the above embodiments, an embodiment of the present application may provide a computer program product, the computer product including a computer program, and when the computer program is executed by a processor, it implements any one of the terminal authentication methods in the above embodiments.
[0281] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0282] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0283] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0284] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0285] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A terminal authentication method, characterized in that: Applied to a terminal, the method comprises: Send an authentication request to a unified authentication server, wherein the authentication request is used to instruct the unified authentication server to authenticate the terminal, and return a token for accessing the application server NAF to the terminal if the authentication is successful; Receiving a feedback response sent by the unified authentication server, wherein the feedback response carries the token; Sending an access request encapsulating the token to the NAF, where the access request is used to instruct each NAF to locally search for a signature key and a signature algorithm corresponding to the token based on the token, and the NAF authenticates the access request using the signature key and the signature algorithm, wherein the signature key and the signature algorithm are sent by the unified authentication server to each NAF; Receive the authentication result response sent by the NAF.
2. The method according to claim 1, characterized in that The authentication request includes an authentication mode field; Before sending the authentication request to the unified authentication server, the method further includes: Obtaining a parameter value in the authentication method field; The sending of the authentication request to the unified authentication server includes: When the parameter value is a preset value, the authentication request is sent to the unified authentication server.
3. The method according to claim 1, characterized in that The token includes a valid flag bit field, and the valid flag bit field is used to instruct the NAF to determine whether the token is valid.
4. The method according to claim 3, characterized in that The token also includes a key identifier; the key identifier is used to instruct the NAF to search for the signature key and the signature algorithm locally according to the key identifier, and use the signature key and the signature algorithm to authenticate the token.
5. The method according to claim 3, characterized in that: The token further includes a token protection window time, and the token protection window time is used to instruct the NAF to determine that the token is a valid token when the local time of the NAF is within the token protection window time.
6. The method according to claim 1, characterized in that The authentication result response includes an updated token generated by the NAF using the signature key and the signature algorithm when the NAF determines that the token is invalid.
7. A terminal authentication method, characterized in that: Applied to a unified authentication server, the method comprises: Upon receiving the authentication request sent by the terminal and the terminal authentication pass instruction sent by the boot server BSF, a token is generated according to the signature algorithm; The token is sent to the terminal, so that the terminal sends an access request encapsulated with the token to each application server NAF, the NAF locally searches for the signature key and the signature algorithm corresponding to the token based on the token, and the NAF authenticates the access request using the signature key and the signature algorithm, wherein the signature key and the signature algorithm are sent to the NAF by the unified authentication server.
8. The method according to claim 7, characterized in that The unified authentication server includes a dynamic key table, the dynamic key table includes keys and key creation time, and the keys in the dynamic key table are updated at preset time intervals; The generating of a token according to the signature algorithm comprises: Determine the latest key in the dynamic key table according to the creation time of each key; Obtaining the signature algorithm corresponding to the latest key; The token is generated using the signature algorithm and the latest key.
9. A terminal authentication method, characterized in that: Applied to an application server NAF, the method comprises: Receiving an access request sent by a terminal, wherein the access request includes a token of the terminal; Based on the token, locally search for a signature key and a signature algorithm corresponding to the token, where the signature key and the signature algorithm are sent to the NAF after the unified authentication server generates the token according to the signature algorithm; authenticating the token using the signing key and the signing algorithm; An authentication result response is sent to the terminal.
10. The method according to claim 9, characterized in that The token includes token data and signature data; The authenticating the token by using the signature key and the signature algorithm comprises: Signing the token data using the signature key to obtain target signature data; In the case where the target signature data and the signature data are identical, it is determined that the token authentication is successful.
Citation Information
Patent Citations
Distributed authentication method and system in restricted environment
CN112887334A
Resource access method and device, electronic equipment and storage medium
CN115001714A
Authentication method and device, server, medium and product
CN118337519A
Unified authentication for web method platforms
US20080256616A1
Cited By
Secret key security management method and device, electronic equipment, medium and program product
CN120856336A
