Permission configuration method, device, system, electronic device and readable medium

By generating and storing permission configuration templates, the complexity of permission management and security risks in the version control platform are solved, high concurrency and integrated development are achieved, and management efficiency and security are improved.

CN110795137BActive Publication Date: 2024-10-18JINGDONG TECH HLDG CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN201810879951.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-08-03
Publication Date
2024-10-18
Estimated Expiration
2038-08-03

AI Technical Summary

Technical Problem

When managing code permissions, existing version control platforms have problems such as overly complex permission configuration files, security risks, lack of visual management interfaces, inability to integrate other platforms, incomplete approval and review, low scalability, and insufficient monitoring mechanisms.

Method used

By obtaining permission management requests, parsing port information, generating permission configuration templates according to the data warehouse type, and storing the templates in the data warehouse to complete permission configuration, it provides a visual interface and rich calling interfaces, and matches corresponding permission templates according to different branch strategies.

Benefits of technology

It improves the efficiency and security of permission management, supports high concurrency and large data volume, provides statistics and monitoring mechanisms for global permission distribution, and meets audit specifications and integrated development needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110795137B_ABST
    Figure CN110795137B_ABST
Patent Text Reader

Abstract

The present application provides a permission configuration method, device, system, electronic device and readable medium, the permission configuration method comprising: obtaining a permission management request, the permission management request including port information; parsing the permission management request according to the port information; generating a permission configuration template for the parsed permission management request according to the data warehouse type; and storing the permission configuration template in the data warehouse to complete the permission configuration. The permission configuration method, device, system, electronic device and readable medium of the present application can match the permission configuration of the corresponding permission template according to different branch strategies on the basis of providing a visual interface and a rich calling interface, and solve user conflicts and high concurrency problems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a permission configuration method, device, system, electronic device and readable medium. Background Art

[0002] With the rapid development of the Internet industry, the product iteration speed of enterprises is very fast. R&D efficiency, as the key to product iteration, plays a very important role in it. What is closely related to product development is the source code, which is the most important resource of a company. Therefore, a version control platform for hosting code came into being. For example, SVN (Subversion) is one of the current mainstream version control tools. With the continuous expansion of software development scale and the continuous increase in development complexity, how to efficiently and securely manage code permissions in the version control platform is a problem that every company needs to solve. Taking SVN as an example, there are generally two mainstream permission management methods. One of them is that the permission administrator manually edits the permission configuration file of the code library. However, with the increase in the number of users, it will be difficult to rely on a very small number of administrators to manually maintain the configuration file. This is reflected in the increase in the number of users, which makes the permission configuration file too much, increasing the difficulty for administrators to understand and manage; relying on manual operation of the configuration file is prone to introduce redundancy and other error information, and cannot guarantee the simplicity and correctness of the file content; lack of a friendly and simple visual management interface. The shortcomings of the above method are as follows:

[0003] a) It is necessary to remotely log in to the code server, which is cumbersome;

[0004] b) The security performance requirements of the code server are relatively high, and frequent remote logins will pose security risks;

[0005] c) It is not possible to intuitively see the permissions of each person on any branch;

[0006] d) No interface is open to the outside world and cannot be integrated with other platforms;

[0007] e) There is no complete approval and review process and it does not comply with audit standards;

[0008] f) It is easy to make mistakes when operating without a beautiful UI interface;

[0009] The other is to use open source software, such as svnMaia, which can manage permissions visually, but it does not have the ability to integrate with other systems, such as connecting with the ERP system to ensure the cleanup of permissions after leaving the company, and it cannot generate different permission templates according to different branch strategies. The disadvantages of open source software are as follows:

[0010] a) It is relatively black box, and few people can understand its internal logic implementation mechanism in detail;

[0011] b) It is relatively closed, without rich interfaces to provide calls, and almost impossible to integrate with other platforms for development;

[0012] c) Low scalability. In many cases, it cannot meet the needs of high concurrency and large data volumes.

[0013] d) The UI design is simple and cannot easily display the current permission configuration from various dimensions;

[0014] e) Lack of statistical functions, unable to obtain a global understanding of the rights allocation;

[0015] f) The lack of monitoring mechanism and security rule configuration mechanism poses certain risks to the allocation of permissions. Summary of the invention

[0016] In view of this, the present application provides a permission configuration method, device, system, electronic device and computer-readable medium, which can match corresponding permission templates according to different branch strategies to complete permission configuration on the basis of providing a visual interface and a rich calling interface, and solve user conflicts and high concurrency problems.

[0017] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.

[0018] According to the first aspect of an embodiment of the present application, a permission configuration method is proposed, which includes: obtaining a permission management request, wherein the permission management request includes port information; parsing the permission management request according to the port information; generating a permission configuration template for the parsed permission management request according to a data warehouse type; and storing the permission configuration template in a data warehouse to complete the permission configuration.

