I'm fairly new to jetty, but I've dug through a lot of pages trying to find the answer to this one.
I'd like to have a single jetty instance running a single webapp. I need it to listen for SSL connections on two ports one that uses mutual ssl, and one that uses normal ssl (I'll be using a different auth method with that one).
The closest I found to an answer was this - but it is concerned with regular old http connections - and I think it may be out of date given its age.
I'm pretty sure this will involve tweaks to jetty-ssl.xml, jetty-ssl-context.xml, and jetty-https.xml . . . but have not been able to put the puzzle pieces together that is both plausible, and doesn't result in a stack trace (let alone doing what I want).
My best guess is that I need to create a second context factory that requires mutual auth (similar to the existing sslContextFactory), and then add another call to addIfAbsentConnectionFactory to wire it in. But while I seem to have the ability to restrict a context factory to require mutual auth - and don't see how I tie the context factories to operate on the separate ports.
I think I've figured it out - hopefully this will save someone else a lot of frustration. Here is what I did: