Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6A166D3AA for ; Sun, 25 Nov 2012 21:48:22 +0000 (UTC) Received: (qmail 53751 invoked by uid 500); 25 Nov 2012 21:48:22 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 53702 invoked by uid 500); 25 Nov 2012 21:48:22 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 53695 invoked by uid 99); 25 Nov 2012 21:48:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Nov 2012 21:48:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 Nov 2012 21:48:17 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 40B9A2388A64 for ; Sun, 25 Nov 2012 21:47:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r839550 - in /websites/production/cxf/content: cache/main.pageCache fediz-jetty.html fediz.html Date: Sun, 25 Nov 2012 21:47:56 -0000 To: commits@cxf.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121125214756.40B9A2388A64@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: buildbot Date: Sun Nov 25 21:47:55 2012 New Revision: 839550 Log: Production update by buildbot for cxf Added: websites/production/cxf/content/fediz-jetty.html Modified: websites/production/cxf/content/cache/main.pageCache websites/production/cxf/content/fediz.html Modified: websites/production/cxf/content/cache/main.pageCache ============================================================================== Binary files - no diff available. Added: websites/production/cxf/content/fediz-jetty.html ============================================================================== --- websites/production/cxf/content/fediz-jetty.html (added) +++ websites/production/cxf/content/fediz-jetty.html Sun Nov 25 21:47:55 2012 @@ -0,0 +1,272 @@ + + + + + + + + + + + + +Apache CXF -- Fediz Jetty + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
   
   +
+ +
+
+ + + + + +
+
+ +Index > Fediz > Fediz Jetty + +
+
+ +
+
+
  
  + + + + + +
+ + + +
+

Jetty Plugin (1.1 SNAPSHOT)

+

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.

+ +

Prior to doing this configuration, make sure you've first deployed the Fediz IDP and STS on the Tomcat IDP instance as discussed here, 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.

+ + +

Installation

+ +

You can either build the Fediz plugin on your own or download the package here. If you have built the plugin on your own you'll find the required libraries in plugins/jetty/target/...zip-with-dependencies.zip

+ +
  1. Create sub-directory fediz in ${jetty.home}/lib/fediz
  2. Update start.ini in ${jetty.home}/start.ini by adding fediz to the OPTIONS +
    +
    +OPTIONS=Server,fediz
    +
    +
  3. Deploy the libraries to the directory created in (1)
+ + + +

Configuration

+ +
HTTPS configuration
+ +

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:

+
  • HTTP port: 8080
  • HTTPS port: 8443 (where IDP and STS are accessed)
+ + +

These are the default ports for a standard Jetty installation.

+ +

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

+ +

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

+ +

The configuration is described in detail here

+ +

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.

+ +

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 this page for more details, it lists the trust requirements as well as sample scripts for creating your own (self-signed) keys.

+ +

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.

+ +

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.

+ + +
Fediz Plugin configuration for Your Web Application
+ +

The Fediz related configuration is done in a Servlet Container independent configuration file which is described here.

+ +

The Fediz plugin requires configuring the FederationAuthenticator like any other authenticator in Jetty. Detailed information about the Authenticators and SecurityHandler is available here.

+ +

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

+ +

You can configure the context in context configuration file located in <jetty.home>/contexts.

+ +
fedizhelloworld.xml
+

Hint: file name must be equal to war file name

+ +
+
 
+  <Get name="securityHandler">
+    <Set name="loginService">
+      <New class="org.apache.cxf.fediz.jetty.FederationLoginService">
+        <Set name="name">WSFED</Set>
+      </New>
+    </Set>
+    <Set name="authenticator">
+      <New class="org.apache.cxf.fediz.jetty.FederationAuthenticator">
+        <Set name="configFile"><SystemProperty name="jetty.home" default="."/>/etc/fediz_config.xml</Set>
+      </New>
+    </Set>
+  </Get>
+
+
+ + +

The Fediz configuration file is a Servlet container independent configuration file and described here

+ +

Web Application deployment

+ +

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

+ +

Federation Metadata document

+ +

The Jetty Fediz plugin supports publishing the WS-Federation Metadata document which is described here.

+ + +
+
+ +
+
 
   + +   
   
+ + + + + + + Modified: websites/production/cxf/content/fediz.html ============================================================================== --- websites/production/cxf/content/fediz.html (original) +++ websites/production/cxf/content/fediz.html Sun Nov 25 21:47:55 2012 @@ -185,7 +185,7 @@ The RP is a web application that needs t

The Fediz plugin needs to be deployed into the Relying Party (RP) container. The security mechanism is not specified by JEE. Even though it is very similar in each servlet container there are some differences which require a dedicated Fediz plugin for each servlet container implementation. Most of the configuration goes into a Servlet container independent configuration file which is described here

The following lists shows the supported containers and the location of the installation and configuration page.

- +