Data type mappings and conversions
The Table Attribute Connector is used to fetch an attribute value from a database source. It maps database data to XACML Attribute values. The table below shows the possible JDBC data types that can be mapped to the corresponding XACML Attributes Types.
SQL to XACML mappings and conversions
The Table Attribute Connector performs the following SQL to XACML mappings and conversions:
Values that are derived from columns that are timestamps are formatted with formatSQLDate function
Values that are derived from columns of any other data type are converted to Strings
Mappings and conversions from JDBC data types to XACML data types
XACML data type | Mapping or conversion of JDBC data type |
---|---|
http://www.w3.org/2001/XMLSchema#string | Any JDBC data type can be converted to an XACML string. |
http://www.w3.org/2001/XMLSchema#boolean | Accepted values are true , false , 1 , and 0 , which can be stored as CHAR, VARCHAR, LONGVARCHAR, NVARCHAR, LONGNVARCHAR, NUMERIC, INTEGER, BIGINT, BIT, SMALLINT. |
http://www.w3.org/2001/XMLSchema#integer | The Table Attribute Connector can map any JDBC Type, except Timestamp, to an XACML Integer, if the stored JDBC value is a numeric integer (for example, VARCHAR with value '35' can be mapped, but a VARCHAR with value 'test' cannot be mapped). |
http://www.w3.org/2001/XMLSchema#anyURI | CHAR, NCHAR, VARCHAR, LONGVARCHAR, NVARCHAR, and LONGNVARCHAR with a value that complies as defined by RFC 2396: Uniform Resource Identifiers (URI): Generic SyntaxOpens in a new tab, amended by RFC 2732: Format for Literal IPv6 Addresses in URLsOpens in a new tab. |
http://www.w3.org/2001/XMLSchema#base64Binary | CHAR, NCHAR, VARCHAR, LONGVARCHAR, NVARCHAR, and LONGNVARCHAR with a valid Base64-encoded value. |
http://www.w3.org/2001/XMLSchema#date | TIMESTAMP, DATE or CHAR, NCHAR, VARCHAR, LONGVARCHAR, NVARCHAR, and LONGNVARCHAR with a value in the text format described in https://www.w3.org/TR/xmlschema11-2/#dateOpens in a new tab. |
http://www.w3.org/2001/XMLSchema#dateTime | TIMESTAMP, DATE or CHAR, NCHAR, VARCHAR, LONGVARCHAR, NVARCHAR, and LONGNVARCHAR with a value in the text format described in https://www.w3.org/TR/xmlschema11-2/#dateTimeOpens in a new tab (which also covers timezone considerations). |
http://www.w3.org/2001/XMLSchema#dayTimeDuration | CHAR, NCHAR, VARCHAR, LONGVARCHAR, NVARCHAR, and LONGNVARCHAR with a value in the text format described in https://www.w3.org/TR/xmlschema11-2/#dayTimeDurationOpens in a new tab. |
http://www.w3.org/2001/XMLSchema#double | DOUBLE, NUMERIC, DECIMAL, FLOAT, REAL, BIGINT, TINYINT, SMALLINT, INTEGER and CHAR, NCHAR, VARCHAR, LONGVARCHR, NVARCHAR, and LONGNVARCHAR with a value in the text format described in https://www.w3.org/TR/xmlschema11-2/#doubleOpens in a new tab. |
http://www.w3.org/2001/XMLSchema#yearMonthDuration | CHAR, NCHAR, VARCHAR, LONGVARCHAR, NVARCHAR, and LONGNVARCHAR with a value in the text format described in https://www.w3.org/TR/xmlschema11-2/#yearMonthDurationOpens in a new tab. |
http://www.w3.org/2001/XMLSchema#time | TIMESTAMP, VARCHAR, LONGVARCHAR, NVARCHAR, and LONGNVARCHAR with a value in the text format described in https://www.w3.org/TR/xmlschema11-2/#timeOpens in a new tab. |
http://www.w3.org/2001/XMLSchema#hexBinary | CHAR, NCHAR, VARCHAR, LONGVARCHAR, NVARCHAR, and LONGNVARCHAR with a value in the format of a string representing a hex binary value. |
urn:oasis:names:tc:xacml:1.0:data-type:rfc822Name | CHAR, NCHAR, VARCHAR, LONGVARCHAR, NVARCHAR, and LONGNVARCHAR with a value with valid syntax as described in IETF RFC 2821Opens in a new tab. |
urn:oasis:names:tc:xacml:2.0:data-type:ipAddress | CHAR, NCHAR, VARCHAR, LONGVARCHAR, NVARCHAR, and LONGNVARCHAR with a value in the format of an IP address. |
urn:oasis:names:tc:xacml:3.0:data-type:xpathExpression | xpathExpression cannot be mapped to any JDBC Type. |
urn:oasis:names:tc:xacml:1.0:data-type:x500Name | CHAR, NCHAR, VARCHAR, LONGVARCHAR, NVARCHAR, and LONGNVARCHAR with a value with valid syntax as described in IETF RFC 2253Opens in a new tab. |
urn:oasis:names:tc:xacml:2.0:data-type:dnsName | CHAR, NCHAR, VARCHAR, LONGVARCHAR, NVARCHAR, and LONGNVARCHAR with a valid domain name |