Mapping configuration
This is the second part of the configuration, where the attribute-specific configuration is managed.
XML element or attribute | Description | Supported format |
---|---|---|
xacmlAttribute | The XACML attribute to be fetched from this attribute source. | A valid XACML-format attribute contains XML attributes for AttributeId, Category, DataType, and Issuer. |
sqlType | The 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. |
query | The SQL query or stored procedure needed to fetch the attribute value from the database. | See the sections on SQL queries and stored procedures below. |
key | Other 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. |
uId | An 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 XML configuration for reasons of compatibility.
The illustration shows an example of how the XML elements can be implemented. It is an extract from the sample XML-format configuration file supplied in the appendix XML Configuration.
<!-- mapping for allergy test -->
<cfg:mapping>
<cfg:xacmlAttribute AttributeId="food-group-name" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" DataType="http://www.w3.org/2001/XMLSchema#string" Issuer=""/>
<cfg:nativeAttribute>
<cfg:sqlType>2004</cfg:sqlType>
<cfg:query>SELECT fddrp_desc FROM fd_group WHERE fdgrp_cd=?</cfg:query>
<cfg:key allowMultiple="false" sqlType="12">
<cfg:xacmlAttribute AttributeId="food-id" Category="urn:oasis:names:tc:xacml:3.0:attribute-category:resource" DataType="http://www.w3.org/2001/XMLSchema#string" Issuer=""/>
</cfg:key>
</cfg:nativeAttribute>
<cfg:uId>1</cfg:uId>
</cfg:mapping>
Mapping configuration example
SQL datatypes
Constant | Value | Constant | Value | Constant | Value |
---|---|---|---|---|---|
ARRAY | 2003 | FLOAT | 6 | REF | 2006 |
BIGINT | -5 | INTEGER | 4 | REF_CURSOR | 2012 |
BINARY | -2 | JAVA_OBJECT | 2000 | ROWID | -8 |
BIT | -7 | LONGNVARCHAR | -4 | SMALLINT | 5 |
BLOB | 2004 | LONGVARBINARY | -4 | SQLXML | 2009 |
BOOLEAN | 16 | LONGVARCHAR | -1 | STRUCT | 2002 |
CHAR | 1 | NCHAR | -15 | TIME | 92 |
CLOB | 2005 | NCLOB | 2011 | TIME_WITH_TIMEZONE | 2013 |
DATALINK | 70 | NULL | 0 | TIMESTAMP | 93 |
DATE | 91 | NUMERIC | 2 | TIMESTAMP_WITH_TIMEZONE | 2014 |
DECIMAL | 3 | NVARCHAR | -9 | TINYINT | -6 |
DISTINCT | 2001 | OTHER | 1111 | VARBINARY | -3 |
DOUBLE | 8 | REAL | 7 | VARCHAR | 12 |