Attribute mapping uses mapping rules that transform assertion attributes to application attributes. When attribute mapping is enabled, Federation Manager generates default mapping rules. The rules are based on the assertion attributes specified for the remote Producer or IdP entity, which you specify in the Configure Entity step of the entity configuration wizard. All this configuration takes place at the local relying party. When attribute mapping is disabled, assertion attributes are passed "as is" to the target application.
Federation Manager uses a Unified Expression Language (UEL) syntax for mapping that is similar to JSP and JSF. Each assertion attribute is put into a hashmap and assigned the attr keyword. A UEL expression evaluator goes through the list of mapping rules, applies them to the hashmap of assertion attributes, and generates another hashmap containing the resulting application attributes. The hashmap of outgoing application attributes is converted into cookie contents or header variables and delivered to the target application.
For more information about UEL, go to the Sun Developer Network.
To construct expressions, it is important to understand the syntax Federation Manager uses for the expressions.
Single Attribute Representation
To represent a single assertion attribute, use the following syntax:
#{attr["attribute_name"]}
Example: #{attr["Name"]} represents the value of the Name assertion attribute.
Composite Attribute Representation
Value expressions can be concatenated to form a composite value (with optional delimiter). To represent a composite assertion attribute, use the following syntax:
#{attr["first_attribute"]}optional_character #{attr["second_attribute"]}
Mapping Examples
The following are a series of examples of mapping rules. These examples are presented in the following format:
application_attribute=assertion_attributes_expression
Name Example
ID = #{attr["Name"]}
BobSmith
Simple Concatenation Examples
FullName = #{attr["FirstName"]},#{attr["LastName"]}
Bob,Smith
FullName = #{attr["LastName"]},#{attr["FirstName"]}
Smith,Bob
Spaces are considered special characters. If you want a space between attributes in an expression, enter a space. For example:
FullName = #{attr["LastName"]}, #{attr["FirstName"]}
Smith, Bob
Date Examples
Date = #{attr["month"]}/#{attr["dateOfMonth"]}/#{attr["year"]}
01/05/2010
Date = #{attr["monthSymbol"]} #{attr["dateOfMonth"]}, #{attr["year"]}
January 5, 2010
Monetary Example
Price = #{attr["amount"]}#{attr["currency"]}
2.50EUR
Email Address Examples
EmailAddress = #{attr["userName"]}@#{attr["domainName"]}
JaneDoe@company.com
AcmeEmailAddress = #{attr["AcmeIDKey"]}@acme.com
bsmith@acme.com
| Copyright © 2010 CA. All rights reserved. | Email CA about this topic |