Secure access method and device of H5 page, equipment, storage medium and product
By obtaining and verifying the security level of the H5 page, the security level of the H5 page is controlled hierarchically, which solves the problem of low access efficiency and security of the H5 page in the existing technology. It is suitable for different scenarios and reduces the time required for external distribution. Development burden is reduced and business response efficiency is improved.
Patent Information
- Application Number
- CN202410282447.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-12
- Publication Date
- 2024-10-18
AI Technical Summary
The access processing efficiency and security of existing H5 pages are low, and the development processing is not flexible enough, resulting in security risks and efficiency issues.
By receiving the user's H5 page access request, the security level of the page to be accessed is obtained from the server feedback, and the encryption interface is called on the target client to obtain the verification signature value, which is sent to the server for access verification, and security is performed based on the verification result. Access to achieve flexible control of hierarchical security.
It reduces the security risk when accessing H5 pages, improves the processing efficiency of low-security pages, supports applications in different scenarios, and does not require re-development when the H5 page is released externally. It only needs to be configured to go online, which improves the efficiency of business iteration response. .
Smart Images

Figure CN118797739A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment, storage medium and product for securely accessing an H5 page. Background Art
[0002] In the prior art, H5 development is mainly adopted in the native framework of the client, and the H5 page is prevented from being opened without the APP. The UA (user-agent) string is obtained and sent to the server side every time the browser http requests. The server determines whether the H5 page is opened in the client side through the user-agent string. Alternatively, a universal asymmetric encryption public key is pre-built in the client side. When the user logs in, the client automatically generates a string of random signature identifiers, merges the login information, uses the public key in the release package, and adopts the asymmetric encryption algorithm RSA to add the client and then submit it to the server side. The client signs and saves it. After the client receives the login return content, it uses the agreed symmetric encryption algorithm AES to decrypt it, and then processes the server return operation. If the login fails, the user is directly prompted. If the return is successful, the server side only returns the decrypted message, the login identifier, and the client's own signature identifier and user identifier are logically mixed and encrypted for storage. Summary of the invention
[0003] The main purpose of the present invention is to provide a method, device, equipment, storage medium and product for secure access to H5 pages, aiming to solve the technical problems of low access processing efficiency and access security of H5 pages in the prior art, and inflexible development and processing.
[0004] To achieve the above object, the present invention provides a method for securely accessing an H5 page, the method comprising the following steps:
[0005] When receiving a user's H5 page access request, obtain the security level of the page to be accessed as fed back by the server;
[0006] When the page to be accessed is accessed in the target client, the encryption interface of the page to be accessed is called at the target client according to the security level to obtain the verification signature value of the page to be accessed;
[0007] Sending the verification signature value of the page to be accessed to the server, so that the server performs access verification according to the verification signature value;
[0008] The page to be accessed is securely accessed according to the access verification result.
[0009] Optionally, when receiving the user's H5 page access request, obtaining the security level of the page to be accessed fed back by the server includes:
[0010] When receiving an H5 page access request from a user, determining a startup type of the page to be accessed according to the H5 page access request;
[0011] When the startup type is an access location restriction type, the H5 page access request is sent to the server, so that the server determines the current status of the restricted access rights corresponding to the page to be accessed according to the H5 page access request, and queries the security level of the page to be accessed according to the current status and provides feedback.
[0012] Optionally, when the page to be accessed is opened on the target client, before calling the encryption interface of the page to be accessed at the target client according to the security level and obtaining the verification signature value of the page to be accessed, the method further includes:
[0013] When the security level of the page to be accessed is obtained, the access location of the page to be accessed is determined according to the UA string corresponding to the page to be accessed;
[0014] When the access location of the page to be accessed is a target client, a step of calling the encryption interface of the page to be accessed at the target client according to the security level to obtain a verification signature value of the page to be accessed is performed.
[0015] Optionally, when the page to be accessed is accessed in the target client, calling the encryption interface of the page to be accessed at the target client according to the security level to obtain the verification signature value of the page to be accessed includes:
[0016] When the page to be accessed is accessed in the target client, determining the current version of the target client;
[0017] When the current version is the target version, calling the encryption interface of the page to be accessed at the target client according to the security level, and obtaining a client signature value fed back by the target client according to the security level;
[0018] Calculate the signature value according to the encryption interface to determine the page signature value;
[0019] A verification signature value of the page to be accessed is obtained according to the page signature value and the client signature value.
[0020] Optionally, sending the verification signature value of the page to be accessed to the server so that the server performs access verification according to the verification signature value includes:
[0021] The verification signature value of the page to be accessed is sent to the server, so that the server verifies the page signature value in the verification signature value; when the verification result of the page signature value is a passed result, the current state of the restricted access permission corresponding to the page to be accessed is obtained; when the current state is a preset open state, the client signature value in the verification signature value is verified, and the access verification result is obtained according to the verification result of the client signature value.
[0022] Optionally, the securely accessing the page to be accessed according to the access verification result includes:
[0023] When the access verification result is a verification pass result, securely access the page to be accessed according to the verification pass result;
[0024] When the access verification result is a verification failure result, a springboard link corresponding to the to-be-accessed page is obtained according to the verification failure result, and the to-be-accessed page is securely accessed according to the springboard link.
[0025] In addition, to achieve the above-mentioned purpose, the present invention also proposes a secure access device for an H5 page, the secure access device for an H5 page comprising:
[0026] The acquisition module is used to obtain the security level of the page to be accessed fed back by the server when receiving the user's H5 page access request;
[0027] A calling module, used for calling the encryption interface of the page to be accessed at the target client according to the security level to obtain the verification signature value of the page to be accessed when the page to be accessed is accessed in the target client;
[0028] A sending module, used for sending the verification signature value of the page to be accessed to the server, so that the server performs access verification according to the verification signature value;
[0029] The access module is used to perform secure access to the page to be accessed according to the access verification result.
[0030] In addition, to achieve the above-mentioned purpose, the present invention also proposes a secure access device for H5 pages, the device comprising: a memory, a processor, and a secure access program for H5 pages stored on the memory and executable on the processor, the secure access program for H5 pages being configured to implement the steps of the secure access method for H5 pages as described above.
[0031] In addition, to achieve the above-mentioned purpose, the present invention also proposes a storage medium, on which a security access program for an H5 page is stored. When the security access program for an H5 page is executed by a processor, the steps of the security access method for an H5 page as described above are implemented.
[0032] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer program product, which includes a security access program for an H5 page, and when the security access program for an H5 page is executed by a processor, the steps of the security access method for an H5 page as described above are implemented.
[0033] The present invention obtains the security level of the page to be accessed fed back by the server when receiving the user's H5 page access request; when the page to be accessed is accessed in the target client, the encryption interface of the page to be accessed is called at the target client according to the security level to obtain the verification signature value of the page to be accessed; the verification signature value of the page to be accessed is sent to the server, so that the server performs access verification according to the verification signature value; and the page to be accessed is securely accessed according to the access verification result. Through the above method, based on the security level of the page to be accessed, the encryption interface is called on the client, the verification signature value of the page to be accessed is obtained, and the access verification is performed based on the verification signature value of the page to be accessed, and the page to be accessed is securely accessed according to the access verification result, realizing the flexible control of the layered and graded security of the H5 page, which can be applied to different scenarios, reducing the security risk when accessing the H5 page, and can be targeted based on the security level of the H5 page. Decryption improves the processing efficiency of low-security pages, and the business and capability externalization is configured and managed through the UI. When the H5 page is externalized to different places, it does not need to be redeveloped, and only configuration is required to go online, which improves the efficiency of business iteration response. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a structural diagram of a secure access device for an H5 page in a hardware operating environment involved in an embodiment of the present invention;
[0035] Figure 2 A flowchart of a first embodiment of a method for securely accessing an H5 page according to the present invention;
[0036] Figure 3 A flowchart of a second embodiment of a method for securely accessing an H5 page according to the present invention;
[0037] Figure 4 A schematic diagram of a flow chart of a third embodiment of a method for securely accessing an H5 page of the present invention;
[0038] Figure 5This is a schematic diagram of the overall process of an embodiment of a method for securely accessing an H5 page of the present invention;
[0039] Figure 6 This is a structural block diagram of the first embodiment of the secure access device for H5 pages of the present invention.
[0040] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0041] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0042] Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of a secure access device for an H5 page in a hardware operating environment according to an embodiment of the present invention.
[0043] like Figure 1 As shown, the secure access device of the H5 page may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (Wireless-Fidelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM), or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk storage. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0044] Those skilled in the art will understand that Figure 1 The structure shown in does not constitute a limitation on the secure access device for H5 pages, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0045] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and a security access program for an H5 page.
[0046] exist Figure 1In the security access device for the H5 page shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the security access device for the H5 page of the present invention can be set in the security access device for the H5 page, and the security access device for the H5 page calls the security access program for the H5 page stored in the memory 1005 through the processor 1001, and executes the security access method for the H5 page provided in the embodiment of the present invention.
[0047] The embodiment of the present invention provides a method for securely accessing an H5 page. Figure 2 , Figure 2 This is a flow chart of the first embodiment of the method for securely accessing an H5 page of the present invention.
[0048] In this embodiment, the secure access method of the H5 page includes the following steps:
[0049] Step S10: upon receiving the user's H5 page access request, obtaining the security level of the page to be accessed fed back by the server.
[0050] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, an H5 page front end, etc. The following takes the H5 page front end as an example to illustrate this embodiment and the following embodiments.
[0051] It is understandable that in the prior art, since the parameters are obtained by the front end and passed to the server, there is a situation where the user-agent is disguised and simulated, which easily bypasses the restriction that the financial H5 page must be accessed within the client, posing a security risk; at the same time, all H5 encryption schemes are one-size-fits-all, which affects the opening efficiency of pages with low security requirements; in addition, if the corresponding H5 page needs to be externalized to other places (public accounts, other apps, etc.), it needs to be redeveloped, which is not flexible enough. In order to solve the above problems, a secure access method for H5 pages of this embodiment is proposed.
[0052] In the specific implementation, the H5 page access request can be generated by the user after clicking the H5 page entrance on the front end of the H5 page. The page to be accessed refers to the H5 page that needs to be accessed securely. After receiving the user's H5 page access request, the server queries the security level of the page to be accessed. The security level of the page to be queried is configured in the background UI.
[0053] It should be noted that in order to ensure the access security of the page to be accessed, further, when receiving the user's H5 page access request, the security level of the page to be accessed fed back by the server is obtained, including: when receiving the user's H5 page access request, determining the startup type of the page to be accessed according to the H5 page access request; when the startup type is an access location restriction type, sending the H5 page access request to the server, so that the server determines the current status of the restricted access rights corresponding to the page to be accessed according to the H5 page access request, and queries the security level of the page to be accessed according to the current status and feeds back.
[0054] It is understandable that when receiving the user's H5 page access request, it is necessary to first determine the startup type of the page to be accessed, and determine whether the page to be accessed is an H5 page that is restricted to be opened in the client, such as a financial H5 page. When the page to be accessed is an H5 page that is restricted to be opened in the client, it means that the startup type of the page to be accessed is an access location restricted type. Otherwise, it means that the startup type of the page to be accessed is an access location unrestricted type.
[0055] In the specific implementation, if the startup type of the page to be accessed is the access location restriction type, it is necessary to first request the server, and the server will determine whether the restricted access switch has been turned on. If the restricted access switch has been turned on, it means that the current state of the restricted access right is on. At this time, the server queries the security level of the page to be accessed and provides feedback.
[0056] It should be noted that if the restricted access switch is not turned on, it means that the current state of the restricted access right is closed, and the subsequent access verification steps are directly performed based on the verification signature value of the page to be accessed.
[0057] Step S20: when the page to be accessed is accessed in the target client, the encryption interface of the page to be accessed is called at the target client according to the security level to obtain the verification signature value of the page to be accessed.
[0058] It should be noted that after obtaining the security level of the page to be accessed, the H5 page front end determines whether the page to be accessed is opened and accessed in the client through the user-agent parameter. If the page to be accessed is accessed in the target client, it is necessary to call the corresponding encryption interface at the target client according to the security level of the page to be accessed. In this embodiment, the target client pre-sets the corresponding encryption interface according to different security levels. The H5 page signs by calling the client encryption interface, obtains the corresponding verification signature value, and verifies the security through the background signature verification interface. At the same time, the verification signature value includes the client signature value returned by the client and its own signature value.
[0059] It can be understood that in order to accurately execute the step of obtaining the verification signature value, further, when the page to be visited is opened on the target client, the encryption interface of the page to be visited is called at the target client according to the security level to obtain the verification signature value of the page to be visited, and it also includes: when the security level of the page to be visited is obtained, the access location of the page to be visited is determined according to the UA string corresponding to the page to be visited; when the access location of the page to be visited is the target client, the encryption interface of the page to be visited is called at the target client according to the security level to obtain the verification signature value of the page to be visited.
[0060] In the specific implementation, when the security level of the page to be accessed is obtained from the server, the H5 page determines the access location of the page to be accessed according to the UA string (that is, the user-agent parameter) corresponding to the page to be accessed, and determines whether the page to be accessed is opened in the client. If the page to be accessed is opened in the client, the access location of the page to be accessed is determined to be the target client. At this time, the encryption interface of the page to be accessed is called at the target client according to the security level to obtain the steps of the verification signature value of the page to be accessed and the subsequent steps.
[0061] It should be noted that if the page to be accessed is not opened in the client, it is determined that the access location of the page to be accessed is not the target client. At this time, directly jump to the springboard link corresponding to the page to be accessed to open the page in the third-party client. The third-party client can be a mobile and package client, or other clients. This embodiment does not limit this.
[0062] Step S30: sending the verification signature value of the page to be accessed to the server, so that the server performs access verification according to the verification signature value.
[0063] It should be noted that the H5 page requests the server interface together with the verification signature value of the page to be accessed, and the server performs verification based on the verification signature value sent by the H5 page, thereby obtaining the access verification result of the page to be accessed, and the access verification result includes the verification pass result, the verification fail result, and the verification failure result. When both the self-signature value and the client signature value of the page to be accessed are verified, the access verification result is a verification pass result; when the self-signature value of the page to be accessed is verified, but the client signature value is not verified, the access verification result is a verification failure result; when the self-signature value of the page to be accessed is verified, the access verification result is a verification failure result; when the self-signature value of the accessed page is not verified, the access verification result is a verification failure result.
[0064] Step S40: Performing secure access to the page to be accessed according to the access verification result.
[0065] This embodiment obtains the security level of the page to be accessed fed back by the server when receiving the user's H5 page access request; when the page to be accessed is accessed in the target client, the encryption interface of the page to be accessed is called at the target client according to the security level to obtain the verification signature value of the page to be accessed; the verification signature value of the page to be accessed is sent to the server so that the server performs access verification according to the verification signature value; and the page to be accessed is securely accessed according to the access verification result. Through the above method, the encryption interface is called on the client based on the security level of the page to be accessed, the verification signature value of the page to be accessed is obtained, and the access verification is performed based on the verification signature value of the page to be accessed, and the page to be accessed is securely accessed according to the access verification result, realizing flexible control of the layered and graded security of the H5 page, which can be applied to different scenarios, reducing the security risk when accessing the H5 page, and can perform targeted decryption based on the security level of the H5 page, improving the processing efficiency of low-security pages, and configuring and managing the business and capability externalization through the UI. When the H5 page is externalized to different places, it does not need to be redeveloped, and only needs to be configured to go online, which improves the efficiency of business iteration response.
[0066] refer to Figure 3 , Figure 3 This is a flow chart of a second embodiment of a method for securely accessing an H5 page according to the present invention.
[0067] Based on the above first embodiment, in this embodiment, step S20 includes:
[0068] Step S21: when the page to be accessed is accessed in the target client, determining the current version of the target client.
[0069] It should be noted that when the page to be accessed is accessed in the target client, it is necessary to obtain the current version of the target client, and determine whether the target client is an old version before the target client H5 page encryption interface is available based on the current version of the client. In this embodiment, the new and old versions of the target client can be determined based on the version number of the target client, or other methods can be used, which are not limited in this embodiment.
[0070] Step S22: When the current version is the target version, the encryption interface of the page to be accessed is called at the target client according to the security level, and a client signature value fed back by the target client according to the security level is obtained.
[0071] It should be noted that when the current version of the target client is the target version, it means that the current version of the target client is a version with an encryption interface. The encryption interface of the page to be accessed by the target client is called based on the security level of the page to be accessed, and the signature of the page to be accessed can also be called. At the same time, the target client will feedback the corresponding signature value based on the security level of the page to be accessed. The corresponding signature value fed back by the target client based on the security level of the page to be accessed is the client signature value. The target client may also feedback the corresponding encrypted ciphertext based on the security level of the page to be accessed.
[0072] It is understandable that when the current version of the target client is not the target version, it means that the current version of the target client does not meet the requirements, and the user needs to be prompted to upgrade the current version of the target client.
[0073] Step S23: Calculate the signature value according to the encryption interface to determine the page signature value.
[0074] It should be noted that the H5 page calculates the signature value based on the encryption interface to determine the signature value of the page to be visited. The signature value of the page to be visited is the page signature value.
[0075] It can be understood that the signing process specifically involves concatenating the request parameters into plain text in alphabetical order, and then combining the encryption key and the plain text to perform MD5 calculation to obtain the signature value. The server and the H5 page front end perform signature calculation in the same way.
[0076] Step S24 obtains the verification signature value of the page to be accessed according to the page signature value and the client signature value.
[0077] It should be noted that the verification signature value of the page to be accessed is composed based on the page signature value and the client signature value.
[0078] This embodiment determines the current version of the target client when the page to be accessed is accessed in the target client; when the current version is the target version, the encryption interface of the page to be accessed is called at the target client according to the security level, and the client signature value fed back by the target client according to the security level is obtained; the signature value is calculated according to the encryption interface to determine the page signature value; the verification signature value of the page to be accessed is obtained according to the page signature value and the client signature value. In the above manner, encryption algorithms of different levels are implanted in the client, and different encryption interfaces are encapsulated for the H5 page to call encryption, which ensures the pertinence of the subsequent decryption process and improves the processing efficiency of low-security pages.
[0079] refer to Figure 4 , Figure 4 This is a flow chart of a third embodiment of a method for securely accessing an H5 page according to the present invention.
[0080] Based on the above embodiments, in this embodiment, step S30 includes:
[0081] Step S31: Send the verification signature value of the page to be accessed to the server, so that the server verifies the page signature value in the verification signature value. When the verification result of the page signature value is a passed result, obtain the current status of the restricted access permission corresponding to the page to be accessed. When the current status is a preset open status, verify the client signature value in the verification signature value, and obtain the access verification result according to the verification result of the client signature value.
[0082] It should be noted that the H5 page front end sends the verification signature value of the page to be accessed to the server for access verification to determine whether the single request of the page to be accessed is safe, reliable and not tampered with. Single request signatures are divided into H5 internal signatures and client signatures. When the web page is outside the terminal, only the H5 internal signature is verified. If the switch outside the terminal is restricted to open the page, access will not be allowed. When the web page is opened in the client, two sets of different signature values will be generated. The signature value types are distinguished according to the security level of the web page for verification. The security level of the page is determined according to the page elements and is implemented by the server through UI configuration. If the client signature value is verified to be valid, it is determined that the current web page is opened on the client and the client's signature algorithm is used. Compared with the H5 internal signature, the client's signature has the advantages of greater security and concealment. The H5 code will be downloaded and executed by the browser, and the signature code and key are easy to be stolen. The client program code is more secure after being compiled into machine code.
[0083] It can be understood that the server first verifies the page signature value. When the verification result of the page signature value is a passed result, the server obtains the current status of the restricted access permission corresponding to the page to be accessed again. The server determines whether the restricted access switch is turned on. If the restricted access switch is turned on, it means that the current status of the restricted access permission is the preset on status. At this time, the server further verifies the client signature value in the verification signature value, and obtains the access verification result based on the verification result of the client signature value.
[0084] It should be understood that when the verification result of the page signature value is a verification failure result, it means that the signature fails and the verification error is reported. At this time, the access verification result is a verification failure result.
[0085] In the specific implementation, if the restricted access switch has been turned off, it means that the current state of restricted access rights is closed. At this time, the front end of the H5 page directly opens the page to be accessed.
[0086] It should be noted that in order to ensure the accuracy and security of access to the page to be accessed, further, the secure access to the page to be accessed based on the access verification result includes: when the access verification result is a verification pass result, the page to be accessed is securely accessed based on the verification pass result; when the access verification result is a verification fail result, obtaining the springboard link corresponding to the page to be accessed based on the verification fail result, and securely accessing the page to be accessed based on the springboard link.
[0087] It can be understood that when the access verification result is a passed verification result, it means that both the self-signature value and the client signature value of the page to be accessed have been verified, and at this time the H5 page front end directly opens the page to be accessed; when the access verification result is a failed verification result, it means that the self-signature value of the page to be accessed has been verified, but the client signature value has failed to be verified. At this time, based on the springboard link corresponding to the page to be accessed, it guides the page to be accessed to be opened in the third-party client.
[0088] In the specific implementation, the hierarchical and graded security access process of H5 pages is as follows: Figure 5 As shown in the figure, when the user clicks the H5 page entrance, the financial H5 page that must be opened in the client first requests the server to determine whether the access restriction switch is turned on. If the access restriction switch is turned on, the security level of the H5 page is queried (the page level is configured in the background UI), and the H5 page determines whether it is opened in the client through the user-agent parameter. If it is not opened in the client, it is directly transferred to the springboard chain to open and package the client page. If it is opened in the client, it is necessary to determine whether it is an old version before the client H5 page signature interface is available. Here, the client version number is used to determine the new and old versions of the client. If it is an old version, the user is prompted to upgrade the client version. If it is a new version, the client H5 page signature or encryption interface is called according to the different security levels of the H5 page, and the signature value or encrypted ciphertext is returned. The H5 request server interface requests the server together with the signature value returned by the client and its own signature value. The server first verifies the page signature value 1 of the H5 self-signed page. If the verification fails, an error is returned. If the verification passes, it determines whether the access restriction switch is turned on again. If the access restriction switch is turned off, the H5 page is opened directly. If the restricted access switch is turned on, the client signature value 2 will be further verified. If the client signature value 2 passes the verification, the H5 page will be opened directly. If the client signature value 2 fails to verify, it will be guided to open in the third-party client through the springboard chain.
[0089] It should be noted that according to the above process, considering the different resource requirements of different encryption algorithms, the security level of the H5 page is hierarchical and graded. Different encryption level interfaces are preset in the client in a hierarchical manner, and then the H5 message is encrypted and decrypted on the server. While ensuring that the H5 page is accessed in the client, the security of the H5 message request is enhanced. Similarly, the back-end restricted access switch is graded, and the security level is controlled through the user interface. The front-end H5 page obtains different switch security levels and calls encryption interfaces of different levels to achieve flexible control of the hierarchical security of the H5 page. At the same time, the security level of the H5 page is set through the UI. The same page can be adjusted through the UI and flexibly applied to different scenarios. To expand to non-client scenarios, you only need to turn off the client encryption verification in the background.
[0090] This embodiment sends the verification signature value of the page to be accessed to the server, so that the server verifies the page signature value in the verification signature value. When the verification result of the page signature value is a pass result, the current state of the restricted access rights corresponding to the page to be accessed is obtained. When the current state is a preset open state, the client signature value in the verification signature value is verified, and the access verification result is obtained according to the verification result of the client signature value. In the above manner, the server performs targeted decryption based on the verification signature value, thereby improving the processing efficiency of low-security pages and the security of page access.
[0091] In addition, an embodiment of the present invention further proposes a storage medium, on which a secure access program for an H5 page is stored. When the secure access program for an H5 page is executed by a processor, the steps of the secure access method for an H5 page as described above are implemented.
[0092] In addition, an embodiment of the present invention further proposes a computer program product, including a secure access program for an H5 page, wherein the secure access program for an H5 page implements the steps of the secure access method for an H5 page as described above when executed by a processor.
[0093] The specific implementation of the computer program product of the present invention is basically the same as the above-mentioned embodiments of the method for securely accessing the H5 page, and will not be repeated here.
[0094] Refer to 6, Figure 6 This is a structural block diagram of the first embodiment of the secure access device for H5 pages of the present invention.
[0095] like Figure 6 As shown, the secure access device for H5 pages proposed in the embodiment of the present invention includes:
[0096] The acquisition module 10 is used to obtain the security level of the page to be accessed fed back by the server when receiving the user's H5 page access request.
[0097] The calling module 20 is used to call the encryption interface of the page to be accessed at the target client according to the security level to obtain the verification signature value of the page to be accessed when the page to be accessed is accessed in the target client.
[0098] The sending module 30 is used to send the verification signature value of the page to be accessed to the server, so that the server performs access verification according to the verification signature value.
[0099] The access module 40 is used to perform secure access to the page to be accessed according to the access verification result.
[0100] This embodiment obtains the security level of the page to be accessed fed back by the server when receiving the user's H5 page access request; when the page to be accessed is accessed in the target client, the encryption interface of the page to be accessed is called at the target client according to the security level to obtain the verification signature value of the page to be accessed; the verification signature value of the page to be accessed is sent to the server so that the server performs access verification according to the verification signature value; and the page to be accessed is securely accessed according to the access verification result. Through the above method, the encryption interface is called on the client based on the security level of the page to be accessed, the verification signature value of the page to be accessed is obtained, and the access verification is performed based on the verification signature value of the page to be accessed, and the page to be accessed is securely accessed according to the access verification result, realizing flexible control of the layered and graded security of the H5 page, which can be applied to different scenarios, reducing the security risk when accessing the H5 page, and can perform targeted decryption based on the security level of the H5 page, improving the processing efficiency of low-security pages, and configuring and managing the business and capability externalization through the UI. When the H5 page is externalized to different places, it does not need to be redeveloped, and only needs to be configured to go online, which improves the efficiency of business iteration response.
[0101] In one embodiment, the acquisition module 10 is further used to determine the startup type of the page to be accessed according to the H5 page access request when receiving the user's H5 page access request;
[0102] When the startup type is an access location restriction type, the H5 page access request is sent to the server, so that the server determines the current status of the restricted access rights corresponding to the page to be accessed according to the H5 page access request, and queries the security level of the page to be accessed according to the current status and provides feedback.
[0103] In one embodiment, the calling module 20 is further used to determine the access location of the page to be accessed according to the UA string corresponding to the page to be accessed when the security level of the page to be accessed is obtained;
[0104] When the access location of the page to be accessed is a target client, a step of calling the encryption interface of the page to be accessed at the target client according to the security level to obtain a verification signature value of the page to be accessed is performed.
[0105] In one embodiment, the calling module 20 is further used to determine the current version of the target client when the page to be accessed is accessed in the target client;
[0106] When the current version is the target version, calling the encryption interface of the page to be accessed at the target client according to the security level, and obtaining a client signature value fed back by the target client according to the security level;
[0107] Calculate the signature value according to the encryption interface to determine the page signature value;
[0108] A verification signature value of the page to be accessed is obtained according to the page signature value and the client signature value.
[0109] In one embodiment, the sending module 30 is also used to send the verification signature value of the page to be accessed to the server, so that the server verifies the page signature value in the verification signature value, and when the verification result of the page signature value is a passed result, obtain the current state of the restricted access permission corresponding to the page to be accessed, and when the current state is a preset open state, verify the client signature value in the verification signature value, and obtain the access verification result according to the verification result of the client signature value.
[0110] In one embodiment, the access module 40 is further configured to, when the access verification result is a verification pass result, perform secure access to the to-be-accessed page according to the verification pass result;
[0111] When the access verification result is a verification failure result, a springboard link corresponding to the to-be-accessed page is obtained according to the verification failure result, and the to-be-accessed page is securely accessed according to the springboard link.
[0112] Other embodiments or specific implementations of the secure access device for H5 pages of the present invention may refer to the above-mentioned method embodiments and will not be described in detail here.
[0113] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system 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 system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0114] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0115] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0116] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A secure access method for H5 pages. It is characterized in that The secure access method of the H5 page includes: When receiving a user's H5 page access request, obtain the security level of the page to be accessed as fed back by the server; When the page to be accessed is accessed in the target client, the encryption interface of the page to be accessed is called at the target client according to the security level to obtain the verification signature value of the page to be accessed; Sending the verification signature value of the page to be accessed to the server, so that the server performs access verification according to the verification signature value; The page to be accessed is securely accessed according to the access verification result.
2. The secure access method for H5 pages as claimed in claim 1, It is characterized in that When receiving the user's H5 page access request, obtaining the security level of the page to be accessed fed back by the server includes: When receiving an H5 page access request from a user, determining a startup type of the page to be accessed according to the H5 page access request; When the startup type is an access location restriction type, the H5 page access request is sent to the server, so that the server determines the current status of the restricted access rights corresponding to the page to be accessed according to the H5 page access request, and queries the security level of the page to be accessed according to the current status and provides feedback.
3. The secure access method for H5 pages as claimed in claim 1, It is characterized in that When the page to be accessed is opened on the target client, before the encryption interface of the page to be accessed is called at the target client according to the security level to obtain the verification signature value of the page to be accessed, the method further includes: When the security level of the page to be accessed is obtained, the access location of the page to be accessed is determined according to the UA string corresponding to the page to be accessed; When the access location of the page to be accessed is a target client, a step of calling the encryption interface of the page to be accessed at the target client according to the security level to obtain a verification signature value of the page to be accessed is performed.
4. The secure access method for H5 pages as claimed in claim 1, It is characterized in that When the page to be accessed is accessed in the target client, the encryption interface of the page to be accessed is called at the target client according to the security level to obtain the verification signature value of the page to be accessed, including: When the page to be accessed is accessed in the target client, determining the current version of the target client; When the current version is the target version, calling the encryption interface of the page to be accessed at the target client according to the security level, and obtaining a client signature value fed back by the target client according to the security level; Calculate the signature value according to the encryption interface to determine the page signature value; A verification signature value of the page to be accessed is obtained according to the page signature value and the client signature value.
5. The secure access method for H5 pages as claimed in claim 1, It is characterized in that The sending the verification signature value of the page to be accessed to the server so that the server performs access verification according to the verification signature value includes: The verification signature value of the page to be accessed is sent to the server, so that the server verifies the page signature value in the verification signature value; when the verification result of the page signature value is a passed result, the current state of the restricted access permission corresponding to the page to be accessed is obtained; when the current state is a preset open state, the client signature value in the verification signature value is verified, and the access verification result is obtained according to the verification result of the client signature value.
6. The method for securely accessing an H5 page according to any one of claims 1 to 5, It is characterized in that The securely accessing the page to be accessed according to the access verification result includes: When the access verification result is a verification pass result, securely access the page to be accessed according to the verification pass result; When the access verification result is a verification failure result, a springboard link corresponding to the to-be-accessed page is obtained according to the verification failure result, and the to-be-accessed page is securely accessed according to the springboard link.
7. A secure access device for H5 pages, It is characterized in that The secure access device of the H5 page includes: The acquisition module is used to obtain the security level of the page to be accessed fed back by the server when receiving the user's H5 page access request; A calling module, used for calling the encryption interface of the page to be accessed at the target client according to the security level to obtain the verification signature value of the page to be accessed when the page to be accessed is accessed in the target client; A sending module, used for sending the verification signature value of the page to be accessed to the server, so that the server performs access verification according to the verification signature value; The access module is used to perform secure access to the page to be accessed according to the access verification result.
8. A secure access device for H5 pages, It is characterized in that The device includes: a memory, a processor, and a secure access program for H5 pages stored in the memory and executable on the processor, wherein the secure access program for H5 pages is configured to implement the steps of the secure access method for H5 pages as described in any one of claims 1 to 6.
9. A storage medium, It is characterized in that The storage medium stores a secure access program for an H5 page, and when the secure access program for an H5 page is executed by a processor, the steps of the secure access method for an H5 page according to any one of claims 1 to 6 are implemented.
10. A computer program product, It is characterized in that The computer program product includes a secure access program for an H5 page, and when the secure access program for an H5 page is executed by a processor, the steps of the secure access method for an H5 page as described in any one of claims 1 to 6 are implemented.
