Summary of the invention
The technical problem that the present invention mainly solves provides bidirectional safe auditing method and the device in a kind of distributed system; Guarantee that identity and authority in the operation of various legal role after login system in user in the distributed system, application program, server and the system applies scene are legal effectively, at utmost safeguards system safety.
In order to solve the problems of the technologies described above, the invention provides the bidirectional safe auditing method in a kind of distributed system, it is one of following that audit log comprises at least: operating time, data source, safe class and access result, and comprise following steps:
Each controlled end comprises an identity authentication module in the distributed system, the corresponding authority information of digital certificate, Role Information and role of this controlled end of storage in this authentication module;
Controlled end is logined said distributed system after using said digital certificate through authentication;
During the each executable operations of the controlled end after login; With reference to the pairing authority information of the current role of this controlled end its operation information is audited; If comprise said operation permission in this authority information; Then allow this controlled end to carry out said operation, otherwise forbid that then this controlled end carries out said operation;
This controlled end comprises the client that inserts said distributed system and the server in the said distributed system at least.
As the improvement of technique scheme, when the each executable operations of controlled end, also comprise following steps:
The controlled end digital certificate is verified, after checking is passed through, its operation information is audited with reference to the pairing authority information of the current role of this controlled end.
As the improvement of technique scheme, before the step that the user's of this client digital certificate is verified, user's key is verified.
As the improvement of technique scheme, if at least two roles of controlled end correspondence, the then corresponding Role Information authority information corresponding that comprises each role in the authentication module of this controlled end with each role;
Controlled end is selected the role of current use when the said distributed system of login.
Improvement as technique scheme; Authentication module is an external connection module; In the step of the step of digital certificate checking and the audit of said operation information; Obtain the digital certificate and the pairing authority information of current role of controlled end from this external authentication module, is connected if controlled end is broken off with external authentication module, then this digital certificate checking or operation information audit are failed.
As the improvement of technique scheme, it is one of following that the operation that controlled end is carried out comprises at least: obtain service, access system resources, visit back-end data.
As the improvement of technique scheme, digital certificate is based on the digital certificate of standard X.509;
The corresponding authority information of role is kept in this extended field based on the digital certificate of standard X.509.
As the improvement of technique scheme, the corresponding authority credentials of sorts of systems resource and back-end data difference in the distributed system, each service in this distributed system is a corresponding service codes respectively;
The authority information of authentication module storage comprises an accessible services tabulation and an authority credentials;
The mode of its operation information being audited with reference to the pairing authority information of the current role of controlled end is:
If corresponding current role's in service codes and the authentication module thereof in its request accessible services tabulation is then read in controlled end acquisition request service, if this service codes corresponding authority in this tabulation then allows this controlled end to obtain said service for allowing; If instead the corresponding authority of this service codes, forbids then that this controlled end obtains said service for forbidding;
If controlled end request access system resources or back-end data; Then will this system resource to be visited or the authority credentials of back-end data compare with the authority credentials of this controlled end; If the controlled end authority credentials is greater than or equal to the authority credentials of system resource or back-end data to be visited, then allow this controlled end to visit said system resource or back-end data; Otherwise, forbid that then this controlled end visits said system resource or back-end data.
As the improvement of technique scheme, the accessible services tabulation is a character string, corresponding service of each bit in the character string, and this controlled end of the value representation of this bit allows or bans use of this service.
As the improvement of technique scheme,, preserve audit log for the executable operations of the high safety grade in the preset range;
It is one of following that audit log comprises at least: operating time, data source, safe class and access result.
The present invention also provides the audit device of the bidirectional safe in a kind of distributed system, also comprises:
Each controlled end comprises an identity authentication module in the distributed system, the corresponding authority information of digital certificate, Role Information and role of this controlled end of storage in this authentication module, and this device comprises:
Authentication module is used for the controlled end digital certificate is verified, after checking is passed through, allows this client to login said distributed system;
Authority audit module; Be used for when the each executable operations of controlled end; With reference to the pairing authority information of the current role of this controlled end its operation information is audited; If comprise said operation permission in this authority information, then allow this controlled end to carry out said operation, otherwise forbid that then this controlled end carries out said operation;
Controlled end comprises the client that inserts said distributed system and the server in the said distributed system at least.
Improvement as technique scheme also comprises:
Identity audit module is used for when the each executable operations of controlled end, this controlled end digital certificate being verified, after checking was passed through, indication authority audit module was audited to operation information.
As the improvement of technique scheme, for client, identity audit module is also verified the user's that uses this client key.
As the improvement of technique scheme, if at least two roles of controlled end correspondence, the then corresponding Role Information authority information corresponding that comprises each role in the authentication module of this controlled end with each role;
Controlled end is selected the role of current use when the said distributed system of login.
Improvement as technique scheme; Authentication module is an external connection module; Authority audit module and identity audit module are obtained the digital certificate and the pairing authority information of current role of controlled end from this external authentication module; If breaking off with external authentication module, controlled end is connected, then digital certificate checking or said operation information audit failure.
As the improvement of technique scheme, it is one of following that the operation that controlled end is carried out comprises at least: obtain service, access system resources, visit back-end data;
The corresponding authority credentials of sorts of systems resource and back-end data difference in the distributed system, each service in this distributed system is a corresponding service codes respectively; The authority information of authentication module storage comprises an accessible services tabulation and an authority credentials;
The mode that authority audit module is audited to operation information is:
If corresponding current role's in service codes and the authentication module thereof in its request accessible services tabulation is then read in controlled end acquisition request service, if this service codes corresponding authority in this tabulation then allows this controlled end to obtain said service for allowing; If instead the corresponding authority of this service codes, forbids then that this controlled end obtains said service for forbidding;
If controlled end request access system resources or back-end data; Then will this system resource to be visited or the authority credentials of back-end data compare with the authority credentials of this controlled end; If the controlled end authority credentials is greater than or equal to the authority credentials of system resource or back-end data to be visited, then allow this controlled end to visit said system resource or back-end data; Otherwise, forbid that then this controlled end visits said system resource or back-end data.
As the improvement of technique scheme, the accessible services tabulation is a character string, corresponding service of each bit in the character string, and this controlled end of the value representation of this bit allows or bans use of this service.
Improvement as technique scheme also comprises:
The audit log module for the executable operations of the high safety grade in the preset range, is preserved audit log;
It is one of following that audit log comprises at least: operating time, data source, safe class and access result.
Embodiment of the present invention compared with prior art; The main distinction and effect thereof are: controlled end in distributed system (comprising the client that inserts distributed system and the server in the distributed system at least) is through authentication; After the login distributed system; During each executable operations, with reference to the pairing authority information of the current role of this controlled end its operation information is audited, if comprise this operation permission in this authority information; Then allow this controlled end to carry out this operation, otherwise then forbid this this operation of controlled end execution; Thereby guarantee that identity and authority in the operation of various legal role after login system in user in the distributed system, application program, server and the system applies scene are legal effectively, at utmost safeguards system safety.
When the each executable operations of controlled end, also this controlled end password and digital certificate are verified, promptly carry out the identity audit, after the identity audit is passed through, its operation information is audited with reference to the pairing authority information of the current role of this controlled end.Thereby prevent that effectively the operator from leaving under the situation temporarily, illegal person usurps situation, further guarantees system security.
This authentication module is an external connection module; In the step of the step of authentication and operation information audit; All obtain the digital certificate and the pairing authority information of current role of controlled end, be connected in case controlled end is broken off with external authentication module, then authentication or operation information audit failure from this external authentication module; Controlled end can't be carried out any operation, has ensured security of system.
For safe class higher resource access and executable operations, all can stay the audit log of information such as comprising time, data source, safe class and access result, in order to statistics and tracking from now on, find suspicious situation at any time.
Embodiment
For making the object of the invention, technical scheme and advantage clearer, embodiment of the present invention is done to describe in detail further below in conjunction with accompanying drawing.
First embodiment of the invention relates to the bidirectional safe auditing method in a kind of distributed system; In this execution mode; Abandon that server is defaulted as safe idea in traditional system; Before the each executable operations of client in distributed system and server, all to carry out the audit of identity authentication and authority, promptly carry out and resource is enjoyed the identity authentication of carrying out and authority audit are all arranged for user or data in server visit each time, operation to it.Wherein, operation is carried out and is generally comprised the service of obtaining, access system resources, visit back-end data etc.And, also carry out track record for the executable operations of the high safety grade in the preset range, generate log information, so that system produces off-line statistics and Audit Report in view of the above in the future.
In this execution mode, the user sends the request of landing to distributed platform, and inputs corresponding password.If when user related two or above role, then need on log-in interface, to select corresponding role.At this moment, distributed platform is verified digital certificate in conjunction with key.After the distributed platform checking is passed through, return and this user-selected role and the corresponding user interface of authority thereof.If the user need carry out an operation; Need to submit corresponding operation information to distributed platform; As system resource sign of asking the service codes of serving or asking visit or back-end data sign etc., carry out the dual audit of identity and authority by distributed platform, and note corresponding audit log.
Concrete bidirectional safe auditing method is as shown in Figure 1, and in step 101, the user sends the request of landing through client to distributed platform, an external identity authentication module on client, and input corresponding password in client.In this step,, also need select the role of current login if when this user related two or above role.The Role Information and the corresponding authority information of role that comprise the corresponding role of digital certificate, this user of this user in this authentication module.For the user who comprises a plurality of roles, comprise each Role Information in this authentication module respectively, and the corresponding authority information of each role.
In the step 102, distributed platform combines user's key that its digital certificate is verified.
Obtain user's digital certificate from this external authentication module, be connected if the client that the user uses is broken off with external authentication module, then authentication is failed.
Wherein, digital certificate adopts based on standard X.509, and user role and the corresponding authority information of role are kept in the extended field of this digital certificate, and is as shown in Figure 2.
In the step 103, return the checking result to the user.If checking is passed through, then return the corresponding user interface of this role and authority, get into step 104.If, then do not return login failure information, process ends through checking.
In the step 104, the user submits required executable operations request to distributed platform.The operation that the user need carry out generally comprises: obtain service, access system resources, visit back-end data etc.
In the step 105; After distributed platform is received the request of this executable operations, earlier the user is carried out authentication, after authentication is passed through; With reference to the pairing authority information of the current role of this user its operation information is audited; Confirm whether this user has the authority of carrying out corresponding operating, if this operation permission of execution is arranged then get into step 106, if not then get into step 107.
Wherein, the mode of authentication is verified digital certificate in conjunction with user's key with step 102.Promptly require the user to input password, this user's password and digital certificate are verified respectively.
The mode of with reference to the pairing authority information of the current role of this user its operation information being audited specifically, is following:
Each service in the distributed system is a corresponding service codes respectively; The corresponding authority credentials of sorts of systems resource and back-end data difference in the distributed system.The authority information of user's authentication module storage comprises an accessible services tabulation and an authority credentials.
Wherein, the accessible services tabulation is a character string, totally 128 bits.Corresponding service of each bit in the character string, the value of this bit are that 1 expression allows this user to use this service, and the value of this bit is that 0 mark expression bans use of this service, and is as shown in table 1.
Table 1
If the user asks the service of obtaining that is operating as carried out; Then read corresponding current role's in service codes and the authentication module thereof in its request accessible services tabulation; If this service codes corresponding authority in this tabulation is to allow, then allow this user to obtain this service; If instead the authority of this service codes correspondence forbids then that for forbidding this user obtains this service.A is an example with service; The user should when service in the needs acquisition request, in its operation requests, comprises service codes 28, and distributed platform finds corresponding bit in this user's the accessible services tabulation according to this service codes; This bit is 0, explains and forbids that this user obtains this service.
If the user asks access system resources or back-end data; Then will this system resource to be visited or the authority credentials of back-end data compare with this user's authority credentials; If the user right value is greater than or equal to the authority credentials of system resource or back-end data to be visited, then allow this user capture system resource or back-end data; Otherwise, then forbid this user capture system resource or back-end data.For example, the user hopes to visit the A resource, then in its operation requests, comprises institute's requested resource sign; After distributed platform is received this request; Confirm the authority credentials of A resource according to this resource identification, the authority credentials of storing in this authority credentials and the authentication module is compared, if the authority credentials in the authenticating user identification module is lower than the authority credentials of A resource; Then forbid this user capture A resource, otherwise then allow this user capture A resource.
Through combining tabulation of 128 bit service and authority credentials to carry out the authority audit, it is more convenient to make that the authority audit implements, and audit speed is faster, and the system that do not influence normally uses.
In the step 106, the relevant position of the addressable tabulation that the current role of contrast user is corresponding is 1 o'clock at the bit of correspondence position, and this user has this operation permission of execution, returns service object's interface to this user.The user obtains required information according to service object's interface to corresponding server, comprises the required service of user, user capture system resource or back-end data etc.
In the step 107, obtain this user in the authority audit and do not have this operation permission of execution, the information of return request failure.
In this execution mode, server when carrying out any operation, need be audited after startup equally.Specifically, server need call other services, access system resources or back-end data equally providing for the user in the process of service; When server carries out aforesaid operations; Platform is audited to it equally, after audit is passed through, returns corresponding service object's interface.
Idiographic flow is as shown in Figure 3, in step 301, lands distributed platform during startup of server.Identical with the user, need an external identity authentication module during server log equally, the digital certificate of this server of storage, Role Information and corresponding authority information in this authentication module.Wherein Role Information is fixing, i.e. role server.Server needs password equally when login, use for ease, and its login password can directly be kept in this server program.
In the step 302, distributed platform combines the password of server that its digital certificate is verified.
Obtain the digital certificate of server from this external authentication module, is connected if server breaks off with external authentication module, then authentication is failed.
Digital certificate is same to be adopted based on standard X.509, and role server (static character) and corresponding authority information are kept in the extended field of this digital certificate, as shown in Figure 2.
In the step 303, platform returns the checking result to server.If checking is passed through, then allow this server log distributed platform, get into step 304.If, then do not return login failure information, process ends through checking.
In the step 304, when demand was arranged, server was submitted required executable operations request to distributed platform.Generally comprise: obtain other services, access system resources, visit back-end data etc.
In the step 305; After distributed platform is received the request of this executable operations, earlier server is carried out authentication, after authentication is passed through; Authority information with reference to this server is current is audited to its operation information; Confirm whether this server has the authority of carrying out corresponding operating, if this operation permission of execution is arranged then get into step 306, if not then get into step 307.
Wherein, the mode of authentication is verified digital certificate in conjunction with the key of server with step 302.Promptly the password and the digital certificate of this server are verified respectively.
Similar in mode of its operation information being audited with reference to the current authority information of this server and the step 105; Be operating as the service of obtaining if server requests is carried out; Then read service codes and the tabulation of the accessible services in the authentication module thereof in its request; If this service codes corresponding authority in this tabulation is to allow, then allow this server to obtain this service; If instead the authority of this service codes correspondence forbids then that for forbidding this server obtains this service.
If server requests access system resources or back-end data; Then will this system resource to be visited or the authority credentials of back-end data compare with the authority credentials of this server; If the server authority credentials is greater than or equal to the authority credentials of system resource or back-end data to be visited, then allow this server access system resource or back-end data; Otherwise, then forbid this server access system resource or back-end data.
In the step 306, the operation requests of this server is through audit, and distributed platform returns service object's interface to this server.Server obtains required information according to service object's interface to corresponding server, comprises the required service of server, server access system resource or back-end data etc.
In the step 307, obtain this server in the authority audit and do not have this operation permission of execution, the information of return request failure.
In sum; After adopting above-mentioned two-way audit technique; Any user in the distributed system and server are carrying out each time service call, data call each time, each time during resource access, all need carry out identity audit and authority audit, thereby guarantee that various legal role in user in the distributed system, application program, server and the system applies scene is in login system afterwards during executable operations; Its identity and authority are legal effective, at utmost safeguards system safety.And,, all can stay the audit log of information such as comprising time, data source, safe class and access result, in order to statistics and tracking from now on for safe class higher resource access and executable operations.Thereby further safeguards system safety.
And, before the authority information of user or server is audited, earlier this controlled end password and digital certificate are verified; Promptly carry out the identity audit; Thereby prevent that effectively the operator from leaving under the situation temporarily, illegal person usurps situation, further guarantees system security.
Second embodiment of the invention relates to the bidirectional safe audit device in a kind of distributed system; Comprise: each controlled end comprises an identity authentication module in the distributed system; The corresponding authority information of digital certificate, Role Information and role of this controlled end of storage in this authentication module, this device comprises: authentication module is used for the controlled end digital certificate is verified; After checking is passed through, allow this client login distributed system; Authority audit module; Be used for when the each executable operations of controlled end; With reference to the pairing authority information of the current role of this controlled end its operation information is audited; If comprise this operation permission in this authority information, then allow this controlled end to carry out this operation, otherwise then forbid this this operation of controlled end execution; Controlled end comprises the client that inserts distributed system and the server in the distributed system at least.
As the improvement of technique scheme, can also comprise in this device: identity audit module is used for when the each executable operations of controlled end, this controlled end digital certificate being verified that after checking was passed through, indication authority audit module was audited to operation information.
As the improvement of technique scheme, for client, this identity audit module is also verified the user's that uses this client key.
As the improvement of technique scheme, if at least two roles of controlled end correspondence, the then corresponding Role Information authority information corresponding that comprises each role in the authentication module of this controlled end with each role; Controlled end is selected the role of current use when the login distributed system.
Improvement as technique scheme; Authentication module is an external connection module; Authority audit module and identity audit module are obtained the digital certificate and the pairing authority information of current role of controlled end from this external authentication module; If breaking off with external authentication module, controlled end is connected, then digital certificate checking or this operation information audit failure.
As the improvement of technique scheme, it is one of following that the operation that controlled end is carried out comprises at least: obtain service, access system resources, visit back-end data; The corresponding authority credentials of sorts of systems resource and back-end data difference in the distributed system, each service in this distributed system is a corresponding service codes respectively; The authority information of authentication module storage comprises an accessible services tabulation and an authority credentials;
The mode that authority audit module is audited to operation information is: if the service of controlled end acquisition request; Then read corresponding current role's in service codes and the authentication module thereof in its request accessible services tabulation; If this service codes corresponding authority in this tabulation is to allow, then allow this controlled end to obtain this service; If instead the corresponding authority of this service codes, forbids then that this controlled end obtains this service for forbidding;
If controlled end request access system resources or back-end data; Then will this system resource to be visited or the authority credentials of back-end data compare with the authority credentials of this controlled end; If the controlled end authority credentials is greater than or equal to the authority credentials of system resource or back-end data to be visited, then allow this controlled end this system resource of visit or back-end data; Otherwise, then forbid this controlled end this system resource of visit or back-end data.
As the improvement of technique scheme, the accessible services tabulation is a character string, corresponding service of each bit in the character string, and this controlled end of the value representation of this bit allows or bans use of this service.
As the improvement of technique scheme, this device can also comprise: the audit log module, for the executable operations of the high safety grade in the preset range, preserve audit log; It is one of following that audit log comprises at least: operating time, data source, safe class and access result.
Through this execution mode, can guarantee that identity and the authority in the operation of various legal role after login system in user in the distributed system, application program, server and the system applies scene is legal effectively, at utmost safeguards system safety.
Though through reference some preferred implementation of the present invention; The present invention is illustrated and describes; But those of ordinary skill in the art should be understood that and can do various changes to it in form with on the details, and without departing from the spirit and scope of the present invention.