Cross-domain resource sharing management method and device, terminal and storage medium
By obtaining the operating status of the cross-domain resource sharing mechanism items and the corresponding cross-domain website list on the browser, and managing cross-domain resource access, it solves the problem of sensitive information leakage caused by cross-domain operations of the browser and improves network security.
Patent Information
- Application Number
- CN202310871222.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-14
- Publication Date
- 2025-01-14
AI Technical Summary
When using browsers to perform cross-domain operations, it is easy to lead to leakage of sensitive information and cause network security issues.
By obtaining the operating status of the cross-domain resource sharing mechanism item on the browser service, determine the corresponding cross-domain website list, and manage cross-domain resource access based on the list, restrict and allow cross-domain resource access, and avoid malicious websites stealing user data.
It effectively avoids malicious websites using cross-domain operations to steal user sensitive information, improves network security, and simplifies the steps for users to perform cross-domain operations.
Smart Images

Figure CN119316165A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a cross-domain resource sharing management method, device, terminal and storage medium. Background Art
[0002] In recent years, with the rapid development of information technology, accessing various resources through browsers has become a part of people's lives. When using browsers to access the Internet, there is a need for cross-domain operations. However, cross-domain operations can easily lead to sensitive information leakage and cause network security issues. Summary of the invention
[0003] The embodiments of the present application provide a cross-domain resource sharing management method, device, terminal and storage medium, which can solve the need for cross-domain operations when surfing the Internet using a browser, but the technical problem that cross-domain operations easily lead to sensitive information leakage.
[0004] In a first aspect, an embodiment of the present application provides a cross-domain resource sharing management method, the method comprising:
[0005] Acquire the running status of a cross-domain resource sharing mechanism item on the browser service, where the cross-domain resource sharing mechanism item is a function item corresponding to the cross-domain resource sharing mechanism integrated on the browser service;
[0006] Determine a list of cross-domain websites corresponding to the running status;
[0007] In response to the cross-domain resource access operation for the browser service, cross-domain resource access management is performed on the target website corresponding to the cross-domain resource access operation based on the cross-domain website list.
[0008] Optionally, the determining a list of cross-domain websites corresponding to the running state includes:
[0009] Determining a mechanism operation type corresponding to the operation state;
[0010] A cross-domain website list corresponding to the mechanism operation type is obtained from a reference cross-domain website list corresponding to at least one reference operation status type.
[0011] Optionally, the reference operation state type includes a global open state and a global closed state for the cross-domain resource sharing mechanism item;
[0012] The reference cross-domain website list includes a cross-domain website blacklist corresponding to the global open state and a cross-domain website whitelist corresponding to the global closed state.
[0013] Optionally, performing cross-domain resource access management on a target website corresponding to the cross-domain resource access operation based on the cross-domain website list includes:
[0014] Determine a target website corresponding to the cross-domain resource access operation, and perform list matching processing on the target website based on the cross-domain website list to obtain a list matching result;
[0015] Based on the cross-domain website list and the list matching result, the operation management type for the target website is determined, and cross-domain resource access management is performed on the target website based on the operation management type.
[0016] Optionally, determining the operation management type for the target website based on the cross-domain website list and the list matching result includes:
[0017] If the cross-domain website list is a cross-domain website blacklist and the list matching result is a list matching type, the operation management type for the target website is a cross-domain access blocking type;
[0018] If the cross-domain website list is a cross-domain website blacklist and the list matching result is a list mismatch type, the operation management type for the target website is a cross-domain access permission type;
[0019] If the cross-domain website list is a cross-domain website whitelist and the list matching result is a list matching type, the operation management type for the target website is a cross-domain access permission type;
[0020] If the cross-domain website list is a cross-domain website whitelist and the list matching result is a list mismatch type, the operation management type for the target website is a cross-domain access blocking type.
[0021] Optionally, performing cross-domain resource access management on the target website based on the operation management type includes:
[0022] If the operation management type is a type that allows cross-domain access, cross-domain resource access is allowed to the target website corresponding to the cross-domain resource access operation;
[0023] If the operation management type is a cross-domain access blocking type, cross-domain resource access to the target website corresponding to the cross-domain resource access operation is blocked.
[0024] Optionally, before obtaining the running status of the cross-origin resource sharing mechanism item on the browser service, the method further includes:
[0025] A reference cross-domain website update list issued by a management platform is obtained, and a cross-domain website blacklist corresponding to the global open state and a cross-domain website whitelist corresponding to the global closed state are updated based on the reference cross-domain website update list.
[0026] Optionally, after updating the cross-domain website blacklist corresponding to the global open state and the cross-domain website whitelist corresponding to the global closed state based on the reference cross-domain website update list, the method further includes:
[0027] In response to the target user's update operation on the reference cross-domain website update list, the cross-domain website blacklist or the cross-domain URL whitelist is updated.
[0028] In a second aspect, an embodiment of the present application further provides a cross-domain resource sharing management device, the device comprising:
[0029] An acquisition module, adapted to acquire the running status of a cross-domain resource sharing mechanism item on a browser service, wherein the cross-domain resource sharing mechanism item is a function item corresponding to the cross-domain resource sharing mechanism integrated on the browser service;
[0030] A determination module, adapted to determine a list of cross-domain websites corresponding to the running state;
[0031] The response module is adapted to respond to the cross-domain resource access operation for the browser service and perform cross-domain resource access management on the target website corresponding to the cross-domain resource access operation based on the cross-domain website list.
[0032] Optionally, the determination module is further adapted to determine a mechanism operation type corresponding to the operation state;
[0033] A cross-domain website list corresponding to the mechanism operation type is obtained from a reference cross-domain website list corresponding to at least one reference operation status type.
[0034] Optionally, the reference operation state type includes a global open state and a global closed state for the cross-domain resource sharing mechanism item;
[0035] The reference cross-domain website list includes a cross-domain website blacklist corresponding to the global open state and a cross-domain website whitelist corresponding to the global closed state.
[0036] Optionally, the response module is adapted to determine a target website corresponding to the cross-domain resource access operation, and perform list matching processing on the target website based on the cross-domain website list to obtain a list matching result;
[0037] Based on the cross-domain website list and the list matching result, the operation management type for the target website is determined, and cross-domain resource access management is performed on the target website based on the operation management type.
[0038] Optionally, the response module is adapted to, if the cross-domain website list is a cross-domain website blacklist and the list matching result is a list matching type, then the operation management type for the target website is a cross-domain access blocking type;
[0039] If the cross-domain website list is a cross-domain website blacklist and the list matching result is a list mismatch type, the operation management type for the target website is a cross-domain access permission type;
[0040] If the cross-domain website list is a cross-domain website whitelist and the list matching result is a list matching type, the operation management type for the target website is a cross-domain access permission type;
[0041] If the cross-domain website list is a cross-domain website whitelist and the list matching result is a list mismatch type, the operation management type for the target website is a cross-domain access blocking type.
[0042] Optionally, the response module is adapted to allow cross-domain resource access to the target website corresponding to the cross-domain resource access operation if the operation management type is a type that allows cross-domain access;
[0043] If the operation management type is a cross-domain access blocking type, cross-domain resource access to the target website corresponding to the cross-domain resource access operation is blocked.
[0044] Optionally, the device also includes a first update module, which is suitable for obtaining a reference cross-domain website update list issued by the management platform, and updating the cross-domain website blacklist corresponding to the global open state and the cross-domain website whitelist corresponding to the global closed state based on the reference cross-domain website update list.
[0045] Optionally, the device further comprises a second updating module, wherein the second updating module is adapted to update the cross-domain website blacklist or the cross-domain URL whitelist in response to an update operation of the target user on the reference cross-domain website update list.
[0046] In a third aspect, an embodiment of the present application further provides a terminal, the terminal comprising:
[0047] Processor; and
[0048] A memory arranged to store computer executable instructions which, when executed, cause the processor to perform any of the methods described above.
[0049] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, implement any of the methods described above.
[0050] The beneficial effects brought about by the technical solutions provided in some embodiments of the present application include at least:
[0051] The embodiment of the present application provides a cross-domain resource sharing management method. First, the running status of the cross-domain resource sharing mechanism item on the browser service is obtained. By providing a user with a visualized cross-domain resource sharing mechanism item, the user is prevented from performing cross-domain operations through cumbersome steps such as command lines. Then, a list of cross-domain websites corresponding to the running status is determined. Different running statuses of cross-domain resource sharing mechanism items correspond to different cross-domain website lists. Based on the cross-domain website list, the cross-domain resource access operation of the browser under the running status of different cross-domain resource sharing mechanism items is restricted, thereby preventing malicious websites from stealing user data across domains.
[0052] Finally, when responding to a cross-domain resource access operation for a browser service, cross-domain resource access management is performed on the target website corresponding to the cross-domain resource access operation based on the cross-domain website list, so as to determine whether the target website can perform cross-domain resource access based on the cross-domain website list, thereby avoiding malicious websites from using cross-domain operations to steal users' sensitive information, thereby solving the need for cross-domain operations when using a browser to access the Internet, but the technical problem that cross-domain operations easily lead to the leakage of sensitive information. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0054] Figure 1 An exemplary system architecture diagram of a cross-domain resource sharing management method provided in an embodiment of the present application;
[0055] Figure 2 A flow chart of a cross-domain resource sharing management method provided in an embodiment of the present application;
[0056] Figure 3 A schematic diagram of a process for determining a cross-domain website list corresponding to an operating state provided in an embodiment of the present application;
[0057] Figure 4 A schematic diagram of a process for cross-domain resource access management provided in an embodiment of the present application;
[0058] Figure 5 A schematic diagram of a specific process for cross-domain resource access management provided in an embodiment of the present application;
[0059] Figure 6 Another specific flow chart of cross-domain resource access management provided in the embodiment of the present application;
[0060] Figure 7 A schematic diagram of the structure of a cross-domain resource sharing management device provided in an embodiment of the present application;
[0061] Figure 8 A schematic diagram of the structure of a terminal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0062] In order to make the features and advantages of the embodiments of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of them. Based on the embodiments in the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the embodiments of the present application.
[0063] In recent years, with the rapid development of information technology, accessing various resources through browsers has become a part of people's lives. When using a browser to access the Internet, there is a need for cross-domain operations. However, some malicious websites use cross-domain operations to steal users' sensitive information, such as user accounts, user passwords, and some verification information, which causes sensitive information to be leaked when users browse the web, thus causing serious network security issues. Usually, due to the same-origin security policy, browsers will prohibit cross-domain requests. However, when facing developers or specific websites that need to perform cross-domain operations, completely prohibiting cross-domain requests will affect the normal operation of the business.
[0064] In order to solve the above technical problems, the present application embodiment provides a cross-origin resource sharing (CORS, Cross-Origin Resource Sharing The invention discloses a cross-domain resource sharing management method, firstly, obtaining the running state of a cross-domain resource sharing mechanism item on a browser service, wherein the cross-domain resource sharing mechanism item is a function item corresponding to the cross-domain resource sharing mechanism integrated on the browser service, and providing a user with a visualized cross-domain resource sharing mechanism item to avoid the user from performing cross-domain operations through cumbersome steps such as command lines; then, determining a list of cross-domain websites corresponding to the running state, wherein different running states of the cross-domain resource sharing mechanism items correspond to different cross-domain website lists, and restricting the cross-domain resource access operation of the browser under the running state of different cross-domain resource sharing mechanism items based on the cross-domain website list; finally, when responding to a cross-domain resource access operation for the browser service, performing cross-domain resource access management on a target website corresponding to the cross-domain resource access operation based on the cross-domain website list, thereby judging whether the target website can perform cross-domain resource access based on the cross-domain website list, avoiding malicious websites from using cross-domain operations to steal sensitive information of users, thereby solving the technical problem that there is a need for cross-domain operations when using a browser to surf the Internet, but sensitive information leakage is easily caused when performing cross-domain operations.
[0065] See also Figure 1 , Figure 1 An exemplary system architecture diagram of a cross-domain resource sharing management method provided in an embodiment of the present application.
[0066] like Figure 1 As shown, the system architecture may include a terminal 101, a network 102, and a server 103. The network 102 is used to provide a medium for a communication link between the terminal 101 and the server 103. The network 102 may include various types of wired communication links or wireless communication links, for example, the wired communication link includes an optical fiber, a twisted pair, or a coaxial cable, and the wireless communication link includes a Bluetooth communication link, a Wireless-Fidelity (Wi-Fi) communication link, or a microwave communication link.
[0067] The terminal 101 can interact with the server 103 through the network 102 to receive messages from the server 103 or send messages to the server 103, or the terminal 101 can interact with the server 103 through the network 102 to receive messages or data sent by other users to the server 103. The terminal 101 can be hardware or software. When the terminal 101 is hardware, it can be various terminals, including but not limited to smart watches, smart phones, tablet computers, laptop portable computers and desktop computers. When the terminal 101 is software, it can be installed in the terminals listed above, which can be implemented as multiple software or software modules (for example: used to provide distributed services), or it can be implemented as a single software or software module, which is not specifically limited here.
[0068] In an embodiment of the present application, terminal 101 can obtain the running status of the cross-domain resource sharing mechanism item on the browser service, where the cross-domain resource sharing mechanism item is a functional item corresponding to the cross-domain resource sharing mechanism integrated on the browser service; then, determine the cross-domain website list corresponding to the running status; finally, in response to the cross-domain resource access operation for the browser service, perform cross-domain resource access management on the target website corresponding to the cross-domain resource access operation based on the cross-domain website list.
[0069] The server 103 may be a business server that provides various services. It should be noted that the server 103 may be hardware or software. When the server 103 is hardware, it may be implemented as a distributed server cluster consisting of multiple servers, or it may be implemented as a single server. When the server 103 is software, it may be implemented as multiple software or software modules (for example, for providing distributed services), or it may be implemented as a single software or software module, which is not specifically limited here.
[0070] Alternatively, the system architecture may not include the server 103. In other words, the server 103 may be an optional device in the embodiments of this specification. That is, the method provided in the embodiments of this specification may be applied to a system structure that only includes the terminal 101, and the embodiments of this application do not limit this.
[0071] It should be understood that Figure 1 The number of terminals, networks and servers in the figure is only for illustration and any number of terminals, networks and servers may be used according to implementation requirements.
[0072] See also Figure 2 , Figure 2A flow chart of a cross-domain resource sharing management method provided for an embodiment of the present application. The execution subject of the embodiment of the present application can be a terminal that executes the cross-domain resource sharing management method, or a processor in the terminal that executes the cross-domain resource sharing management method, or a cross-domain resource sharing management service in the terminal that executes the cross-domain resource sharing management method. For the convenience of description, the specific execution process of the cross-domain resource sharing management method is introduced below by taking the execution subject as the processor in the terminal as an example.
[0073] S202: Acquire the running status of the cross-domain resource sharing mechanism item on the browser service, where the cross-domain resource sharing mechanism item is a function item corresponding to the cross-domain resource sharing mechanism integrated on the browser service.
[0074] Cross-origin resource sharing is a mechanism that allows resources in the current domain to be accessed by script requests from other domains. Usually, browsers prohibit such cross-origin requests due to the same-origin security policy. In order to enable the browser service to provide a simple cross-origin resource sharing function and avoid the tedious opening and closing of cross-origin resource sharing through the command line, a visual cross-origin resource sharing mechanism item is provided to users, so that users can conveniently open or close the function item based on the cross-origin resource sharing mechanism item.
[0075] In addition, in order to improve the user experience, the running status of the cross-domain resource sharing mechanism item on the browser service can be stored locally or in the cloud after being set by the user. When the browser is opened again, the running status of the cross-domain resource sharing mechanism item when the user last used the browser can be restored from the local or cloud.
[0076] It should be noted that the domain name address corresponding to the domain may include the protocol, subdomain, primary domain, port and request resource address. Cross-domain can be understood as the two domains have different protocols, different primary domains, different subdomains or different ports and there is a cross-domain request between the two domains. If the protocol, subdomain, primary domain and port in the domain name address corresponding to the two domains are the same, the two domains can be regarded as the same domain.
[0077] Specifically, take the URL "http: / / www.abc.com:1010 / a,b,c" as an example, where "http: / / " is the protocol, "www" is the subdomain, "abc.com" is the main domain, "1010" is the port, and "a,b,c" is the requested resource address. When there is a difference in at least one of the protocols, main domains, subdomains, and ports between the two domains in a cross-domain request, there is a cross-domain between the two domains.
[0078] Furthermore, the running state of the cross-domain resource sharing mechanism item on the browser service includes at least two mechanism running types, where the at least two mechanism running types may include a mechanism type corresponding to a global open state and a mechanism type corresponding to a global closed state. When the running state of the cross-domain resource sharing mechanism item on the browser service is a global open state, users can perform cross-domain resource sharing between domains based on the browser service; when the running state of the cross-domain resource sharing mechanism item on the browser service is a global closed state, it is generally difficult for users to perform cross-domain resource sharing between domains based on the browser service. Of course, after the cross-domain website list is introduced into the cross-domain resource sharing mechanism, when the running state of the cross-domain resource sharing mechanism item on the browser service is a global open state, the cross-domain website list can limit the cross-domain resource sharing of some domains; when the running state of the cross-domain resource sharing mechanism item on the browser service is a global closed state, the cross-domain website list can enable some domains to perform cross-domain resource sharing. The running status of the cross-domain resource sharing mechanism item on the browser service can be judged based on the current network security environment. For example, when the user believes that the current network security environment is relatively safe, the global open state can be turned on. When the user believes that the current network security environment is poor, the global closed state can be turned on.
[0079] S204: Determine a list of cross-domain websites corresponding to the running status.
[0080] Different running states have their own corresponding cross-domain website lists. When the running state of the cross-domain resource sharing mechanism item on the browser service is globally enabled, the corresponding cross-domain website list contains a cross-domain website blacklist; when the running state of the cross-domain resource sharing mechanism item on the browser service is globally disabled, the corresponding cross-domain website list contains a cross-domain website whitelist.
[0081] Among them, the cross-domain resource sharing mechanism is based on the cross-domain website blacklist, which can prohibit websites corresponding to other domains from sharing cross-domain resources with websites corresponding to each domain in the list, and websites corresponding to each domain in the cross-domain website blacklist are prohibited from sharing cross-domain resources; on the contrary, the cross-domain resource sharing mechanism is based on the cross-domain website whitelist, which can allow websites corresponding to each domain in the list to share cross-domain resources. Here, unknown security websites and malicious websites can be included in the cross-domain website blacklist, and some websites that need to share cross-domain resources can be included in the cross-domain website whitelist, so as to improve the user experience while preventing the user's sensitive information from being stolen by malicious websites.
[0082] See also Figure 3 , Figure 3 A flowchart of determining a list of cross-domain websites corresponding to an operating status provided in an embodiment of the present application.
[0083] Optionally, determining the cross-domain website list corresponding to the running status in step S204 includes:
[0084] S302: Determine the mechanism operation type corresponding to the operation state.
[0085] The mechanism operation type corresponding to the operation state may include a mechanism type corresponding to the global open state and a mechanism type corresponding to the global closed state. The corresponding operation state is obtained by determining the mechanism operation type. When the mechanism operation type corresponding to the operation state is the mechanism type corresponding to the global open state, the operation state is the global open state; when the mechanism operation type corresponding to the operation state is the mechanism type corresponding to the global closed state, the operation state is the global closed state.
[0086] S304: Acquire a cross-domain website list corresponding to the mechanism operation type from a reference cross-domain website list corresponding to at least one reference operation status type.
[0087] The browser pre-stores multiple reference operation status types and their corresponding reference cross-domain website lists. The reference operation status types include the global open state and the global closed state for the cross-domain resource sharing mechanism item. The reference cross-domain website list includes a cross-domain website blacklist corresponding to the global open state and a cross-domain website whitelist corresponding to the global closed state.
[0088] By acquiring the mechanism operation type, based on the first mapping relationship between the mechanism operation type and the pre-established mechanism operation type and the reference operation state type, the reference operation state type corresponding to the acquired mechanism operation type and the reference cross-domain website list corresponding to the reference operation state type can be directly obtained. At this time, the cross-domain website list corresponding to the mechanism operation type can be directly obtained from the reference cross-domain website list corresponding to a reference operation state type. After acquiring the mechanism operation type, when the mechanism operation type is matched with multiple reference operation state types pre-stored in the browser, the cross-domain website list corresponding to the mechanism operation type is obtained from the reference cross-domain website list corresponding to multiple reference operation state types.
[0089] S206: In response to the cross-domain resource access operation for the browser service, cross-domain resource access management is performed on the target website corresponding to the cross-domain resource access operation based on the cross-domain website list.
[0090] When a user loads a website or loads a website based on a browser, the loaded website or the loaded website can perform a cross-domain resource access operation for the cross-domain resource sharing mechanism in the browser service. At this time, the processor of the terminal where the browser is located responds to the cross-domain resource access operation for the browser service, and performs cross-domain resource access management on the target website corresponding to the cross-domain resource access operation based on the running status of the cross-domain resource sharing mechanism item on the browser service and its corresponding cross-domain website list. Here, the number of target websites can be one or more. The target website can be the website corresponding to the domain that initiates the cross-domain resource access operation, or it can be the website corresponding to the domain that receives the cross-domain resource access operation. Cross-domain resource access management can include allowing cross-domain access operations and refusing cross-domain access operations.
[0091] See also Figure 4 , Figure 4 A schematic diagram of a process for cross-domain resource access management provided in an embodiment of the present application.
[0092] Optionally, in step S206, cross-domain resource access management is performed on the target website corresponding to the cross-domain resource access operation based on the cross-domain website list, including:
[0093] S402: Determine a target website corresponding to the cross-domain resource access operation, and perform list matching processing on the target website based on the cross-domain website list to obtain a list matching result.
[0094] The target website corresponding to the cross-domain resource access operation includes the website of the domain corresponding to the initiating cross-domain resource access operation, and may also include the website of the domain corresponding to the receiving cross-domain resource access operation. Of course, the target website corresponding to the cross-domain resource access operation may include both the website of the domain corresponding to the initiating cross-domain resource access operation and the website of the domain corresponding to the receiving cross-domain resource access operation.
[0095] When the target website includes the website of the domain corresponding to the initiating cross-domain resource access operation, the cross-domain resource access operation of the website has not yet been issued to the websites corresponding to other domains. Based on the cross-domain website list, the website of the domain corresponding to the initiating cross-domain resource access operation is matched with the list to obtain the list matching result, so as to determine whether to allow or prohibit the issuance of the cross-domain resource access operation.
[0096] When the target website includes a website of the domain corresponding to the cross-domain resource access operation, the cross-domain resource access operation of the website has not yet returned the requested resource to the website corresponding to the domain sending the cross-domain resource access operation. Based on the cross-domain website list, a list matching process is performed on the website of the domain corresponding to the cross-domain resource access operation to obtain a list matching result, thereby determining whether to allow or prohibit returning the requested resource.
[0097] It should be noted that cross-domain resource access includes issuing a cross-domain resource access operation and returning the requested resources. When the target website includes both the website of the domain corresponding to the initiating cross-domain resource access operation and the website of the domain corresponding to the receiving cross-domain resource access operation, firstly, the website of the domain corresponding to the initiating cross-domain resource access operation is subjected to a list matching process to obtain a list matching result. If the website is allowed to issue a cross-domain resource access operation, then the website of the domain corresponding to the receiving cross-domain resource access operation is subjected to a list matching process to obtain a list matching result. If the requested resources are allowed to be returned, the cross-domain resource access is successful. However, when the website of the domain corresponding to the initiating cross-domain resource access operation is refused to issue a cross-domain resource access operation or the website of the domain corresponding to the receiving cross-domain resource access operation is refused to return the requested resources, the cross-domain resource access fails.
[0098] S404: Based on the cross-domain website list and the list matching result, determine the operation management type for the target website, and perform cross-domain resource access management on the target website based on the operation management type.
[0099] Optionally, in step S404, based on the cross-domain website list and the list matching result, determining the operation management type for the target website includes:
[0100] The first case: If the cross-domain website list is a cross-domain website blacklist and the list matching result is a list matching type, the operation management type for the target website is to block cross-domain access.
[0101] When the operation state of the cross-domain resource sharing mechanism item on the browser service is globally enabled, the corresponding cross-domain website list is a cross-domain website blacklist, and the list matching result based on the cross-domain website blacklist is a list matching type, then the operation management type for the target website is a cross-domain access blocking type. Here, the cross-domain blocking type of cross-domain access corresponds to blocking cross-domain resource access, and blocking cross-domain resource access may include at least one of blocking the issuance of a cross-domain resource access operation and blocking the return of the requested resource.
[0102] The second case: if the cross-domain website list is a cross-domain website blacklist and the list matching result is a list mismatch type, the operation management type for the target website is to allow cross-domain access.
[0103] When the operation state of the cross-domain resource sharing mechanism item on the browser service is globally enabled, the corresponding cross-domain website list is a cross-domain website blacklist, and the list matching result based on the cross-domain website blacklist is a list mismatch type, then the operation management type for the target website is a cross-domain access type. Here, the cross-domain access type may correspond to cross-domain resource access, and cross-domain resource access may include at least one of allowing a cross-domain resource access operation to be issued and allowing the requested resource to be returned.
[0104] The third case: If the cross-domain website list is a cross-domain website whitelist and the list matching result is a list matching type, the operation management type for the target website is to allow cross-domain access.
[0105] When the running state of the cross-domain resource sharing mechanism item on the browser service is a global closed state, the corresponding cross-domain website list is a cross-domain website whitelist, and the list matching result based on the cross-domain website whitelist is a list matching type, then the operation management type for the target website is a cross-domain access type. Here, the cross-domain access type can correspond to allowing cross-domain resource access, and allowing cross-domain resource access can include at least one of allowing a cross-domain resource access operation to be issued and allowing the requested resource to be returned.
[0106] The fourth case: If the cross-domain website list is a cross-domain website whitelist and the list matching result is a list mismatch type, the operation management type for the target website is to block cross-domain access.
[0107] When the running state of the cross-domain resource sharing mechanism item on the browser service is a global closed state, the corresponding cross-domain website list is a cross-domain website whitelist, and the list matching result based on the cross-domain website whitelist is a list mismatch type, then the operation management type for the target website is a cross-domain access blocking type. Here, the cross-domain access blocking type may correspond to blocking cross-domain resource access, and blocking cross-domain resource access may include at least one of blocking the issuance of a cross-domain resource access operation and blocking the return of a requested resource.
[0108] Optionally, performing cross-domain resource access management on the target website based on the operation management type in step S404 includes:
[0109] If the operation management type is to allow cross-domain access, cross-domain resource access is allowed to the target website corresponding to the cross-domain resource access operation;
[0110] If the operation management type is to block cross-domain access, cross-domain resource access to the target website corresponding to the cross-domain resource access operation is blocked.
[0111] When the operation management type is determined to be a type that allows cross-domain access, cross-domain resource access is allowed to the target website corresponding to the cross-domain resource access operation. The target website may include a website that initiates the domain corresponding to the cross-domain resource access operation and a website that receives the domain corresponding to the cross-domain resource access operation. Allowing cross-domain resource access to the target website corresponding to the cross-domain resource access operation includes allowing the target website to issue a cross-domain resource access operation or allowing the target website to return the requested resources.
[0112] When it is determined that the operation management type is a cross-domain access blocking type, cross-domain resource access is blocked for the target website corresponding to the cross-domain resource access operation. The target website may include a website in the domain corresponding to the initiating cross-domain resource access operation and a website in the domain corresponding to the receiving cross-domain resource access operation. Blocking cross-domain resource access for the target website corresponding to the cross-domain resource access operation includes blocking the target website from issuing a cross-domain resource access operation or blocking the target website from returning the requested resource.
[0113] Optionally, before obtaining the running status of the cross-origin resource sharing mechanism item on the browser service in step S202, the method further includes:
[0114] Obtain the reference cross-domain website update list issued by the management platform, and update the cross-domain website blacklist corresponding to the global open state and the cross-domain website whitelist corresponding to the global closed state based on the reference cross-domain website update list.
[0115] The management platform can interact with the terminal where the browser is located through the network, and the management platform can interact with one or more terminals. The administrator sends a reference cross-domain website update list to the terminal where the browser is located on the management platform. The reference cross-domain website update list can include a reference cross-domain website update blacklist and a reference cross-domain website update whitelist. Afterwards, the cross-domain website blacklist corresponding to the global open state is updated based on the reference cross-domain website update blacklist in the reference cross-domain website update list, and the cross-domain website whitelist corresponding to the global closed state is updated based on the reference cross-domain website update whitelist in the reference cross-domain website update list.
[0116] By updating the cross-domain website blacklist and cross-domain URL whitelist, the cross-domain website blacklist and cross-domain URL whitelist can be set in time based on website security to avoid network security incidents or affect the normal use of users due to the long-term non-update of the cross-domain website blacklist and cross-domain URL whitelist. For example, the website in the cross-domain URL whitelist is maliciously hijacked, resulting in user data leakage, and the URL in the cross-domain website blacklist can be removed from the cross-domain website blacklist after re-security assessment. In addition, the cross-domain website blacklist and cross-domain URL whitelist can be batch updated for the browsers on each terminal based on the management platform.
[0117] Optionally, after updating the cross-domain website blacklist corresponding to the global open state and the cross-domain website whitelist corresponding to the global closed state based on the reference cross-domain website update list, the method further includes:
[0118] In response to the target user's update operation on the reference cross-domain website update list, the cross-domain website blacklist or the cross-domain URL whitelist is updated.
[0119] The target user can manually update the cross-domain website blacklist or cross-domain URL whitelist. For example, when the target user is a developer, the cross-domain website blacklist or cross-domain URL whitelist can be set based on the actual needs of the developer to improve the developer's work efficiency.
[0120] See also Figure 5 , Figure 5 A schematic diagram of a specific process for cross-domain resource access management provided in an embodiment of the present application.
[0121] In an embodiment provided by the present application, when the running state of the cross-domain resource sharing mechanism item on the browser service is globally enabled, performing cross-domain resource access management may include:
[0122] S502: The browser accesses the website.
[0123] Users can access websites based on browsers, for example, through search boxes, URLs, etc.
[0124] S504: Determine whether the website belongs to the cross-domain website blacklist.
[0125] The website is matched based on the cross-domain website blacklist to determine whether the website is in the cross-domain website blacklist.
[0126] S506A: When the website is on the cross-domain website blacklist, the browser prohibits the website from cross-domain access.
[0127] When the website is on the cross-domain website blacklist, the browser prohibits the website from cross-domain access, including preventing the website from issuing a cross-domain resource access operation or preventing the website from returning the requested resource.
[0128] S506B: When the website is not in the cross-domain website blacklist, the browser allows the website to be accessed across domains.
[0129] When the website is not in the cross-domain website blacklist, the browser allows the website to access the website across domains, including allowing the website to issue a cross-domain resource access operation or allowing the website to return the requested resource.
[0130] See also Figure 6 , Figure 6 Another specific flow chart of cross-domain resource access management provided in an embodiment of the present application.
[0131] In an embodiment provided by the present application, when the running state of the cross-domain resource sharing mechanism item on the browser service is in a globally closed state, performing cross-domain resource access management may include:
[0132] S602: The browser accesses the website.
[0133] The relevant contents in step S602 may refer to step S502 and will not be described again here.
[0134] S604: Determine whether the website belongs to the cross-domain website whitelist.
[0135] The website is matched based on the cross-domain website whitelist to determine whether the website is in the cross-domain website whitelist.
[0136] S606A: When the website is on the cross-domain website whitelist, the browser allows the website to be accessed across domains.
[0137] When the website is on the cross-domain website whitelist, the browser allows the website to access the website across domains, including allowing the website to issue a cross-domain resource access operation or allowing the website to return the requested resource.
[0138] S606B: When the website is not in the cross-domain website whitelist, the browser prohibits cross-domain access to the website.
[0139] When the website is not in the cross-domain website whitelist, the browser prohibits the website from cross-domain access, including preventing the website from issuing a cross-domain resource access operation or preventing the website from returning the requested resource.
[0140] An embodiment of the present application also provides a computer-readable storage medium, which can store multiple instructions, and the instructions are suitable for being loaded by a processor and executing the steps of any method in the above embodiments.
[0141] See also Figure 7 , Figure 7 A schematic diagram of the structure of a cross-domain resource sharing management device provided in an embodiment of the present application.
[0142] The embodiment of the present application provides a cross-domain resource sharing management device 700, which includes:
[0143] The acquisition module 710 is adapted to acquire the running status of the cross-domain resource sharing mechanism item on the browser service, where the cross-domain resource sharing mechanism item is a function item corresponding to the cross-domain resource sharing mechanism integrated on the browser service;
[0144] A determination module 720, adapted to determine a list of cross-domain websites corresponding to the running state;
[0145] The response module 730 is adapted to respond to the cross-domain resource access operation for the browser service and perform cross-domain resource access management on the target website corresponding to the cross-domain resource access operation based on the cross-domain website list.
[0146] Optionally, the determination module 720 is further adapted to determine a mechanism operation type corresponding to the operation state;
[0147] A cross-domain website list corresponding to the mechanism operation type is obtained from a reference cross-domain website list corresponding to at least one reference operation status type.
[0148] Optionally, the reference operation state type includes a global open state and a global closed state for the cross-domain resource sharing mechanism item;
[0149] The reference cross-domain website list includes a cross-domain website blacklist corresponding to the global open state and a cross-domain website whitelist corresponding to the global closed state.
[0150] Optionally, the response module 730 is adapted to determine a target website corresponding to the cross-domain resource access operation, and perform list matching processing on the target website based on the cross-domain website list to obtain a list matching result;
[0151] Based on the cross-domain website list and the list matching results, the operation management type for the target website is determined, and cross-domain resource access management is performed on the target website based on the operation management type.
[0152] Optionally, the response module 730 is adapted to, if the cross-domain website list is a cross-domain website blacklist and the list matching result is a list matching type, then the operation management type for the target website is a cross-domain access blocking type;
[0153] If the cross-domain website list is a cross-domain website blacklist and the list matching result is a list mismatch type, the operation management type for the target website is to allow cross-domain access;
[0154] If the cross-domain website list is a cross-domain website whitelist and the list matching result is a list matching type, the operation management type for the target website is to allow cross-domain access;
[0155] If the cross-domain website list is a cross-domain website whitelist and the list matching result is a list mismatch type, the operation management type for the target website is a cross-domain access blocking type.
[0156] Optionally, the response module 730 is adapted to allow cross-domain resource access to the target website corresponding to the cross-domain resource access operation if the operation management type is a cross-domain access permission type;
[0157] If the operation management type is to block cross-domain access, cross-domain resource access to the target website corresponding to the cross-domain resource access operation is blocked.
[0158] Optionally, the cross-domain resource sharing management device 700 also includes a first update module, which is suitable for obtaining a reference cross-domain website update list issued by the management platform, and updating a cross-domain website blacklist corresponding to the global open state and a cross-domain website whitelist corresponding to the global closed state based on the reference cross-domain website update list.
[0159] Optionally, the cross-domain resource sharing management device 700 further includes a second updating module, which is adapted to update the cross-domain website blacklist or the cross-domain URL whitelist in response to the target user's update operation on the reference cross-domain website update list.
[0160] See also Figure 8 , Figure 8 A schematic diagram of the structure of a terminal provided in an embodiment of the present application. Figure 8 As shown, the terminal 800 may include: at least one processor 801 , at least one network interface 804 , a user interface 803 , a memory 805 , and at least one communication bus 802 .
[0161] The communication bus 802 is used to realize the connection and communication between these components.
[0162] The user interface 803 may include a display screen (Display) and a camera (Camera), and the optional user interface 803 may also include a standard wired interface and a wireless interface.
[0163] The network interface 804 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0164] Among them, the processor 801 may include one or more processing cores. The processor 801 uses various interfaces and lines to connect various parts in the entire terminal 800, and executes various functions and processes data of the terminal 800 by running or executing instructions, programs, code sets or instruction sets stored in the memory 805, and calling data stored in the memory 805. Optionally, the processor 801 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 801 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 801, and it can be implemented separately through a chip.
[0165] Among them, the memory 805 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory, ROM). Optionally, the memory 805 includes a non-transitory computer-readable storage medium. The memory 805 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 805 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned method embodiments, etc.; the data storage area may store data involved in the above-mentioned method embodiments, etc. The memory 805 may optionally be at least one storage device located away from the aforementioned processor 801. As Figure 8 As shown, the memory 805 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a cross-domain resource sharing management program.
[0166] exist Figure 8 In the terminal 800 shown, the user interface 803 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 801 can be used to call the cross-domain resource sharing management program stored in the memory 805, and specifically perform the following operations:
[0167] Acquire the running status of a cross-domain resource sharing mechanism item on the browser service, where the cross-domain resource sharing mechanism item is a function item corresponding to the cross-domain resource sharing mechanism integrated on the browser service;
[0168] Determine a list of cross-domain websites corresponding to the running status;
[0169] In response to the cross-domain resource access operation for the browser service, cross-domain resource access management is performed on the target website corresponding to the cross-domain resource access operation based on the cross-domain website list.
[0170] Optionally, when the processor 801 determines the cross-domain website list corresponding to the running state, the processor 801 specifically performs the following steps:
[0171] Determine the mechanism operation type corresponding to the operation state;
[0172] A cross-domain website list corresponding to the mechanism operation type is obtained from a reference cross-domain website list corresponding to at least one reference operation status type.
[0173] Optionally, the reference operation state type includes a global open state and a global closed state for the cross-domain resource sharing mechanism item;
[0174] The reference cross-domain website list includes a cross-domain website blacklist corresponding to the global open state and a cross-domain website whitelist corresponding to the global closed state.
[0175] Optionally, when the processor 801 performs cross-domain resource access management on a target website corresponding to the cross-domain resource access operation based on the cross-domain website list, the following steps are specifically performed:
[0176] Determine the target website corresponding to the cross-domain resource access operation, and perform list matching processing on the target website based on the cross-domain website list to obtain a list matching result;
[0177] Based on the cross-domain website list and the list matching results, the operation management type for the target website is determined, and cross-domain resource access management is performed on the target website based on the operation management type.
[0178] Optionally, when the processor 801 determines the operation management type for the target website based on the cross-domain website list and the list matching result, the following steps are specifically performed:
[0179] If the cross-domain website list is a cross-domain website blacklist and the list matching result is a list matching type, the operation management type for the target website is to block cross-domain access;
[0180] If the cross-domain website list is a cross-domain website blacklist and the list matching result is a list mismatch type, the operation management type for the target website is to allow cross-domain access;
[0181] If the cross-domain website list is a cross-domain website whitelist and the list matching result is a list matching type, the operation management type for the target website is to allow cross-domain access;
[0182] If the cross-domain website list is a cross-domain website whitelist and the list matching result is a list mismatch type, the operation management type for the target website is a cross-domain access blocking type.
[0183] Optionally, when the processor 801 performs cross-domain resource access management on the target website based on the operation management type, the following steps are specifically performed:
[0184] If the operation management type is to allow cross-domain access, cross-domain resource access is allowed to the target website corresponding to the cross-domain resource access operation;
[0185] If the operation management type is to block cross-domain access, cross-domain resource access to the target website corresponding to the cross-domain resource access operation is blocked.
[0186] Optionally, before the processor 801 obtains the running status of the cross-origin resource sharing mechanism item on the browser service, it further executes the following steps:
[0187] Obtain the reference cross-domain website update list issued by the management platform, and update the cross-domain website blacklist corresponding to the global open state and the cross-domain website whitelist corresponding to the global closed state based on the reference cross-domain website update list.
[0188] Optionally, after updating the cross-domain website blacklist corresponding to the global open state and the cross-domain website whitelist corresponding to the global closed state based on the reference cross-domain website update list, the processor 801 further performs the following steps:
[0189] In response to the target user's update operation on the reference cross-domain website update list, the cross-domain website blacklist or the cross-domain URL whitelist is updated.
[0190] In the several embodiments provided in the embodiments of the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0191] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0192] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
[0193] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0194] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present application are not limited by the described order of actions, because according to the embodiments of the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of the present application.
[0195] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0196] The above is a description of a cross-domain resource sharing management method, device, terminal and storage medium provided in an embodiment of the present application. For technical personnel in this field, according to the ideas of the embodiments of the present application, there may be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the embodiments of the present application.
Claims
1. A cross-domain resource sharing management method, wherein: The method comprises: Acquire the running status of a cross-domain resource sharing mechanism item on the browser service, where the cross-domain resource sharing mechanism item is a function item corresponding to the cross-domain resource sharing mechanism integrated on the browser service; Determine a list of cross-domain websites corresponding to the running status; In response to the cross-domain resource access operation for the browser service, cross-domain resource access management is performed on the target website corresponding to the cross-domain resource access operation based on the cross-domain website list.
2. The method according to claim 1, wherein: The determining of the cross-domain website list corresponding to the running state includes: Determining a mechanism operation type corresponding to the operation state; A cross-domain website list corresponding to the mechanism operation type is obtained from a reference cross-domain website list corresponding to at least one reference operation status type.
3. The method according to claim 2, wherein: The reference operation state type includes a global open state and a global closed state for the cross-domain resource sharing mechanism item; The reference cross-domain website list includes a cross-domain website blacklist corresponding to the global open state and a cross-domain website whitelist corresponding to the global closed state.
4. The method according to claim 1, wherein: The performing cross-domain resource access management on the target website corresponding to the cross-domain resource access operation based on the cross-domain website list includes: Determine a target website corresponding to the cross-domain resource access operation, and perform list matching processing on the target website based on the cross-domain website list to obtain a list matching result; Based on the cross-domain website list and the list matching result, the operation management type for the target website is determined, and cross-domain resource access management is performed on the target website based on the operation management type.
5. The method according to claim 4, wherein: The determining the operation management type of the target website based on the cross-domain website list and the list matching result includes: If the cross-domain website list is a cross-domain website blacklist and the list matching result is a list matching type, the operation management type for the target website is a cross-domain access blocking type; If the cross-domain website list is a cross-domain website blacklist and the list matching result is a list mismatch type, the operation management type for the target website is a cross-domain access permission type; If the cross-domain website list is a cross-domain website whitelist and the list matching result is a list matching type, the operation management type for the target website is a cross-domain access permission type; If the cross-domain website list is a cross-domain website whitelist and the list matching result is a list mismatch type, the operation management type for the target website is a cross-domain access blocking type.
6. The method according to claim 5, wherein: The performing cross-domain resource access management on the target website based on the operation management type includes: If the operation management type is a type that allows cross-domain access, cross-domain resource access is allowed to the target website corresponding to the cross-domain resource access operation; If the operation management type is a cross-domain access blocking type, cross-domain resource access to the target website corresponding to the cross-domain resource access operation is blocked.
7. The method of claim 3, wherein: Before obtaining the running status of the cross-origin resource sharing mechanism item on the browser service, it also includes: A reference cross-domain website update list issued by a management platform is obtained, and a cross-domain website blacklist corresponding to the global open state and a cross-domain website whitelist corresponding to the global closed state are updated based on the reference cross-domain website update list.
8. A cross-domain resource sharing management device, wherein: The device comprises: An acquisition module, adapted to acquire the running status of a cross-domain resource sharing mechanism item on a browser service, wherein the cross-domain resource sharing mechanism item is a function item corresponding to the cross-domain resource sharing mechanism integrated on the browser service; A determination module, adapted to determine a list of cross-domain websites corresponding to the running state; The response module is adapted to respond to the cross-domain resource access operation for the browser service and perform cross-domain resource access management on the target website corresponding to the cross-domain resource access operation based on the cross-domain website list.
9. A terminal, wherein: The terminal includes: Processor; and A memory arranged to store computer executable instructions which, when executed, cause the processor to perform a method according to any one of claims 1 to 7.
10. A computer-readable storage medium, wherein: The computer-readable storage medium stores one or more programs, which, when executed by a processor, implement the method of any one of claims 1 to 7.