Embodiments of the present invention relate to a Lightweight Directory Access Protocol (LDAP), and more specifically to hybrid groups.
Light Weight Directory Access Protocol (LDAP) has become very popular due to its efficient and fast data access. A large number of applications/services are currently being developed which use an LDAP directory as their centralized data repository.
The LDAP directory stores entries as a tree. Each entry may consist of one or more attribute names and attribute values. An entry may be uniquely identified by its distinguished name (DN) that may include a common name (cn) attribute of the entry and DN of a parent entry.
The contents of the entries are governed by an LDAP directory schema. The schema defines object classes, and each entry has an objectClass attribute containing named classes defined in the schema. The objectClass attribute may be multivalued, and contain the class “top” as well as some number of other classes. The schema definition for each class an entry belongs to defines what kind of object the entry may represent (e.g., a person, organization or domain). Membership in a particular class gives the entry the option of containing one set of attributes (optional attributes), and the obligation of containing another set of attributes (mandatory or required attributes). For example, an entry representing a person might belong to the class “person”. Membership in the “person” class would require the entry to contain the “sn” and “cn” attributes, and allow the entry also to contain “userPassword”, “telephoneNumber”, and other attributes.
Entries may be part of a group, for example, a static group. The static group is one which where membership is specified by presence in a list. Thus, a static group may comprises a list of members. The specific members are listed and identified by their attribute. Membership may change at any time, just as one might cross a name off the paper list or write in a new name. Such a potentially large static group may be either prone to error or not always up to date.
The present invention is illustrated by way of example, and not by way of limitation, in the figures of the accompanying drawings and in which:
Described herein is a method and apparatus for managing groups in a directory server. In one embodiment, in response to a request for accessing a static group, the directory server dynamically performs an action represented by an attribute of an entry of the directory server. A result of the action is returned as part of a response of the static group.
In the following description, numerous details are set forth. It will be apparent, however, to one skilled in the art, that the present invention may be practiced without these specific details. In some instances, well-known structures and devices are shown in block diagram form, rather than in detail, in order to avoid obscuring the present invention.
Some portions of the detailed descriptions which follow are presented in terms of algorithms and symbolic representations of operations on data bits within a computer memory. These algorithmic descriptions and representations are the means used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art. An algorithm is here, and generally, conceived to be a self-consistent sequence of steps leading to a desired result. The steps are those requiring physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated. It has proven convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, or the like.
It should be borne in mind, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise as apparent from the following discussion, it is appreciated that throughout the description, discussions utilizing terms such as “processing” or “computing” or “calculating” or “determining” or “displaying” or the like, refer to the action and processes of a computer system, or similar electronic computing device, that manipulates and transforms data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage, transmission or display devices.
The present invention also relates to apparatus for performing the operations herein. This apparatus may be specially constructed for the required purposes, or it may comprise a general purpose computer selectively activated or reconfigured by a computer program stored in the computer. Such a computer program may be stored in a computer readable storage medium, such as, but is not limited to, any type of disk including floppy disks, optical disks, CD-ROMs, and magnetic-optical disks, read-only memories (ROMs), random access memories (RAMs), EPROMs, EEPROMs, magnetic or optical cards, or any type of media suitable for storing electronic instructions, and each coupled to a computer system bus.
The algorithms and displays presented herein are not inherently related to any particular computer or other apparatus. Various general purpose systems may be used with programs in accordance with the teachings herein, or it may prove convenient to construct more specialized apparatus to perform the required method steps. The required structure for a variety of these systems will appear from the description below. In addition, the present invention is not described with reference to any particular programming language. It will be appreciated that a variety of programming languages may be used to implement the teachings of the invention as described herein.
A machine-accessible storage medium includes any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer). For example, a machine-accessible storage medium includes read only memory (“ROM”); random access memory (“RAM”); magnetic disk storage media; optical storage media; flash memory devices; electrical, optical, acoustical or other form of propagated signals (e.g., carrier waves, infrared signals, digital signals, etc.); etc.
The clients 102 are coupled to the LDAP directory server 108 via the network 106, which may be a public network (e.g., Internet) or a private network (e.g., Ethernet or a local area Network (LAN)). The LDAP directory server 108 may contain a server front-end responsible for network communications, plugins for server functions (such as access control and replication), a basic directory tree containing server-related data, and a database back-end plugin responsible for managing the storage and retrieval of LDAP repository data.
In one embodiment, the clients 102 communicate with the LDAP directory server 108 via a web server (not shown). For example, the clients 102 may host web browsers that communicate with the web server using HTTP to request information pertaining either to a static or a dynamic group. The web server may then communicate with the LDAP directory server 108 using LDAP to retrieve requested information from an LDAP repository 112. Alternatively, the clients 102 may communicate directly with the LDAP directory server 108 using LDAP to request information stored in the LDAP repository 112.
The network architecture 100 may also include one or more application servers 104 that hosts various applications requesting information from the LDAP directory server 108. The application servers 104 operate as clients in communications with the LDAP directory server 112. Similarly to the clients 102, the application servers 104 may communicate with the LDAP directory server 112 directly or via a web server.
The LDAP repository 112 may be part of the LDAP directory server 108, or it may reside externally (e.g., on a database server). Server 108 may be a single server or a cluster of servers. The LDAP repository 112 may contain a tree of data entries. The structure of the entries may be specified in the definition of the LDAP repository 112. The definition of the LDAP repository 112 may be represented as a schema, a table or some other data structure, and may reside independently or inside the LDAP repository 112. For example, the schema may be included in the LDAP repository 112 as a collection of LDAP repository entries rooted at the base DN cn=schema.
The schema may define object classes and attributes associated with each object class. Each entry in the LDAP repository has an objectClass attribute, containing one or more classes defined in the schema. The schema definition for each class an entry belongs to defines what kind of object the entry may represent (e.g., a person, organization or domain).
In one embodiment, the LDAP directory server 108 includes a hybrid group management module 110 that may be part of the LDAP directory server 108 or some other device and/or program, or be an independent module implemented in hardware, software or a combination thereof.
In one embodiment, the hybrid group management module 110 manages groups formed in the LDAP directory server 108. Groups are typically defined based on certain common characteristics of members of the groups. A member can be included in a group if the member has an attribute of a specific type. Conventionally, groups can be static or dynamic. In accordance with one embodiment, the hybrid group management module 110 manages static groups as dynamic groups and dynamic groups as dynamic groups.
A static group is one where membership is specified by presence in a list. For example, a static group may comprise a list of members. The specific members are listed and identified by their attribute. The operation and management of a static group is further described in
A dynamic group is one where membership is inherent in some property of the entries. For example, a group containing a number of persons in an organization may be “everyone who works in the HR department”. This would be defined by a filter (query) against the directory for “department=HR”. As people are hired, laid-off, or transferred in the company, they may become part of the HR department group. The operation and management of a dynamic group is further described in
In accordance with one embodiment, the hybrid group management module 110 may receive a request pertaining to either a static group or a dynamic group. The hybrid group management module 110 processes the request accordingly and returns a result corresponding to the type of group the request is pertaining to. Thus, the hybrid group management module 110 may virtualize a group (e.g. Static group) by maintaining only one group (e.g. A dynamic group). If a request is pertaining to a static group, the hybrid group management module 110 may generate a response of the static group. If the request is pertaining to a dynamic group, the hybrid group management module 110 may generate a response of the dynamic group. This process is farther described with respect to
Referring back to
At block 206, processing logic executes the request on a dynamic group corresponding to the static group. The value of an attribute in the entries in the LDAP repository 112 is used to enumerate the members of the static group. In accordance with one embodiment, the attribute may comprise a “memberof” attribute. For example, an entry of an employee of a company working in the HR department may have an attribute of “memberof-HRpeople”.
Processing logic dynamically changes the content of a group based on the value of the “memberof” attribute of an entry in the LDAP directory server 108. In accordance with one embodiment, the content of the group may comprise a membership. The content of the group may be dynamically changed by first determining that the value of the attribute of the entry corresponds to the group and second adding an identifier (e.g., a DN) of the entry to the content of the group. For example, an entry for an employee of a company may include the following attribute: “memberof=HRpeople”. The processing logic determines whether the value of the attribute (“HRpeople”) corresponds to a group. Assuming the group called “HRpeople” already exists in the LDAP directory server 108, the employee with the above attribute is thus added as a member of the “HRpeople” group in the LDAP directory server. Thus, the content of the “HRpeople” group may be dynamically changed and updated based on the attributes of the entries of the employees of the company. Furthermore, the content of the group may be dynamically changed such that the entry does not have to be manually added to the group.
In accordance with one embodiment, all static groups are in reality dynamic groups based on the “memberof” attribute. Whenever the static group is enumerated, a search is performed in the background to enumerate the members in the member virtual attribute. When an entry is added or removed, the target entry “memberof” attribute is modified instead of changing the member attribute as it is conventionally performed for members in a static group.
At block 208, processing logic returns the results of the above execution at block 206, as a response of the static group. The execution on a dynamic group is transparent to a client or a user.
At block 210, when a request pertains to a dynamic group, processing logic retains the request pertaining to the dynamic group and executes the request on the dynamic group maintained in the LDAP repository 112 using the “memberof” attribute.
At block 212, processing logic returns the results of the above execution at block 210, as a response of the dynamic group.
The groups may be composed of IT group 514 and HR group 518. The content of each group can be populated and maintained by manually entering the group members for the respective group. The content of each group includes members that are assumed to exist in the company (under “ou=people” branch 504). For example, the IT group 514 may comprise employee Michael Smith 516. The HR group 518 may comprise employees Jane Doe 520, and John Doe 522. The content of the group are manually entered and thus manually updated.
The groups may be composed of IT group 714 and HR group 718. The content of each group can be populated and maintained dynamically using filters 718, 720 for the respective groups 714, 718. The content of each dynamic group may include members resulting from search using the filters. For example, the IT group 714 may include an ITpeople filter 718 that searches for employees under the node “ou=people” 704 that have an attribute corresponding to an IT department. For example, the dynamic group may include employee Michael Smith 706. Similarly, the HR group 716 may include an HRpeople filter 720 that searches for employees under the node “ou=people” 704 that have an attribute corresponding to an HR department. For example, the dynamic group may include employees Jane Doe 708, and John Doe 710. The content of the dynamic group is automatically updated.
When the request pertains to a static group, the attribute “memberof” may be used to enumerate members of the static group. Subsequently, the hybrid group management module 110 may perform an action on the enumerated members. The hybrid group management module 110 may then return results of the action as part of a response of the static group.
When the request pertains to a dynamic group, the filters may be used to generate members of the dynamic group. Subsequently, the hybrid group management module 110 may perform an action on the generated members. The hybrid group management module 110 may then return results of the action as part of a response of the dynamic group.
In accordance with one embodiment, the content of each group 918 and 920 may be dynamically populated and maintained based on the value of the “memberof” attribute in the employee entries 906, 908, 910. The content of each group includes members that are based on the value of the “memberof” attribute in the employee entries 906, 908, 910. For example, a query for the content of the IT group 916 may return employee Michael Smith 906. A query for the content of the HR group 916 may return employees Jane Doe 908, and John Doe 910. Thus, the content of the groups maybe dynamically changed based on the value of the “memberof” attribute in the entries under “ou=people” 904.
In accordance with another embodiment, when the value of the attribute “memberof” in an entry corresponds to a non-existing group under “ou=groups” 906, a new group is automatically created under “ou=groups” 912 having an identifier or a common name based on the new value of the attribute “memberof” of the entry. In one embodiment, when a new group is created, the new group is a static group.
In accordance with one embodiment, groups under “ou=groups” 706 may include a static group and/or a dynamic group. For a static group, once the “memberof” attribute of an entry is updated, the static group's membership is automatically (and explicitly) modified to include a new member or delete an old member. For a dynamic group, a filter is modified or edited to retrieve all entries with the “memberof” attribute equal to the ID of the dynamic group. Subsequently, when a request for a list of members of the dynamic group is received, the filter is used to generate a list of members of this dynamic group.
The exemplary computer system 1000 includes a processing device 1002, a main memory 1004 (e.g., read-only memory (ROM), flash memory, dynamic random access memory (DRAM) such as synchronous DRAM (SDRAM) or Rambus DRAM (RDRAM), etc.), a static memory 1006 (e.g., flash memory, static random access memory (SRAM), etc.), and a data storage device 1018, which communicate with each other via a bus 1030.
Processing device 1002 represents one or more general-purpose processing devices such as a microprocessor, central processing unit, or the like. More particularly, the processing device may be complex instruction set computing (CISC) microprocessor, reduced instruction set computing (RISC) microprocessor, very long instruction word (VLIW) microprocessor, or processor implementing other instruction sets, or processors implementing a combination of instruction sets. Processing device 1002 may also be one or more special-purpose processing devices such as an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a digital signal processor (DSP), network processor, or the like. The processing device 1002 is configured to execute the processing logic 1026 for performing the operations and steps discussed herein.
The computer system 1000 may further include a network interface device 1008. The computer system 1000 also may include a video display unit 1010 (e.g., a liquid crystal display (LCD) or a cathode ray tube (CRT)), an alphanumeric input device 1012 (e.g., a keyboard), a cursor control device 1014 (e.g., a mouse), and a signal generation device 1016 (e.g., a speaker).
The data storage device 1018 may include a machine-accessible storage medium 1030 on which is stored one or more sets of instructions (e.g., software 1022) embodying any one or more of the methodologies or functions described herein. The software 1022 may also reside, completely or at least partially, within the main memory 1004 and/or within the processing device 1002 during execution thereof by the computer system 1000, the main memory 1004 and the processing device 1002 also constituting machine-accessible storage media. The software 1022 may further be transmitted or received over a network 1020 via the network interface device 1008.
The machine-accessible storage medium 1030 may also be used to store LDAP repository data entries 1024. LDAP repository data entries 1024 may also be stored in other sections of computer system 1000, such as static memory 1006.
While the machine-accessible storage medium 1030 is shown in an exemplary embodiment to be a single medium, the term “machine-accessible storage medium” should be taken to include a single medium or multiple media (e.g., a centralized or distributed database, and/or associated caches and servers) that store the one or more sets of instructions. The term “machine-accessible storage medium” shall also be taken to include any medium that is capable of storing, encoding or carrying a set of instructions for execution by the machine and that cause the machine to perform any one or more of the methodologies of the present invention. The term “machine-accessible storage medium” shall accordingly be taken to include, but not be limited to, solid-state memories, optical and magnetic media, and carrier wave signals.
Thus, a method and apparatus for dynamically managing hybrid groups have been described. It is to be understood that the above description is intended to be illustrative, and not restrictive. Many other embodiments will be apparent to those of skill in the art upon reading and understanding the above description. The scope of the invention should, therefore, be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled.