Value settings
Value settings enable you to define a data type for an authorization attribute or service and an optional default value for an attribute.
For information about adding value settings to an attribute, see Adding value settings to an attribute.
Default value
You can define a default value to provide an attribute with a value when it can’t otherwise be resolved. This is optional. For example, with the following value settings, a risk level attribute resolves to the default value NO_THREAT under conditions in which it doesn’t resolve to another value.
An attribute with a default value and no resolvers acts as a constant that always resolves to the fixed default value. |
Data type
The data type constrains the set of allowable attribute or service values and provides a predictable model for value processing and other data transformations.
The main data types for input and output data are String and JSON. All data types have conversions to and from a canonical string representation. You must use processors to convert other formats, such as date and time representations.
Data type mismatches can be a common source of errors during attribute and service testing. Check for data type inconsistencies when you are building and testing the Trust Framework. |
Attributes and services can have the following data types.
Data type | Description | ||||||
---|---|---|---|---|---|---|---|
Boolean |
A simple true or false (case insensitive):
In value processing contexts, such as SpEL expressions, the value is a |
||||||
Collection |
An ordered collection of other value types. Only valid value types as described here can be members of collections. JSON-formatted arrays are valid textual representations of collections. In value processing contexts, a collection is a Use only the get() method to retrieve items by zero-based integer index.
|
||||||
Date |
A date, such as In value processing contexts, the value is a Date values can be converted to the following types:
|
||||||
Date Time |
A date and time of day, such as In value processing contexts, the value is a Date Time values can be converted to the following types:
|
||||||
Duration |
A time duration expressible in seconds or a fraction of seconds. The textual representation is ISO-8601, for example:
In value processing contexts, the value is a Duration values can’t be converted to other types. |
||||||
JSON |
A JSON document. This is useful for bringing data into and out of the decision point. This is the only attribute type subject to JSON Path value processors. The textual representation is In value processing contexts, the value is a Optionally, you can define a valid JSON Schema for an attribute and generate attributes based on the schema. For example:
Only simple JSON property definitions are supported. Complex object definitions, such as collections, are not supported. Limitations for the type keyword are as follows:
|
||||||
Number |
A numeric value. Decimal integers and real numbers are supported, including scientific notation. In value processing contexts, the value is a |
||||||
Period |
A time period expressible in calendar units, such as a number of days or months. The textual representation is ISO-8601, for example:
In value processing contexts, the value is a Period values can’t be converted to other types. |
||||||
String |
Data that is not one of the other types is interpreted as UTF-8 text, stored internally as UTF-16. In value processing contexts, these values are |
||||||
Time |
A time of day, such as In value processing contexts, the value is a Time values can’t be converted to other types. |
||||||
XML |
An XML document. This is useful for bringing data into and out of the decision point. This is the only data type subject to XPath value processors. The textual representation is XML. In value processing contexts, the value is an |
||||||
Zoned Date Time |
A date and time of day with a time zone expressed as an offset from UTC. The textual representation is ISO-8601, for example, In value processing contexts, the value is a Zoned Date Time values can be converted to the following types, dropping information in each case:
|