Method, apparatus and system for managing cluster access permission

By obtaining and updating access rights policies between clusters, listening to resource changes and dynamically managing permissions, the problem of insufficient flexibility in cluster access rights management in the existing technology is solved, and real-time and efficiency are improved.

WO2024045646A9PCT designated stage expired Publication Date: 2024-12-05JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/089635
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-09-01
Filing Date
2023-04-21
Publication Date
2024-12-05

AI Technical Summary

Technical Problem

The prior art has poor flexibility in managing cluster access rights, making it difficult to update and dynamically manage access rights between multiple clusters in real time.

Method used

By obtaining the access permission policy of the first cluster, listening to the resource changes of the associated cluster, automatically updating the access permission policy, and dynamically managing access permissions between clusters using the updated policies, including adding clusters between the first cluster and the second cluster. Identify annotations to limit access rights.

Benefits of technology

It improves the real-time and efficiency of managing cluster access rights, overcomes the problem of insufficient flexibility of existing methods, and realizes automated access rights management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023089635_05122024_PF_FP_ABST
    Figure CN2023089635_05122024_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure provides a method, apparatus and system for managing a cluster access permission, and an electronic device and a computer-readable medium. The present disclosure relates to the technical field of cloud computing. A particular embodiment of the method comprises: automatically acquiring an access permission policy of a first cluster managed in a plurality of clusters, and acquiring access permission information which is between the first cluster and one or more second clusters associated therewith and is included in the access permission policy; and when it is detected that resources of the one or more second clusters have changed, automatically updating the access permission information included in the access permission policy, so as to dynamically manage the plurality of clusters by using the updated access permission information.
Need to check novelty before this filing date? Find Prior Art

Description

Method, device and system for managing cluster access rights

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese patent application 202211064945.0, filed on September 1, 2022, with the disclosure name “A method, device and system for managing cluster access rights”. The contents disclosed in the above-mentioned Chinese patent application are hereby cited in their entirety as part or all of this application. Technical Field

[0003] The present disclosure relates to the field of cloud computing technology, and in particular to a method, device, and system for managing cluster access rights. Background Art

[0004] Data exchange between multiple clusters can often be leveraged to improve the data processing capabilities of internet application systems. Depending on the application's business scenario, managing access permissions between clusters is often necessary. Currently, access permissions between clusters are configured separately for each cluster requiring interaction, based on predefined access permissions (e.g., blacklists and whitelists).

[0005] Summary of the Invention

[0006] According to one or more embodiments of the present disclosure, a method for managing cluster access rights is provided, characterized in that it includes: obtaining an access rights policy of a first cluster; the access rights policy includes access rights information between the first cluster and one or more second clusters associated with it; when a change in the resources of any associated second cluster is detected, updating the access rights information corresponding to the second cluster included in the access rights policy according to the change result of the resources of the second cluster; and using the updated access rights policy to manage the access rights between the first cluster and the associated second cluster.

[0007] According to one or more embodiments of the present disclosure, the method for managing cluster access rights further includes: upon detecting a change in the resources of the first cluster, updating the access rights information corresponding to the first cluster contained in the access rights policy according to the change result of the first cluster resources; and using the updated access rights policy to manage the access rights between the first cluster and the associated second cluster.

[0008] According to one or more embodiments of the present disclosure, the updating of the access permission information corresponding to the second cluster contained in the access permission policy includes: adding an annotation containing the cluster identifier of the second cluster to the access permission information corresponding to the second cluster; indicating the situation where a resource change occurs in the second cluster through the cluster identifier contained in the annotation, so that when the first cluster accesses the second cluster, the access permission of the first cluster to the second cluster is limited through the access permission policy combined with the annotation.

[0009] According to one or more embodiments of the present disclosure, obtaining the access permission policy of the first cluster includes: obtaining configuration information of the first cluster; determining cluster information of one or more second clusters associated with the first cluster based on the configuration information; obtaining preset access permission information between the first cluster and one or more second clusters, and generating the access permission policy of the first cluster based on the preset access permission information.

[0010] According to one or more embodiments of the present disclosure, obtaining the preset access permission information between the first cluster and one or more second clusters includes: parsing the preset access permission information from a preset configuration file, and / or parsing the preset access permission information from custom permission data contained in the first cluster, wherein the custom permission data is obtained based on the expansion of cluster native permission data.

[0011] According to one or more embodiments of the present disclosure, the method for managing cluster access rights further includes: the first cluster includes a permission controller; and utilizing the permission controller to execute the steps of obtaining an access rights policy for the first cluster and updating the access rights policy.

[0012] According to one or more embodiments of the present disclosure, the method for managing cluster access rights further includes: using the permission controller to start a first controller and a second controller for the first cluster to which it belongs; using the first controller to monitor resource changes of the first cluster; and using the second controller to monitor resource changes of one or more second clusters associated with the first cluster.

[0013] According to one or more embodiments of the present disclosure, according to a second aspect of an embodiment of the present disclosure, there is provided an apparatus for managing cluster access rights, comprising: a policy acquisition module, a permission change module, and a permission management module; wherein,

[0014] The acquisition policy module is configured to acquire the access permission policy of the first cluster; the access permission policy includes access permission information between the first cluster and one or more second clusters associated with the first cluster;

[0015] The permission change module is configured to update the access permission information corresponding to the second cluster included in the access permission policy according to the change result of the resources of any associated second cluster when monitoring the change of the resources of the second cluster;

[0016] The management authority module is configured to manage the access authority between the first cluster and the associated second cluster using the updated access authority policy.

[0017] According to one or more embodiments of the present disclosure, the device for managing cluster access rights is further used to: upon detecting a change in the resources of the first cluster, update the access rights information corresponding to the first cluster contained in the access rights policy according to the change result of the first cluster resources; and use the updated access rights policy to manage the access rights between the first cluster and the associated second cluster.

[0018] According to one or more embodiments of the present disclosure, the device for managing cluster access rights is used to update the access rights information corresponding to the second cluster contained in the access rights policy, including: adding an annotation containing the cluster identifier of the second cluster to the access rights information corresponding to the second cluster; indicating a resource change in the second cluster through the cluster identifier contained in the annotation, so that when the first cluster accesses the second cluster, the access rights of the first cluster to the second cluster are limited through the access rights policy combined with the annotation.

[0019] According to one or more embodiments of the present disclosure, the device for managing cluster access rights is used to obtain the access rights policy of the first cluster, including: obtaining configuration information of the first cluster; determining cluster information of one or more second clusters associated with the first cluster based on the configuration information; obtaining preset access rights information between the first cluster and one or more second clusters, and generating the access rights policy of the first cluster based on the preset access rights information.

[0020] According to one or more embodiments of the present disclosure, the device for managing cluster access rights is used to obtain preset access rights information between the first cluster and one or more second clusters, including: parsing the preset access rights information from a preset configuration file, and / or parsing the preset access rights information from custom permission data contained in the first cluster, wherein the custom permission data is obtained based on the expansion of cluster native permission data.

[0021] According to one or more embodiments of the present disclosure, the device for managing cluster access rights is further configured to: the first cluster includes a rights controller; and utilize the rights controller to execute the steps of obtaining the access rights policy of the first cluster and updating the access rights policy.

[0022] According to one or more embodiments of the present disclosure, the device for managing cluster access rights is further used to: use the permission controller to start the first controller and the second controller for the first cluster to which it belongs; use the first controller to monitor resource changes of the first cluster; and use the second controller to monitor resource changes of one or more second clusters associated with the first cluster.

[0023] According to one or more embodiments of the present disclosure, a device for managing cluster access rights is provided, comprising: a policy acquisition module, a permission change module, and a permission management module; wherein,

