Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
The StorageService DataConnector generates results from a query against the IdP's StorageService API (see also StorageConfiguration). It's main value is in prototyping certain features that require persistent storage without the need for new code, and because the IdP includes an in-memory service by default, it's easy to use for testing with no extra configuration.
The interface to storage relies on lookup of a single record at a time, but the data connector also allows scriptable response handling that can parse the content of a storage record into multiple results, if the record is in a parseable form such as JSON.
General Configuration
The connector marries three essential pieces of configuration to be supplied by the deployer:
the two-part record lookup criteria (known as "context" and "key" in the storage model)
response processing
The lookup criteria are produced by evaluation of a pair of Velocity templates supplied with the <ContextTemplate> and <KeyTemplate> elements.
The two supplied response processing implementations consist of:
A simple mechanism that exposes the entire record content as a single attribute (configured with the generatedAttributeID setting to name the attribute).
A more complex approach using the <RecordMapping> element to supply a script to produce attribute data from the record arbitrarily.
At minimum, a storageServiceRef attribute must be supplied to provide the StorageService to use.
Context/Key Template Contexts
Several variables are available in the two template contexts. In practice, $resolutionContext.principal and various named dependent attributes (if any) tend to be most useful.
For each IdPAttribute available from all the provided dependencies, the attributes' values are available as a collection under the attribute's name.
Examples
Any examples here omit the Spring beans that define the StorageService to use. This service may be one used for other purposes within the IdP, or may be defined specifically for this purpose.
Bean ID of a condition to decide whether to resolve this connector, see here. Mutually exclusive with relyingParties and resolutionPhases and variants
relyingParties
Space-delimited list
List of entity IDs for which this connector should be resolved. Mutually exclusive with activationConditionRef
excludeRelyingParties
Space-delimited list
List of entity IDs for which this connector should not be resolved. Mutually exclusive with activationConditionRef
resolutionPhases
Space-delimited list
List of resolution phases (i.e. flows) during which this connector should be resolved. Mutually exclusive with activationConditionRef
excludeResolutionPhases
Space-delimited list
List of resolution phases (i.e. flows) during which this connector should not be resolved. Mutually exclusive with activationConditionRef
exportAttributes
Space-delimited list
List of attributes produced by the DataConnector that should be directly exported as resolved IdPAttributes without requiring actual AttributeDefinitions.
In the case of a name clash (a DataConnector exports an attribute with the same name as an AttributeDefinition, or another DataConnector exports the same attribute) the DataConnector attribute is NOT added and a warning issued.
noRetryDelay
Duration
0
Time between retries of a failed DataConnector (during the interval, failure is just assumed when the connector is run and no actual connection is attempted)
propagateResolutionExceptions
Boolean
true
Whether connector/plugin failure is fatal to the entire attribute resolution process. If this is set to false the error is logged and the data connector returns no attributes.
Name
Cardinality
Description
Name
Cardinality
Description
<InputAttributeDefinition>
0 or more
This element identifies an attribute definition which is an input to this data connector
<InputDataConnector>
0 or more
This element identifies a data connector whose attributes are to be input to this data conector
<FailoverDataConnector>
0 or 1
This element has a single attribute ref="whatever" whose content is the identifier of a data connector to resolve if this data connector fails (for instance due to the external data source being unavailable)
The StorageService instance is injected via the storageServiceRef attribute.
The builder for the query can be specified as an externally defined bean via the executableSearchBuilderRef attribute (as a replacement for the <ContextTemplate> element and related elements). This allows for complete generality of the query-building process.
The processing of the response can be specified with an externally defined bean via the mappingStrategyRef attribute (as a replacement for the <RecordMapping> element).
The caching of results can be specified as an externally defined bean via the <ResultCacheBean> element (as a replacement for the <ResultCache> element).
Rarely, a non-default Velocity engine can be injected via the templateEngine attribute.