Skip to end of metadata
Go to start of metadata

Apache CXF Fediz: An Open-Source Web Security Framework


Apache CXF Fediz is a subproject of CXF. Fediz helps you to secure your web applications and delegates security enforcement to the underlying application server. With Fediz, authentication is externalized from your web application to an identity provider installed as a dedicated server component. The supported standard is WS-Federation Passive Requestor Profile. Fediz supports Claims Based Access Control beyond Role Based Access Control (RBAC).


November 30, 2017 - Apache CXF Fediz 1.4.3 and 1.3.3 released

Apache CXF Fediz 1.4.3 and 1.3.3 have been released. A new security advisory has been released for an issue that was fixed in these releases:

  • CVE-2017-12631: CSRF vulnerabilities in the Apache CXF Fediz Spring plugins.

For more information and to download the new release, please go here.

September 15, 2017 - Apache CXF Fediz 1.4.2 released

Apache CXF Fediz 1.4.2 has been released.

For more information and to download the new release, please go here.

August 18, 2017 - Apache CXF Fediz 1.4.1 released

Apache CXF Fediz 1.4.1 has been released.

For more information and to download the new release, please go here.

May 16, 2017 - Two new security advisories for Apache CXF Fediz are released

Two new security advisories have been released for issues that are fixed in the latest releases (1.4.0, 1.3.2 and 1.2.4):

  • CVE-2017-7661: The Apache CXF Fediz Jetty and Spring plugins are vulnerable to CSRF attacks.
  • CVE-2017-7662: The Apache CXF Fediz OIDC Client Registration Service is vulnerable to CSRF attacks.


The following features are supported by Fediz 1.2

  • WS-Federation 1.0/1.1/1.2
  • SAML 1.1/2.0 Tokens
  • Support for encrypted SAML Tokens (Release 1.1)
  • Support for Holder-Of-Key SubjectConfirmationMethod (1.1)
  • Custom token Support
  • Publish WS-Federation Metadata document
  • Role information encoded as AttributeStatement in SAML 1.1/2.0 tokens
  • Claims information provided by FederationPrincipal Interface
  • Support for Tomcat, Jetty, Websphere, Spring Security and CXF (1.1)
  • Fediz IDP supports "Resource IDP" role as well (1.1)
  • A new REST API for the IdP (1.2)
  • Support for logout in both the RP and IdP (1.2)
  • Support for logging on to the IdP via Kerberos and TLS client authentication (1.2)
  • A new container-independent CXF plugin for WS-Federation (1.2)
  • Support to use the IdP as an identity broker with a remote SAML SSO IdP (1.2)

The following features are planned for the next release:

  • support for other protocols like OAuth

You can get the current status of the enhancements here .


The Fediz architecture is described in more detail here.


See here.

Getting started

The WS-Federation specification defines the following parties involved during a web login:

  • Browser
  • Identity Provider (IDP)
    The IDP is a centralized, application independent runtime component which implements the protocol defined by WS-Federation. You can use any open source or commercial product that supports WS-Federation 1.1/1.2 as your IDP. It's recommended to use the Fediz IDP for testing as it allows for testing your web application in a sandbox without having all infrastructure components available. The Fediz IDP consists of two WAR components. The Security Token Service (STS) does most of the work including user authentication, claims/role data retrieval and creating the SAML token. The IDP WAR translates the response to an HTML response allowing a browser to process it.
  • Relying Party (RP)
    The RP is a web application that needs to be protected. The RP must be able to implement the protocol as defined by WS-Federation. This component is called "Fediz Plugin" in this project which consists of container agnostic module/jar and a container specific jar. When an authenticated request is detected by the plugin it redirects to the IDP for authentication. The browser sends the response from the IDP to the RP after successful authentication. The RP validates the response and creates the container security context.

It's recommended to deploy the IDP and the web application (RP) into different container instances as in a production deployment. The container with the IDP can be used during development and testing for multiple web applications needing security.

Setting up the IDP

The installation and configuration of the IDP is documented here

Set up the Relying Party Container

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.


The examples directory contains two sample relying party applications. They are independent of each other, so it is not necessary to deploy both at once.

Each sample is described in a README.txt file located in the base directory of each sample.




a simple web application which is protected by the Fediz IDP. The FederationServlet illustrates how to get security information using the standard APIs.


a protected web application that calls a web service that uses the Fediz STS to validate credentials. Here, the same STS is used for token issuance (indirectly, by the web application through use of the Fediz IDP) and validation. The FederationServlet illustrates how to securely call a web service.


The CXF sources are hosted at Apache gitbox. This includes a full two way sync with github. As github provides the nicer user interface we now recommend to directly work on the github cxf repo.

Web browsing

Checking out from GIT

git clone


CXF committers can directly commit to github after doing the Apache gitbox setup. Be aware that the sync might take half an hour before you are added to the cxf github group.

Forking and pull requests

See Getting Involved


Then follow the BUILDING.txt file in the Fediz download for full build instructions.

Setting up Eclipse

See this page for information on using the Eclipse IDE with the Fediz source code. This page is created for CXF but the same commands are applicable for Fediz too.


  • No labels