[0024] The acquisition policy module is configured to acquire the access permission policy of the first cluster; the access permission policy includes access permission information between the first cluster and one or more second clusters associated with the first cluster;

[0025] The permission change module is configured to update the access permission information corresponding to the first cluster included in the access permission policy according to the change result of the first cluster resource when monitoring the change of the first cluster resource;

[0026] The management authority module is configured to manage the access authority between the first cluster and the associated second cluster using the updated access authority policy.

[0027] According to one or more embodiments of the present disclosure, a system for managing cluster access rights is provided, characterized in that it includes: multiple communicatively connected clusters; wherein one or more of the clusters is configured with the device for managing cluster access rights described in the second aspect or the device for managing cluster access rights described in the third aspect.

[0028] According to one or more embodiments of the present disclosure, an electronic device for managing cluster access rights is provided, characterized in that it includes: one or more processors; and a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any of the methods for managing cluster access rights described above.

[0029] According to one or more embodiments of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, wherein when the program is executed by a processor, any of the methods for managing cluster access rights described above is implemented.

[0030] The disclosed embodiments have the following advantages or beneficial effects: they can automatically obtain the access rights policy for a first cluster managed among multiple clusters; obtain access rights information between the first cluster and one or more associated second clusters, as contained in the access rights policy; automatically update the access rights information contained in the access rights policy upon detecting changes to resources in the one or more second clusters; and dynamically manage multiple clusters using the updated access rights information. The disclosed embodiments overcome the lack of flexibility in managing cluster access rights in existing methods and improve the real-time and efficiency of managing cluster access rights.

[0031] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The accompanying drawings are used to better understand the present disclosure and do not constitute an improper limitation of the present disclosure.

[0033] FIG1 is a flow chart of a method for managing cluster access rights provided by one embodiment of the present disclosure;

[0034] FIG2 is a schematic diagram of a managed cluster structure provided by an embodiment of the present disclosure;

[0035] FIG3 is a schematic diagram of a process for managing cluster access rights provided by an embodiment of the present disclosure;

[0036] FIG4 is a schematic structural diagram of an apparatus for managing cluster access rights provided by an embodiment of the present disclosure;

[0037] FIG5 is a schematic structural diagram of a system for managing cluster access rights provided by an embodiment of the present disclosure;

[0038] FIG6 is a diagram of an exemplary system architecture in which embodiments of the present disclosure may be applied;

[0039] FIG7 is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present disclosure. DETAILED DESCRIPTION

[0040] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0041] The disclosed embodiments provide a method, apparatus, and system for managing cluster access rights. These methods automatically obtain the access rights policy for a first cluster managed among multiple clusters; obtain access rights information between the first cluster and one or more associated second clusters, as contained in the access rights policy; automatically update the access rights information contained in the access rights policy upon detecting changes to resources of the one or more second clusters; and dynamically manage multiple clusters using the updated access rights information. The disclosed embodiments overcome the lack of flexibility inherent in existing methods for managing cluster access rights, improving the real-time and efficiency of managing cluster access rights.

[0042] As shown in FIG1 , an embodiment of the present disclosure provides a method for managing cluster access rights, which may include the following steps:

[0043] Step S101: Acquire the access permission policy of the first cluster; the access permission policy includes access permission information between the first cluster and one or more second clusters associated with it;

[0044] Specifically, in one embodiment of the present disclosure, the method for managing cluster access rights can be used for any one of the multiple clusters managed. Figure 2 shows multiple clusters with data interaction: cluster 1, cluster 2...cluster N; as shown in Figure 2, for cluster 1, cluster 1 has an association relationship with cluster 2, cluster 3, and cluster 4 (for example, data interaction, or data synchronization, etc.); then, when the first cluster is cluster 1, cluster 2, cluster 3, and cluster 4 are multiple second clusters associated with cluster 1; similarly, for cluster 2, cluster 2 has an association relationship with cluster 1 and cluster 4, then when the first cluster is cluster 2, cluster 1 and cluster 4 are multiple second clusters associated with cluster 2.

