Summary of the invention
In order to solve the above technical problems, the present invention provides a kind of cloud platform unified identity authentication method and system, Ke Yitong
One Identity Management and authentication reduce the management cost of authentication, provide the efficiency of management and safety of authentication.
A kind of cloud platform unified identity authentication method provided by the invention, includes the following steps:
Building includes the cluster of multiple unified identity authentication service devices, and does load balance process to the cluster;
The unified identity authentication service device receives the user login information from client, and verifies the user and log in
Information, after the user login information is verified, by the unified domain name of setting create TGT bill and generate with it is described
The corresponding ST bill of TGT bill, and the ST bill is back to the client, so that the client utilizes the ST
Bill single-sign-on or single-point LOG striding domain name under the cluster under the same domain name of the cluster;
The client reading digital certificate information, and acquisition username information corresponding with the digital certificate information/
User password, and the digital certificate information and the username information/user password are sent to the Unified Identity and recognized
Demonstrate,prove server;
The unified identity authentication service device judges whether corresponding digital certificate is expired according to the digital certificate information
Or be revoked, and verify whether the corresponding digital certificate of the digital certificate information is registered, also verify the user name
The corresponding subscriber identity information of information/user password.
Preferably, further include following step:
Each unified identity authentication service device caches the TGT bill and the ST bill to cache server,
Shared High Availabitity service is concentrated to provide by the cache server for all unified identity authentication service devices;
Session between all clients and the unified identity authentication service device is stored in session management server,
To realize the High Availabitity of session.
Preferably, further include following step:
In certificate authority downloadable authentication revocation list, to judge the digital certificate by the certificate revocation list
Whether revoke.
Preferably, verify whether the corresponding digital certificate of the digital certificate information is infused by LDAP keeps
Volume, and verify the corresponding subscriber identity information of the username information/user password.
Preferably, the client is Web applications client or C/S applications client;
When the client is Web applications client, between the client and the unified identity authentication service device
Data interaction is carried out by Http/Https agreement;
When the client is C/S client, pass through between the client and the unified identity authentication service device
The api interface of the unified identity authentication service device carries out data interaction.
The present invention also provides a kind of cloud platform unified single sign-on systems comprising client and multiple unified identity authentications
Server and cluster building module, wherein the client includes authentication information collection module, the Unified Identity
Certificate server includes single-sign-on module, authentication module;
The cluster building module, for construct include multiple unified identity authentication service devices cluster, and to described
Cluster does load balance process;
The single-sign-on module for receiving the user login information from client, and is verified the user and is logged in
Information, after the user login information is verified, by the unified domain name of setting create TGT bill and generate with it is described
The corresponding ST bill of TGT bill, and the ST bill is back to the client, so that the client utilizes the ST
Bill single-sign-on or single-point LOG striding domain name under the cluster under the same domain name of the cluster;
The authentication information collection module for reading digital certificate information, and obtains and believes with the digital certificate
Corresponding username information/user password is ceased, and the digital certificate information and the username information/user password are sent out
It send to the unified identity authentication service device;
The authentication module, for according to the digital certificate information judge corresponding digital certificate it is whether expired or
Person is revoked, and verifies whether the corresponding digital certificate of the digital certificate information is registered, and also verifies the user name letter
The corresponding subscriber identity information of breath/user password.
Preferably, the unified identity authentication service device further includes bill cache module, and the client further includes session
Cache module;
The bill cache module, for caching the TGT bill and the ST bill to cache server, with logical
It crosses the cache server and provides the High Availabitity service concentrated and shared for all unified identity authentication service devices;
The session cache module, for protecting the session between all clients and the unified identity authentication service device
There are in session management server, to realize the High Availabitity of session.
Preferably, the authentication module also, is also used in certificate authority downloadable authentication revocation list, to pass through
The certificate revocation list judges whether the digital certificate is revoked.
Preferably, the authentication module is further used for verifying the digital certificate letter by LDAP keeps
It ceases whether corresponding digital certificate is registered, and verifies the corresponding subscriber identity information of the username information/user password.
Preferably, the client is Web applications client or C/S applications client;
When the client is Web applications client, between the client and the unified identity authentication service device
Data interaction is carried out by Http/Https agreement;
When the client is C/S client, pass through between the client and the unified identity authentication service device
The api interface of the unified identity authentication service device carries out data interaction.
The invention has the following beneficial effects: the present invention can provide the body of a unified centralization for cloud platform
Part management and identity authorization system, the function of client single-sign-on can be completed by unified identity authentication service device, can also
To realize the function of authentication, can finally be avoided respective because constructing with Unified Identity management regulation, unified identity authentication system
Waste, the cost for reducing Identity Management caused by authentication system, the safety for improving authentication.
Specific embodiment
The present invention provides a kind of cloud platform unified identity authentication method, as shown in Figure 1, it includes the following steps:
Building includes the cluster of multiple unified identity authentication service devices, and does load balance process to cluster;
Unified identity authentication service device receives the user login information from client, and verifies user login information,
After user login information is verified, TGT bill (ticket granting is created by the unified domain name of setting
Ticket logs in bill) and generate corresponding with TGT bill ST bill (Service Ticket, service ticket), and by ST
Bill is back to client, so as to client using ST bill under the same domain name of cluster single-sign-on or under cluster across
Domain name single-sign-on, single-point LOG striding domain name here refer under single authentication management;
Client reads digital certificate information, and obtains username information/user password corresponding with digital certificate information,
And digital certificate information and username information/user password are sent to unified identity authentication service device;
Unified identity authentication service device judges whether corresponding digital certificate is expired or removed according to digital certificate information
Pin, and verify whether the corresponding digital certificate of digital certificate information is registered, also verification username information/user password is corresponding
Subscriber identity information.
Further, cloud platform unified identity authentication method further includes following step:
Each unified identity authentication service device caches TGT bill and ST bill to cache server, by slow
It deposits server and provides the High Availabitity service concentrated and shared for all unified identity authentication service devices;
Session between all clients and unified identity authentication service device is stored in session management server, with reality
The High Availabitity of existing session.
Further, cloud platform unified identity authentication method further includes following step:
In certificate authority downloadable authentication revocation list, to judge whether digital certificate hangs by certificate revocation list
Pin.
Further, by LDAP (
Lightweight Directory Access Protocol, Light Directory Access Protocol) keeps verification
Whether the corresponding digital certificate of digital certificate information is registered, and verifies the corresponding user's body of username information/user password
Part information.
Further, client is Web applications client or C/S applications client.
When client is Web applications client, pass through Http/ between client and unified identity authentication service device
Https agreement carries out data interaction.
When client is C/S client, pass through unified identity authentication between client and unified identity authentication service device
API (Application Programming Interface, the application programming interface) interface of server carries out data friendship
Mutually.
Preferably, above-mentioned client be also provided with verification graphical verification code function (people's of graphical verification code
Discrimination >=70%, OCR software discrimination≤10%) and Single Sign Out function.Above-mentioned authentication is supported multifactor
Certification, other than user password, mobile digital certificate authentification of message, can also there is the certification etc. of the domain Windows account.
Unified identity authentication service device can also integrate password management function, including built in user password encryption algorithm, mouth
Enable effective period, Cipher Strength verification that there is combination to check that the pluggable ability of rule, user reset password etc..
The technical needs such as above-mentioned single-sign-on, authentication, user and rights management belong to unified identity authentication system
System, due to function opposite independent, it is desirable that this partial function can be disposed independently, separate with application system.
Single sign-on authentication bill has following characteristics: primary effective, effective time is configurable;It can prevent from forging, strategy
It is configurable;Client can not land.
Single-sign-on is the service independently disposed, and the identity authentication function for supporting user to concentrate provides not same area and answers
Single-sign-on between;Authentication then can verify use according to user name, password or other authentication informations that user inputs
The true identity at family.
Unsecured connections or secure connection (SSL) are supported in certification, while supporting unidirectional, two-way SSL;Authentication provide with
The measure of lower safety problem: including network interception, brute force attack, dictionary attack, cookie attack, theft authority, violence are reset
Registration and submission Data attack etc..Single-sign-on implementation is realized using mainstream SSO (Single Sign On, single-sign-on)
Scheme: CAS (Central Authentication Service, central authentication service).
Unified single sign-on system selects Jasig CAS (technological constraint) as the key foundation component of single-sign-on.
CAS is the open source system of Yale University's exploitation, it is intended to provide a kind of reliable single-point logging method for Web application system.CAS
It is had the advantage that with others open source SSO project plan comparison
1.SSO opening is good, and design concept is advanced, architecture is reasonable, configuration is simple, it can be readily appreciated that supporting to act on behalf of function
Energy;
2. supporting a variety of clients such as Java .NET, PHP, can independently dispose;
3. having than more complete document protocol;
4. reliable by industry extensive use, technology maturation.
Keeps select OpenLDAP.OpenLDAP is that the open source of current most widely used LDAP is realized.Figure
Identifying code selects Kaptcha.The advantages of compared to jCaptcha:
1) Kaptcha is easily installed use, and defaults output identifying code.
2) the verifying code value of Kaptcha is associated with Session, supports multiple servers cluster.
The present invention provides a kind of cloud platform unified single sign-on system comprising client shown in Fig. 2 and multiple unifications
Authentication server and cluster building module shown in Fig. 3, wherein client includes authentication information collection module,
Unified identity authentication service device includes single-sign-on module, authentication module.
Cluster building module be used to construct include multiple unified identity authentication service devices cluster, and cluster is loaded
Equilibrium treatment.
Single-sign-on module verifies user login information for receiving the user login information from client, with
After family log-on message is verified, TGT bill is created by the unified domain name of setting and generates ST corresponding with TGT bill
Bill, and ST bill is back to client, so as to client using ST bill under the same domain name of cluster single-sign-on or
Person's single-point LOG striding domain name under cluster.
Authentication information collection module obtains use corresponding with digital certificate information for reading digital certificate information
Name in an account book information/user password, and digital certificate information and username information/user password are sent to unified identity authentication clothes
Business device.
Authentication module is used for according to digital certificate information judging whether corresponding digital certificate is expired or is revoked,
And verify whether the corresponding digital certificate of digital certificate information is registered, also verification username information/user password is corresponding
Subscriber identity information.
Further, unified identity authentication service device further includes bill cache module, and client further includes session cache mould
Block.
Bill cache module is for caching TGT bill and ST bill to cache server, to pass through cache server
It is provided for all unified identity authentication service devices and concentrates shared High Availabitity service.
Session cache module is used to the session between all clients and unified identity authentication service device being stored in session
In management server, to realize the High Availabitity of session.
Further, authentication module is also used in certificate authority downloadable authentication revocation list, to pass through certificate
Revocation list judges whether digital certificate is revoked.
Further, authentication module is further used for corresponding by LDAP keeps verification digital certificate information
Digital certificate whether be registered, and verify the corresponding subscriber identity information of username information/user password.
Further, client is Web applications client or C/S applications client.
When client is Web applications client, pass through Http/ between client and unified identity authentication service device
Https agreement carries out data interaction.
When client is C/S client, pass through unified identity authentication between client and unified identity authentication service device
The api interface of server carries out data interaction.
The client login of single-sign-on is divided into the login of Web applications client and C/S applications client logs in, and client is stepped on
The effect of record is responsible for acting on behalf of the service call of single-sign-on, simplifies application program to the integrated difficulty of single-sign-on, as long as answering
It is logged in program installation client, by simply configuring, so that it may integrated single-sign-on function, without being carried out to application program
Modification.
Client logs in and the interaction of unified identity authentication service device is carried out by Http/Https agreement.C/S application visitor
It is realized by the Restful API of CAS Server (the single-sign-on module i.e. inside unified identity authentication service device) at family end
The TGT/ST of single-sign-on is obtained and note validating.
The SSO session of single-sign-on is stored in session management, to support the centralized management of SSO session.
The billing information of single-sign-on is centrally stored by buffer service.
Authentication is encrypted and is saved by password of the encryption/decryption algorithm component to user.
Authentication updates CRL (certificate revocation list) by the center CA (certificate authority) downloading.
Unified identity authentication service device includes two logic modules: single-sign-on and authentication, and single-sign-on module is negative
The single-sign-on of duty processing client and the request of note validating, and pass through the authentication of authentication module progress user.
Authentication module calls account server to carry out authentication, and account server selects LDAP account server.
The password of user's modification is saved to LDAP keeps.
User management shares user by database mode and extends information, and authentication is obtained by database connection type
The extension information of user.
As shown in figure 3, needing to solve SSO to realize High Availabitity demand of the unified single sign-on system without Single Point of Faliure
(single-sign-on) Session and bill it is shared, can be using concentrating shared and distribution copy to two schemes, this system is adopted
With the shared high availability scheme of concentration.
Unified identity authentication service uses trunking mode, does load balancing and Failover (failover) using Nginx.
CAS bill (including TGT bill and ST bill) concentration is buffered on cache server, to prevent from recognizing in Unified Identity
CAS bill is caused to lose after demonstrate,proving the Single Point of Faliure of server.
In order to support CAS bill not lose because of Single Point of Faliure in cache server, cache server is needed to provide high
Available solutions.
Because TGT bill is stored in TGT-cookie, in order to enable any unified identity authentication in cluster
Server generate TGT-cookie to all CAS Servers (that is to say above-mentioned single-sign-on module) in cluster as it can be seen that
Need to be arranged identical domain name.It needs in warnCookieGenerator and ticketGrantingTiketCookieGener
The setting for increasing cookieDomain in the bill generation strategy of ator, is arranged to unified domain name, for example all services are arranged
The identical father field name cas.szse.cn of device.
As also shown in e.g. figs. 4-7, Fig. 4 shows the main flow of single-sign-on, and Fig. 5 shows the cross-domain name of Web applications client and visits
The main flow asked, Fig. 6 show the main flow of C/S applications client single-sign-on, and Fig. 7 shows the number of Web applications client
Word certificate verification process.
Each user information (Group after avoiding directly is stored in the graph structure suggestion of LDAP data at " people "
Variation lead to structure change), distinguish user grouping by increasing simple " ou " attribute in each user information.
The present invention can provide the Identity Management and identity authorization system of a unified centralization for cloud platform, can unify
Identity Management specification, unified identity authentication system are finally avoided because of waste, reduction body caused by constructing respective authentication system
The cost of part management, the safety for improving authentication.
The above content is a further detailed description of the present invention in conjunction with specific preferred embodiments, and it cannot be said that
Specific implementation of the invention is only limited to these instructions.For those of ordinary skill in the art to which the present invention belongs, exist
Under the premise of not departing from present inventive concept, a number of simple deductions or replacements can also be made, all shall be regarded as belonging to of the invention
Protection scope.