cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Wulff (Confluence)" <conflue...@apache.org>
Subject [CONF] Apache CXF > Fediz Jetty
Date Sun, 10 Nov 2013 19:49:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/de/2176/1/15/_/styles/combined.css?spaceKey=CXF&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/CXF/Fediz+Jetty">Fediz
Jetty</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~owulff@apache.org">Oliver
Wulff</a>
    </h4>
        <br/>
                         <h4>Changes (1)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-changed-lines" >h1. Jetty Plugin <span class="diff-changed-words">(1.1<span
class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">
SNAPSHOT</span>)</span> <br></td></tr>
            <tr><td class="diff-unchanged" >This page describes how to enable
Federation for a Jetty 7/8 instance hosting Relying Party (RP) applications.  This configuration
is not for a separate Tomcat instance hosting the Fediz IDP and IDP STS WARs, or hosts for
third-party applications that use Fediz STS-generated SAML assertions for authentication.
 After this configuration is done, the Jetty-RP instance will validate the incoming SignInResponse
created by the IDP server. <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h1><a name="FedizJetty-JettyPlugin%281.1%29"></a>Jetty Plugin (1.1)</h1>
<p>This page describes how to enable Federation for a Jetty 7/8 instance hosting Relying
Party (RP) applications.  This configuration is not for a separate Tomcat instance hosting
the Fediz IDP and IDP STS WARs, or hosts for third-party applications that use Fediz STS-generated
SAML assertions for authentication.  After this configuration is done, the Jetty-RP instance
will validate the incoming SignInResponse created by the IDP server.</p>

<p>Prior to doing this configuration, make sure you've first deployed the Fediz IDP
and STS on the Tomcat IDP instance as discussed <a href="/confluence/display/CXF/Fediz+IDP"
title="Fediz IDP">here</a>, and can view the STS WSDL at the URL given on that page.
 That page also provides some tips for running multiple Tomcat instances on your machine.</p>


<h3><a name="FedizJetty-Installation"></a>Installation</h3>

<p>You can either build the Fediz plugin on your own or download the package <a href="/confluence/display/CXF/Fediz+Downloads"
title="Fediz Downloads">here</a>. If you have built the plugin on your own you'll
find the required libraries in <tt>plugins/jetty/target/...zip-with-dependencies.zip</tt></p>

<ol>
	<li>Create sub-directory <tt>fediz</tt> in <tt>${jetty.home}/lib/fediz</tt></li>
	<li>Update start.ini in ${jetty.home}/start.ini by adding <tt>fediz</tt>
to the OPTIONS
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Default; brush: java; gutter: false" style="font-size:12px; font-family:
ConfluenceInstalledFont,monospace;">
OPTIONS=Server,fediz
</pre>
</div></div></li>
	<li>Deploy the libraries to the directory created in (1)</li>
</ol>



<h3><a name="FedizJetty-Configuration"></a>Configuration</h3>

<h5><a name="FedizJetty-HTTPSconfiguration"></a>HTTPS configuration</h5>

<p>It's recommended to set up a dedicated (separate) Jetty instance for the Relying
Party. The Fediz RP web applications use the following TCP ports:</p>
<ul>
	<li>HTTP port: 8080</li>
	<li>HTTPS port: 8443 (where IDP and STS are accessed)</li>
</ul>


<p>These are the default ports for a standard Jetty installation.</p>

<p>The Relying Party must be accessed over HTTPS to protect the security tokens issued
by the IDP.</p>

<p>The Jetty HTTP(s) configuration is done in etc/jetty-ssl.xml.</p>

<p>The configuration is described in detail <a href="http://wiki.eclipse.org/Jetty/Howto/Configure_SSL"
class="external-link" rel="nofollow">here</a></p>

<p>This page also describes how to create certificates.  Sample Jetty keystores (not
for production use, but useful for demoing Fediz and running the sample applications) are
provided in the examples/samplekeys folder of the Fediz distribution.  Note the Jetty keystore
here is different from the one used to configure the Tomcat-IDP instance.</p>

