Summary of the invention
Technical problem to be solved by this invention is, a kind of access control technology based on DN in the digital certificate (Distinguished Name distinguished name) element is provided, when can be implemented in TSM Security Agent, to the unified access control of all services of providing in the network.
The technical scheme that the present invention solve the technical problem employing is, a kind of access control method is provided, to doing access control, record the User Identity template according to Access Control List (ACL) in the described Access Control List (ACL) from the visit of ssl proxy client---handle the action mapping relation; Described User Identity template is a ssl proxy client certificate DN template.
Result by certificate main body DN and DN template matches discerns the user.When the ssl proxy server receives when connecting from the SSL of ssl proxy client, acting server extracts main body DN from ssl proxy client user's digital certificate, and mates with the Access Control List (ACL) of being set up; If can mate, then handle this connection according to matching result; If can not mate, then handle according to default action.Described processing action comprises: allow or refuse the visit of set kind, allow or refusal to the visit of the set kind of certain set address.Described set address is the set server address that service is provided, and the visit of described set kind comprises HTTP, FTP or TELNET or user-defined type service based on TCP.
Above-mentioned " User Identity template " can be main body DN template.To specific user, in other words, the every attribute of main body DN is all obtained showing as main body DN under the situation of appointment, this paper is considered as a kind of form of DN template.As the list1 in the embodiment.
The present invention also provides a kind of security proxy server with access control, comprises the ssl proxy device, also comprises access control apparatus, and described access control apparatus comprises storage device, processing unit; Storage device stores Access Control List (ACL); Record the User Identity template in the described Access Control List (ACL)---handle the action mapping relation; Described User Identity template is a ssl proxy client certificate DN template; Processing unit extracts main body DN and mates with the Access Control List (ACL) in the storage device from the ssl proxy client certificate, handle accordingly according to matching result.Corresponding being treated to:, then handle this connection according to matching result if can mate; If can not mate, then handle according to default action.
The invention has the beneficial effects as follows:
1, using ssl protocol to carry out providing on the basis of security protection access control function to institute's agency service; 2, can provide unified access control planning to all application systems of acting on behalf of in the scope; 3, can be by control of authority that main body DN different in the application certificate is conducted interviews flexibly.
The present invention is further illustrated below in conjunction with specification drawings and specific embodiments.
Embodiment
Referring to Fig. 1 and Fig. 2, the present invention relates to acting server end and agent client based on ssl protocol.In ssl protocol, use server end and client certificate verification simultaneously, promptly use the SSL server certificate at the ssl proxy server end, use the SSL client certificate in the ssl proxy client, the user in use, need to use the SSL client certificate to login, could be connected with the ssl proxy server.Because therefore the title that the main consuming body DN comes identifying user in the digital certificate is just controlled the user access that indicates among the main body DN based on the access control of digital certificate.The Access Control List (ACL) of main body DN element in the ssl proxy server end is realized based on digital certificate, every the control tabulation can comprise some clauses and subclauses, each clauses and subclauses is made up of the DN template and the processing action of needs coupling, promptly can specify main body DN to satisfy the user's of a certain DN matching template access rights, these access rights can be appointed as refusal or allow.Described DN template is come out by the main body DN information extraction of standard digital certificate, is the combination of digital certificate main body DN field,
Digital certificate as herein described is meant the X509v3 certificate format of employing standard, and the information field that comprises in this certificate format mainly contains: certificate version number, certificate serial number, certificate authority person, certificate main body, validity period of certificate, public key algorithm information etc.Wherein certificate authority person and certificate main body all use the mode of DN to represent, the certificate main body is the owner of certificate, and issuer is meant the CA that this certificate is issued.The access control that we did be exactly owner at certificate be that the certificate main body is controlled, so our the main consuming body DN is as the object of our control.
DN is made up of a series of relative distinguished name (RDN, Relative DistinguishedName), and RDN generally includes CN, OU, O, L, ST and C (CN, OU, O, L, ST, C are used to mark the attribute of object).We are that the basic element of DN matching template is set up access control list (ACL) with these six promptly, when the SSL server receives when connecting from the SSL of client, server extracts this user's DN from client user's digital certificate, and mate with the ACL that is set up, if on the coupling, then allow or refuse to determine processing,, then handle according to default ACL action if unmatch to this connection according to the action of the acl entry that is mated.
Specifically, implementation step is as follows:
1, the agency who " HTTP service ", " FTP service " is reached " other service " is set in the ssl proxy server.
2, the ssl proxy server is embodied as requirement client certificate is verified.
3, set up needed Access Control List (ACL) at the ssl proxy server end.
4, when the request of sending from the ssl proxy client a certain service, the SSL server end reaches the User DN that extracts according to defined Access Control List (ACL) and compares from client certificate, and next step operation is carried out in specified action according to Access Control List (ACL).
Below be embodiment more specifically, as Fig. 3.
Between protected Intranet and outer net, the arrangement acting server, its outer net interface IP address is 202.115.72.23, extranet interfaces address 192.168.0.1; Acting server is acted on behalf of three different application servers in certain company's internal network, i.e. http server, ftp server and other server (as mis system etc.).
The pairing IP of each server address is as follows:
192.168.0.23——MIS
192.168.0.25——FTP
192.168.0.27——HTTP
Access rights to these three kinds of dissimilar application are assumed to be:
1, all employees of company can visit http server;
2, the employee of other department can visit ftp server except that research institute of company employee;
3, has only the mis system that the first of Human Resource Department and second can visited company.
At above access rights control, we are configured to Access Control List (ACL) down on acting server:
When certificate management system carried out certificate authority to the employee, do to give a definition: Business Name was defined as: mp; Research institute's department name is defined as: R﹠amp; D; Human Resource Department's title is defined as: PR.
list1
The cn=first, ou=PR, o=mp, c=cn:permit
Cn=second, ou=PR, o=mp, c=cn:permit
list2
cn=any,ou=any,o=mp,c=cn:permit
list3
cn=any,ou=R&D,o=mp,c=cn:deny
Be explained as follows:
list1:
" cn=first, ou=PR, o=mp, c=cn " is the DN matching template, and " permit " is corresponding processing action.
If main body DN and " cn=first, ou=PR, o=mp " coupling then implement to handle action " permission ";
If main body DN and " cn=second, ou=PR, o=mp " coupling then implement to handle action " permission ";
list2:
If main body DN and " o=mp " coupling are then implemented to handle action and are allowed;
list3:
If main body DN and " ou=R﹠amp; D, o=mp " coupling, then implement to handle action " refusal ".
Contain among above-mentioned list2 and the list3 " cn=any ", cn is any in expression.
Access control list application defined above to the application service of being acted on behalf of, can be realized the access control to the difference service.As follows:
proxy?http?192.168.0.27:80?list?2
proxy?ftp?192.168.0.25:21?list?3
proxy?mis?192.168.0.23:8888?list?1
Be explained as follows:
Http access application tabulation 2 to the 192.168.0.27 server;
Ftp access application tabulation 3 to the 192.168.0.25 server;
Mis access application tabulation 1 to the 192.168.0.27 server;