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 857AA11530 for ; Wed, 24 Sep 2014 13:47:45 +0000 (UTC) Received: (qmail 67452 invoked by uid 500); 24 Sep 2014 13:47:45 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 67394 invoked by uid 500); 24 Sep 2014 13:47:45 -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 67385 invoked by uid 99); 24 Sep 2014 13:47:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Sep 2014 13:47:45 +0000 X-ASF-Spam-Status: No, hits=-1997.5 required=5.0 tests=ALL_TRUSTED,LOTTO_AGENT 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; Wed, 24 Sep 2014 13:47:41 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 875012388868 for ; Wed, 24 Sep 2014 13:47:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r923396 - in /websites/production/cxf/content: cache/main.pageCache fediz-idp-11.html Date: Wed, 24 Sep 2014 13:47:21 -0000 To: commits@cxf.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140924134721.875012388868@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: buildbot Date: Wed Sep 24 13:47:21 2014 New Revision: 923396 Log: Production update by buildbot for cxf Modified: websites/production/cxf/content/cache/main.pageCache websites/production/cxf/content/fediz-idp-11.html Modified: websites/production/cxf/content/cache/main.pageCache ============================================================================== Binary files - no diff available. Modified: websites/production/cxf/content/fediz-idp-11.html ============================================================================== --- websites/production/cxf/content/fediz-idp-11.html (original) +++ websites/production/cxf/content/fediz-idp-11.html Wed Sep 24 13:47:21 2014 @@ -109,71 +109,16 @@ Apache CXF -- Fediz IDP 1.1
-

Fediz IDP

- -

Note: Fediz IDP 1.0 is described here .

- -

The Release 1.1 introduces the following new feature:

- -
  • Federation Metadata
    -The IDP supports publishing the WS-Federation Metadata document which allows to more easily integrate the IDP into platforms which support referencing a Metadata document. Metadata consists of the signing certificate, the provided claims, etc.
- - -
  • Spring Web Flow support
    -The IDP has been refactored to use Spring Web Flow to manage the federation flow. This provides flexibility to be able to customize the IDP to company's specific requirements. The IDP is secured by Spring Security to get the benefits and flexibility of Spring Security.
- - -
  • Resource IDP and Home Realm Discovery
    -This is the major new feature. The IDP is able to figure out from which security domain/realm the browser request is coming from to redirect the sign-in request to the requestor IDP which does the authentication and issues a token which is sent to the Resource IDP. The Resource IDP will then either map the principal from one security domain to the target security domain and get claims information of the mapped principal or transform the claims information and finally issue a new token for the relying party (application).
- - - -

The Fediz Identity Provider (IDP) consists of two WAR files. One is the Security Token Service (STS) component, fediz-idp-sts.war, which is responsible for validating credentials, getting the requested claims data and issuing a SAML token. There is no easy way for Web browsers to issue SOAP requests to the STS directly, necessitating the second component, an IDP WAR (fediz-idp.war) which allows browser-based applications to interact with the STS. The communication between the browser and the IDP must be performed within the confines of the base HTTP 1.1 functionality and conform as closely as possible to the WS-Trust protocols semantic.

- -

The Fediz STS is based on a customized CXF STS configured to support standard Federation use cases demonstrated by the examples. The Fediz STS has been enhanced to support two realms *Realm-A* and *Realm-B* with the following set of users:

-

User

Password

Realm A

 

alice

ecila

bob

bob

ted

det

Realm B

 

ALICE

ECILA

BOB

BOB

TED

DET

- - -

The Fediz IDP doesn't support several realms within one WAR which requires to build a Fediz IDP WAR for Realm A (default, shipped with Fediz Distribution) and Realm B. See below how to build a Fediz IDP WAR for a specific realm.

- -

Installation

- -

The Fediz IDP has been tested with Tomcat 6 and 7 but should be able to work with any commercial JEE application server.

- -

It's recommended to set up a dedicated (separate) Tomcat instance for the IDP compared to the one hosting the RP (relying party) applications. Using one deployment of Tomcat with multiple CATALINA_BASE instances, as described here is one option but note any libs in $CATALINA_HOME/lib folder will be shared throughout each of the activated CATALINA_BASE instances. Another probably simpler alternative is to copy your Tomcat folder into a second location and edit its conf/server.xml file and change port values (discussed below) so they don't conflict with the original Tomcat installation.

- -

To start and stop this second Tomcat instance, it is perhaps easiest to create small startup.sh and shutdown.sh scripts that temporarily redefine $CATALINA_HOME from the first to the second instance, for example:

- -
- -
- -

and

- -
- -
- -

If you're using the one Tomcat with multiple instance option, it's $CATALINA_BASE instead that will need to be redefined above.

- -
Tomcat server.xml configuration
- -

