I thought you could get more details of the error from the browser. Just
give you everything interesting). The code I linked to from the InfoQ
code and add it to the SSLContext init() call. This stackoverflow
http://stackoverflow.com/questions/9179717/using-more-than-one-key-pair-in-ssl-socket-factory-connection
Post by Linus KambHi All,
Thanks for your responses.
I know there are many ways to authenticate the client. Using certs
started out as an exploratory exercise. (Now it's a WTF is going
wrong?!? problem.)
I'm sure there is some slap-myself-in-the-head detail that I've
overlooked or am getting wrong.
I have a client cert imported into FF and Chrome. I've imported that
cert into the server's trust store. Tried as well with independent
(from "regular" ssl port) listener with its own trust and key stores.
FF connection attempts just fail. Chrome says SSL_PROTOCOL_ERROR,
which is at least something. Other than that I get no error or log
messages, and browser network tools say nothing, and I can't tell if
wireshark is telling me anything useful. My feeling is that the
failure is probably some damn string name inconsistency somewhere, but
I am not getting any clues.
thanks,
Linus
Two corrections, not necessarily pertinent to the question. I
wrote: "Thrift or _SOAP_ or ProtoBuf." I meant: "Thrift or _REST_
or ProtoBuf." And about credentials being sent message-level as
opposed to transport-level, well, they always are. I was thinking
about the broader question of message-level vs. transport-level
security, and the SSL (where client is trusting server) is doing
the latter.
Building on what Dennis wrote
I like to look at two-way SSL authentication by breaking it up
1. The client trusting the server--to create the secure
connection so the client can pass its credentials.
2. The server authenticating the client.
Here's what I can recall from having to support and document
this sort of thing before in an SOA ecosystem. As Dennis
writes, each JVM client is going to have to pull the server's
public key certificate into its keystore.
Then each client is going to have to create their own
public/private key pair using some authority the server trusts
and then share the signed public key certificate with the
server. The server will have a persistence store with its
entire known universe of clients and their signed certificates
from which it can authenticate requests. I've done this with
SOAP, so the client would pass their credentials message-level
(as opposed to transport-level) in the header of the SOAP
message according to the WS-Security standard. I'm glossing
over so much. Recalling everything that had to be documented,
this is a classic case of "the devil's in the details."
And not that I'm saying this is a reason in itself to use
SOAP. The client could always pass its one-way hashed public
key the way it would pass a one-way hashed password via Thrift
or SOAP or ProtoBuf using some parameters the client and
server agree to; I don't know of any established practices for
those lightweight protocols. I recently saw someone propose
taking a REST JSON message and break it up into a standard
envelope containing a header and a payload, just like you'd do
with SOAP, and frankly, I don't quite know yet what to make of
that.
One other observation, and maybe this is stating the obvious.
Once you get to #2, you have a lot of choices how to get the
client to authenticate itself to the server.