[0045] Furthermore, the access permission policy of the first cluster is obtained; wherein the access permission policy is a policy for interactive access permissions for node resources between multiple clusters. Taking the Kubernetes cluster as an example, in a Kubernetes cluster, each node pod has an independent IP address. According to the business scenario, pods between multiple Kubernetes clusters can access each other to achieve data interaction. Usually, when interacting with data, for one cluster, it is often necessary to manage the access permissions of other clusters that are allowed (or prohibited) to access and / or allowed (or prohibited) to be accessed, that is, to set the access permission policy of the first cluster.

[0046] Furthermore, obtaining the access rights policy of the first cluster includes: obtaining configuration information of the first cluster; determining cluster information of one or more second clusters associated with the first cluster based on the configuration information; obtaining preset access rights information between the first cluster and the one or more second clusters, and generating the access rights policy of the first cluster based on the preset access rights information. The obtained configuration information of the first cluster can be used to determine cluster information of each second cluster associated with the first cluster. For example, if the first cluster is Kubernetes cluster 1, the configuration file kubeconfig of Kubernetes cluster 1 itself is obtained, and the configuration files kubeconfig corresponding to multiple other clusters associated with Kubernetes cluster 1 are obtained. For the first cluster, the configuration files of the first cluster and the configuration files of the other clusters can be used to parse the second clusters associated with the first cluster. For example, if it is found that Kubernetes cluster 1 has a communication connection and data exchange with Kubernetes cluster 2 and Kubernetes cluster 3, it is determined that the second clusters associated with the first cluster Kubernetes cluster 1 include Kubernetes cluster 2, Kubernetes cluster 3, etc. Further, the preset access rights information between the first cluster and the one or more second clusters is obtained, and the access rights policy of the first cluster is generated based on the preset access rights information.Among them, the preset access permission information can be parsed from the configuration file configured by the R&D personnel for the first cluster; and / or parsed from the custom permission data of the first cluster; specifically, the access permission information can include: access direction: accessing other clusters or being accessed by other clusters (Ingress and / or Egress), the IP address segment allowed for access set for the access direction (including one or more port numbers associated with the IP address), or the IP address segment prohibited for access (including one or more port numbers associated with the IP address), the resource identifier allowed (or prohibited) for access (such as namespace identifier, node resource identifier, etc.), the communication protocol used for access, node type, node role, node whitelist, etc.; the preset configuration file can be a file containing various types of access permission information (for example, a text file, a database file, etc.); further, the first cluster contains custom Custom permission data is obtained by extending the cluster's native permission data. Taking the Kubernetes cluster as an example, custom permission data can be obtained by extending the Kubernetes cluster's native NetworkPolicy configuration. For example, custom permission data NewNpSpec of the CRD (CustomResourceDefinition) type is set. NewNpSpec is obtained by extending NpSpec, where NpSpec is the native permission data. The specific information of the native permission data is set in v1.NetworkPolicy. For example, in v1.NetworkPolicy, you can set which IP+Port nodes one or more pods can access in the egress direction, or which IP+Port nodes can be accessed in the ingress direction. The data example of NewNpSpec extending NpSpec is as follows:

[0047] type NewNpSpec struct{ / / NewNpSpec represents custom permission data

[0048] ClusterList[]string`json:"clusterlist…"` / / ClusterList represents a list of multiple clusters. The specific list data can be obtained from the data in json format;

[0049] NpSpec v1.NetworkPolicy`json:"npspec…"` / / NpSpec represents native permission data. Specific permission data can be obtained from the json format data.

[0050] That is, obtaining the preset access permission information between the first cluster and one or more second clusters includes: parsing the preset access permission information from a preset configuration file, and / or parsing the preset access permission information from the custom permission data contained in the first cluster, wherein the custom permission data is obtained based on the expansion of the cluster native permission data.

[0051] Furthermore, the access permission policy of the first cluster is generated based on the preset access permission information. It is understandable that the access permission policy includes specific access permission information.

[0052] Step S102: when it is monitored that a change occurs to the resources of any associated second cluster, the access permission information corresponding to the second cluster included in the access permission policy is updated according to the change result of the resources of the second cluster.

[0053] Specifically, the controller (e.g., controller1) contained in the first cluster can be used to monitor whether there are changes in the resources of one or more second clusters related to the first cluster according to set rules (e.g., set time intervals, business triggers, etc.), where resource changes include, for example, node resource addition, node resource update, node resource deletion, namespace resource change, etc. When a change is determined to have occurred, the access permission information related to the change result is updated according to the change result, that is, the access permission information corresponding to the second cluster contained in the relevant access permission policy is updated; for example, if cluster 1 monitors that cluster 2 deletes node 1, and node 1 is a node that cluster 1 prohibits access to in the access permission information, the access permission information can be updated accordingly (e.g., deleting the access permission information for node 1). Taking the kubernetes cluster as an example, after monitoring resource changes in any one or more second clusters, the ipBlock field (IP address segment contained in the access permission information) of the Ingress and Egress (access direction) in the NetworkPolicy associated with the first cluster can be dynamically filtered and updated according to the access permission information defined in the custom permission data, thereby achieving the technical effect of updating the access permission information corresponding to the second cluster contained in the access permission policy.

[0054] Furthermore, the first cluster monitors changes to the resources of any associated second cluster, and / or monitors changes to its own resources, that is, the first cluster monitors changes to the various resources it contains (for example, namespace resources, node resources, etc.). Specifically, the controller contained in the first cluster (for example, controller2) can be used to monitor changes to resources related to the first cluster according to set rules (for example, set time intervals, business triggers, etc.). When a change is determined to have occurred, the access permission information related to the change result is updated according to the change result, and the updated access permission policy is used to manage the access permissions between the first cluster and the associated second cluster. That is, when a change is monitored to the resources of the first cluster, the access permission information corresponding to the first cluster contained in the access permission policy is updated according to the change result of the first cluster resources; and the access permissions between the first cluster and the associated second cluster are managed using the updated access permission policy.

[0055] Further preferably, updating the access permission information corresponding to the second cluster contained in the access permission policy includes: adding an annotation containing the cluster identifier of the second cluster to the access permission information corresponding to the second cluster; indicating the situation where a resource change occurs in the second cluster through the cluster identifier contained in the annotation, so that when the first cluster accesses the second cluster, the access permission of the first cluster to access the second cluster is limited by the access permission policy combined with the annotation. Specifically, when updating the access permission information corresponding to the second cluster contained in the access permission policy for the first cluster, an annotation can be added to identify the second cluster where a resource change occurs, or the cluster itself; wherein, for example, the second cluster is cluster 2 and the cluster identifier is "cluster2", then an annotation in key-value format for "cluster2" can be added, such as key is newnpfrom and value is cluster2; similarly, when it is necessary to update the access permission information contained in the access permission policy for resource changes of the first cluster itself, an annotation in key-value format can be added, such as key is newnpfrom and value is the cluster identifier of the first cluster, such as cluster1. It can be understood that by combining the access permission policy with the added annotations, a historical record of updating the access permission policy of the first cluster due to resource changes in the first cluster and any cluster in one or more second clusters associated with the first cluster can be obtained, thereby improving the accuracy and efficiency of managing access permission policies.

[0056] Step S103: using the updated access permission policy to manage the access permission between the first cluster and the associated second cluster.

[0057] Specifically, the first cluster uses the access permission policy to manage the access permissions between the first cluster and the associated second cluster. For example, taking the kubernete cluster as an example, you can set which IP+Port corresponding nodes one or more pod nodes can access in the Egress direction (i.e., access permissions), or which IP+Port corresponding nodes can be accessed in the Ingress direction (i.e., access permissions). Furthermore, the first cluster can interact with the business server apiserver contained in the cluster through the access permission policy, and access the corresponding data layer through network plug-ins (such as calico, kube-router, cilium, etc.) to achieve access permission management.

[0058] As shown in FIG3 , an embodiment of the present disclosure provides a method for managing cluster access rights, which may include the following steps:

[0059] Step S301: The authority controller corresponding to the cluster is initialized to obtain configuration information.

[0060] Specifically, the first cluster includes a permission controller. It is understood that each of the multiple clusters managed by the embodiments of the method disclosed herein includes a permission controller. That is, the first cluster includes a permission controller; the permission controller is used to perform the steps of obtaining the access permission policy for the first cluster and updating the access permission policy.

[0061] Furthermore, an authority controller npcontroller may be installed and deployed for each cluster; the authority controller npcontroller may run in any node server of the cluster to which it belongs; or it may run in a server independent of each cluster.

[0062] Preferably, npcontroller can be used to obtain the configuration information of the first cluster during the initialization phase. The configuration information includes, for example, the first cluster configuration file (such as the kubeconfig file of the first cluster) and the second cluster configuration files (such as the kubeconfig file of the second cluster) of other managed clusters (including one or more second clusters). At the same time, the authority controller is also used to interact with the apiservers of multiple clusters.

[0063] Furthermore, the permission controller npcontroller may be used to execute the step of updating the access policy when detecting a change in the resources of any second cluster.

[0064] Step S302: Using the first controller to monitor resource changes of the first cluster. Specifically, using the authority controller to start the first controller and the second controller for the first cluster to which it belongs.

[0065] Step S303: using the second controller to monitor resource changes of one or more second clusters associated with the first cluster.

[0066] That is, the authority controller is used to start the first controller and the second controller for the first cluster to which it belongs; the first controller is used to monitor resource changes of the first cluster; and the second controller is used to monitor resource changes of one or more second clusters associated with the first cluster.

[0067] The order of step S302 and step S303 is only an example, and the order of the operations of step S302 and step S303 can be any one step first, or performed simultaneously.

[0068] Step S304: according to the change result of the resources of the second cluster, update the access permission information corresponding to the second cluster included in the access permission policy.

[0069] That is, the permission controller is used to execute the steps of obtaining the access permission policy of the first cluster and updating the access permission policy after monitoring resource changes of the second cluster.

[0070] The data layer can use plug-ins (for example, calico, kube-router, cilium, etc.) to dynamically monitor npcontroller's changes to the NetworkPolicy resources of this cluster (i.e., the first cluster), and automatically issue corresponding data layer rules to manage cluster access rights at the data level based on the data layer rules.

[0071] As shown in FIG4 , the embodiment of the present disclosure provides a device 400 for managing cluster access rights, including: a policy acquisition module 401 , a permission change module 402 , and a permission management module 403 ; wherein,

[0072] The acquisition policy module 401 is configured to acquire the access permission policy of the first cluster; the access permission policy includes access permission information between the first cluster and one or more second clusters associated with the first cluster;

[0073] The permission change module 402 is configured to update the access permission information corresponding to the second cluster included in the access permission policy according to the change result of the resources of any associated second cluster when monitoring the change of the resources of the second cluster;

[0074] The management permission module 403 is configured to manage the access permissions between the first cluster and the associated second cluster using the updated access permission policy.

[0075] In an embodiment of the present disclosure, when the permission change module 402 detects a change in the resources of the first cluster, it updates the access permission information corresponding to the first cluster contained in the access permission policy according to the change result of the first cluster resources; the permission management module 403 uses the updated access permission policy to manage the access permissions between the first cluster and the associated second cluster.

[0076] As shown in FIG5 , an embodiment of the present disclosure provides a system 500 for managing cluster access rights, comprising: a plurality of clusters connected by communication; wherein one or more of the clusters is configured with a device 400 for managing cluster access rights;

[0077] Among them, the device for managing cluster access rights 400 includes a permission change module 402, which is used to update the access permission information corresponding to the second cluster contained in the access permission policy according to the change result of the resources of any associated second cluster when a change is detected in the resources of the second cluster; or to update the access permission information corresponding to the first cluster contained in the access permission policy according to the change result of the resources of the first cluster when a change is detected in the resources of the first cluster.

[0078] An embodiment of the present disclosure also provides an electronic device for managing cluster access rights, including: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in any of the above embodiments.

[0079] An embodiment of the present disclosure further provides a computer-readable medium having a computer program stored thereon, and when the program is executed by a processor, the method provided in any of the above embodiments is implemented.

[0080] FIG. 6 shows an exemplary system architecture 600 to which the method for managing cluster access rights or the apparatus for managing cluster access rights according to an embodiment of the present disclosure can be applied.

[0081] As shown in Figure 6, system architecture 600 may include terminal devices 601, 602, and 603, a network 604, and a server 605. Network 604 is used to provide a medium for communication links between terminal devices 601, 602, and 603 and server 605. Network 604 may include various connection types, such as wired or wireless communication links or fiber optic cables.

[0082] Users can use terminal devices 601, 602, and 603 to interact with server 605 via network 604 to receive or send messages, etc. Various client applications can be installed on terminal devices 601, 602, and 603, such as e-commerce client applications, web browser applications, search applications, instant messaging tools, and email clients.

[0083] The terminal devices 601 , 602 , and 603 may be various electronic devices having a display screen and supporting various client applications, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0084] Server 605 can be a server that provides various services, such as a background management server that supports client applications used by users on terminal devices 601, 602, and 603. A cluster can include one or more servers 605; the background management server can process received service requests and feed back service data to the terminal devices.