[0019] In an exemplary embodiment of the present application, it also includes: receiving the permission management request from the user; and adding the permission management request to a processing queue.

[0020] In an exemplary embodiment of the present application, obtaining the rights management request includes: obtaining the rights management request through a distributed service.

[0021] In an exemplary embodiment of the present application, generating a permission configuration template for a parsed permission management request according to a data warehouse type includes: generating a permission configuration template for a parsed permission management request through a branch mode according to a data warehouse type; or generating a permission configuration template for a parsed permission management request through a free mode according to a data warehouse type.

[0022] In an exemplary embodiment of the present application, the permission management request includes a permission management request of an SVN version control tool; generating a permission configuration template for the parsed permission management request according to the data warehouse type includes: a simple SVN path authentication processing factory generates a permission configuration template for the parsed permission management request according to the data warehouse type.

[0023] In an exemplary embodiment of the present application, a simple SVN path authentication processing factory generates a permission configuration template for a parsed permission management request according to a data warehouse type, including: the simple SVN path authentication processing factory generates a corresponding processing object according to the data warehouse type; and the processing object calls a path authentication processing method to perform permission setting to generate the permission configuration template.

[0024] In an exemplary embodiment of the present application, the simple SVN path authentication processing factory generates corresponding processing objects according to the data warehouse type in at least one of the following situations: the simple SVN path authentication processing factory generates a classic branch multi-authentication processing object according to the data warehouse type to generate the permission configuration template; the simple SVN path authentication processing factory generates a branch multi-authentication processing object according to the data warehouse type to generate the permission configuration template; and the simple SVN path authentication processing factory generates a document authentication processing object according to the data warehouse type to generate the permission configuration template.

[0025] In an exemplary embodiment of the present application, the processing object calls the path authentication processing method to perform permission setting to generate the permission configuration template, including: generating a permission setting object by creating an SVN path authentication setting method; and the processing object calls the path authentication processing method to perform permission setting on the permission setting object to generate the permission configuration template.

[0026] In an exemplary embodiment of the present application, storing the permission configuration template in a data warehouse to complete the permission configuration includes: rewriting multiple functions in the data warehouse according to the permission configuration template to complete the permission configuration.

[0027] In an exemplary embodiment of the present application, rewriting multiple functions in the data warehouse according to the permission configuration template to complete the permission configuration includes at least one of the following: rewriting the configAuthView function in the data warehouse according to the permission configuration template to complete the permission configuration; rewriting the configAuth function in the data warehouse according to the permission configuration template to complete the permission configuration; rewriting the rsyncSvnServerAuth function in the data warehouse according to the permission configuration template to complete the permission configuration; rewriting the configAuthViewAdd function in the data warehouse according to the permission configuration template to complete the permission configuration; and rewriting the configAuthViewDelete function in the data warehouse according to the permission configuration template to complete the permission configuration.

[0028] According to the second aspect of an embodiment of the present application, a permission configuration device is proposed, which includes: a receiving module for obtaining a permission management request, wherein the permission management request includes port information; a parsing module for parsing the permission management request according to the port information; a template module for generating a permission configuration template for the parsed permission management request according to a data warehouse type; and a configuration module for storing the permission configuration template in a data warehouse to complete the permission configuration.

[0029] According to the third aspect of the embodiment of the present application, a permission configuration system is proposed, which includes: a configuration system for obtaining a permission management request, wherein the permission management request includes port information; and parsing the permission management request according to the port information; and generating a permission configuration template for the parsed permission management request according to the data warehouse type; an SVN data warehouse, for receiving the permission configuration template, and completing the permission configuration according to the right configuration template.

[0030] According to the fourth aspect of an embodiment of the present application, an electronic device is proposed, which includes: 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 any of the permission configuration methods described above.

[0031] According to a fifth aspect of an embodiment of the present application, a computer-readable medium is provided, on which a computer program is stored, characterized in that when the program is executed by a processor, a permission configuration method as described in any one of the above items is implemented.

[0032] According to the permission configuration method, device, electronic device and computer-readable medium of the present application, it is possible to match corresponding permission templates according to different branch strategies to complete permission configuration on the basis of providing a visual interface and a rich calling interface, and solve user conflicts and high concurrency problems.

[0033] It is to be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application. The drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0035] Figure 1 The present invention is a system block diagram showing a permission configuration method and device according to an exemplary embodiment.

[0036] Figure 2 The figure is a flowchart of a permission configuration method according to an exemplary embodiment.

[0037] Figure 3 The figure is a flowchart of a permission configuration method according to an exemplary embodiment.

