Skip to main content
Version: 6.4

Mapping configuration

This is the second part of the configuration, where the attribute-specific configuration is managed.

Element or attributeDescriptionSupported format
xacmlAttributeThe XACML attribute to be fetched from this attribute source.A valid XACML-format attribute contains XML attributes for AttributeId, Category, DataType, and Issuer.
attributeNameThe identifier of the ALFA attribute to be fetched from this attribute source.
NOTE: Only available in JSON and YAML configurations.
A valid ALFA attribute name that begins with a letter or underscore and includes only letters, numbers, and underscores.
sqlTypeThe integer value of the SQL datatype used for the attribute or key.See the "SQL datatypes" table below for a reference listing of the constants and values.
queryThe SQL query or stored procedure needed to fetch the attribute value from the database.See the sections on SQL queries and stored procedures below.
keyOther XACML attributes and their corresponding column names in the specified table that act as keys to the target attribute.Any valid JDBC database column name. The exact format may depend on the database used.
uIdAn identifier used to distinguish otherwise identical mappings for the purpose of caching.The element is required, but can contain an arbitrary value.

note

The attribute allowMultiple is deprecated and does not have any functionality. It remains in the configuration for reasons of compatibility.

This is an extract from the sample XML-format configuration file supplied in the Configuration appendix.

<cfg:mapping>
<cfg:xacmlAttribute Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="role" DataType="http://www.w3.org/2001/XMLSchema#string"/>
<cfg:nativeAttribute outputIndex="0">
<cfg:sqlType>2004</cfg:sqlType>
<cfg:query>select employee_role from employee_details where employee_name=?</cfg:query>
<cfg:key allowMultiple="false" sqlType="12" inputType="IN">
<cfg:xacmlAttribute Category="urn:oasis:names:tc:xacml:1.0:subject-category:access-subject" AttributeId="name" DataType="http://www.w3.org/2001/XMLSchema#string"/>
</cfg:key>
</cfg:nativeAttribute>
<cfg:uId>a34a514e-a5d8-4860-9dfd-71af8b7e7998</cfg:uId>
</cfg:mapping>

Mapping configuration example in XML format

note

Several key attributes can be specified for a given target attribute that is to be looked up with a composite key.

SQL datatypes

ConstantValueConstantValueConstantValue
ARRAY2003FLOAT6REF2006
BIGINT-5INTEGER4REF_CURSOR2012
BINARY-2JAVA_OBJECT2000ROWID-8
BIT-7LONGNVARCHAR-4SMALLINT5
BLOB2004LONGVARBINARY-4SQLXML2009
BOOLEAN16LONGVARCHAR-1STRUCT2002
CHAR1NCHAR-15TIME92
CLOB2005NCLOB2011TIME_WITH_TIMEZONE2013
DATALINK70NULL0TIMESTAMP93
DATE91NUMERIC2TIMESTAMP_WITH_TIMEZONE2014
DECIMAL3NVARCHAR-9TINYINT-6
DISTINCT2001OTHER1111VARBINARY-3
DOUBLE8REAL7VARCHAR12