I'm setting up a jetty application that needs to communicate with a sql server. I have successfully generated the keystore, but I'm not sure where the best location is to actually put the file. The default is $JETTY_BASE/etc . If I do that I'm going to either need to maintain a copy of the cert for every jetty application that communicates with this server, or set up a symlink to a common file.
I'm looking for advice for anyone who has actually deployed a jetty app to production. Am I on the right track, or is there a better way to maintain a common keystore?
Look into using the
--include-jetty-dir=<path>concept.Basically, this is where you keep common configuration. It's layout is identical to a
${jetty.base}directory.So lay this out ...
Lets call this common configuration location
${common.base.dir}(lets say its path is/opt/jetty-common/)Your
/opt/jetty-common/directory would have ...The
keystore.pk12`` is obvious, but see whatconfigure-keystore.ini` has in it.Next, to use this common configuration, you'll need to setup in your
${jetty.base}instance specific configuration a reference to this common directory.You can see how this works with the
start.jar --list-configoutput.You can see in this output that the search order has this extra directory, and your properties are set according to the common location values.