[0038] Figure 4 The figure is a flowchart of a permission configuration method according to an exemplary embodiment.

[0039] Figure 5 It is a design framework diagram of a permission configuration method according to an exemplary embodiment.

[0040] Figure 6 The figure is a schematic diagram of an SVN showing a method for configuring permissions according to an exemplary embodiment.

[0041] Figure 7 It is a class diagram showing a permission configuration method according to an exemplary embodiment.

[0042] Figure 8 The figure is a block diagram of a permission configuration device according to an exemplary embodiment.

[0043] Fig. 9 The figure is a block diagram of a permission configuration device according to an exemplary embodiment.

[0044] Fig.10 It is a block diagram of an electronic device for permission configuration according to an exemplary embodiment. DETAILED DESCRIPTION

[0045] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that the present invention will be comprehensive and complete and fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.

[0046] The described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present invention. However, those skilled in the art will appreciate that the technical solution of the present invention may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring various aspects of the present invention.

[0047] The accompanying drawings are only schematic illustrations of the present invention, and the same reference numerals in the drawings represent the same or similar parts, so their repeated description will be omitted. Some block diagrams shown in the accompanying drawings do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0048] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and steps, nor must they be executed in the order described. For example, some steps can be decomposed, and some steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0049] Exemplary embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0050] Figure 1 The present invention is a system block diagram showing a permission configuration method and device according to an exemplary embodiment.

[0051] The server 105 may be a server that provides various services, such as a backend server (for example only) that provides support for the rights management request submission system operated by the user using the terminal devices 101, 102, and 103. The backend server may analyze and process the received rights management request and other data, and feed back the processing result (for example, a notification of successful rights creation - for example only) to the terminal device.

[0052] Server 105 may, for example, obtain a permission management request, which includes port information; server 105 may, for example, parse the permission management request based on the port information; server 105 may, for example, generate a permission configuration template for the parsed permission management request based on the data warehouse type; server 105 may, for example, store the permission configuration template in the data warehouse to complete the permission configuration; server 105 may also, for example, receive a permission management request from a user; and add the permission management request to a processing queue.

[0053] Server 105 can be a physical server, and can also be composed of multiple servers, for example. A part of server 105 can be used as the permission configuration task receiving system in the present application, for receiving tasks to execute permission configuration commands; and a part of server 105 can also be used as the permission configuration system in the present application, for obtaining a permission management request, which includes port information; parsing the permission management request according to the port information; generating a permission configuration template for the parsed permission management request according to the data warehouse type; and storing the permission configuration template in the data warehouse to complete the permission configuration.

[0054] It should be noted that the permission configuration method provided in the embodiment of the present application can be executed by the server 105, and accordingly, the permission configuration device can be set in the server 105. The request end provided to the user for permission configuration request and obtaining permission configuration results is generally located in the terminal devices 101, 102, and 103.

[0055] Figure 2 is a flowchart of a method for configuring permissions according to an exemplary embodiment. Figure 2 The method of permission configuration shown can match corresponding permission templates according to different branch strategies to complete permission configuration on the basis of providing a visual interface and rich calling interfaces, and solve user conflicts and high concurrency problems.

[0056] Next, we will refer to Figure 2 , the permission configuration method in the exemplary embodiment of the present application is described.

[0057] In step S210, a permission management request is obtained, and the permission management request includes port information. According to an example embodiment, obtaining a permission management request may include: obtaining a permission management request through a distributed service. Distributed deployment can improve the system's requirements for high concurrency and facilitate expansion. For example, a call to a gateway project can be completed through a distributed permission configuration service to complete inter-process communication and inter-system message notification, but the technical solution of the present invention is not limited to this. Among them, a permission configuration general interface service can be added to parse and read SVN permission files. The upper layer of the permission configuration general interface service is the SVN warehouse permission management module, which can provide services to the permission view web-side call upward, and call the permission configuration downward to implement the processing of SVN permissions through the interface service.

[0058] According to an example embodiment, step S210 may further include: receiving a permission management request from a user; and adding the permission management request to a processing queue. The processing queue mode provides an asynchronous processing mechanism, solving the problem of conflicts caused by a large number of users setting permissions simultaneously and intensively.

[0059] In step S220, the permission management request is parsed according to the port information. For example, a permission configuration general interface service can be added to the lower layer of the SVN repository permission management module to provide services to the permission view web end to call upward, and call the permission configuration downward to implement the processing of SVN permissions through the interface service.

[0060] In step S230, a permission configuration template is generated for the parsed permission management request according to the data warehouse type, wherein the type of the data warehouse may be, for example, a classic branch development strategy.

