Terminal authentication method, device, equipment and storage medium
By detecting the network type and automatically selecting authentication parameters, the problem of low efficiency of terminal access to the intranet is solved, the function of automatic access to the intranet under different network environments is realized, and the access efficiency is improved.
Patent Information
- Application Number
- CN202410742186.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-06-11
AI Technical Summary
In the existing technology, terminals need to manually select an access method when accessing an enterprise's intranet, resulting in low access efficiency, especially in different network environments where appropriate authentication credentials, connection methods, and authentication methods need to be manually selected.
By detecting the network type that the target terminal is connected to, it automatically selects the corresponding authentication parameters, including connection method, authentication method and authentication credentials, to realize the function of automatic access to the intranet. The specific method includes: obtaining the service set identifier when using a wireless network, and selecting authentication parameters based on it; sending a detection request when using a wired network, and selecting authentication parameters based on the response results.
It improves the efficiency of terminal access to the intranet, enables automatic selection of appropriate authentication credentials and connection methods in different network environments, reduces manual operations, and improves access efficiency.
Smart Images

Figure CN118337527B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intranet communication technology, and in particular to a terminal authentication method, device, equipment and storage medium. Background Art
[0002] Nowadays, the office space of many corporate employees is no longer limited to the corporate office area. They have more requirements for mobile office when traveling or at home. In order to prevent illegal access to the corporate network, the terminal accessing the network needs to be authenticated.
[0003] When accessing the enterprise intranet, different access methods will be used according to the access location based on the enterprise's information security policy. For example, when users are in the company, they generally use 802.1x or Portal to directly access the enterprise intranet; when they need to access the enterprise intranet at home or on a public network, they will access it through SSL VPN. The existing authentication method is that users manually select it according to the environment after accessing the network. If the user accesses the enterprise network, Portal or 802.1x authentication is manually selected; when accessing through a home or public network, SSL VPN will be selected to establish a tunnel before authentication and access.
[0004] Network access through the above solution requires the user to first judge the network environment and then manually select, resulting in low efficiency in accessing the intranet. Summary of the invention
[0005] In view of this, the present application provides a terminal authentication method, apparatus, computer equipment and storage medium, which improve the efficiency of terminal access to the intranet. The technical solution is as follows.
[0006] In a first aspect, a terminal authentication method is provided, the method comprising:
[0007] When it is detected that the target terminal accesses the target network, determining the network type of the target network;
[0008] Selecting authentication parameters of the target terminal according to the network type of the target network; the authentication parameters include connection mode, authentication mode and authentication credentials;
[0009] Based on the authentication credential, the target terminal is controlled to perform network authentication through the connection mode and the authentication mode.
[0010] In a possible implementation manner, selecting the authentication parameter of the target terminal according to the network type of the target network includes:
[0011] When the network type of the target network is a wireless network, obtaining a target service set identifier of the target network;
[0012] According to the target service set identifier, an authentication parameter of the target terminal is selected from the authentication scenario set of the target terminal; the authentication scenario set includes a correspondence between each authentication parameter and each service set identifier.
[0013] In a possible implementation manner, selecting, according to the target service set identifier, an authentication parameter of the target terminal in the authentication scenario set of the target terminal includes:
[0014] When there is an authentication parameter corresponding to the target service set identifier in the authentication scenario set, selecting the authentication parameter corresponding to the target service set identifier as the authentication parameter of the target terminal;
[0015] When there is no authentication parameter corresponding to the target service set identifier in the authentication scenario set, a preset wireless authentication parameter in the authentication scenario set is selected as the authentication parameter of the target terminal.
[0016] In a possible implementation manner, selecting the authentication parameter of the target terminal according to the network type of the target network includes:
[0017] When the network type of the target network is a wired network, sending a detection request to the target network;
[0018] When a response result corresponding to the detection request is received, an authentication parameter of the target terminal is selected from the authentication scenario set of the target terminal according to the response result; the authentication scenario set includes a correspondence between each authentication parameter and each response result;
[0019] When no response result corresponding to the detection request is received, a preset default wired authentication parameter is selected from the authentication scenario set of the target terminal as the authentication parameter of the target terminal.
[0020] In one possible implementation, the detection request is a request sent by the target application running in the target terminal to the server, and the response result is a reply message sent by the server to the detection request; or, the detection request is an echo request sent to the target IP address, and the response result is a reply message from the target IP address to the echo request.
[0021] In a possible implementation manner, when the network type of the target network is a wired network, sending a probe request to the target network includes:
[0022] When the network type of the target network is a wired network, selecting a probe request with an Nth priority in the probe request set and sending it to the target network, where N is a positive integer;
[0023] If no response result is received from the target network within the specified time period, a probe request with the N+1th priority is selected from the probe request set and sent to the target network;
[0024] If a response result is received from the target network within a specified time period, the sending of the probe request is stopped.
[0025] In a second aspect, a terminal authentication device is provided, the device comprising:
[0026] A network type determination module, configured to determine the network type of the target network when detecting that the target terminal has accessed the target network;
[0027] An authentication parameter selection module, used to select authentication parameters of the target terminal according to the network type of the target network; the authentication parameters include connection mode, authentication mode and authentication credentials;
[0028] A network authentication module is used to control the target terminal to perform network authentication through the connection mode and the authentication mode based on the authentication credential.
[0029] In a third aspect, a computer device is provided, the computer device comprising a processor and a memory, the memory storing at least one instruction, the at least one instruction being loaded and executed by the processor to implement the above-mentioned terminal authentication method.
[0030] In a fourth aspect, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement the above-mentioned terminal authentication method.
[0031] In a fifth aspect, a computer program product or a computer program is provided, wherein the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs a terminal authentication method.
[0032] The technical solution provided by this application may have the following beneficial effects:
[0033] When the target terminal needs to access the intranet, the target terminal detects the target network in real time and determines the network type of the target network, thereby selecting the connection method, authentication method and authentication credentials for the target terminal to access the intranet based on the network type; at this time, the target terminal can perform network authentication based on the authentication credentials through the connection method and authentication method indicated in the authentication parameters to access the intranet. In the above scheme, the target terminal will detect the type of network it is connected to in real time, and automatically select the authentication parameters according to the network type to realize the function of automatic access to the intranet. It can also select the appropriate authentication credentials, connection method and authentication method in different network environments without manual operation, thereby improving the efficiency of terminal access to the intranet. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0035] Figure 1 The diagram is a schematic diagram showing the structure of a network system according to an exemplary embodiment.
[0036] Figure 2 The present invention is a flowchart of a terminal authentication method according to an exemplary embodiment.
[0037] Figure 3 A flowchart of an authentication scenario involved in an embodiment of the present application is shown.
[0038] Figure 4 The present invention is a flowchart of a terminal authentication method according to an exemplary embodiment.
[0039] Figure 5 A schematic diagram of a flow chart of a wireless access terminal authentication process involved in an embodiment of the present application is shown.
[0040] Figure 6 The present invention is a flowchart of a terminal authentication method according to an exemplary embodiment.
[0041] Figure 7 A schematic flow chart of a wired terminal authentication process involved in an embodiment of the present application is shown.
[0042] Figure 8 A schematic diagram of a process for defining a network access scenario involved in an embodiment of the present application is shown.
[0043] Fig. 9It is a structural diagram of a terminal authentication device provided in an embodiment of the present application.
[0044] Fig.10 It is a structural schematic diagram of a computer device provided by an optional embodiment of the present invention. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0046] In the description of the embodiments of the present application, the term "corresponding" may indicate a direct or indirect correspondence between two items, or an association relationship between the two items, or a relationship between indication and being indicated, configuration and being configured, and the like.
[0047] Figure 1 1 is a schematic diagram showing a structure of a network system according to an exemplary embodiment. The network system includes an intranet node 101 and an extranet node 102.
[0048] The intranet in the network system includes multiple intranet nodes.
[0049] Optionally, the intranet in the network system is a local area network built within the enterprise, and each intranet node in the intranet can be each network device in the local area network (such as a router or a switch). In this case, the user terminal (such as the second terminal 104) can access the intranet by establishing a communication connection with any intranet node in the network system.
[0050] Optionally, the intranet in the network system may also be connected to the external network (wide area network) directly or indirectly through a router or gateway. Figure 1 The external network in the example may include an external network node 102, which is a network device in the wide area network. At this time, the user terminal (such as the first terminal 103) can establish a communication connection with the external network node to enable the user terminal to access the wide area network. Optionally, the external network may be a home network or a public network.
[0051] Furthermore, in order to ensure the information security of the intranet, the user terminal needs to be authenticated when accessing the intranet. For the second terminal 104 directly accessing the intranet node 101, 802.1x or Portal can be directly used for authentication and connection; and for the first terminal 103 accessing the external network node 102, a communication connection can be established with the intranet through SSL VPN and other methods before authentication.
[0052] Optionally, the above communication connection can be achieved through a wired network or a wireless network.
[0053] Optionally, the above-mentioned wireless network or wired network uses standard communication technology and / or protocol. The network is usually the Internet, but it can also be any other network, including but not limited to any combination of local area network, metropolitan area network, wide area network, mobile, limited or wireless network, private network or virtual private network. In some embodiments, the technology and / or format including hypertext markup language, extensible markup language, etc. are used to represent the data exchanged through the network. In addition, conventional encryption technologies such as secure socket layer, transport layer security, virtual private network, Internet protocol security, etc. can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technology can also be used to replace or supplement the above-mentioned data communication technology.
[0054] Figure 2 is a method flow chart of a terminal authentication method according to an exemplary embodiment. The method is executed by a target terminal, which may be Figure 1 The first terminal 103 or the second terminal 104 in the network system shown. Figure 2 As shown, the terminal authentication method may include the following steps:
[0055] Step 201: When it is detected that a target terminal accesses a target network, the network type of the target network is determined.
[0056] Optionally, the network type of the target network may be an intranet or an extranet. The target terminal is an authentication terminal that needs to access the intranet and perform authentication.
[0057] In a possible implementation of the embodiment of the present application, the target terminal can be connected by directly communicating with an external network node. In this case, the network accessed by the target terminal is the external network.
[0058] In another possible implementation of the embodiment of the present application, the target terminal may be connected to the intranet node by direct communication. In this case, the network accessed by the target terminal is the intranet.
[0059] Step 202: Select authentication parameters of the target terminal according to the network type of the target network.
[0060] Optionally, the authentication parameters include a connection method, an authentication method, and an authentication credential.
[0061] Optionally, in the embodiment of the present application, the network type of the target network may characterize the connection mode between the target terminal and the target network.
[0062] For example, the network type of the target network can be either an intranet or an extranet; when the target network accessed by the target terminal is an intranet, the target terminal can directly authenticate through 802.1x or Portal to access the intranet. At this time, the target terminal only needs to obtain the corresponding authentication credentials;
[0063] When the target network accessed by the target terminal is an external network, the target terminal needs to connect through SSL VPN. At this time, the target terminal needs to establish SSL VPN. After the SSL VPN is established, it can be authenticated through 802.1x or Portal to access the intranet.
[0064] Furthermore, in a possible implementation of the embodiment of the present application, after confirming the network type of the target network, the target terminal may select an authentication scenario for the target terminal according to the network type.
[0065] When the target terminal determines the authentication scenario that matches the target network, it can perform network authentication according to the connection method, authentication method and authentication credentials corresponding to the authentication scenario.
[0066] When there is no authentication scenario matching the target network, the preset authentication scenario can be used as the authentication scenario matching the target network, thereby selecting the connection method, authentication method and authentication credentials corresponding to the preset authentication scenario for network authentication.
[0067] To improve security, some users want to automatically perform SSL VPN authentication and establish an SSL VPN tunnel for connection when, for example, accessing an unknown network. After the tunnel is established, the target terminal can communicate with the intranet through an encrypted tunnel regardless of the network it uses. That is, it must go through a secure gateway to achieve access from the intranet to the public network or from the public network to the intranet, thereby preventing network packets from being hijacked or snooped. To avoid having to select and authenticate a scenario every time you access, you can specify an authentication scenario as the default authentication scenario (that is, the preset authentication scenario). For network access scenarios that are not associated with a specific authentication scenario, authentication is performed according to the default authentication scenario policy, such as establishing an SSL VPN for connection, and then selecting the corresponding authentication method (such as 802.1x, Portal, or other optional authentication methods) for authentication.
[0068] Please refer to Figure 3, which shows a flow chart of an authentication scenario involved in an embodiment of the present application.
[0069] That is, the user can manually create a new authentication scenario in the target terminal and specify its scenario name; the user then defines the authentication parameters for the authentication scenario, which include connection method, authentication method, and authentication credentials (user name / password).
[0070] In addition, the user can also manually modify the existing authentication scenario in the target terminal, such as modifying its scenario name or redefining its authentication parameters.
[0071] In another possible implementation manner of the embodiment of the present application, the network type of the target network may be a wired network or a wireless network.
[0072] At this time, the target terminal can first determine whether the network type of the target network to which the target terminal is connected is a wired network or a wireless network, and then select a method for obtaining authentication parameters according to the determined network type, thereby obtaining corresponding authentication parameters.
[0073] Step 203: Based on the authentication credential, control the target terminal to perform network authentication through the connection mode and authentication mode.
[0074] When the target terminal obtains the authentication parameters, it selects the corresponding connection method and authentication method, and controls the target terminal to authenticate through the authentication credentials. After the authentication is successful, the communication connection between the target terminal and the intranet can be realized.
[0075] In summary, when the target terminal needs to access the intranet, the target terminal performs real-time detection of the target network to be accessed, and determines the network type of the target network, thereby selecting the connection method, authentication method and authentication credentials for the target terminal to access the intranet according to the network type; at this time, the target terminal can perform network authentication based on the authentication credentials through the connection method and authentication method indicated in the authentication parameters to access the intranet. In the above scheme, the target terminal will detect the type of network it is connected to in real time, and automatically select the authentication parameters according to the network type to realize the function of automatic access to the intranet. It can also select appropriate authentication credentials, connection methods and authentication methods in different network environments without manual operation, thereby improving the efficiency of terminal access to the intranet.
[0076] Figure 4 FIG. 1 is a flow chart of a terminal authentication method according to an exemplary embodiment. The method is executed by a target terminal, which may be Figure 1 The first terminal 103 or the second terminal 104 in the network system shown. Figure 4 As shown, the terminal authentication method may include the following steps:
[0077] Step 401: When the network type of the target network is a wireless network, a target service set identifier of the target network is obtained.
[0078] In an embodiment of the present application, the target terminal may be a computer device with a wireless connection function. When the target terminal is within the coverage of a wireless network, a service set identifier (SSID) of the scanned wireless network may be obtained.
[0079] If the target terminal detects that the network type of the target network to which it is connected is a wireless network, it directly obtains the target service set identifier of the wireless network, that is, the SSID of the target network.
[0080] Step 402: Select an authentication parameter of the target terminal from the authentication scenario set of the target terminal according to the target service set identifier.
[0081] The authentication scenario set includes the correspondence between each authentication parameter and each service set identifier.
[0082] After obtaining the SSID of the target network, the target terminal can confirm which authentication scenario the network currently accessed corresponds to. In an embodiment of the present application, the target terminal stores an authentication scenario set, and the authentication scenario set includes various authentication scenarios, each of which has its corresponding authentication parameters and service set identifier.
[0083] Therefore, when the target service set identifier of the target is obtained, the corresponding authentication scenario can be selected, thereby obtaining the authentication parameters used by the target terminal after accessing the target network.
[0084] In a possible implementation manner, when there is an authentication parameter corresponding to the target service set identifier in the authentication scenario set, the authentication parameter corresponding to the target service set identifier is selected as the authentication parameter of the target terminal.
[0085] Optionally, the connection mode in the authentication parameter corresponding to the target service set identifier may include direct connection and tunnel connection. Direct connection refers to a mode in which a connection is established directly between two devices without going through a tunnel. Tunnel connection refers to a mode in which a tunnel is first established between two devices and then connected through the tunnel. The tunnel may include, for example, a virtual private network VPN channel.
[0086] Optionally, the authentication method in the authentication parameter corresponding to the target service set identifier is 802.1x or Portal. It is understandable that the authentication method in the authentication parameter may also include other authentication methods except 802.1x and Portal.
[0087] When there is no authentication parameter corresponding to the target service set identifier in the authentication scenario set, a preset default wireless authentication parameter in the authentication scenario set is selected as the authentication parameter of the target terminal.
[0088] Optionally, the connection mode in the default wireless authentication parameter may include direct connection and tunnel connection. Direct connection refers to a mode in which a connection is established directly between two devices without a tunnel. Tunnel connection refers to a mode in which a tunnel is first established between two devices and then connected through the tunnel. The tunnel may include, for example, a virtual private network VPN channel.
[0089] Optionally, the VPN channel may be a virtual private network SSL VPN established based on a secure socket layer.
[0090] That is, in an embodiment of the present application, when the target terminal accesses the target network, and the target network is a wireless network, the target terminal directly obtains the target service set identifier of the target network and compares it with the authentication scenario set pre-stored in the target terminal.
[0091] At this time, when there are authentication parameters corresponding to the target service set identifier in the authentication scenario set, it means that the authentication scenario corresponding to the target network has been set up in the target terminal (the target network may be an internal wireless network of the enterprise, or a fixed office location). At this time, the target terminal directly selects the authentication parameters corresponding to the target service set identifier in the authentication scenario set for subsequent network authentication.
[0092] When the authentication parameters corresponding to the target service set identifier do not exist in the authentication scenario set, it means that the authentication scenario corresponding to the target network is not set in the target terminal (the target network may not be a commonly used network). At this time, the target network can directly select the preset default wireless authentication parameters in the authentication scenario set as the authentication parameters of the target terminal for authentication.
[0093] Furthermore, in order to ensure the security of the target terminal connecting to the intranet through the target network, the connection method in the preset default wireless authentication parameters can be SSL VPN. That is to say, as long as the target terminal accesses the intranet through a wireless network for which no authentication scenario has been set, SSL VPN is used by default for connection and then authentication is performed through 802.1x or Portal. As a result, the communication between the target network and the intranet needs to go through an encrypted tunnel, ensuring the security of the terminal's communication in an unfamiliar network.
[0094] Step 403: Based on the authentication credential, control the target terminal to perform network authentication through the connection mode and authentication mode.
[0095] After obtaining the connection method, authentication method and authentication credentials, the target terminal establishes a connection according to the connection method, and performs authentication operations on the target terminal through the authentication credentials and the corresponding authentication method, thereby achieving communication connection with the intranet.
[0096] Please refer to Figure 5 , which shows a schematic diagram of a process flow of a wireless access terminal authentication process involved in an embodiment of the present application. Figure 5 As shown, the authentication terminal (i.e., the target terminal) monitors the network access status in real time, and when it detects that the target terminal has accessed the target network, it obtains the wireless access identifier SSID of the target network; the target terminal then searches for the corresponding access scenario based on the SSID; if the corresponding access scenario is found, the authentication scenario information is obtained; if the corresponding access scenario is not found, the default authentication scenario information is obtained;
[0097] At this time, the authentication scenario information obtained by the target terminal includes the connection mode and authentication mode, which indicates how the target terminal accesses the intranet (such as SSL VPN) and how to perform authentication (such as 802.1x, Portal or other optional authentication methods). At this time, the authentication client interface in the target terminal automatically switches to the corresponding authentication scenario. If the authentication client of the target terminal enables automatic start of authentication, the target terminal automatically starts authentication according to the authentication information to complete the authentication operation of the target terminal.
[0098] In summary, when the target terminal needs to access the intranet, the target terminal performs real-time detection of the target network to be accessed, and determines the network type of the target network, thereby selecting the connection method, authentication method and authentication credentials for the target terminal to access the intranet according to the network type; at this time, the target terminal can perform network authentication based on the authentication credentials through the connection method and authentication method indicated in the authentication parameters to access the intranet. In the above scheme, the target terminal will detect the type of network it is connected to in real time, and automatically select the authentication parameters according to the network type to realize the function of automatic access to the intranet. It can also select appropriate authentication credentials, connection methods and authentication methods in different network environments without manual operation, thereby improving the efficiency of terminal access to the intranet.
[0099] Figure 6 FIG. 1 is a flow chart of a terminal authentication method according to an exemplary embodiment. The method is executed by a target terminal, which may be Figure 1 The first terminal 103 or the second terminal 104 in the network system shown. Figure 6 As shown, the terminal authentication method may include the following steps:
[0100] Step 601: When the network type of the target network is a wired network, a detection request is sent to the target network.
[0101] Optionally, the probe request is an echo request sent to the target IP address.
[0102] In an embodiment of the present application, the detection request may instruct the target terminal to send a detection signal to the website or IP address corresponding to the detection request to determine the connectivity of the website or IP address corresponding to the detection request. For example, the detection request may be an echo request, in which case the target terminal sends the echo request to the corresponding target IP address. If the target IP address is connected, the target terminal may receive a response message (i.e., a response result) to the echo request returned by the target IP address; if the target terminal does not receive an echo response message returned by the target IP address within a specified time period, it means that the target IP address is not connected, and the target terminal has not received the response result corresponding to the detection request.
[0103] Optionally, the detection request is a request sent by a target application running in the target terminal.
[0104] In an embodiment of the present application, a target application is running in the target terminal, and the target terminal sends a request for the target application (i.e., a detection request) to the server corresponding to the target application to determine the connectivity of the server corresponding to the target application; if the server corresponding to the target application is connected, then after the server receives the detection request of the target application, it will send a response message (i.e., a response result) to the target terminal in response to the detection request; if the target terminal does not receive a response message corresponding to the detection request within a specified time period, it means that the target application is not connected to the server.
[0105] Step 602A: When a response result corresponding to the detection request is received, an authentication parameter of the target terminal is selected according to the response result in the authentication scenario set of the target terminal.
[0106] The authentication scenario set includes the corresponding relationship between each authentication parameter and each response result.
[0107] When receiving the response result corresponding to the detection request, the target terminal can determine the authentication scenario according to the response result, and thus select the corresponding authentication parameters. For example, when the response result received is the response result corresponding to the detection signal sent by the target terminal to the IP address corresponding to the detection request, and the IP address is the IP address of the enterprise intranet, it can be determined that the target terminal is directly connected to the intranet node, so the connection method and authentication method suitable for the target terminal to connect to the intranet can be selected.
[0108] In an embodiment of the present application, a correspondence table of authentication parameters and response results is pre-stored in the target terminal. When the target terminal sends detection requests one by one according to the priority and receives the response result, the authentication parameters can be directly selected according to the correspondence table.
[0109] Optionally, the connection mode in the authentication parameters corresponding to each response result may include direct connection and tunnel connection. Direct connection refers to a mode in which a connection is established directly between two devices without a tunnel. Tunnel connection refers to a mode in which a tunnel is first established between two devices and then connected through the tunnel. The tunnel may include, for example, a virtual private network VPN channel.
[0110] Optionally, the authentication method in the authentication parameters corresponding to each response result may be 802.1x or Portal. It is understandable that the authentication method in the authentication parameters may also include other authentication methods except 802.1x and Portal.
[0111] Step 602B: when no response result corresponding to the detection request is received, a preset default wired authentication parameter is selected from the authentication scenario set of the target terminal as the authentication parameter of the target terminal.
[0112] If no response result corresponding to the detection request is received, the target terminal directly uses the default authentication scenario as the wired authentication scenario of the target terminal to obtain the authentication parameters. For example, when the target terminal does not receive a response result after sending each detection request, it can be considered that the target terminal has not pre-set the authentication scenario corresponding to the currently connected wired network, so the preset default wired authentication parameters in the default authentication scenario are directly used as the authentication parameters of the target terminal for the target terminal to perform authentication.
[0113] Furthermore, in order to ensure the security of the target terminal connecting to the intranet through the target network, the connection mode in the preset default wired authentication parameters may include direct connection and tunnel connection. Direct connection refers to a mode in which a connection is established directly between two devices without a tunnel. Tunnel connection refers to a mode in which a tunnel is first established between two devices and then connected through the tunnel. The tunnel may include, for example, a virtual private network VPN channel.
[0114] Optionally, the VPN channel can be a virtual private network SSL VPN established based on the secure socket layer. That is, in a possible implementation, if the preset default wired authentication parameters are used to instruct the target terminal to establish an SSL VPN channel, then as long as the target terminal accesses the intranet through a wired network for which no authentication scenario has been set, SSL VPN is used for authentication by default, so that the communication between the target network and the intranet needs to go through an encrypted tunnel, thereby ensuring the security of the terminal's communication in an unfamiliar network.
[0115] Step 603: Based on the authentication credential, control the target terminal to perform network authentication through the connection mode and authentication mode.
[0116] In a possible implementation, step 601 may also be implemented by the following steps:
[0117] Step 6011: When the network type of the target network is a wired network, select probe requests from the probe request set in order of priority and send them to the target network.
[0118] Step 6012, selecting a probe request with an Nth priority from the probe request set and sending it to the target network, where N is a positive integer;
[0119] Step 6013: If no response result is received from the target network within the specified time period, a probe request with the N+1th priority is selected from the probe request set and sent to the target network;
[0120] Step 6014: If a response result is received from the target network within the specified time period, stop sending the probe request.
[0121] At this time, a set of detection requests is pre-set in the target terminal, and the target terminal performs detection in sequence according to the priority of each detection request. When a detection request of the first priority is sent to the target network, the target network should forward its request according to the routing information in the detection request. If no response is received within the specified time period, it means that the target network is not the network corresponding to the detection request of the first priority; then the target terminal continues to send the detection request of the second priority to the target network and repeats the above process.
[0122] In the process of sending the above-mentioned probe requests in order of priority, if a response result of the target network (corresponding to the probe request of the Nth priority) is received within the specified time period, the sending of the probe request is stopped. At this time, the target network is the network corresponding to the probe request of the Nth priority.
[0123] After the above-mentioned detection request is sent in priority order, if no response is received from the target network, the detection request will also be stopped. At this time, the target network is identified as corresponding to the default authentication scenario, and the preset default wired authentication parameters are directly selected from the authentication scenario set of the target terminal as the authentication parameters of the target terminal.
[0124] Please refer to Figure 7 , which shows a schematic diagram of a process flow of a wired terminal authentication process involved in an embodiment of the present application. Figure 7 As shown, the authentication terminal (i.e., the target terminal) monitors the network access status in real time. When it is found that the target terminal is connected to a wired connection, the network accessed by the target terminal is a wired network. At this time, each detection request can be sent according to the priority of the detection request for detection, so as to match the corresponding access scenario.
[0125] If a response result is obtained in the process of sending the detection request in sequence according to the priority, the corresponding authentication scenario information can be directly selected; if no response result is obtained, the default authentication scenario information is directly used as the authentication scenario information corresponding to the wired network.
[0126] At this time, the authentication scenario information obtained by the target terminal includes a connection mode and an authentication mode, which indicates how the target terminal accesses the intranet (for example, establishing an SSL VPN and using 802.1x, Portal or other optional authentication methods). At this time, the authentication client interface in the target terminal automatically switches to the corresponding authentication scenario. If the authentication client of the target terminal enables automatic start of authentication at this time, the target terminal automatically starts authentication according to the authentication information to complete the authentication operation of the target terminal.
[0127] In summary, when the target terminal needs to access the intranet, the target terminal performs real-time detection of the target network to be accessed, and determines the network type of the target network, thereby selecting the connection method, authentication method and authentication credentials for the target terminal to access the intranet according to the network type; at this time, the target terminal can perform network authentication based on the connection method and authentication method indicated by the authentication parameters of the authentication credentials to access the intranet. In the above scheme, the target terminal will detect the type of network it is connected to in real time, and automatically select the authentication parameters according to the network type to realize the function of automatic access to the intranet. It can also select the appropriate authentication credentials, connection methods and authentication methods in different network environments without manual operation, thereby improving the efficiency of terminal access to the intranet.
[0128] exist Figure 4 as well as Figure 6 In the embodiments involved, the user needs to predefine the possible network access scenarios of the target terminal, so that the target terminal can find its corresponding authentication scenario regardless of whether it accesses a wired network or a wireless network, and thus obtain its corresponding authentication parameters for terminal authentication. Figure 8 , which shows a flow chart of a network access scenario definition involved in an embodiment of the present application.
[0129] For wireless networks that the terminal may access, such as Figure 8 As shown, when the authentication terminal discovers a new wireless SSID, the user can create an access scenario for the SSID, or bind the SSID to an already created access scenario;
[0130] For the wireless SSID pre-stored in the target terminal, the user can also choose to create an access scenario for the SSID, or bind the wireless SSID to the access scenario that has been created.
[0131] For the wired network that the terminal may access, the user can manually create an access scenario as a wired access scenario and configure the detection conditions to determine whether it is the access scenario based on the detection results when the target terminal accesses the network;
[0132] At this time, the user also needs to set the priority of each detection condition to determine the detection order during wired access.
[0133] When the above process is completed, the target terminal will also bind the access scenario with the authentication scenario, that is, bind the access scenario with the connection method, authentication method and authentication credentials.
[0134] At this time, if there is an access scenario that is not bound to an authentication scenario, it will be bound to the default authentication scenario; for the authentication scenario that is not bound to the SSID, it will be confirmed as a wired access scenario. At this time, it is necessary to bind its authentication scenario according to its detection conditions, so as to realize the binding of the detection conditions with the connection method, authentication method and authentication credentials.
[0135] After all access scenarios are bound to authentication scenarios, users also need to set whether to automatically start authentication for each authentication scenario.
[0136] Through the above process, the user can pre-set the binding relationship between the wired network, wireless network and various authentication scenarios. At this time, after the target terminal accesses the target network, it can directly determine the authentication scenario corresponding to the target network, that is, Figure 4 or Figure 6 The steps shown are to achieve automatic authentication of the target terminal.
[0137] In the embodiments of the present application, a terminal authentication device is also provided, which is used to implement the above embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0138] The present application embodiment provides a terminal authentication device, Fig. 9 : is a schematic diagram of the structure of a terminal authentication device provided in an embodiment of the present application, the device comprising:
[0139] A network type determination module 901 is used to determine the network type of the target network when it is detected that the target terminal accesses the target network;
[0140] An authentication parameter selection module 902 is used to select authentication parameters of the target terminal according to the network type of the target network; the authentication parameters include connection mode, authentication mode and authentication credentials;
[0141] The network authentication module 903 is used to control the target terminal to perform network authentication through the connection mode and the authentication mode based on the authentication credential.
[0142] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0143] The terminal authentication device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0144] The embodiment of the present invention also provides a computer device having the above Fig. 9 The terminal authentication device shown.
[0145] See also Fig.10 , Fig.10 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig.10 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display graphic information in a graphical user interface on an external input / output device (such as a display device coupled to an interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.10 A processor 10 is taken as an example.
[0146] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0147] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0148] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0149] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0150] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0151] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0152] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0153] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A terminal authentication method, characterized in that: The method comprises: When it is detected that the target terminal accesses the target network, determining the network type of the target network; Selecting authentication parameters of the target terminal according to the network type of the target network; the authentication parameters include connection mode, authentication mode and authentication credentials; Based on the authentication credentials, controlling the target terminal to perform network authentication through the connection method and the authentication method; The selecting the authentication parameters of the target terminal according to the network type of the target network includes: When the network type of the target network is a wireless network, obtaining a target service set identifier of the target network; According to the target service set identifier, selecting an authentication parameter of the target terminal from the authentication scenario set of the target terminal; the authentication scenario set includes a correspondence between each authentication parameter and each service set identifier; When the network type of the target network is a wired network, sending a detection request to the target network; When a response result corresponding to the detection request is received within a specified time period, an authentication parameter of the target terminal is selected from the authentication scenario set of the target terminal according to the response result; the authentication scenario set includes a correspondence between each authentication parameter and each response result.
2. The method according to claim 1, characterized in that: The selecting, according to the target service set identifier, the authentication parameter of the target terminal in the authentication scenario set of the target terminal comprises: When there is an authentication parameter corresponding to the target service set identifier in the authentication scenario set, selecting the authentication parameter corresponding to the target service set identifier as the authentication parameter of the target terminal; When there is no authentication parameter corresponding to the target service set identifier in the authentication scenario set, a preset default wireless authentication parameter in the authentication scenario set is selected as the authentication parameter of the target terminal.
3. The method according to claim 1, characterized in that: The method further comprises: When no response result corresponding to the detection request is received within a specified time period, a preset default wired authentication parameter is selected from the authentication scenario set of the target terminal as the authentication parameter of the target terminal.
4. The method according to claim 3, characterized in that: The detection request is a request sent by the target application running in the target terminal to the server, and the response result is a response message sent by the server in response to the detection request; Alternatively, the detection request is an echo request sent to a target IP address, and the response result is a response message from the target IP address to the echo request.
5. The method according to claim 3 or 4, characterized in that: When the network type of the target network is a wired network, sending a detection request to the target network includes: When the network type of the target network is a wired network, selecting a probe request with an Nth priority in the probe request set and sending it to the target network, where N is a positive integer; If no response result is received from the target network within the specified time period, a probe request with the N+1th priority is selected from the probe request set and sent to the target network; If a response result is received from the target network within a specified time period, the sending of the probe request is stopped.
6. A terminal authentication device, characterized in that: The device comprises: A network type determination module, configured to determine the network type of the target network when detecting that the target terminal has accessed the target network; An authentication parameter selection module, used to select authentication parameters of the target terminal according to the network type of the target network; the authentication parameters include connection mode, authentication mode and authentication credentials; A network authentication module, used to control the target terminal to perform network authentication through the connection mode and the authentication mode based on the authentication credential; The authentication parameter selection module is further used to: When the network type of the target network is a wireless network, obtaining a target service set identifier of the target network; According to the target service set identifier, selecting an authentication parameter of the target terminal from the authentication scenario set of the target terminal; the authentication scenario set includes a correspondence between each authentication parameter and each service set identifier; When the network type of the target network is a wired network, sending a detection request to the target network; When a response result corresponding to the detection request is received within a specified time period, an authentication parameter of the target terminal is selected from the authentication scenario set of the target terminal according to the response result; the authentication scenario set includes a correspondence between each authentication parameter and each response result.
7. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the terminal authentication method according to any one of claims 1 to 5 by executing the computer instructions.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the terminal authentication method according to any one of claims 1 to 5.
9. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to enable a computer to execute the terminal authentication method according to any one of claims 1 to 5.