[0085] It should be noted that the method for managing cluster access rights provided in the embodiment of the present disclosure is generally executed by the server 605 . Accordingly, the device for managing cluster access rights is generally provided in the server 605 .

[0086] It should be understood that the number of terminal devices, networks and servers in Figure 6 is merely illustrative and any number of terminal devices, networks and servers may be provided as required.

[0087] 7, which shows a schematic diagram of a computer system 700 suitable for implementing an embodiment of the present disclosure. The terminal device shown in FIG7 is merely an example and should not limit the functionality and scope of use of the embodiment of the present disclosure.

[0088] As shown in FIG7 , a computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage unit 708 into a random access memory (RAM) 703. Various programs and data required for the operation of the system 700 are also stored in the RAM 703. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0089] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, and the like; an output section 707 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 708 including a hard disk; and a communication section 709 including a network interface card such as a LAN card or a modem. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 710 as needed, so that computer programs read therefrom can be installed into the storage section 708 as needed.

[0090] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 709, and / or installed from a removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present disclosure are performed.

[0091] It should be noted that the computer-readable medium described in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, or any suitable combination thereof.

[0092] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0093] The modules and / or units involved in the embodiments described in the present disclosure may be implemented in software or in hardware. The modules and / or units described may also be provided in a processor. For example, they may be described as follows: a processor includes an acquisition policy module, a change permission module, and a management permission module. The names of these modules do not, in some cases, constitute a limitation on the module itself. For example, the acquisition policy module may also be described as a "module for acquiring the access permission policy of the first cluster."