[0061] According to an example embodiment, generating a permission configuration template for a parsed permission management request according to a data warehouse type includes: generating a permission configuration template for a parsed permission management request through a branch mode according to a data warehouse type; or generating a permission configuration template for a parsed permission management request through a free mode according to a data warehouse type. Among them, the permission configuration may include two core classes, namely a branch mode and a free mode. In the branch mode, the root directory and base cannot add read and write permissions, while the free mode can set permissions for any path. The permission inheritance processing logic of the above two modes is the same, and the logic of permission processing is analyzed from the following three points.

[0062] (1) Permission overlay. For example, if read-only permission is set on branch 1.0.0 first, and then read-only permission is set on its parent branches, then branch 1.0.0 will be marked as inherited permission in the database, that is, the read-only permission of the parent branches overwrites the read-only permission of the next branch 1.0.0 (read and write permissions will not be overwritten, only the same permissions will be overwritten). At this time, the read-only permission previously set on the 1.0.0 branch cannot be deleted.

[0063] (2) Inherited user permissions cannot be deleted. Regardless of whether the sub-directory has individual permissions set, as long as the upper level has permissions, the sub-directory permissions cannot be deleted. Conversely, deleting the root directory permissions will delete all inherited permissions below, making the permissions what you see is what you get.

[0064] (3) If a subdirectory inherits the permissions of the previous level, then the permissions cannot be set separately. For example, if the root directory is set with read and write permissions, then all the subdirectories below it cannot be set with read and write permissions separately.

[0065] According to an example embodiment, the permission management request may include a permission management request of an SVN version control tool; generating a permission configuration template for the parsed permission management request according to the data warehouse type may include: the simple SVN path authentication processing factory generates a permission configuration template for the parsed permission management request according to the data warehouse type. The simple SVN path authentication processing factory may be a simple factory method, which may obtain an object in the warehouse that sets permissions for a path according to the path information.

[0066] According to an example embodiment, the simple SVN path authentication processing factory generates a permission configuration template for the parsed permission management request according to the data warehouse type, including: the simple SVN path authentication processing factory generates a corresponding processing object according to the data warehouse type; and the processing object calls the path authentication processing method to perform permission setting to generate a permission configuration template. For example, the above three processing objects may include: a classic branch multi-authentication processing object, a branch multi-authentication processing object, and a document authentication processing object.

[0067] According to an example embodiment, the simple SVN path authentication processing factory generates corresponding processing objects according to the data warehouse type, which may include at least one of the following situations: the simple SVN path authentication processing factory generates a classic branch multi-authentication processing object according to the data warehouse type to generate a permission configuration template; the simple SVN path authentication processing factory generates a branch multi-authentication processing object according to the data warehouse type to generate a permission configuration template; and the simple SVN path authentication processing factory generates a document authentication processing object according to the data warehouse type to generate a permission configuration template. As mentioned above, the above three objects should be selected according to the type of the data warehouse.

[0068] According to an example embodiment, the processing object calls the path authentication processing method to perform permission setting to generate a permission configuration template, including: generating a permission setting object by creating an SVN path authentication setting method; and the processing object calls the path authentication processing method to perform permission setting on the permission setting object to generate a permission configuration template.

[0069] In step S240, the permission configuration template is stored in the data warehouse to complete the permission configuration.

[0070] According to an example embodiment, storing the permission configuration template in the data warehouse to complete the permission configuration may include: rewriting multiple functions in the data warehouse according to the permission configuration template to complete the permission configuration.

[0071] According to an example embodiment, rewriting multiple functions in a data warehouse according to a permission configuration template to complete permission configuration may include at least one of the following: rewriting a configAuthView function in a data warehouse according to a permission configuration template to complete permission configuration; rewriting a configAuth function in a data warehouse according to a permission configuration template to complete permission configuration; rewriting an rsyncSvnServerAuth function in a data warehouse according to a permission configuration template to complete permission configuration; rewriting a configAuthViewAdd function in a data warehouse according to a permission configuration template to complete permission configuration; and rewriting a configAuthViewDelete function in a data warehouse according to a permission configuration template to complete permission configuration. All of the above five functions can be used to configure authentication views to achieve visualization of permission configuration.

[0072] According to the permission configuration method of the present application, by parsing the permission management request according to the port information, generating a permission configuration template for the parsed permission management request according to the data warehouse type, and storing the permission configuration template in the data warehouse, it is possible to match the corresponding permission template according to different branch strategies to complete the permission configuration on the basis of providing a visual interface and a rich calling interface, and solve user conflicts and high concurrency problems.

[0073] Figure 3 is a flowchart of a method for configuring permissions according to an exemplary embodiment. Figure 3 , permission configuration methods can include:

[0074] Step S310, determine the data warehouse type. If it is a classic branch development strategy type, execute step S320, if it is a branch development strategy, execute step S330, if it is a document development strategy, execute step S340.

