jetty-ssl.xml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?xml version="1.0"?>
  2. <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
  3. <!-- ============================================================= -->
  4. <!-- Configure a TLS (SSL) Context Factory -->
  5. <!-- This configuration must be used in conjunction with jetty.xml -->
  6. <!-- and either jetty-https.xml or jetty-spdy.xml (but not both) -->
  7. <!-- ============================================================= -->
  8. <Configure id="sslContextFactory" class="org.eclipse.jetty.util.ssl.SslContextFactory">
  9. <Call class="org.apache.solr.util.configuration.SSLConfigurationsFactory" name="current">
  10. <Get name="keyStorePassword" id="keyStorePassword"/>
  11. <Get name="trustStorePassword" id="trustStorePassword"/>
  12. </Call>
  13. <Set name="KeyStorePath"><Property name="solr.jetty.keystore" default="./etc/solr-ssl.keystore.jks"/></Set>
  14. <Set name="KeyStorePassword"><Ref refid="keyStorePassword"/></Set>
  15. <Set name="TrustStorePath"><Property name="solr.jetty.truststore" default="./etc/solr-ssl.keystore.jks"/></Set>
  16. <Set name="TrustStorePassword"><Ref refid="trustStorePassword"/></Set>
  17. <Set name="NeedClientAuth"><Property name="solr.jetty.ssl.needClientAuth" default="false"/></Set>
  18. <Set name="WantClientAuth"><Property name="solr.jetty.ssl.wantClientAuth" default="false"/></Set>
  19. <Set name="KeyStoreType"><Property name="solr.jetty.keystore.type" default="JKS"/></Set>
  20. <Set name="TrustStoreType"><Property name="solr.jetty.truststore.type" default="JKS"/></Set>
  21. <!-- =========================================================== -->
  22. <!-- Create a TLS specific HttpConfiguration based on the -->
  23. <!-- common HttpConfiguration defined in jetty.xml -->
  24. <!-- Add a SecureRequestCustomizer to extract certificate and -->
  25. <!-- session information -->
  26. <!-- =========================================================== -->
  27. <New id="sslHttpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
  28. <Arg><Ref refid="httpConfig"/></Arg>
  29. <Call name="addCustomizer">
  30. <Arg><New class="org.eclipse.jetty.server.SecureRequestCustomizer"/></Arg>
  31. </Call>
  32. </New>
  33. </Configure>