Sun Identity Manager 8.1 Web Services

Configuring SPML

To expose the SPML interface, you must properly configure the Identity Manager server by installing and modifying specific repository objects and by editing the file.

Instructions for configuring the SPML interface are provided in the following sections:

Installing and Modifying Repository Objects

The following table describes the repository objects that you must install and modify to configure SPML for Identity Manager.

Table 1–1 Repository Objects Used to Configure SPML




Contains definitions of the SPML schemas supported by the server, and rules for converting between the SPML schema and the internal view model. Each SPML schema typically has an associated form. 

SPML Forms 

Contains one or more form objects that encapsulate the rules for transforming between the external model (defined by an SPML schema) and the internal model (defined by an Identity Manager view). Typically, you define one SPML form for each object class defined in the SPML schema. 

Configuration:IDM Schema Configuration

Defines user attributes that can be stored in the Identity Manager repository for access through an SPML filter, and which are queryable and summary attributes for Identity Manager user objects.

  • Define a queryable attribute for attributes that you want to use in an SPML filter.

  • Define a summary attribute for attributes that you want returned in an optimized search.


System task used to process asynchronous SPML requests. 

You typically do not have to customize this object. 

Identity Manager includes a sample set of SPML configuration objects in the sample/spml.xml file. You must manually import the sample/spml.xml file because the file is not imported by default when the repository is initialized.

The sample configuration defines a person class to track the evolving standard schema defined by the SPML working group. Do not customize this class. You must keep the person class consistent with the standard schema, except when you are configuring the Service Provider SPML interface.

When configuring the Service Provider SPML interface, you must install and modify the Configuration:SPE SPML configuration object as follows:

You access the Service Provider SPML interface from the following (default) path:


For example, if you deploy Identity Manager in the /idm context on host:port, you can access the interface at the following URL:



Note –

See the SPML 1.0 Specification at for the most current information about the standard SPML schema.

Editing the File

The following table describes three optional entries in the file that you can use to control how SPML requests are authorized.

Table 1–2 Optional Entries in

Entry Name 



Name of the Identity Manager user who performs SPML requests 


Clear text password for the user specified by soap.username


Base-64 representation of an encrypted password for the user specified by soap.username

Editing soap.epassword and soap.password Properties

The user specified in soap.username is known as the proxy user.

You can specify only one password property for the proxy user:

Establishing a proxy user is convenient for clients because authentication is not required by the web service. This configuration is common for portal environments where the Identity Manager server is only accessed by other applications that handle user authentication.

Caution – Caution –

Using a proxy user can be dangerous if the HTTP port on which the responding server resides is generally accessible. Anyone who knows the Identity Manager server’s URL and understands how to build SPML requests can configure Identity Manager operations for the proxy user to perform.

The SPML standard does not specify how to perform authentication and authorization. Several related web standards are available for authentication, but these standards are not yet in common use. At this time, the most common approach for authentication is to use the Secure Socket Layer (SSL) between applications and the server. Identity Manager does not dictate how to configure SSL.

If you cannot use a proxy user or SSL, Identity Manager supports a vendor-specific extension to SPML that allows the client to log in and maintain a session token, which can be used to authenticate subsequent requests. You can use the LighthouseClient class (an extension of the SpmlClient class that includes support for specifying credentials) to perform a login request and pass a session token in all SPML requests.

Note –

The Service Provider SPML interface does not support authentication and authorization. However, you can configure the Identity Manager SPML interface to use the IDMXUser view instead of using Service Provider SPML.

Service Provider assumes that clients accessing Identity Manager have been authenticated and authorized by an access management application. The client has all possible rights when using the Service Provider SPML interface.

To prevent sensitive data from being exposed between the client and Identity Manager, consider accessing the Service Provider SPML interface over SSL.

Creating an Encrypted Password

Use one of the following methods to create an encrypted password:

Editing Configuration Objects

Applications require a mechanism to send SPML messages and to receive SPML responses.

To configure SPML for Identity Manager, you must edit the following configuration objects:

Note –