[0075] Step S320: Generate a classic branch multi-authentication processing object to generate a permission configuration template. For example,

[0076] Step S330: Generate a branch multi-authentication processing object to generate a permission configuration template.

[0077] Step S340, generate a document authentication processing object to generate a permission configuration template. Among them, the object for setting permissions for the path in the repository can be obtained according to the path information. For example, when setting the root directory, createSvnPathAuthSetter() will generate a ClassicalBranchMultiSvnRootAuthSetter object according to the path.

[0078] Figure 4 is a flowchart of a method for configuring permissions according to an exemplary embodiment. Figure 4 , permission configuration methods can include:

[0079] Step S410, rewrite the configAuthView function in the data warehouse according to the permission configuration template to complete the permission configuration.

[0080] Step S420, rewrite the configAuth function in the data warehouse according to the permission configuration template to complete the permission configuration.

[0081] Step S430, rewrite the rsyncSvnServerAuth function in the data warehouse according to the authority configuration template to complete the authority configuration.

[0082] Step S440, rewrite the configAuthViewAdd function in the data warehouse according to the permission configuration template to complete the permission configuration.

[0083] Step S450, rewrite the configAuthViewDelete function in the data warehouse according to the permission configuration template to complete the permission configuration. The permission configuration can be completed according to one or more steps of steps S410, S420, S430, S440, and S450, and the basis for selection can be the characteristics of the path setting. In addition, the configAuthView function, the configAuth function, and the rsyncSvnServerAuth function can configure the authentication view to achieve the effect of visualizing the permission configuration.

[0084] Figure 5 is a design framework diagram of a permission configuration method according to an exemplary embodiment. Figure 5SVN first directly controls the permission configuration file through a gateway project. The project implements a queue mechanism to complete the repair and preservation of the permission configuration file; it solves the problem of conflicts caused by a large number of users setting permissions intensively at the same time, and improves the performance of the system. The use of the queue mechanism enables key components to withstand sudden access pressures without completely crashing due to sudden overload requests. The message queue provides an asynchronous processing mechanism, allowing users to put a message into the queue but not process it immediately.

[0085] Secondly, SVN completes the call to the gateway project through the distributed permission configuration service to complete the inter-process communication and inter-system message notification, which improves the system's requirements for high concurrency and facilitates expansion. Because the message queue decouples the entire processing process, it is easy to increase the frequency of message queuing and processing. Just add another processing process without changing the code or adjusting parameters. Expansion is as simple as turning up the power button.

[0086] Figure 6 FIG. 1 is a schematic diagram of an SVN showing a method for configuring permissions according to an exemplary embodiment. Figure 6 The SVN server can use a variety of protocols to provide external services. When using the Http protocol to provide external services, users can access the repository, download code, or submit code by sending http requests. Figure 6 The SVN shown in the figure uses the Apache web server to provide external services. There are two modules in Apache: mod_authz_svn module and mod_dav_svn module. When the user's HTTP request reaches the Apache service, the user is first authenticated and the permission is verified. The processing logic of the above verification is implemented in the mod_authz_svn module. After the permission is verified, the mod_dav_svn module processes the data in the request accordingly to realize the real interaction with the SVN repository.

[0087] In the permission verification process of the mod_authz_svn module. SVN permissions have certain rules, including permission inheritance and truncation, read-write permissions are greater than read-only permissions, and the principle of proximity. The permission configuration general interface service provides basic services for parsing and reading and writing SVN permission files. It is independent of the business and can provide interfaces such as warehouse permission settings and warehouse permission reading and writing for any business party to use. The upper layer of the permission configuration general interface service can be the SVN warehouse permission management module, which provides services to the permission view web end call upward and calls the permission configuration downward to implement the processing of SVN permissions through the interface service. This module includes three parts: SVN permission view setting, SVN permission setting and translator. The SVN permission view setting module implements the WYSIWYG of permissions for SVN warehouse directories. For example, when a permission is configured for the first-level directory of warehouse A on the web page, the second-level directory of warehouse A will also present the permissions configured for the first-level directory. It formats the permission data seen and stores it in the database. The translator translates the visualized permission data into actual permission rules. The SVN permission setting module processes the permission rules and then calls the permission configuration general service interface to write the permission rules into the permission file.

[0088] Figure 7 is a class diagram of a permission configuration method according to an exemplary embodiment. Figure 7 BranchMultiSvnBaseAuthSetter and ClassicalBranchMultiSvnBaseAuthSetter are two core classes for permission setting. They are class methods for setting permissions in branch mode and free mode respectively. In branch mode, the root directory and base cannot add read and write permissions; while in free mode, permissions for any path can be set.

