HTTPS vs SSL Authentication

Status
Not open for further replies.
Hey Guys, thought I'd post this as I'm a little confused at trying to explain some things and I'm not 100% sure I'm right.

Our dev's are trying to validate an SSL connection between API's and keep getting locked up on the HTTPS domain SSL cert. They think it MUST be changed to support their API authentication... but this doesn't make sense to me. To me this is 2 different things and maybe I'm trying to explain it wrong.

HTTPS SSL Cert is for domain validation and encryption, Correct?

The "other side" has provided US with a JKS file containing a PUBLIC and supposedly PRIVATE key for us to use in their API... First I find that they'd give us a Private Key instead of us providing them a public key is strange, but I'll roll with it for now... To me this shows an APPLICATION level AUTHENTICATION that has nothing to do with the HTTPS certificate...

Is this correct? If so, am I explaining it right or is there a better way to explain this?
 

Faramir

Ars Legatus Legionis
36,356
Subscriptor
My guess is that the application is using client authentication. In ordinary web HTTPS the client gets a certificate from the server and using PKI verifies that the server is who it says it is. The client, however, does not provide a certificate to the server and so has to prove who it is through some other mechanism--typically a username and password. When using client authentication both sides provide certificates and can be authenticated.

One problem with this is that there's no generally accepted means of obtaining client side certificates such that they can be traced to trust root. So what ends up happening is the parties pre-share a client certificate, most commonly it is generated by the server owner using a private CA. This could be done with a certificate signing request which would avoid having to transmit a private key, but my sense is that it is rarely done that way.
 

tinyMan

Ars Tribunus Angusticlavius
6,149
Subscriptor++
Mututal Auth, Client Certificates, X.509, Certificate Based Authentication, Client Auth, etc.

This scheme goes by many names. It can be used to strongly authenticate a client to a server, provided the certificates are unique per client.

Its probably my least favorite authentication solution (for web sites/apis), as the overhead of managing certificates is a bigger pain than most other credentials, and getting common web libraries to play nicely with client side certs can be a pain. Worse, you may need to munge the certs between a variety of formats (DER/CRT/CER/PEM) to work with different tools.

Them handing you a private key is typical. The infrastructure and communication overhead to handle client generated keys and signing requests is typically "too much" for the types of companies that end up using these types of solutions.
 

Faramir

Ars Legatus Legionis
36,356
Subscriptor
[url=http:/civis/viewtopic.php?p=28762989#p28762989:38wpsmm1 said:
tinyMan[/url]":38wpsmm1]Its probably my least favorite authentication solution (for web sites/apis), as the overhead of managing certificates is a bigger pain than most other credentials, and getting common web libraries to play nicely with client side certs can be a pain. Worse, you may need to munge the certs between a variety of formats (DER/CRT/CER/PEM) to work with different tools.
As a purely technical matter, I like the TLS-PSK family of ciphersuites (i.e. RFC 5487 or 5489). Why muck around with public and private keys if you are relying on a pre-shared secret anyway?

But library support for that makes client side SSL look like basic auth.
 

ShuggyCoUk

Ars Legatus Legionis
10,387
Subscriptor++
If you're in a shared domain in windows and use something like auto enrolment, or some similar internally hosted PKI then your clients and servers can both get X509 Certs from the trusted root (which would have its own CA cert, or more than one). In this way the cert can be used to prove who you are as a client, just by saying "My CA says I'm X". if you assume non hostile/stupid clients. Keep the client cert lifetime low enough and they should function fine.

Now if you don't have that nice central authority you both trust then a simple solution is to arrange to share everything up front. You have a harder problem for revoking things, and dealing with expiry, but it's also very simple. Obviously the whole public/private key exchange is being utterly ignored, but you can then make use of all the solid (you hope) APIs and protocols that can work perfectly well no matter how they are given their certificates.
 
[url=http:/civis/viewtopic.php?p=28760357#p28760357:je68vxjn said:
Sharkannon[/url]":je68vxjn]Hey Guys, thought I'd post this as I'm a little confused at trying to explain some things and I'm not 100% sure I'm right.

Our dev's are trying to validate an SSL connection between API's and keep getting locked up on the HTTPS domain SSL cert. They think it MUST be changed to support their API authentication... but this doesn't make sense to me. To me this is 2 different things and maybe I'm trying to explain it wrong.

HTTPS SSL Cert is for domain validation and encryption, Correct?

The "other side" has provided US with a JKS file containing a PUBLIC and supposedly PRIVATE key for us to use in their API... First I find that they'd give us a Private Key instead of us providing them a public key is strange, but I'll roll with it for now... To me this shows an APPLICATION level AUTHENTICATION that has nothing to do with the HTTPS certificate...

Is this correct? If so, am I explaining it right or is there a better way to explain this?

Yeah, you're explaining it right. The certificate is the "Client Certificate" in TLS -- you wire it up to the JSSE KeyManager in the keystore, on the client side.

https://docs.oracle.com/javase/7/docs/t ... KeyManager

Note that this is, as you say, only going to authenticate things for the application -- if multiple users are connecting over this API with different credentials, it's still going to be using the same X.509 certificate for the connection. In this situation, you'd want to use another level of user authentication.

If you turn on -Djavax.net.debug=ssl then that should show the X.509 certificate being hooked up.

Also, you should check that you're doing hostname verification: https://tersesystems.com/2014/03/31/tes ... ification/
 
Status
Not open for further replies.