Method for realizing unified authentication provided by replacing AD domain based on ldap protocol
Technical Field
The invention belongs to the technical field of network management, and particularly relates to a method for realizing unified authentication by replacing an AD domain based on an ldap protocol.
Background
For large-scale power companies, the digitization and networking construction of enterprises have great promotion effects on improving the working efficiency and improving the management mode, and as the ecological system of the whole group application system is continuously grown, the application systems are various, and the application systems cover various working scenes such as supply chain management, project management, financial management, human resource management, customer service management and the like. At present, enterprises perform unified authentication on users logging in various application systems in an AD domain mode, and errors easily occur in the AD domain authentication, for example, after an account logs in one application, after logging out, a device is changed to log in another application, login unsuccessful phenomenon easily occurs, and in the login process, information such as unknown user names or wrong passwords easily occurs, so that the user is inconvenient to use and the experience is not friendly.
Disclosure of Invention
The invention aims to provide a method for realizing unified authentication by replacing an AD domain based on an ldap protocol, which solves the technical problems that in the prior art, when staff of a group logs in various application systems, account management is inconvenient, authentication on login behaviors of a user is easy to make mistakes through the AD domain, and login authentication fails.
In order to solve the technical problems, the invention adopts the following technical scheme:
the method for realizing the unified authentication for replacing the AD domain based on the ldap protocol comprises the following steps:
a login authentication server is set, wherein an ldap service module is arranged in the login authentication server, a user directory information management module is arranged in the ldap service module, and the user directory information management module is used for managing the related information of the registration account numbers of all users;
the terminal equipment of the user is provided with a first application program login module and a second application program login module which are respectively used for logging in the first application program and the second application program, and the terminal equipment of the user is provided with a ldap network access service module;
when a user logs in the first application program and the second application program respectively through the first application program login module and the second application program login module, based on the ldap service module and the ldap network access service module, the user can log in the first application program and the second application program through a set of account numbers to authenticate.
Preferably, when the user logs in the first application program through the first application program login module, the authentication mode is as follows:
(1) The user inputs an account number and an account password in the first application login module;
(2) The method comprises the steps that an account number and an account password are obtained by the ldap network access service module, and an authentication data packet is sent to the ldap service module by the ldap network access service module, wherein the authentication data packet comprises the account number and the account password;
(3) The ldap service module defaults to bind with the received account number, the ldap service module executes search operation on the user directory information management module according to the account number, and the user directory information management module returns user information related to the account number to the ldap service module;
(4) And the ldap service module carries out a second binding operation according to the obtained user information related to the account number according to the account number and the password, and if the binding is successful, the authentication is successful.
Preferably, the user directory information management module is provided with an account number storage directory, an account password storage directory, a user domain name directory, a user ID directory and a user organization unit directory.
Preferably, the user information related to the account number includes an account number, an account password, a user domain name, a user ID, and a user organization unit.
Preferably, the authentication data packet further includes a user domain name, a user ID, and a user organization unit of the terminal device.
Compared with the prior art, the invention has the beneficial effects that: the method for realizing unified authentication by replacing an AD domain based on the ldap protocol is characterized in that a login authentication server is arranged, an ldap service module is arranged in the login authentication server, a user directory information management module is arranged in the ldap service module, and the user directory information management module is used for managing relevant information of registered accounts of all users; a first application program login module and a second application program login module are arranged on the terminal equipment of the user and are respectively used for logging in the first application program and the second application program, and a ldap network access service module is arranged on the terminal equipment of the user; when a user logs in a first application program and a second application program respectively through the first application program login module and the second application program login module, the user can log in the first application program and the second application program based on the ldap service module and the ldap network access service module, so that the user can log in through a set of account numbers for authentication. Therefore, when group staff logs in various application systems, the account management is more convenient, and the ldap service module is a mature and reliable account management module, so that the phenomenon of login errors is reduced.
Drawings
Fig. 1 is a flowchart of an embodiment of a method for implementing a unified authentication based on the ldap protocol to replace an AD domain according to the present invention.
Fig. 2 is a block diagram of a user directory information management module in an embodiment of a method for implementing a unified authentication for replacing an AD domain based on the ldap protocol according to the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
A method for implementing a unified authentication for replacing an AD domain based on ldap protocol, refer to fig. 1 and fig. 2.
As shown in fig. 1, the method for implementing the unified authentication based on the ldap protocol to replace the AD domain includes:
setting a third-party independent login authentication server, wherein an ldap service module is arranged in the login authentication server, and a user directory information management module is arranged in the ldap service module and used for managing the related information of the registration account numbers of all users. As shown in fig. 2, the user directory information management module is provided with an account number storage directory, an account password storage directory, a user domain name directory, a user ID directory, and a user organization unit directory.
The system comprises an account number storage directory, an account password storage directory, a user domain name directory, a user ID directory, a user organization unit directory and an organization unit directory, wherein the account number storage directory is used for storing account numbers, the account password storage directory is used for storing account passwords, the user domain name directory is used for storing domain names of terminal equipment, the user ID directory is used for storing addresses of the terminal equipment, and the user organization unit directory is used for storing organization units corresponding to the terminal equipment.
The terminal equipment of the user is provided with a first application program login module and a second application program login module which are respectively used for logging in the first application program and the second application program, and the terminal equipment of the user is provided with an ldap network access service module, when the user logs in the first application program and the second application program respectively through the first application program login module and the second application program login module, the user can log in the first application program and the second application program based on the ldap service module and the ldap network access service module, so that the user can log in the first application program and the second application program through a set of account numbers for authentication.
Specifically, when a user logs in a first application program through a first application program login module, the authentication mode is as follows:
(1) A user inputs an account number and an account password in a first application login module;
(2) The method comprises the steps that an ldap network access service module obtains an account number and an account password, and sends an authentication data packet to the ldap service module, wherein the authentication data packet comprises the account number and the account password;
(3) The ldap service module defaults to bind with the received account number, performs search operation on the user directory information management module according to the account number, and returns user information related to the account number to the ldap service module;
(4) The ldap service module carries out the second binding operation according to the acquired user information related to the account number and the account number, and if the binding is successful, the authentication is successful.
When a user logs in a second application program through a second application program login module, the authentication mode is as follows:
(1) The user inputs the same set of account number and account password in a second application login module;
(2) The method comprises the steps that an ldap network access service module obtains an account number and an account password, and sends an authentication data packet to the ldap service module, wherein the authentication data packet comprises the account number and the account password;
(3) The ldap service module defaults to bind with the received account number, performs search operation on the user directory information management module according to the account number, and returns user information related to the account number to the ldap service module;
(4) The ldap service module carries out the second binding operation according to the acquired user information related to the account number and the account number, and if the binding is successful, the authentication is successful.
Further, the user information related to the account number includes the account number, the account password, the user domain name, the user ID and the user organization unit, and the authentication data packet further includes the user domain name, the user ID and the user organization unit of the terminal device, so that authentication of multiple factors is performed, and authentication security is ensured.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
Although embodiments of the present invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.