The Service Provider SPML interface has only one configuration object, Configuration:SPE SPML, which is similar to the Configuration:SPML object in structure.

Configuration: SPML Object

The Configuration: SPML object contains definitions for the SPML schemas that you want to expose, and information about how those SPML schemas are mapped into Identity Manager views. This information is represented by using a GenericObject that is stored as an extension of the configuration object.

The following attributes are defined in GenericObject: schemas and classes:

Initially, the distinction between the two lists might be confusing. The information in the schemas list defines what Identity Manager returns in response to an SPML SchemaRequest message. The client uses this information to decide which attributes can be included in other messages such as AddRequest. Identity Manager does not care about the contents of the schemas list. This list is simply returned verbatim to the client.

You are not required to define SPML schemas. Identity Manager works without schemas. If you do not define an SPML schema, Identity Manager returns an empty response after receiving a schema request message. Without a schema, clients must rely on pre-existing knowledge about the supported classes and attributes.

Best Practice:

Writing SPML schemas is considered a best practice, because it enables you to use general purpose tools (such as the OpenSPML Browser) to build requests.

Default SPML Configuration

The following example shows the default SPML configuration. The text of the SPML schema definitions have been omitted for brevity.

Example 1–1 Default SPML Configuration

<Configuration name='SPML' authType='SPML'>
  <Attribute name='classes'>
      <Object name='person'>
        <Attribute name='type' value='User'/>
        <Attribute name='form' value='SPMLPerson'/>
        <Attribute name='default' value='true'/>
        <Attribute name='identifier' value='uid'/>
      <!-- Class 'user' defines no form so we'll default to a builtin 
simplified schema. I don't really like this but SimpleRpc currently depends on it.
      <Object name='user'>
        <Attribute name='type' value='User'/>
        <Attribute name='identifier' value='waveset.accountId'/>
      <!-- Class 'userview' defines the form "view" which causes the view 
to pass through unmodified-->      <Object name='userview'>
        <Attribute name='type' value='User'/>
        <Attribute name='form' value='view'/>
        <Attribute name='identifier' value='waveset.accountId'/>
        <Attribute name='multiValuedAttributes'>
      <Object name='role'>
        <Attribute name='type' value='Role'/>
        <Attribute name='form' value='SPMLRole'/>
        <Attribute name='default' value='true'/>
        <Attribute name='identifier' value='name'/> <!--  attribute ...for now? -->

Two classes are defined in this example:

The following attributes are supported in a class definition:

Default Schemas

The schemas attribute contains a list of strings that contain the escaped XML for an SPML <schema> element. If you examine the spml.xml file, note that the schema elements are surrounded by a CDATA-marked section. Using CDATA-marked sections is convenient for escaping long strings of XML. When Identity Manager normalizes the spml.xml file, the CDATA-marked sections are converted into strings containing &lt; and &gt; character entities.

The default SPML configuration includes two schemas:

Configuration: SPMLPerson Object

Each class defined in the Configuration:SPML object typically has an associated form object containing the rules for transforming between the external attribute model defined by the class and the internal model defined by the associated view.

The following example shows how the standard person class references a form.

Example 1–2 Standard Person Class Referencing a Form

<Configuration name='SPMLPerson'>
         <Field name='cn'>
         <Field name='global.fullname'>
         <Field name='email'>
         <Field name=''>
         <Field name='description'>
         <Field name='accounts[Lighthouse].description'>
         <Field name='password'>
         <Field name='password.password'>
         <Field name='sn'>
         <Field name='global.lastname'>
         <Field name='gn'>
         <Field name='global.firstname'>
         <Field name='telephone'>
         <Field name='accounts[Lighthouse].telephone'>

SPML class forms

Each attribute in a class definition contains two field definitions:

The form is processed in such a way that when attributes are returned to the client, only the result of the <Derivation> expressions are included. When attributes are being sent from the client to the server, only <Expansion> expression results are assimilated back into the view. The effect is similar to the schema map of a Resource definition.

Configuration: IDM Schema Configuration Object

If you want to use attributes in an SPML search filter, you must define those attributes as extended attributes for Identity Manager users. Identity Manager stores extended attribute values in the repository, even when that value is also stored as a resource account attribute.

Try to minimize the use of extended attributes. Too many extended attributes can increase the repository size and might cause consistency problems between attributes stored in Identity Manager and the real value of the attribute stored on a resource. To use an attribute in an Identity Manager query, you must declare the attribute as an extended attribute to ensure that the value is accessible when the repository query indexes are built.

To include attributes in a user’s set of summary attributes, you must define those attributes as extended attributes. You can use summary attributes to optimize searches by avoiding deserialization of the object XML, and instead return only a few of the most important user attributes. In the Identity Manager SPML implementation, summary attributes are returned when you do not explicitly provide a list of return attributes in the search request.

In the following example, firstname, lastname, fullname, description, and telephone are extended attributes that are present on the User IDMObjectClassConfiguration after being defined in IDMAttributeConfigurations. Only firstname, lastname, and telephone are queryable and summary attributes.

Example 1–3 telephone and description Declared as Extended Attributes

<Configuration name="IDM Schema Configuration"
               <!-- this is the standard set -->
               <IDMAttributeConfiguration name=’firstname’
               <IDMAttributeConfiguration name=’lastname’
               <IDMAttributeConfiguration name=’fullname’
               <!-- these are the SPML extensions -->
               <IDMAttributeConfiguration name=’description’
               <IDMAttributeConfiguration name=’telephone’
               <IDMObjectClassConfiguration name=’User’
                                            description=’User description’>
                   <IDMObjectClassAttributeConfiguration name=’firstname’
                   <IDMObjectClassAttributeConfiguration name=’lastname’
                   <IDMObjectClassAttributeConfiguration name=’fullname’/>
                   <IDMObjectClassAttributeConfiguration name=’description’/>
                   <IDMObjectClassAttributeConfiguration name=’telephone’

You can customize the list of attributes according to the needs of your site.

The names you choose for extended attributes depend on the mappings performed in the class form. Because the default SPMLPerson form maps sn into lastname, you must declare the extended attribute as lastname. The form does not transform the name of telephone or description, so the extended attribute name comes directly from the SPML schema.

Beyond declaring extended attributes, you must also modify the same Configuration: object to declare which of the attributes are queryable, or usable in an SPML filter, and which attributes are summary attributes to be returned by an optimized search result.

TaskDefinition: SPMLRequest Object

The spml.xml file also includes a brief definition for a new system task named SpmlRequest. You can use this task to implement asynchronous SPML requests. When the server receives an asynchronous request, it launches a new instance of this task and passes the SPML message as an input variable for the task. The server then returns the task instance repository ID in the SPML response for later status requests. For example:

<TaskDefinition name=’SPMLRequest’

Do not change the definition name, the executor name, or the execution mode. You can change the resultLimit value. When asynchronous requests have completed, the system typically retains the result value for a specified time so the client can issue an SPML status request to obtain the results. How long to retain these results is site-specific.

Use a positive resultLimit value to specify how long (in seconds) the system can retain results after completing a task. The default value for SPMLRequest is typically 3600 seconds or approximately one hour. Other tasks default to 0 seconds unless you change the task name to a different value.

If negative, the request instance is never removed automatically.

Tip –

To avoid cluttering the repository, set the resultLimit value to the shortest possible time.

Note –

The Service Provider SPML interface does not support asynchronous requests.

Deployment Descriptor

You must edit the Identity Manager deployment descriptor, typically found in the WEB-INF/web.xml file, to contain a declaration for the servlet that receives SPML requests.

If you are having difficulty contacting the SPML web service, look in the web.xml file for a servlet declaration. The following example shows a servlet declaration.

Example 1–4 Servlet Declaration

   <display-name>OpenSPML SOAP Router</display-name>
   <description>no description</description>

This declaration allows you to access addRequest, modifyRequest, and searchRequest web services through the URL:



Although you can, you are not required to define a servlet-mapping. Do not modify the contents of this servlet declaration.