[0094] As another aspect, the present disclosure also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: obtaining an access permission policy of a first cluster; the access permission policy includes access permission information between the first cluster and one or more second clusters associated with it; when a change is detected in the resources of any associated second cluster, the access permission information corresponding to the second cluster included in the access permission policy is updated according to the change result of the resources of the second cluster; and the access permission between the first cluster and the associated second cluster is managed using the updated access permission policy.

[0095] The disclosed embodiments automatically obtain the access rights policy for a first cluster among multiple clusters; obtain the access rights information between the first cluster and one or more associated second clusters, as contained in the access rights policy; and automatically update the access rights information contained in the access rights policy upon detecting changes to resources in the one or more second clusters; thereby dynamically managing multiple clusters using the updated access rights information. The disclosed embodiments overcome the limited flexibility of existing methods for managing cluster access rights, improving the real-time and efficiency of managing cluster access rights.

[0096] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.

Claims

1. A method for managing cluster access rights, comprising: Get the access permission policy of the first cluster; The access permission policy includes access permission information between the first cluster and one or more second clusters associated with the first cluster; When a change is detected in resources of any associated second cluster, updating the access permission information corresponding to the second cluster included in the access permission policy according to the change result of the resources of the second cluster; The updated access permission policy is used to manage the access permission between the first cluster and the associated second cluster.