[0089] The following is a brief introduction to the core method implementation of the SVN permission management module. SVN's permission management is closely integrated with the parallel branch development strategy. The current branch development strategy can be divided into two types: branch development strategy and classic branch development test. The characteristics of the branch development strategy are three paths in the root directory of any repository: base, branches, and tags. Users can only set read-only permissions for the root directory, base, and tags, and can set read and write permissions for the branches directory. The difference between the classic branch development strategy and the branch development strategy is that read and write permissions can be set for the base.

[0090] The overall implementation of the interface for setting permissions on the path adopts the factory design pattern. After the service request enters the Controller, the Controller calls the SimpleSvnPathAuthHandlerFactory factory, and the factory generates an object for setting permissions on the repository according to the type of repository. If permissions are set for a repository with a classic branch development strategy, the factory will generate a ClassicalBranchMultiAuthHandler object for permission setting. The ClassicalBranchMultiAuthHandler object uniformly calls the pathAuthSet() method for permission setting. The pathAuthSet() method calls the createSvnPathAuthSetter() method to generate a permission setting object for permission setting. Among them, createSvnPathAuthSetter() is a simple factory method that can obtain an object for setting permissions on the path in the repository based on the path information. For example, to set the root directory, createSvnPathAuthSetter() will generate a Classical BranchMultiSvnRootAuthSetter object. The ClassicalBranchMultiSvnRootAuthSetter object will eventually complete the permission setting for the root directory in the classic branch module repository.

[0091] AbstractSvnPathAuthSetter is an abstract class that defines the authset() method for unified permission settings. All objects that implement permission settings at the final path level inherit AbstractSvnPathAuthSetter and rewrite configAuthView(), configurationAuth(), rsyncSvnServerAuth(), configAuthViewAdd(), and configAuthViewDelete() according to their own characteristics of path settings. Among them, configAuthView(), configAuth(), and rsyncSvnServerAuth() can configure authentication views to achieve visualization of permission configuration.

[0092] According to the permission configuration method of the present application, it is possible to parse the permission management request according to the port information, generate a permission configuration template according to the data warehouse type, and store the configuration template in the data warehouse to complete the permission configuration. The permission configuration method of the present application, on the basis of providing a visual interface and a rich calling interface, matches the corresponding permission template according to different branching strategies to complete the permission configuration, and solves the user conflict and high concurrency problems. In summary, the permission configuration method of the present application has the following beneficial effects:

[0093] (1) Providing more comprehensive permission information from different perspectives, improving interactivity, reducing the difficulty of permission management, and improving R&D efficiency;

[0094] (2) Provides a rich set of interface calls to facilitate integrated development on other platforms, making it more flexible and open.

[0095] (3) A complete authority approval and review mechanism records the entire authority source, with clear management to meet audit requirements;

[0096] (4) Centrally manage warehouses and permissions, monitor warehouse access and download status, and provide timely security protection for warehouses.

[0097] (5) Support email approval and fully self-service management of permissions, saving time and effort.

[0098] (6) When configuring permissions, perfectly map the permission inheritance relationship to ensure that permissions are visible and available;

[0099] (7) Support different permission templates for different branch strategies. For example, the branch mode does not allow the configuration of trunk permissions, while the free mode allows the configuration of any permissions.

[0100] Figure 8 is a block diagram of a permission configuration device according to an exemplary embodiment. Figure 5 The permission configuration device may include: a receiving module 810, a parsing module 820, a template module 830 and a configuration module 840.

[0101] In the permission configuration device, the receiving module 810 is used to obtain a permission management request, and the permission management request includes port information. According to an example embodiment, obtaining a permission management request may include: obtaining a permission management request through a distributed service. Distributed deployment can improve the system's requirements for high concurrency and facilitate expansion. For example, a call to a gateway project can be completed through a distributed permission configuration service to complete inter-process communication and inter-system message notification, but the technical solution of the present invention is not limited to this. Among them, a permission configuration general interface service can be added to parse and read SVN permission files. The upper layer of the permission configuration general interface service is the SVN warehouse permission management module, which can provide services to the permission view web end to call upward, and call the permission configuration downward to implement the processing of SVN permissions through the interface service.

[0102] The parsing module 820 is used to parse the permission management request according to the port information. For example, a permission configuration general interface service can be added to the lower layer of the SVN repository permission management module to provide services to the permission view web end to call upward, and call the permission configuration downward to implement the processing of SVN permissions through the interface service.

[0103] The template module 830 is used to generate a permission configuration template for the parsed permission management request according to the data warehouse type. For example, the template module can generate a permission configuration template for the parsed permission management request through a branch mode according to the data warehouse type; or generate a permission configuration template for the parsed permission management request through a free mode according to the data warehouse type.

[0104] The configuration module 840 is used to store the permission configuration template in the data warehouse to complete the permission configuration. For example, the configuration module 840 can rewrite multiple functions in the data warehouse according to the permission configuration template to complete the permission configuration. Among them, the multiple functions include but are not limited to the following functions: configAuthView function, configAuth function, rsyncSvnServerAuth function, configAuthViewAdd function, configAuthViewDelete function.

[0105] According to the permission configuration device of the present application, by parsing the permission management request according to the port information, generating a permission configuration template for the parsed permission management request according to the data warehouse type, and storing the permission configuration template in the data warehouse, it is possible to match the corresponding permission template according to different branch strategies to complete the permission configuration on the basis of providing a visual interface and a rich calling interface, and solve the problems of user conflicts and high concurrency.

[0106] Fig. 9 FIG. 1 is a schematic diagram of a permission configuration system according to an exemplary embodiment. Fig. 9 The authority configuration system may include a configuration system 910 and an SVN data warehouse 920 .

[0107] In the authority configuration system, the configuration system 910 is used to obtain an authority management request, which includes port information; parse the authority management request according to the port information; and generate an authority configuration template for the parsed authority management request according to the data warehouse type.

[0108] The SVN data warehouse 920 is used to receive the rights configuration template and complete the rights configuration according to the rights configuration template.

[0109] According to the permission configuration system of the present application, it is possible to match corresponding permission templates according to different branch strategies to complete permission configuration and solve user conflicts and high concurrency problems on the basis of providing a visual interface and rich calling interfaces.

[0110] Fig.10 The invention is a block diagram of an electronic device for permission configuration according to an exemplary embodiment.

[0111] Refer to the following Fig.10 The electronic device 1000 according to this embodiment of the present application is described. Fig.10 The electronic device 1000 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0112] like Fig.10 As shown, the computer system 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage portion 1008 to a random access memory (RAM) 1003. For example, the central processing unit 801 can perform the following operations: Figure 2 , Figure 3 , Figure 4 1 or more of the steps shown.

[0113] In the RAM 1003, various programs and data required for system operation are also stored, such as warehouse type, port information, etc. The CPU 1001, ROM 1002, and RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0114] The following components are connected to the I / O interface 1005: an input section 1006 including a touch screen, a keyboard, etc.; an output section 1007 including a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 1008 including a flash memory, etc.; and a communication section 1009 including a wireless network card, a high-speed network card, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a semiconductor memory, a magnetic disk, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed.

[0115] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution of the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for a computing device (which can be a personal computer, a server, a mobile terminal, or a smart device, etc.) to execute the method according to the embodiment of the present invention, for example Figure 2 , Figure 3 , Figure 4 1 or more of the steps shown.

[0116] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0117] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not claimed by the present invention. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the claims.

[0118] It should be understood that the present invention is not limited to the detailed structures, drawings or implementations shown herein, but rather the present invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims

1. A permission configuration method, characterized in that: include: Obtaining a rights management request, wherein the rights management request includes port information; Parsing the permission management request according to the port information; Generate a permission configuration template for the parsed permission management request according to the data warehouse type; as well as Storing the permission configuration template in a data warehouse to complete the permission configuration; Wherein, generating a permission configuration template for the parsed permission management request according to the data warehouse type includes at least one of the following situations: If the data warehouse type is a classic branch development strategy type, the simple SVN path authentication processing factory generates a classic branch multi-authentication processing object according to the data warehouse type to generate the permission configuration template; If the data warehouse type is a branch development strategy, the simple SVN path authentication processing factory generates a branch multi-authentication processing object according to the data warehouse type to generate the authority configuration template; and If the data warehouse type is a document development strategy, the simple SVN path authentication processing factory generates a document authentication processing object according to the data warehouse type to generate the permission configuration template; Among them, the characteristics of the branch development strategy are that there are three paths under the root directory of any warehouse: base, branches, and tags. Users can only set read-only permissions for the root directory, base, and tags, and read and write permissions for the branches directory. The difference between the classic branch development strategy type and the branch development strategy is that read and write permissions can be set for the base.

2. The method according to claim 1, characterized in that Also includes: Receiving the permission management request from the user; as well as The rights management request is added to a processing queue.

3. The method according to claim 1, characterized in that The request to obtain permission management includes: The rights management request is obtained through a distributed service.

4. The method according to claim 1, characterized in that Generate permission configuration templates for parsed permission management requests based on data warehouse type, including: Generate a permission configuration template for the parsed permission management request through a branch mode according to the data warehouse type, in which the root directory and base cannot be added with read and write permissions; or According to the data warehouse type, a permission configuration template is generated for the parsed permission management request through a free mode, in which permissions for any path can be set.

