Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334062 - It should be possible to embed in the jetty.home.bundle the ssl keystore files
Summary: It should be possible to embed in the jetty.home.bundle the ssl keystore files
Status: CLOSED FIXED
Alias: None
Product: Jetty
Classification: RT
Component: osgi (show other bugs)
Version: 7.2.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 7.3.x   Edit
Assignee: Hugues Malphettes CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-12 05:06 EST by Hugues Malphettes CLA
Modified: 2011-09-20 15:52 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hugues Malphettes CLA 2011-01-12 05:06:55 EST
A typical jetty.xml that configures an SSL listener specifies the keystore as relative path to a file:

<Call name="addConnector">
    <Arg>
        <New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
            <Set name="Port">
                <SystemProperty name="jetty.port" default="8443"/>
            </Set>
            <Set name="maxIdleTime">30000</Set>
            <Set name="Acceptors">2</Set>
            <Set name="AcceptQueueSize">100</Set>
            
            <Set name="Keystore">etc/mipkeystore.jks</Set>
            <Set name="needClientAuth">false</Set>      
            <Set name="Password">mippassword</Set>
            <Set name="KeyPassword">mippassword</Set>
            <Set name="truststore">etc/cacerts.jks</Set>
            <Set name="trustPassword">mippassword</Set>
        </New>
    </Arg>
</Call>

In the case where this configuration file is inside a [jarred] bundle as the jetty.home.bundle; the mipkeystore won't be located.

The enhancement consists of supporting this usecase by passing a new Property "this.jetty.xml.parent.folder.url" that resolves to the URL of the parent  'folder' of the jetty configuration file.
So that:
   <Set name="Keystore"><Property name="this.jetty.xml.parent.folder.url"/>/etc/mipkeystore.jks</Set>

is resolved as (for example)
jar:file:/home/hmalphettes/proj/osgi-exp/tmp/dmytro-jettyhome/org.eclipse.jetty-config_0.19.0.SNAPSHOT.jar!/etc/mipkeystore.jks
Comment 1 Hugues Malphettes CLA 2011-01-12 05:10:37 EST
This type of enhancement is in fact similar to https://bugs.eclipse.org/bugs/show_bug.cgi?id=318152

Although the code to support the enhancement is only related to the osgi bootstrapper.
Comment 2 Hugues Malphettes CLA 2011-01-13 23:19:17 EST
The simple enhancement is committed and working fine for Dmytro.
Comment 3 Jesse McConnell CLA 2011-09-20 15:52:02 EDT
Resolved -> Closed