Python-based processing method and system for an ldap server
By establishing the input structure and rules for the LDAP server using Python, and by standardizing encapsulation and pre-setting filters, the problem of low operational efficiency caused by the complexity of the LDAP server schema was solved, and efficient database operations were achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN SIPU TECH CO LTD
- Filing Date
- 2022-09-30
- Publication Date
- 2026-06-26
Smart Images

Figure CN115525723B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of LDAP server access technology, and in particular to a Python-based method and system for processing LDAP servers. Background Technology
[0002] The LDAP (Lightweight Directory Access Protocol) directory on the relevant servers can support complex query filters and perform database-like query functions, featuring fast and convenient read / write operations.
[0003] However, LDAP read and write operations are not symmetrical. Since LDAP directories correspond to many similar databases, and different databases have corresponding schema structures and rules, the schema defines the structure and rules that the LDAP directory should follow, but its complexity also increases. It is necessary to learn the complex schema structure and rules of LDAP in order to modify and query data in the database. This situation restricts the efficiency of LDAP and is not conducive to the LDAP server performing fast and batch operations on the database. Summary of the Invention
[0004] This invention provides a Python-based method and system for processing LDAP servers, which addresses the problem that the complex schema structure and rules of LDAP directories in related servers restrict the efficiency of LDAP usage and hinder the LDAP server from performing fast and batch operations on the database.
[0005] The first aspect of this invention provides a Python-based method for processing LDAP servers, comprising the following steps:
[0006] Access to an LDAP server must follow the schema structure and rules;
[0007] Based on the structure and rules of the Schema, corresponding input structures and rules are established, wherein the input structures and rules are established based on the Python language;
[0008] The input structure and rules are standardized and encapsulated to form an encapsulation body, wherein the standardized encapsulation has corresponding preset filters for different types of users;
[0009] The encapsulation body communicates with the LDAP server to exchange data and perform operations on the information within the LDAP server.
[0010] In a preferred embodiment, the step of obtaining access to the LDAP server that requires adherence to the schema structure and rules includes:
[0011] The structure and rules of the schema include categories, attributes, syntax, and identifiers.
[0012] In a preferred embodiment, the step of standardizing and encapsulating the input structure and rules to form an encapsulation body includes:
[0013] In the input structure and rules, establish the objectclass category of the first entry;
[0014] Based on the second entry, identify the objectclass category of the first entry in the input structure and rules, and form an operation statement that conforms to the schema definition for the key attributes in the objectclass category, wherein the second entry corresponds to the first entry.
[0015] In a preferred embodiment, the step of standardizing and encapsulating the input structure and rules to form an encapsulation body includes:
[0016] Establish different types of filters corresponding to the query filters in the LDAP server, wherein the different types of filters represent filters used by different types of users, and the different types of filters have different filter statements;
[0017] The different types of filters are encapsulated within the encapsulation body;
[0018] Select the corresponding filter based on the user type, and call the Filter statement corresponding to that filter to match the query filter.
[0019] In a preferred embodiment, the step of the encapsulation body communicating with the LDAP server to operate on information within the LDAP server includes:
[0020] A Format function is created within the encapsulation body, and the Format function is then encapsulated.
[0021] The encapsulated body uses the Format function within the function encapsulation to call the corresponding data in the LDAP server, thereby concatenating the encapsulated body with the LDAP server.
[0022] In a preferred embodiment, the step of the encapsulation body communicating with the LDAP server to operate on information within the LDAP server includes:
[0023] Instantiate the input structure and rules based on the accessed LDAP server;
[0024] The instantiated input structure and rules are bound to the LDAP server.
[0025] A second aspect of the present invention provides a Python-based system for processing LDAP servers, including the aforementioned Python-based method for processing LDAP servers, comprising:
[0026] An access unit is used to obtain the schema structure and rules that must be followed to access the LDAP server;
[0027] A construction unit is used to establish corresponding input structures and rules based on the structure and rules of the Schema, wherein the input structures and rules are established based on the Python language;
[0028] The encapsulation unit is used to standardize and encapsulate the input structure and rules to form an encapsulation body;
[0029] The communication unit is used to communicate data between the encapsulation body and the LDAP server, and to perform operations on the information within the LDAP server.
[0030] A third aspect of the present invention provides an electronic device, comprising:
[0031] processor;
[0032] Memory used to store the processor's executable instructions;
[0033] The processor is configured to read the executable instructions from the memory and execute the instructions to implement the aforementioned Python-based method for processing LDAP servers.
[0034] A third aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions, characterized in that, when executed by a processor, the program instructions implement the steps of the aforementioned Python-based method for processing an LDAP server.
[0035] This invention provides a Python-based method for processing LDAP servers. It uses Python to establish an input structure and rules that follow the schema's structure and rules for accessing the LDAP server. These input structures and rules are then standardized and encapsulated into a package. During standardization, corresponding filters are created for different users, facilitating data exchange between different users and the LDAP server, enabling access to the LDAP server's database. By standardizing and assigning default values to the parameters of the input structures and rules, parameter requirements are simplified, lowering the barrier to entry. This method is more efficient for LDAP server CRUD operations and, thanks to Python, can run across operating systems. Attached Figure Description
[0036] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0037] Figure 1 This is a flowchart illustrating the Python-based method for processing LDAP servers according to the present invention.
[0038] Figure 2 The flowchart illustrates the standardized encapsulation of the input structure and rules in the Python-based LDAP server processing method of this invention, forming an encapsulated body.
[0039] Figure 3 This is a flowchart illustrating the data exchange between the Python-based Python encapsulation of the present invention and the LDAP server.
[0040] Figure 4 This is a flowchart illustrating the instantiation of the Python-based encapsulation method for processing LDAP servers according to the present invention.
[0041] Figure 5 This is a flowchart of the LDAP server operation in the Python-based LDAP server processing method of the present invention;
[0042] Figure 6 This is a flowchart illustrating the unbinding process of the Python-based method for handling LDAP servers according to the present invention. Detailed Implementation
[0043] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0044] To facilitate the explanation of the technical solution of this application, some concepts involved in this application will be explained first below.
[0045] Schema, or XML Schema, XSD (XML Schema Definition), refers to the form in which the elements of an XML document are described.
[0046] LDAP, or Lightweight Directory Access Protocol, is an industry-standard application protocol that provides access control and maintains distributed directory information via the IP protocol.
[0047] API, or Application Program Interface, is defined as a set of standards that an application can use to exchange information and commands with a computer's operating system.
[0048] Entry, an entry in an LDAP directory, refers to each directory entry.
[0049] A filter, or access control filter, is used by web developers to filter and intercept data from the database on an LDAP server, thereby implementing specific functionalities. These functions include access control, filtering sensitive words, and compressing response information.
[0050] The Format function converts data of any type into a string through formatting operations. The Format function is also a formatted string function.
[0051] In object-oriented programming, instantiation refers to the process of creating an object from a class. It is the process of making an abstract conceptual class a concrete entity of that class.
[0052] Binding, in LDAP terminology, means binding, while unbinding means unbinding.
[0053] LDAP is a lightweight directory access protocol that supports complex query filters, enabling it to perform many database-like query functions. Accessing a corresponding database through an LDAP directory requires establishing an access structure and rules. The schema defines the structure and rules that the LDAP directory should follow. In other words, to access a PDAP directory and then access the corresponding database through the directory, the schema's structure and rules must be followed for it to be recognized. For example, the schema structure and rules define the attributes of an object class, and the structure of these attributes. Specifically, an object class defines a category that will be used by different directories (in LDAP, this is an Entry); it specifies what attributes the directory should have, which attributes are required, and which are optional. An object class definition includes name (NAME), description (DESC), type (STRUCTURAL or AUXILARY, indicating whether it is structural or auxiliary), required attributes (MUST), and optional attributes (MAY).
[0054] In related technologies, Python is used to access LDAP servers based on the LDAP3 library. The LDAP3 library provides a unified API for accessing LDAP servers. However, using the LDAP3 API requires in-depth learning of LDAP's complex schema structure and rules. For example, the schema structure and rules are numerous and the statements are technical, making it too complex and difficult to read for non-professional users. This situation restricts the efficiency of LDAP use, especially when performing write operations on the server, such as adding, modifying, and deleting, which is not conducive to fast and batch operations.
[0055] Based on the above issues, the structure and rules of the schema are configured accordingly, and the corresponding input structure and rules are established to enable fast and batch operations. The specific details are as follows:
[0056] See Figures 1 to 6 This application discloses a Python-based method for processing LDAP servers, comprising the following steps:
[0057] like Figure 1 As shown in S101: Accessing the LDAP server requires following the schema structure and rules.
[0058] The structure and rules of a schema mainly include four elements: categories, attributes, syntax, and identifiers.
[0059] 1. Objectclass category
[0060] An objectclass defines a category that will be used by different directories (in LDAP, this is an Entry). It specifies which attributes the directory should have, which attributes are required, and which are optional. An objectclass definition includes information such as name (NAME), description (DESC), type (STRUCTURAL or AUXILARY, indicating whether it is structural or auxiliary), required attributes (MUST), and optional attributes (MAY).
[0061] 2. Attribute property
[0062] An attribute is a property that an object class may contain. The definition of an object class includes its name, data type, whether it is a single value or multiple values, and matching rules.
[0063] 3. Syntax
[0064] Syntax in LDAP refers to the data types and data constraints used in LDAP. This syntax conforms to the data constraint definitions in X.500.
[0065] 4. Matching Rules Identifier
[0066] Matching Rules are used to specify matching rules for a certain attribute. Specifically, they define a special alias for a syntax that the LDAP server can recognize and match based on the defined attribute.
[0067] Accessing an LDAP server requires following the structure and rules of the above schema. Only input information that conforms to the above rules can be recognized and thus accessed.
[0068] S102: Based on the structure and rules of the Schema, establish corresponding input structures and rules, wherein the input structures and rules are established based on the Python language.
[0069] The established input structure and rules need to correspond to the structure and rules of the schema. For example, if the object class of the first entry is established in the input structure and rules, there should also be an object class corresponding to the first entry in the structure and rules of the schema. The object class can include, for example, a person, a group, or an organization unit, and different processes are executed.
[0070] Specifically, users, user groups, and user organizations represent different categories of needs, and based on these different categories of needs, the schema's structure and rules can execute different processes.
[0071] It should be noted that, since the input structure and rules correspond to the structure and rules of the schema, object class categories conforming to the schema structure and rules are pre-established in the input structure and rules. When a second entry matching the first entry is input, the object class category of the first entry in the input structure and rules is identified based on the object class category in the second entry, and operation statements conforming to the schema definition are formed based on the key attributes in the object class category. Because the structure and rules of the first entry conform to the schema structure and rules, the first entry can form operation statements conforming to the schema definition to access the LDAP server and perform corresponding add, delete, modify, and query operations based on the key attribute values corresponding to the object class category of the first entry.
[0072] For example, ID:objectclass defines a category that will be used by different directories (which is an Entry in LDAP); it specifies what attributes the directory should have, which attributes are required, and which are optional.
[0073] An object class definition includes information such as name (NAME), description (DESC), type (STRUCTURAL or AUXILARY, indicating whether it is structural or auxiliary), required attributes (MUST), and optional attributes (MAY).
[0074] Below is a partial list of object classes contained in a complete LDAP Entry:
[0075] dn:uid=ID,ou=People,dc=abtnet,dc=net
[0076] telephoneNumber: 13XXXXXXXXX
[0077] email: ID@xxxxx.com
[0078] objectClass:top
[0079] objectClass:person
[0080] objectClass:organizationalPerson
[0081] objectClass:inetorgperson
[0082] cn:WangChao
[0083] userPassword:{SSHA}aPTgP47LeziVGqjPBI8343FwkcL3QgQQ9kirXw==
[0084] The object class of this entry is top, person, organizationPerson, inetorgPerson; this determines that the type of this entry is user (person), and which attributes of this entry (cn, dn, userPassword, etc.) are required, and which (the rest) are optional.
[0085] In this technical solution, different processes are executed depending on whether the object class of the Entry is a person, a group, or an organization unit. The input structure and rules established using Python have the characteristics of strong versatility, which makes the access and operation of the LDAP server more stable and simplifies the operation to improve development efficiency.
[0086] S103: Standardize and encapsulate the input structure and rules to form an encapsulation body, wherein the standardized encapsulation has corresponding preset filters for different types of users.
[0087] The input structure and rules are standardized and encapsulated to form a package, which can then be concatenated with the LDAP3 database for data transmission. This specifically includes steps S1031 to S1033.
[0088] like Figure 2 As shown, S1031: Establish different types of filters corresponding to the query filters in the LDAP server, wherein the different types of filters represent filters used by different types of users, and the different types of filters have different Filter statements.
[0089] LDAP often has complex query filters. Therefore, the encapsulation body establishes different types of filters corresponding to the query filters in the LDAP server. Different types of filters represent the filters used by different types of users. For example, corresponding filters are designed for queries on users, user groups, and organizational units. Users, user groups, and organizational units do not need to input filtering information through the client. The filters are automatically filtered based on the categories of users, user groups, and organizational units to improve efficiency and avoid errors.
[0090] For example, LDAP filters support:
[0091] Operators:
[0092] • Equal to: =
[0093] Greater than or equal to: >=
[0094] Less than or equal to: <=
[0095] Wildcard: *
[0096] Logical operators:
[0097] · Logical AND: &
[0098] Logical OR: |
[0099] Logical NOT: !
[0100] In the example above, the entry information is:
[0101] The filtering code for users whose ID query email is ID@xxxxx.com and whose phone number is 13XXXXXXXXX is:
[0102] (&(mail=ID@xxxxx.com)(telephoneNumber=13XXXXXXXXX)).
[0103] Furthermore, taking querying user group information as an example, to account for differences in different server versions, the filter used when querying user group information is as follows:
[0104] (|(objectclass=posixGroup)(objectclass=groupOfUniqueNames)(objectclass=group)).
[0105] S1032: Encapsulate the different types of filters within the enclosure.
[0106] In this process, different types of filters are encapsulated within a package. This allows the package to automatically convert different types of filters into Filter statements that can be recognized by the LDAP server when the package interfaces with it, without requiring any additional operations.
[0107] By encapsulating different types of filters within a package, it is easier to automatically switch between different types of filters when the package is connected to the LDAP server, simplifying input and improving execution efficiency and stability.
[0108] S1033: Select the corresponding filter based on the user type, and call the Filter statement corresponding to the filter to match the query filter.
[0109] Specifically, during query operations, the input structure and rules in the encapsulation body identify the input type based on the different types of users, user groups, and organizational units. This allows the corresponding filter to be invoked based on the identification results. Since different types of filters have already been converted into Filter statements when the encapsulation body and LDAP server are concatenated, users, user groups, or organizational units can directly perform query operations on the LDAP server.
[0110] S104: The encapsulation body communicates with the LDAP server to perform data exchange and realize operations on the information in the LDAP server.
[0111] The data exchange between the encapsulation body and the LDAP server first requires connecting the encapsulation body and the LDAP server, specifically including steps S1041 to S1042.
[0112] like Figure 3 As shown, S1041: A Format function is established within the encapsulation body, and the Format function is encapsulated.
[0113] In order to enable data transmission between the encapsulated body and the LDAP server, a Format function is created within the encapsulated body. The Format function is used to automatically concatenate message bodies between the encapsulated body and the LDAP server. The Format function is encapsulated, that is, a secondary encapsulation is performed within the encapsulated body, so that the desired effect can be obtained by only requiring specific parameters or without requiring any parameters.
[0114] S1042: The encapsulated body calls the corresponding data in the LDAP server through the Format function in the function encapsulation, thereby realizing the concatenation of the encapsulated body and the LDAP server.
[0115] The Format function is used to format the data to be transmitted before it is transmitted to the LDAP server. Data is then transmitted between the LDAP directory and the corresponding LDAP3 database.
[0116] For example, adding multiple specified users to a user group can be done as follows:
[0117] 1. Automatic splicing:
[0118] dn="cn={},ou={},{}".format(group_name,ou_name,self.base_dc);
[0119] 2. Using LDAP3 to operate on the LDAP server:
[0120] user_distinguishedname=["user1","user2"]
[0121] status,result,response,_=self.conn.modify(dn,{'member':[MODIFY_ADD,user_distinguishedname]}).
[0122] In this embodiment, the Format function is encapsulated in the encapsulation body to format the transmitted data. The formatted data is then transmitted to the LDAP server, and the LDAP server is used to operate on LDAP3. This simplifies the operation steps of the LDAP server and improves the efficiency of accessing and operating the LDAP server in the prior art.
[0123] In addition, in the step of different encapsulations communicating with the LDAP server and realizing operations on the information within the LDAP server, in order to cope with different LDAP servers, it is necessary to instantiate the encapsulation, specifically including steps S1043 to S1044.
[0124] like Figure 4 As shown, S1043: Instantiate the input structure and rules based on the accessed LDAP server.
[0125] Instantiation involves binding the instance to the server using a specified administrator username and password to gain operational privileges. During the instantiation process of the encapsulated object and the LDAP server, the connection between the encapsulated object and the LDAP server is instantiated first, and then configured according to the object.
[0126] S1044: The instantiated input structure and rules are bound to the LDAP server.
[0127] The instantiated input structure and rules are bound to the LDAP server, and the message body conforming to the LDAP protocol operation is sent to the server in a prescribed format.
[0128] The process is as follows:
[0129] 1. When an LDAP client initiates a connection request to establish a session binding with the LDAP server, the LDAP client usually needs to specify the access user in order to access the directory information on the LDAP server (i.e., instantiation).
[0130] 2. LDAP clients send directory queries, create, update, delete, move, and compare directory entries to the LDAP server.
[0131] 3. The LDAP client ends its session with the LDAP server, i.e., unbinding.
[0132] In this embodiment, the encapsulated body is instantiated based on the LDAP server to be bound, so as to bind to the server, obtain operation permissions, and thus realize the operation of the LDAP server.
[0133] like Figure 5 As shown, after encapsulating the input structure and rules, the following example illustrates how to operate on the LDAP server:
[0134] 1. The LDAP client instantiates the connection to the LDAP service and binds the corresponding LDAP server according to the configuration object.
[0135] 2. Determine if the binding was successful;
[0136] 3. Perform operations on the server:
[0137] 3.1 For operations on OU (organization unit), the message body is automatically constructed based on the input OU name, and the operation result or query result is returned;
[0138] Add OU;
[0139] Delete OU;
[0140] Query OU;
[0141] 3.2 For operations on groups, clusters, batches, classes, groups, and groups, the message body is automatically constructed based on the input OU position and group name, and the operation result or query result is returned;
[0142] Add a group;
[0143] Delete the group;
[0144] Query group;
[0145] 3.3 For operations on users, this invention will automatically construct the message body based on the input OU location and user name, and return the operation result or query result;
[0146] Add user;
[0147] Delete user;
[0148] Query user;
[0149] Add user to the specified group
[0150] Remove user from specified group
[0151] 4. Determine whether the operation was successful. If successful, return the operation result and return value; if it failed, return the reason for the failure.
[0152] like Figure 6 As shown in Figure 5, unbind the device by sending an automatically constructed unbinding message to the LDAP server.
[0153] Corresponding to the previous embodiments of the Python-based method for processing LDAP servers, this application also provides a Python-based system for processing LDAP servers. This Python-based system for processing LDAP servers includes:
[0154] The access unit is used to obtain the schema structure and rules that must be followed to access the LDAP server.
[0155] The construction unit is used to establish corresponding input structures and rules based on the structure and rules of the Schema, wherein the input structures and rules are established based on the Python language.
[0156] The encapsulation unit is used to standardize and encapsulate the input structure and rules to form an encapsulation body.
[0157] The communication unit is used to communicate data between the encapsulation body and the LDAP server, and to perform operations on the information within the LDAP server.
[0158] Corresponding to the previous embodiments of the Python-based method for processing LDAP servers, this application also provides an electronic device. This electronic device includes:
[0159] processor;
[0160] Memory used to store the processor's executable instructions;
[0161] The processor is configured to read the executable instructions from the memory and execute the instructions to implement the aforementioned Python-based method for processing LDAP servers.
[0162] Corresponding to the previous embodiments of the Python-based method for processing LDAP servers, this application also provides a computer-readable storage medium. This computer-readable storage medium stores computer program instructions thereon, characterized in that, when executed by a processor, the program instructions implement the steps of the aforementioned Python-based method for processing LDAP servers.
[0163] In summary, the present invention provides a Python-based method for processing LDAP servers. By utilizing the schema structure and rules that must be followed when accessing an LDAP server, a corresponding input structure and rules are established to enable access to the LDAP server directory based on the schema structure and rules.
[0164] The input structure and rules are standardized, with user categories pre-classified and corresponding execution flows established based on these categories, along with default values. This simplifies the information required to access the LDAP server. Since the corresponding structures and rules are already established within the input structure and rules, users input the name of the user, user group, and organizational unit to be operated on into the encapsulation body based on their own category. The input structure and rules can then execute the corresponding flow according to the user category, automatically concatenating the message body of the corresponding LDAP3 database on the LDAP server to perform operations such as adding, modifying, and deleting.
[0165] Encapsulating input structures and rules into a wrapper body facilitates correct use by users and prevents erroneous attribute modification. This promotes loose coupling between input structures and rules and the LDAP server, improving their independence and reusability.
[0166] The above embodiments merely illustrate specific implementations of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention.
Claims
1. A Python-based method for processing LDAP servers, characterized in that, Includes the following steps: Access to an LDAP server must follow the schema structure and rules; Based on the structure and rules of the Schema, corresponding input structures and rules are established, wherein the input structures and rules are established based on the Python language; The input structure and rules are standardized and encapsulated to form an encapsulation body. This standardized encapsulation body has corresponding preset filters for different types of users. The standardized encapsulation includes: establishing different types of filters corresponding to query filters in the LDAP server, where each type of filter represents a filter used by a different type of user, and each type of filter has a different Filter statement; encapsulating the different types of filters within the encapsulation body; selecting the corresponding filter based on the user type and calling the Filter statement corresponding to that filter to match the query filter; establishing an objectclass category for a first entry in the input structure and rules; identifying the objectclass category of the first entry in the input structure and rules based on the second entry in the input, and forming operation statements conforming to the schema definition for the key attributes in the objectclass category, where the second entry corresponds to the first entry. The encapsulation body communicates with the LDAP server to exchange data and perform operations on the information within the LDAP server.
2. The method for processing LDAP servers based on Python according to claim 1, characterized in that, The steps for obtaining access to the LDAP server, which require adherence to the schema structure and rules, include: The structure and rules of the schema include categories, attributes, syntax, and identifiers.
3. The method for processing LDAP servers based on Python according to claim 1, characterized in that, The steps of enabling data exchange between the encapsulation body and the LDAP server to operate on information within the LDAP server include: A Format function is created within the encapsulation body, and the Format function is then encapsulated. The encapsulated body uses the Format function within the function encapsulation to call the corresponding data in the LDAP server, thereby concatenating the encapsulated body with the LDAP server.
4. The method for processing LDAP servers based on Python according to claim 1, characterized in that, The steps of enabling data exchange between the encapsulation body and the LDAP server to operate on information within the LDAP server include: Instantiate the input structure and rules based on the accessed LDAP server; The instantiated input structure and rules are bound to the LDAP server.
5. A Python-based system for processing LDAP servers, characterized in that, The Python-based method for processing an LDAP server, including any one of claims 1-4, comprises: An access unit is used to obtain the schema structure and rules that must be followed to access the LDAP server; A construction unit is used to establish corresponding input structures and rules based on the structure and rules of the Schema, wherein the input structures and rules are established based on the Python language; The encapsulation unit is used to standardize and encapsulate the input structure and rules to form an encapsulation body; The communication unit is used to communicate data between the encapsulation body and the LDAP server, and to perform operations on the information within the LDAP server.
6. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the Python-based processing method for an LDAP server as described in any one of claims 1-4.
7. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the program instructions are executed by the processor, they implement the steps of the Python-based method for processing an LDAP server as described in any of claims 1-4.