2. The method according to claim 1, further comprising: When a change is detected in resources of the first cluster, updating the access permission information corresponding to the first cluster included in the access permission policy according to the change result of the resources of the first cluster; The updated access permission policy is used to manage the access permission between the first cluster and the associated second cluster.

3. The method according to claim 1, wherein: Updating the access permission information corresponding to the second cluster included in the access permission policy includes: An annotation including the cluster identifier of the second cluster is added to the access permission information corresponding to the second cluster; the cluster identifier included in the annotation is used to indicate a resource change in the second cluster; and when the first cluster accesses the second cluster, the access permission of the first cluster to access the second cluster is limited by combining the access permission policy with the annotation.

4. The method according to claim 1, wherein: Get the access permission policy of the first cluster, including: Obtain configuration information of the first cluster; determine, based on the configuration information, cluster information of one or more second clusters associated with the first cluster; The preset access permission information between the first cluster and one or more second clusters is obtained, and the access permission policy of the first cluster is generated based on the preset access permission information.

5. The method according to claim 4, wherein: Acquiring preset access permission information between the first cluster and one or more of the second clusters includes: Parsing the preset access permission information from a preset configuration file, and / or, The preset access permission information is parsed from the custom permission data included in the first cluster, wherein the custom permission data is obtained by expanding the native permission data of the cluster.

6. The method according to claim 1, further comprising: The first cluster includes an authority controller; The permission controller is used to execute the steps of obtaining the access permission policy of the first cluster and updating the access permission policy.

7. The method according to claim 6, further comprising: Using the authority controller to start a first controller and a second controller for the first cluster to which the authority controller belongs; Using the first controller to monitor resource changes of the first cluster; The second controller is used to monitor resource changes of one or more second clusters associated with the first cluster.

8. A device for managing cluster access rights, comprising: Get policy module, change authority module and management authority module; among them, The policy acquisition module is used to acquire the access permission policy of the first cluster; the access permission policy includes access permission information between the first cluster and one or more second clusters associated with it; The change authority module is used to monitor the resource of any associated second cluster. When the source is changed, updating the access permission information corresponding to the second cluster included in the access permission policy according to the change result of the resources of the second cluster; The management permission module is used to manage the access permission between the first cluster and the associated second cluster by using the updated access permission policy.

9. The apparatus according to claim 8, further comprising: When the permission change module monitors that the resources of the first cluster are changed, the permission change module updates the access permission information corresponding to the first cluster included in the access permission policy according to the change result of the resources of the first cluster; The updated access permission policy is used by the management permission module to manage the access permission between the first cluster and the associated second cluster.

10. A system for managing cluster access rights, comprising: A plurality of communicatively connected clusters; wherein one or more of the clusters is configured with the device for managing cluster access rights as claimed in claim 8 or the device for managing cluster access rights as claimed in claim 9.

11. An electronic device, comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

12. A computer readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.