Why should I authenticate a client using a certificate?
Asked Answered
A

5

17

I'm implementing a client with python's twisted that checks the server ssl certificate when connecting, following basically this recipe. I've seen in many HOWTOs such as this one the server checking the client's authenticity through a ssl certificate as well. Currently i authenticate my clients using an unique id and 1024 char string (they are automated clients without human interaction).

What I don't understand is what reason would I have to use the whole ssl thing for this instead of just sending the "password" to the server. After all the connection is already ssl encrypted, checking the server certificate and everything. This is a similar question but I want to know why people use ssl client certs and not just what is the best way to do it instead.

Acknowledge answered 29/1, 2010 at 19:0 Comment(0)
P
4

A client certificate restricts access to people authorized with certificates. Assuming your certificates are distributed and managed correctly, this makes it more difficult to connect from an unauthorized location (or say, a bot network), since you need more than just a username and password.

Client-side certificates are a potential part of a defense-in-depth strategy, if you are in an environment where you can manage client certificates.

Patriliny answered 29/1, 2010 at 19:7 Comment(3)
The client is checking the server certificate so a connection can only be done with the real server. If the connection is encrypted using the server ssl setup can someone still make a mitm attack? I suppose a client certificate could make it harder to ddos my server with invalid auth requests but I'm not sure. What I mean is it seems to me the client certificate is basically a fancy password, I don't see the difference. Thanks for your answer.Acknowledge
MITM attack is not supposed to possible with SSL (check server certificates, obviously). However, a username/password is easily divulged. So for another layer, a client certificate is more than a fancy user/password - it is a signed artifact with a distribution management system and revocation, etc. With an ordinary username/password, you can try different password attacks from multiple machines without needing a certificate. Client certificates are for another level of security - usually only possible in a controlled environment.Patriliny
Yes, the management and distribution of certificates is the tricky part.Morganmorgana
M
2

Certificates are easy to revoke. Passwords can be stolen, but stealing a client side certificate would be much harder.

Mccann answered 29/1, 2010 at 19:41 Comment(2)
The client I wrote doesn't need any human input, so the password is already in a text file the client reads and sends to the server. If someone can steal the password file they can steal the client cert file as well. If I need to "revoke" the client password I can just change it on the database/whatever. So in this case, what are the advantages of using a cert over a pwd string on a file?Acknowledge
Is the password sent over the wire in cleartext? If yes, it can be stolen. Most OS store client certificates in an encrypted store specific to the login used.Mccann
B
2

Using client certificate based mutual authentication prevents at least the following attacks/problems:

  • Phishing the password
  • Key logging the password
  • Shoulder surfing the password
  • Guessing the password
  • Password reuse on several services

Additionally, using client certs gives you the possibility to store client certificate (and the matching private key) on a smartcard, USB token or other hardware security module (HSM), thereby going from "something you know" (password) to "something you possess physically" (token, card) plus "something you know" (PIN). This is also called two-factor authentication.

In your specific case of using passwords as shared keys in a technical, system to system communication link, using certificates has two advantages:

  • scales better: with shared keys, every node has to share a different key/password with each other node, resulting in (n-1)! passwords, while with certificates, each node needs only one certificate and private key (n certificates plus a CA)
  • the possibility of storing the key on a HSM and thereby prevent it from being copied/stolen digitally.
Bolen answered 16/3, 2012 at 12:6 Comment(0)
W
1

The main advantage of client-side authentication (i.e. when server checks client certificate) is that if server gets compromised, the client's secret, which is private key for certificate, won't be compromised. Whereas if client uses credentials they could be compromised along with server.

Winzler answered 10/1, 2017 at 10:55 Comment(0)
T
-3

Owning SSL certificates that are signed by a certificate authority means that the SSL certificate owners have gone through the hassle of being verified by the CA that the owner is who they say they are. For instance, if you have an ecommerce store called widgetsdeluxe.com and you have a certificate for the domain widgetsdeluxe.com that has been signed by Verisign, et. Al., shoppers will know that when they go to that site and the name on the certificate matches the actual domain name they went to, then they can trust that the information is secured and is coming from the widgetsdeluxe.com domain (this is to prevent spoofing and man-in-the-middle attacks).

Tletski answered 29/1, 2010 at 19:6 Comment(1)
This answer only addresses server certificates, the OP was asking why a client-side certificate would be useful.Patriliny

© 2022 - 2024 — McMap. All rights reserved.