5. The method according to claim 1, characterized in that The rights management request includes a rights management request of an SVN version control tool; Generate permission configuration templates for parsed permission management requests based on data warehouse type, including: The simple SVN path authentication processing factory generates a permission configuration template for the parsed permission management request according to the data warehouse type, and the simple SVN path authentication processing factory is used to obtain an object for setting permissions on the path in the warehouse according to the path information.

6. The method according to claim 5, characterized in that The simple SVN path authentication processing factory generates permission configuration templates for the parsed permission management request according to the data warehouse type, including: The simple SVN path authentication processing factory generates corresponding processing objects according to the data warehouse type; and The processing object calls the path authentication processing method to perform permission setting to generate the permission configuration template.

7. The method according to claim 6, characterized in that The processing object calls the path authentication processing method to perform permission setting to generate the permission configuration template, including: Generate a permission setting object by creating an SVN path authentication setting method, wherein the SVN path authentication setting method is used to obtain an object for setting permissions on a path in a warehouse according to path information; and The processing object calls the path authentication processing method to perform permission setting on the permission setting object to generate the permission configuration template.

8. The method according to claim 1, characterized in that Storing the permission configuration template in a data warehouse to complete the permission configuration includes: Rewrite multiple functions in the data warehouse according to the permission configuration template to complete the permission configuration.

9. The method according to claim 8, characterized in that Rewriting multiple functions in the data warehouse according to the permission configuration template to complete the permission configuration includes at least one of the following: Rewrite the configAuthView function in the data warehouse according to the permission configuration template to complete the permission configuration; Rewrite the configAuth function in the data warehouse according to the permission configuration template to complete the permission configuration; Rewrite the rsyncSvnServerAuth function in the data warehouse according to the permission configuration template to complete the permission configuration; Rewrite the configAuthViewAdd function in the data warehouse according to the permission configuration template to complete the permission configuration; as well as Rewrite the configAuthViewDelete function in the data warehouse according to the permission configuration template to complete the permission configuration.

10. A permission configuration device, characterized in that: include: A receiving module, used for obtaining a rights management request, wherein the rights management request includes port information; A parsing module, used for parsing the permission management request according to the port information; A template module, used to generate a permission configuration template for the parsed permission management request according to the data warehouse type, which includes at least one of the following situations: if the data warehouse type is a classic branch development strategy type, the simple SVN path authentication processing factory generates a classic branch multi-authentication processing object according to the data warehouse type to generate the permission configuration template; If the data warehouse type is a branch development strategy, the simple SVN path authentication processing factory generates a branch multi-authentication processing object according to the data warehouse type to generate the permission configuration template; and if the data warehouse type is a document development strategy, the simple SVN path authentication processing factory generates a document authentication processing object according to the data warehouse type to generate the permission configuration template; as well as A configuration module, used for storing the permission configuration template in a data warehouse to complete the permission configuration; Among them, the characteristics of the branch development strategy are that there are three paths under the root directory of any warehouse: base, branches, and tags. Users can only set read-only permissions for the root directory, base, and tags, and read and write permissions for the branches directory. The difference between the classic branch development strategy type and the branch development strategy is that read and write permissions can be set for the base.

11. A permission configuration system, characterized in that: include: A configuration system is used to obtain a rights management request, wherein the rights management request includes port information; and parsing the authority management request according to the port information; and generating a permission configuration template for the parsed permission management request according to the data warehouse type, which includes at least one of the following situations: if the data warehouse type is a classic branch development strategy type, the simple SVN path authentication processing factory generates a classic branch multi-authentication processing object according to the data warehouse type to generate the permission configuration template; If the data warehouse type is a branch development strategy, the simple SVN path authentication processing factory generates a branch multi-authentication processing object according to the data warehouse type to generate the permission configuration template; and if the data warehouse type is a document development strategy, the simple SVN path authentication processing factory generates a document authentication processing object according to the data warehouse type to generate the permission configuration template; The SVN data warehouse is used to receive the permission configuration template and complete the permission configuration according to the permission configuration template; Among them, the characteristics of the branch development strategy are that there are three paths under the root directory of any warehouse: base, branches, and tags. Users can only set read-only permissions for the root directory, base, and tags, and read and write permissions for the branches directory. The difference between the classic branch development strategy type and the branch development strategy is that read and write permissions can be set for the base.

12. An electronic device, characterized in that: include: 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 9.

13. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Management system permission adding method and device

    CN103368765A

  • Data access method and system and data warehouse

    CN103488791A

  • Method and device for processing data based on operation authority

    CN106778345A

  • Distributed code server authority management method, device and system

    CN107579865A

  • Data query system and method

    CN108132987A