/
ProfileActions

The Shibboleth IdP V4 software has reached its End of Life and is no longer supported. This documentation is available for historical purposes only. See the IDP5 wiki space for current documentation on the supported version.

ProfileActions

A profile action is a discrete piece of code, packaged into a Java bean, that peforms a specific function, such as building a SAML assertion, signing a message, encrypting an attribute, validating a password, or displaying a message to a user. Just as the functionality in the IdP is made up of "profiles", a profile is implemented by connecting together a series of profile action beans into a sequence of steps. The steps can be sequential or include conditional branches based on data or user input.

Spring Web Flow is the mechanism used to orchestrate the sequence of actions that implement a complete profile. Authentication is also implemented using a reusable set of web flows that support the login mechanisms a deployer wants to enable, and new mechanisms can be added by implementing small amounts of code and configuring new flows.

The interface used by Spring to invoke an action bean is org.springframework.webflow.execution.Action and a single method is used:

SWF Action interface
package org.springframework.webflow.execution; public interface Action { public Event execute(RequestContext context) throws Exception;

All action beans ultimately support this interface. However, the vast majority of beans in the IdP will implement an OpenSAML interface, ProfileAction, which is a Spring-independent interface with a similarly simple signature:

OpenSAML ProfileAction interface
package org.opensaml.profile.action; public interface ProfileAction<InboundMessageType,OutboundMessageType> extends InitializableComponent { public void execute(@Nonnull final ProfileRequestContext<InboundMessageType,OutboundMessageType> profileRequestContext) throws ProfileException;

There is intentional symmetry between these interfaces. The purpose of the OpenSAML interface is to support independence from Spring when possible, and make a larger amount of functional SAML processing code available within OpenSAML for those that are implementing their own applications.

Note that some profile action beans may require other IdP services and components, and so may not be independent of the IdP. They often, though, will still be mostly independent of Spring.

Spring-Independent Actions

More often than not, a profile action bean will not need access to the Spring Web Flow context or the Spring container, in which case it