The Fediz examples use the following Tomcat port values for the IDP/STS, defined in the conf/server.xml file. We use ports different from the Tomcat defaults so as not to conflict with the Tomcat instance running the RP applications.

- -
  • HTTP port: 9080 (used for Maven deployment, mvn tomcat:redeploy)
  • HTTPS port: 9443 (where IDP and STS are accessed)
  • Server port: 9005 (for shutdown and other commands)
- - -

Here is a sample snippet for showing the configuration of the above three values:

- -
- -
- -

The keystoreFile is relative to $CATALINA_BASE. See here for the Tomcat 7 configuration reference. This page also describes how to create certificates. Sample Tomcat 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.

- -

To establish trust, there are significant keystore/truststore requirements between the Tomcat 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.

- -
Build the IDP WAR
- -

The Fediz 1.1 distribution ships one Fediz IDP WAR built for Realm-A by default. The distribution also contains the IDP and STS sources with two Maven Profiles realm-a and realm-b. More information is provided in the README.txt here

- -

Once you deploy the IDP WAR files to your Tomcat installation (<catalina.home>/webapps), you should be able to see the Fediz STS from a browser at http://localhost:9080/fediz-idp-sts/STSService?wsdl , assuming you're using port 9080 as listed above.

- - -

Configuration

- -

You can manage the users, their claims and the claims per application in the IDP.

- -
User and password
- -

The users and passwords are configured in a Spring configuration file in webapps/fediz-idp-sts/WEB-INF/passwords.xml. The following users are already configured for the Realm A and can easily be extended.

-
- -
- -
User Claims
- -

The claims of each user are configured in a spring configuration file webapps/fediz-idp-sts/WEB-INF/userClaims.xml. The following claims are already configured:

-
- -
- -

The claim id's are configured according to Section 7.5 in the specification Identity Metasystem Interoperability. The mapping of claims to a SAML attribute statement are described in Section 7.2.

- -
IDP configuration
- -

The IDP configuration is done in the new configuration file idp-config-<realm>.xml which is illustrated below

- -
- -
- -
Relying Party / Application configuration
- -

Note: The configuration file RPClaims.xml has been replaced

- -

The application related configuration like required claims are configured in the new IDP configuration file idp-config-<realm>.xml which has been enhanced to support other configuration parameters as well:

-
- -
- -
Trusted IDP configuration
- -

This feature is new in Fediz IDP 1.1 and allows to redirect a SignIn Request to a trusted IDP. The following configuration is required:

- -
- -
- -

Configure LDAP directory

- -

The Fediz IDP can be configured to attach an LDAP directory to authenticate users and to retrieve claims information of users.

- -
Username and password authentication
- -

WSS4J supports username/password authentication using JAAS. The JDK provides a JAAS LoginModule for LDAP which can be configured as illustrated here in a sample jaas configuration (jaas.config):

- -
- -
- -

You can get more information about this LoginModule here.

- -

In this example, all the users are stored in the organization unit Users within mycompany.org. The configuration filename can be chosen, e.g. jaas.config. The filename must be configured as a JVM argument. JVM related configurations for Tomcat can be done in the file setenv.sh/bat located in directory tomcat/bin. This script is called implicitly by catalina.bat/sh and might look like this for UNIX:

- -
- -
- -

Next, the STS endpoint has to be configured to use the JAAS LoginModule which is accomplished by the JAASUsernameTokenValidator.

- -
- -
- -

The property contextName must match the context name defined in the JAAS configuration file which is myldap in this example.

- -
Claims management
- -

When a STS client (IDP) requests a claim, the ClaimsManager in the STS checks every registered ClaimsHandler who can provide the data of the requested claim. The CXF STS provides org.apache.cxf.sts.claims.LdapClaimsHandler which is a claims handler implementation to get claims from user attributes in a LDAP directory.

- -

You configure which claim URI maps to which LDAP user attribute. The implementation uses the Spring Ldap Module (LdapTemplate).

- -

The following example illustrate the changes to be made in webapps/fediz-idp-sts/WEB-INF/cxf-transport.xml:

- -
- -
- -

You must deploy the library for the spring ldap module and its dependencies. The POM of the spring ldap module is available here.

- -

You can add the dependency to spring ldap module to the Fediz STS POM, add the above configuration and rebuild the STS component or do the configuration in the deployed STS directly and add the following JAR files:

- -
  • lang-2.1.0.jar
  • ldapbp-1.0.jar
  • spring-ldap-1.2.jar
+

You must deploy the library for the spring ldap module and its dependencies. The POM of the spring ldap module is available here.

You can add the dependency to spring ldap module to the Fediz STS POM, add the above configuration and rebuild the STS component or do the configuration in the deployed STS directly and add the following JAR files:

  • lang-2.1.0.jar
  • ldapbp-1.0.jar
  • spring-ldap-1.2.jar