<p>To establish trust, there are significant keystore/truststore requirements between
the Servlet Container instances and the various web applications (IDP, STS, Relying party
applications, third party web services, etc.)  See <a href="http://svn.apache.org/viewvc/cxf/fediz/trunk/examples/samplekeys/HowToGenerateKeysREADME.html?view=co"
class="external-link" rel="nofollow">this page</a> for more details, it lists the
trust requirements as well as sample scripts for creating your own (self-signed) keys.</p>

<p><b>Warning:  All sample keystores provided with Fediz (including in the WAR
files for its services and examples) are for development/prototyping use only.  They'll need
to be replaced for production use, at a minimum with your own self-signed keys but strongly
recommended to use third-party signed keys.</b></p>

<p>If you are currently just trying to run the Fediz samples, the configuration above
is all you need (the below configuration is already provided within the samples) so you can
return now to the samples' READMEs for the next steps in running them.</p>


<h5><a name="FedizJetty-FedizPluginconfigurationforYourWebApplication"></a>Fediz
Plugin configuration for Your Web Application</h5>

<p>The Fediz related configuration is done in a Servlet Container independent configuration
file which is described <a href="/confluence/display/CXF/Fediz+Configuration" title="Fediz
Configuration">here</a>.</p>

<p>The Fediz plugin requires configuring the FederationAuthenticator like any other
authenticator in Jetty. Detailed information about the Authenticators and SecurityHandler
is available <a href="http://wiki.eclipse.org/Jetty/Tutorial/Realms" class="external-link"
rel="nofollow">here</a>.</p>

<p>The Fediz configuration file allows to configure all servlet contexts in one file
or choosing one file per Servlet Context.</p>

<p>You can configure the context in context configuration file located in &lt;jetty.home&gt;/contexts.</p>

<h6><a name="FedizJetty-fedizhelloworld.xml"></a>fedizhelloworld.xml</h6>
<p>Hint: file name must be equal to war file name</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Default; brush: xml; gutter: false" style="font-size:12px; font-family:
ConfluenceInstalledFont,monospace;"> 
  &lt;Get name="securityHandler"&gt;
    &lt;Set name="loginService"&gt;
      &lt;New class="org.apache.cxf.fediz.jetty.FederationLoginService"&gt;
        &lt;Set name="name"&gt;WSFED&lt;/Set&gt;
      &lt;/New&gt;
    &lt;/Set&gt;
    &lt;Set name="authenticator"&gt;
      &lt;New class="org.apache.cxf.fediz.jetty.FederationAuthenticator"&gt;
        &lt;Set name="configFile"&gt;&lt;SystemProperty name="jetty.home" default="."/&gt;/etc/fediz_config.xml&lt;/Set&gt;
      &lt;/New&gt;
    &lt;/Set&gt;
  &lt;/Get&gt;
</pre>
</div></div>


<p>The Fediz configuration file is a Servlet container independent configuration file
and described <a href="/confluence/display/CXF/Fediz+Configuration" title="Fediz Configuration">here</a></p>

<h3><a name="FedizJetty-WebApplicationdeployment"></a>Web Application deployment</h3>

<p>Deploy your Web Application to your Jetty installation (&lt;jetty.home&gt;/webapps).
 If you're running the Fediz examples, their README files will have instructions on how to
do this.</p>

<h3><a name="FedizJetty-FederationMetadatadocument"></a>Federation Metadata
document</h3>

<p>The Jetty Fediz plugin supports publishing the WS-Federation Metadata document which
is described <a href="/confluence/display/CXF/Fediz+Metadata" title="Fediz Metadata">here</a>.</p>



    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;" class="grey">
                        <a href="https://cwiki.apache.org/confluence/users/removespacenotification.action?spaceKey=CXF">Stop
watching space</a>
            <span style="padding: 0px 5px;">|</span>
                <a href="https://cwiki.apache.org/confluence/users/editmyemailsettings.action">Change
email notification preferences</a>
</div>
        <a href="https://cwiki.apache.org/confluence/display/CXF/Fediz+Jetty">View Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=30743189&revisedVersion=2&originalVersion=1">View
Changes</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message