Sun ONE logo     Previous     Contents     Index     Next     

Sun ONE Identity Server Programmer's Guide





Chapter 3   Authentication Service


The Authentication Service is the point of entry for Sun™ One Identity Server. A user must pass an authentication process before being allowed access to the console or any resource that is secured using the Identity Server. As well, an application or service must pass the authentication process before it can be considered a trusted source by Identity Server. This chapter explains the process, its pluggable architecture, and the authentication APIs. It contains the following sections:


Overview


Identity Server provides secure access to web-based (and non-web-based) applications and the data that they store. Gaining access to either of these resources requires that the user or application be given permission by the Authentication Service. When the requestor tries to access a protected resource, it is directed to submit credentials to one (or more) of several authentication modules; for instance, the LDAP module generally requires authentication with the user's Directory Server ID and password while the SafeWord™ module requires authentication to the ACE/Server. The Authentication Service then acts as an authority, granting or denying access upon completion of the required process. If access is granted, a session token is created and assigned to the requestor who is then, by default, directed to the Identity Server console. When the console finds and validates the token, the appropriate page is displayed based on the identity's request and their parent organization. If there is no valid session token, the console denies access.


Note

Upon successful authentication, the requestor is directed to the Identity Server console unless they have initially requested an external protected resource, have a goto parameter in their URL or have an authentication method which contains values for redirect URLs based on success or failure.





Accessing The Authentication Service

There are a number of ways to authenticate to the Identity Server in order to allow access to protected resources. Java™ applications can use the authentication API while C applications can open a connection using a web browser. End users also access the Authentication Service using a web browser. In addition, there is a remote-auth.dtd that defines the XML structure used to format the XML request messages.


Authentication For Java Applications

External Java applications can authenticate to the Identity Server or any of its protected resources (including the Sun ONE Directory Server data store) using the Authentication API for Java. This API provides interfaces to initiate the authentication process and communicate authentication credentials to the Authentication Service. The API is defined in a Java package called com.sun.identity.authentication. Developers incorporate the classes and methods from this package into their Java applications to allow communication with the Authentication Service. The application's Java request is first converted to an XML message format and passed to the Identity Server over http or https. (XML messages are structured according to the remote-auth.dtd which is discussed further in "The remote-auth.dtd Structure".) The XML message is then converted back into Java which is able to be interpreted by the Authentication Service. These API are discussed further in "Authentication API For Java Applications".


Authentication For C Applications

Identity Server includes the resources for C applications to authenticate to the Identity Server. They must first open a connection to the Identity Server using the URL, http://<Identity Server_host.domain>/ <service_deploy_uri>/authservice. Then the application sends a request in XML message format and passes it to the Identity Server over http or https. The XML message is then processed by the Authentication Service. After passing the authentication process, a validated session token will be sent to the C application. XML messages are structured according to the remote-auth.dtd which is discussed further in "The remote-auth.dtd Structure".


Authentication For Users Using A Web Browser

A user with a web browser can authenticate to Identity Server using the authentication user interface. The URI for this web-based interface is http://<Identity Server_host.domain>/<service_deploy_uri>/UI/Login. Once authenticated, the user gains access to the Identity Server console and based on their privileges:

Authenticating The Request

The authentication framework has the job of validating the authentication request. The framework integrates the standard Java Authentication and Authorization Service (JAAS) API with proprietary APIs that support Identity Server-specific features. Identity Server adds features on top of the JAAS framework including account locking, web-based UI, and an XML over HTTP interface that allows authentication APIs to work on a remote machine. Because of this architecture, any custom JAAS authentication modules will also work within the Authentication Service.


Note

This guide is not intended to document the JAAS framework. For more information on these APIs, see the Java Authentication And Authorization Service Developer's Guide at http://java.sun.com/security/ jaas/doc/api.html. Additional information can be found at http://java.sun.com/products/jaas/.






Requesting Authentication

The authentication framework starts the authentication process by reading a Java request. When a request is received, the framework creates a session for the requestor and begins the authentication process by calling the Authentication Service Provider Interface (SPI) to allow interaction between the requestor and the login module for credential gathering. The SPI references the authentication module configuration file to determine the login requirements for the specific authentication module. (More information on the authentication module configuration file can be found in "The Auth_Module_Properties.dtd Structure".)


Using The Authentication SPI

Identity Server provides the Authentication SPI to invoke a specific authentication module. The SPI is defined in the com.sun.identity.authentication.spi package. All configured modules, custom and default, can extend the AMLoginModule and implement the process, init and getPrincipal methods. These methods access Identity Server objects for post-processing of user profiles, service templates, and attributes. More information on the Authentication SPI can be found in "Authentication SPI".


Note

The Authentication API are also able to invoke authentication modules written using the pure JAAS API.






Client Detection

Within the framework, the first step in authenticating a user is to identify the client type making the HTTP request. The Authentication Service uses the URL information to retrieve the browser type's characteristics. Based on these characteristics, the correct authentication pages are sent back to the client browser; for example, HTML pages. Once the user is validated, the client type is added to the session token where it can be retrieved by other services. More information on client detection can be found in Chapter 11 "Client Detection."


Note

Although Identity Server has the capability to support multiple clients (including wireless), currently it only defines client data for HTML clients.





Miscellaneous Features

The Authentication Service includes a number of new features. Account locking and Fully Qualified Domain Name (FQDN) Mapping are explained below.


Account Locking

Account locking prohibits the user from authenticating after a fixed number of consecutive unsuccessful login attempts. Identity Server allows two additional login attempts after the user is warned about an impending lockout. The locking can be initiated by changing the status of an attribute in LDAP or by memory locking which occurs when the time-out duration is greater then 0. Email notifications are sent to administrators regarding any account lockouts. (Account locking activities are also logged.) For more information on the account locking attributes, see the Sun ONE Identity Server Administration Guide.


Note

Only modules that throw an Invalid Password Exception can leverage the Account Locking feature.






FQDN Mapping

FQDN Mapping enables the Authentication Service to take corrective action in the case where a user may have typed in an incorrect URL (such as specifying a partial host name or using an IP address to access protected resources). FQDN Mapping is enabled by modifying the com.sun.identity.server.fqdnMap attribute in the AMConfig.properties file. The format for specifying this property is:
com.sun.identity.server.fqdnMap[<invalid-name>]=<valid-name>
The value <invalid-name> would be a possible invalid FQDN host name that may be typed by the user, and <valid-name> would be the actual host name to which the filter will redirect the user. Any number of mappings can be specified in AMConfig.properties (as illustrated in Code Example 3-1) as long as they conform to the stated requirements.
:

Code Example 3-1    FQDN Mapping Attribute In AMConfig.properties

com.sun.identity.server.fqdnMap[isserver]=isserver.mydomain.com

com.sun.identity.server.fqdnMap[isserver.mydomain]=isserver.mydo main.com

com.sun.identity.server.fqdnMap[<IP address>]=isserver.mydomain.com





Possible Uses For FQDN Mapping
This property can be used for creating a mapping for more than one host name which may be the case if applications hosted on this server are accessible by more than one host name. This property can also be used to configure Identity Server to not take corrective action for certain URLs. For example, if no redirect is required for users who access applications by using an IP address, this feature can be implemented by specifying a map entry such as com.sun.identity.server.fqdnMap[<IP>]=<IP>.


Note

If more than one mapping is defined, ensure that there are no overlapping values in the invalid FQDN name.Failing to do so may result in the application becoming inaccessible.






The Authentication User Interface


The Authentication Service has a separate user interface from the Identity Server console. It provides the web-based interface for all authentication modules installed in the Identity Server deployment. The interface provides a dynamic and customizable means for gathering user credentials for authentication by presenting the web-based login requirement pages to a user requesting access. Figure 3-1 is a screenshot of the default user interface for LDAP authentication.
Figure 3-1   Default LDAP Authentication User Interface
Screenshot of authentication user interface
Like the Identity Server console, the Authentication Service interface is built with J2EE Assisted Take-Off (JATO), a Java 2 Enterprise Edition (J2EE) application framework used to help developers build functional web applications. It uses the Authentication API to authenticate users to their specified authentication module. (This component can be deployed on non-Identity Server machines.)
The Authentication Service interface uses Java Server Pages (JSP) and XML files to convey graphical-based user information such as login, logout and time-out information as well as error messages. The JSP templates define the layout of the pages and are located in <identity_server_root>/SUNWam/web-apps/ services/config/auth/default. The XML templates are the authentication module configuration files, discussed in "Configuring Module Credential Requirements". They are also located in <identity_server_root>/SUNWam/web-apps/services/config/auth/default. Both of these types of files can be modified to customize the user experience at the following levels:

Customizing The Authentication Interface

The JSP templates and module configuration properties files can be modified to reflect an organization's branding or to add organization-specific functionality. For example, if there are three organizations in the Identity Server deploymentorg1, org2, org3and org1 has customized templates, these templates will be located in <identity_server_root>/SUNWam/web-apps/services/config/auth/org1. Any organization that does not have its own directory of modified templates will continue to use the default set of files located in <identity_server_root>/ SUNWam/web-apps/services/config/auth/default. In the example, both directories contain a full set of templates. Org1 would use the set in the org1 directory while org2 and org3 would use the set in the default directory.


Creating A Directory
  1. Go to the directory where the JSP templates are stored.
    cd <identity_server_root>/SUNWam/web-apps/services/config/auth/
  2. Create a directory using the appropriate path based on the level of customization.
    The directory name should match the name that appears in the Identity Server console. Table 3-1 lists the different path names for each level based on its customization of either a default or configured organization.
    Table 3-1    Directory Locations Based On Customization Level

    Level

    Default Organization Location

    Configured Organization Location

    Organization  

    <identity_server_root>/SUNWam/web-apps/services/config/auth/default  

    <identity_server_root>/SUNWam/web-apps/services/config/auth/org1  

    Sub-organization  

    <identity_server_root>/SUNWam/web-apps/services/config/auth/default/sub-org1  

    <identity_server_root>/SUNWam/web-apps/services/config/auth/org1/sub-org1  

    Locale  

    <identity_server_root>/SUNWam/web-apps/services/config/auth/default_locale  

    <identity_server_root>/SUNWam/web-apps/services/config/auth/org1_locale  

    Service or Application  

    <identity_server_root>/SUNWam/web-apps/services/config/auth/default/service1  

    <identity_server_root>/SUNWam/web-apps/services/config/auth/org1/service1  

    Client Type (HTML, WML, etc.)  

    <identity_server_root>/SUNWam/web-apps/services/config/auth/default/clienttype1  

    <identity_server_root>/SUNWam/web-apps/services/config/auth/org1/clienttype1  

  3. Copy all the module configuration properties files and JSP templates into the new directory.
    All of the files in the <identity_server_root>/SUNWam/web-apps/ services/config/auth/ directory need to be copied into the new directory.
  4. Customize the files in the new organization directory.
    Make sure that any image files (for example, JPEG or GIF files for logos) are copied into <identity_server_root>/SUNWam/web-apps/services/ login_images. Any HTML specific tags can be modified to other desired HTML tags or any other client type specific tags.

    Note

    All JSP background colors, page layouts, and fonts are configurable using the style sheets located in <identity_server_root>/ web-apps/services/css.



    JSP Templates

    The following JSP templates can be found in <identity_server_root>/SUNWam/ web-apps/services/config/auth/default. Strong HTML skills as well as an understanding of web servers can help in the modification of these files.


Table 3-2    List of Customizable JSP Templates 

GUI Template

Purpose

auth_error_template.jsp  

Informs the user when an internal authentication error has occurred.  

authException.jsp  

Informs the user that an error has occurred during authentication.  

account_expired.jsp  

Informs the user that their account has expired and should contact the system administrator.  

configuration.jsp  

Informs the user that there has been a configuration error.  

disclaimer.jsp  

This is a sample, customizable disclaimer page used in the Self-registration authentication module.  

Exception.jsp  

Informs the user that an error has occurred.  

invalid_domain.jsp  

Informs the user that there is no such domain.  

invalidPCookieUserid.jsp  

Informs the user that a persistent cookie user name does not exist in the persistent cookie domain.  

invalidPassword.jsp  

Informs the user that the password entered does not contain enough characters.  

Login.jsp  

This is a Login/Password template.  

login_denied.jsp  

Informs the user that no profile has been found in this domain.  

login_failed_template.jsp  

Informs the user that authentication has failed.  

Logout.jsp  

Informs the user that they have logged out.  

maxSessions.jsp  

Informs the user that the maximum sessions have been reached.  

membership.jsp  

A login page for the Self-registration module.  

Message.jsp  

A generic message template for a general error not defined in one of the other error message pages.  

missingReqField.jsp  

Informs the user that a required field has not been completed.  

module_denied.jsp  

Informs the user that the chosen authentication module has been denied.  

module_template.jsp  

A customizable module page.  

noConfig.jsp  

Informs the user that no configuration has been defined/found for them.  

noConfirmation.jsp  

Informs the user that the password confirmation field has not been entered.  

noPassword.jsp  

Informs the user that no password has been entered.  

noUserName.jsp  

Informs the user that no user name has been entered. It links back to the login page.  

noUserProfile.jsp  

Informs the user that no profile has been found. It gives them the option to try again or select New User and links back to the login page.  

org_inactive.jsp  

Informs the user that the organization they are attempting to authenticate to is no longer active.  

passwordMismatch.jsp  

This page is called when the password and confirming password do not match.  

profileException.jsp  

Informs the user that an error has occurred while storing the user profile.  

Redirect.jsp  

This page carries a link to a page that has been moved.  

register.jsp  

A user self-registration page.  

session_timeout.jsp  

Informs the user that their current login session has timed out.  

userDenied.jsp  

Informs the user that they do not possess the necessary role (for role-based authentication.)  

userExists.jsp  

This page is called if a new user is registering with a user name that already exists.  

userPasswordSame.jsp  

Called if a new user is registering with a user name field and password field have the same value.  

user_inactive.jsp  

Informs the user that they are not active.  

wrongPassword.jsp  

Informs the user that the password entered is invalid.  


Authentication Module Configuration Files

The authentication module configuration XML files are based on the Auth_Module_Properties.dtd and the syntax of this DTD should be followed when customizing these files. Modifying elements in these XML files will automatically and dynamically customize the authentication interface. More information on modifying this type of file can be found in "Configuring Module Credential Requirements"."


Default Authentication Modules


Identity Server is installed with a set of default authentication modules that can be used to communicate with proprietary technologies. These modules are explained below.

Core Authentication Service

The Core authentication service is the configuration base for all other proprietary authentication modules. It must be registered to an organization before any user can log in using one of the default authentication modules. It allows the Identity Server administrator to define default values for the Core authentication parameters. These values can then be picked up if no overriding value is set in the specific authentication module chosen. The default values for the Core service are defined in the amAuth.xml file and stored in the Directory Server after installation.

Proprietary Authentication Modules

Identity Server provides authentication modules able to communicate with proprietary technologies. The authentication modules currently included are:
The default authentication module used after installation is LDAP.

Assigning The Authentication Method

An authentication module can be assigned as the method to authenticate identities that belong to any of the following objects:
Once a module is defined as the authentication method for one of these objects, it can than be configured with URLs to redirect the identity on either a successful authentication or a failed authentication. When more than one URL is set, Identity Server has a defined hierarchy to pick the proper redirection URL.


Note

For more information on how to define the authentication module using the Identity Server console, see the Sun ONE Identity Server Administration Guide.






Authentication By Organization

The authentication method for an organization is set by registering the Core Authentication service to the organization and configuring the Organization Authentication Configuration attribute. The authentication service(s) defined must also be registered to the organization.


Note

Authentication by organization is the default definition. It can also be accessed by providing the "org" parameter in the authentication URL. More information on this function can be found in "URL Parameters".






Successful Organization-based Authentication Redirection URLs
Identity Server bases a successful organization-based authentication redirection determination by checking for a redirection URL in the following places:
  1. A URL set by the module.
  2. A URL set by a goto URL parameter.
  3. A URL set for clientType in iplanet-am-user-success-url in user's amUser.xml service file.
  4. A URL set for clientType in iplanet-am-auth-login-success-url in the user's role.
  5. A URL set for clientType in iplanet-am-auth-login-success-url in the organization.
  6. A URL set for clientType in iplanet-am-auth-login-success-url as the global default.
  7. iplanet-am-user-success-url set at user entry
  8. iplanet-am-auth-login-success-url set at user's role entry
  9. iplanet-am-auth-login-success-url set at the org entry
  10. iplanet-am-auth-login-success-url as the global default if not set in org


Failed Organization-based Authentication Redirection URLs
Identity Server bases a failed organization-based authentication redirection determination by checking for a URL in the following order:
  1. A URL set by the module.
  2. A URL set by a gotoOnFail parameter.
  3. A URL set for clientType in iplanet-am-user-failure-url set at the user entry.
  4. A URL set for clientType in iplanet-am-auth-login-failure-url set at the user's role entry.
  5. A URL set for clientType in iplanet-am-auth-login-failure-url set at the organization entry.
  6. iplanet-am-auth-login-failure-url as the global default if it is not set in the organization.
  7. iplanet-am-user-failure-url set at the user entry.
  8. iplanet-am-auth-login-failure-url set at the user's role entry.
  9. iplanet-am-auth-login-failure-url set at the organization entry.
  10. iplanet-am-auth-login-failure-url as the global default if it is not set in the organization.


Authentication By Role

The authentication method for a role is set by registering the Core Authentication service to the role and configuring the Organization Authentication Configuration attribute. The authentication service(s) defined must also be registered to the organization in which the role exists.


Note

Authentication by role is accessed by providing the "role" parameter in the authentication URL. More information on this function can be found in "URL Parameters".






Successful Role-based Authentication Redirection URLs
Identity Server bases a successful role-based authentication redirection determination by checking for a URL in the following order:
  1. A URL set by the module.
  2. A URL set by the goto parameter.
  3. A URL matching clientType in iplanet-am-user-success-url set in the user entry.
  4. A URL matching clientType in iplanet-am-auth-login-success-url set at the role to which the user authenticates.
  5. A URL matching clientType in iplanet-am-auth-login-success-url set at the user's role.
  6. A URL matching clientType in iplanet-am-auth-login-success-url set at the organization.
  7. A URL matching clientType in iplanet-am-auth-login-success-url as the global default.
  8. iplanet-am-user-success-url set in the user entry.
  9. iplanet-am-auth-login-success-url set at the role to which the user authenticates.
  10. iplanet-am-auth-login-success-url set at the user's role.
  11. iplanet-am-auth-login-success-url set at the organization.
  12. iplanet-am-auth-login-success-url from the global default.


Failed Role-based Authentication Redirection URLs
Identity Server bases a failed role-based authentication redirection determination by checking for a URL in the following order:
  1. A URL set by the module.
  2. A URL set by the gotoOnFail parameter.
  3. A URL matching clientType in iplanet-am-user-failure-url set in the user entry.
  4. A URL matching clientType in iplanet-am-auth-login-failure-url set at the role to which the user authenticates.
  5. A URL matching clientType in iplanet-am-auth-login-failure-url set at the user's role.
  6. A URL matching clientType in iplanet-am-auth-login-failure-url set at the organization.
  7. A URL matching clientType in iplanet-am-auth-login-failure-url as the global default.
  8. iplanet-am-user-failure-url set in the user entry.
  9. iplanet-am-auth-login-failure-url set at the role to which the user authenticates.
  10. iplanet-am-auth-login-failure-url set at the user's role.
  11. iplanet-am-auth-login-failure-url set at the organization.
  12. iplanet-am-auth-login-failure-url from the global default.


Authentication By Service

The authentication method for a service is set by registering the Core Authentication service and configuring the Organization Authentication Configuration attribute. The authentication service(s) defined must also be registered to the organization in which the role exists.


Note

Authentication by service is accessed by providing the "service" parameter in the authentication URL. More information on this function can be found in "URL Parameters".






Successful Service-based Authentication Redirection URLs
Identity Server bases a successful service-based authentication redirection determination by checking for a URL in the following order:
  1. A URL set by the module.
  2. A URL set by the goto parameter.
  3. A URL matching clientType in iplanet-am-user-success-url set in the user entry.
  4. A URL matching clientType in iplanet-am-auth-login-success-url set at the service entry.
  5. A URL matching clientType in iplanet-am-auth-login-success-url set at the user's role.
  6. A URL matching clientType in iplanet-am-auth-login-success-url set at the organization.
  7. A URL matching clientType in iplanet-am-auth-login-success-url set at the global default.
  8. iplanet-am-user-success-url set at the user entry.
  9. iplanet-am-auth-login-success-url set at the service entry.
  10. iplanet-am-auth-login-success-url set at user's role entry.
  11. iplanet-am-auth-login-success-url set at the organization entry.
  12. iplanet-am-auth-login-success-url as the global default if not set in the organization.


Failed Service-based Authentication Redirection URLs
Identity Server bases a failed role-based authentication redirection
  1. A URL set by the module.
  2. A URL set by the gotoOnFail parameter.
  3. A URL matching clientType in iplanet-am-user-failure-url set at the user entry.
  4. A URL matching clientType in iplanet-am-auth-login-failure-url set at the service entry.
  5. A URL matching clientType in iplanet-am-auth-login-failure-url set at the user's role entry.
  6. A URL matching clientType in iplanet-am-auth-login-failure-url set at the organization entry.
  7. A URL matching clientType in iplanet-am-auth-login-failure-url as the global default if not set in the organization.
  8. iplanet-am-user-failure-url set at the user entry.
  9. iplanet-am-auth-login-failure-url set at the service entry.
  10. iplanet-am-auth-login-failure-url set at user's role entry.
  11. iplanet-am-auth-login-failure-url set at the organization entry.
  12. iplanet-am-auth-login-failure-url as the global default if not set in the organization.


Authentication By User

The authentication method for a user is set by registering the Core Authentication service to the user and configuring the Organization Authentication Configuration attribute. The authentication service(s) defined must also be registered to the organization in which the role exists. More information on how this is done can be found in the Sun ONE Identity Server Administration Guide.


Note

Authentication by user is accessed by providing the "user" parameter in the authentication URL. More information on this function can be found in "URL Parameters".






Authentication By Authentication Level

The authentication method for a particular authentication level is set by the administrator. More information on how this is done can be found in the Sun ONE Identity Server Administration Guide.


Note

Authentication by authentication level is accessed by providing the "authLevel" parameter in the authentication URL. More information on this function can be found in "URL Parameters".






Authentication By Module

The authentication method for a module is set by registering the Core Authentication service to the module and configuring the Organization Authentication Configuration attribute. More information on how this is done can be found in the Sun ONE Identity Server Administration Guide.


Custom Authentication Modules


The Authentication Service framework allows an organization to plug-in custom authentication modules. The following section discusses the steps necessary to create a custom authentication module.


Note

To write a custom authentication module, knowledge of the JAAS API is necessary, especially for defining the module's configuration properties.





Creating A New Authentication Module
  1. Create an XML service file for the new authentication module.
    The XML service file is written, and imported, into Identity Server in order to manage the authentication module's parameters using the Identity Server console. The name of the XML service file follows the format amAuth<modulename>.xml (for example, amAuthSafeWord.xml or amAuthLDAP.xml) and it is located in <identity_server_root>/SUNWam/ config/xml. Information on writing this XML service file, based on the sms.dtd, can be found in Chapter 6 "Service Management."
  2. Create a localization properties file for the new module.
    The localization properties file defines language-specific screen text for the attribute names of the module. It is located in the directory <identity_server_root>/SUNWam/locale/. More information on this file and how to configure it can be found in "Configuring Localization Properties".
  3. Create an authentication module configuration file.
    An authentication module configuration file specifies the credentials required from an identity (either user, service, or application) in order to authenticate to a specific authentication module. It is located in <identity_server_root>/ SUNWam/web-apps/services/config/auth/default. The required credentials might include, but are certainly not limited to, user name and password. Information on how to create the file, based on the syntax of the Auth_Module_Properties.dtd, can be found in "Configuring Module Credential Requirements".
  4. Modify the amAuth.xml file.
    The amAuth.xml defines the "parent" Core Authentication service. It is located in <identity_server_root>/SUNWam/config/xml. This file must be modified in order for the Authentication Service to recognize any custom authentication module. Information on amAuth.xml modifications can be found in "Modifying amAuth.xml". Information on modifying XML service files in general can be found in Chapter 6 "Service Management."
  5. Import the custom module's XML service file into the Authentication Service using the amadmin command line tool.
    The syntax of the amadmin command line tool and instructions on how to use it can be found in the Sun ONE Identity Server Administration Guide.

    Note

    Identity Server contains a sample exercise for creating a custom authentication module. For more information, see the "Login Module".



    Configuring Localization Properties

    A localization properties file specifies the localized screen text and messages that an administrator or user will see when directed to an Authentication Service's attribute configuration page. Each authentication module has a corresponding localization properties file. The name of the file follows the format amAuth<modulename>.properties; for example, amAuthLDAP.properties. The default character set is ISO-8859-1 (English). Each authentication module has its own localization properties file, located in <identity_server_root>/ SUNWam/locale/. This directory contains a sub-directory for each locale. The default English directory is en_US. For reference, Code Example 3-2 is a portion of the file amAuthLDAP.properties. (The file is in the <identity_server_root>/ SUNWam/locale/en_US directory.) Following are the concepts behind the configuration of this file.

PasswdSame=Password should not be same

PasswdMinChars=Password should be at least 8 characters

a1=Primary LDAP Server and Port

a2=Secondary LDAP Server and Port

a3=DN to Start User Search

a4=DN for Root User bind

a5=Password for Root User Bind

a6=User Naming Attribute

a7=User Entry Search Attribute

...




Configuring Module Credential Requirements

The authentication module configuration file specifies each authentication module's credential requirements by defining the screens that a user might see when directed to authenticate. Modifying elements in this XML file will automatically and dynamically customize the authentication interface. The name of this file follows the format <modulename>.xml; for example, SafeWord.xml or LDAP.xml. Each authentication module has its own configuration file, located in <identity_server_root>/SUNWam/web-apps/services/config/auth/default.
If there is more than one organization in the Identity Server deployment, each organization has its own authentication directory named <identity_server_root>/SUNWam/web-apps/services/config/auth/ org_name. If an organization has more than one locale, the files are stored separately, in directories appended with a locale, as in <identity_server_root>/ SUNWam/web-apps/services/config/auth/org_name_locale. Additionally, with service authentication, there might be an authentication directory corresponding to the service under the LDAP organization tree.


Note

Customization of the authentication screens are only supported at the organization, sub-organization and service levels. In a search for the correct module configuration properties files, Identity Server first searches the org_name_locale directory, followed by the org_name, the default_locale and the default directories.






The Auth_Module_Properties.dtd Structure

The Auth_Module_Properties.dtd defines the structure for the XML-based authentication module configuration files. It provides definitions to initiate, construct and send the required authentication interface to the authentication framework. The DTD is located in <identity_server_root>/SUNWam/dtd. An explanation of the elements defined by the Auth_Module_Properties.dtd follows. Each element includes required and/or optional XML attributes.


ModuleProperties Element
ModuleProperties is the root element of the authentication module configuration file. It must contain at least one Callbacks sub-element. The required XML attributes of ModuleProperties are moduleName which takes a value equal to the name of the module and version which takes a value equal to the version number of the authentication module configuration file itself. Code Example 3-3 below is the LDAP.xml file that defines the screens for the LDAP authentication module. Note the ModuleProperties element on the first line of code.


Code Example 3-3    LDAP.xml  

...

<ModuleProperties moduleName="LDAP" version="1.0" >

<Callbacks length="2" order="1" timeout="120"

header="LDAP Authentication" >

<NameCallback>

<Prompt> User Name: </Prompt>

</NameCallback>

<PasswordCallback echoPassword="false" >

<Prompt> Password: </Prompt>

</PasswordCallback>

</Callbacks>

<Callbacks length="4" order="2" timeout="120"

header="Change Password" >

<PasswordCallback echoPassword="false" >

<Prompt>#REPLACE#&lt;BR&gt; Old Password </Prompt>

</PasswordCallback>

<PasswordCallback echoPassword="false" >

<Prompt> New Password </Prompt>

</PasswordCallback>

<PasswordCallback echoPassword="false" >

<Prompt> Confirm Password </Prompt>

</PasswordCallback>

<ConfirmationCallback>

<OptionValues>

<OptionValue>

<Value> Submit </Value>

</OptionValue>

<OptionValue>

<Value> Cancel </Value>

</OptionValue>

</OptionValues>

</ConfirmationCallback>

</Callbacks>

<Callbacks length="0" order="3" timeout="120"

header="Your password has expired."

error="true" >

</Callbacks>

</ModuleProperties>





Callbacks Element
The Callbacks element is used to request the information a module needs to gather from the client requesting authentication. Each Callbacks element signifies a separate screen that can be called during the authentication process. It can contain one or more of four sub-elements: NameCallback, PasswordCallback, ChoiceCallback or ConfirmationCallback. The required XML attributes of Callbacks are length which takes a value equal to the number of callback requests for the defined element and order which takes a value equal to the number this particular callback is in the sequence of callbacks. The order attribute value starts with the number `1'. The optional XML attributes are timeout, template, image, header and error.
Code Example 3-3 defines three screen's callback elements that can be called by the LDAP Authentication module. The first asks the requestor for a name and password. The second screen allows the requestor to change their password. The final screen sends a message to reset the password.


NameCallback Element
The NameCallback element is used to request data that is entered by the user, for example, a user identification. It can contain one sub-element: Prompt. The optional XML attributes are isRequired and attribute. isRequired takes a value of true or false and defines whether the element is required information. (A value of true displays an asterisk next to the attribute's name in the GUI.) attribute takes a character value of the corresponding LDAP attribute of this value.


PasswordCallback Element
The PasswordCallback element is used to request password data that is entered by the user. It can contain one sub-element: Prompt. The XML attributes are echoPassword, isRequired and attribute. echoPassword is required and takes a value of true or false and defines whether the password should be displayed on the screen or not. isRequired is optional and takes a value of true or false and defines whether the element is required information. (A value of true displays an asterisk next to the attribute's name in the GUI.) attribute is also optional and takes a character value of the corresponding LDAP attribute of this value.


ChoiceCallback Element
The ChoiceCallback element is used when the application user must choose from multiple values. It can contain two sub-elements: Prompt or ChoiceValues. The XML attributes are multipleSelectionsAllowed, isRequired and attribute. multipleSelectionsAllowed is a required attribute and takes a value of true or false. It defines whether the user can choose a number of values or only one from the available choices. isRequired is optional and takes a value of true or false. (A value of true displays an asterisk next to the attribute's name in the GUI.) attribute is also optional and takes a character value of the corresponding LDAP attribute of this value.


ConfirmationCallback Element
The ConfirmationCallback element is used to send `button' information, such as button text which needs to be rendered on the module's screen, as well as receive the button information, such as which button is clicked by the user. It can contain one sub-element: OptionValues. There are no XML attributes.


Prompt Element
The Prompt element is used to set the prompt that will display on the browser screen to request the information. It has no sub-elements or XML attributes.


ChoiceValues and ChoiceValue Element
The ChoiceValues element provides a list of values from which the user can select. It must contain at least one sub-element of the type ChoiceValue which defines one choice. ChoiceValue must contain the sub-element Value. ChoiceValues has no XML attributes but ChoiceValue can contain the XML attribute isDefault. isDefault specifies if the defined value has to be selected by default when displayed; it takes a value of true or false.


OptionValues and OptionValue Element
The OptionValues element provides a list of text information for buttons that need to be rendered on the login screen. It must contain at least one sub-element of the type OptionValue which defines one button text value. OptionValue must contain the sub-element Value. OptionValues has no XML attributes but OptionValue can contain the XML attribute isDefault. isDefault specifies if the defined value has to be selected by default when displayed; it takes a value of true or false.


Value Element
The Value element is used by the client to return a value provided by the requestor back to the Identity Server. It has no sub-elements or XML attributes.

Modifying amAuth.xml

The amAuth.xml defines the "parent" authentication service named Core. Following are the attributes in this file that need to be extended in order for the Authentication Service to recognize a new authentication module. amAuth.xml is located in <identity_server_root>/SUNWam/config/xml.
After modifying amAuth.xml, the command line tool amadmin is used to remove the old Core service file and load the modified one.
  1. amadmin --runasdn <admin_dn> --password <password> --deleteService iPlanetAMAuthService
  2. amadmin --runasdn <admin_dn> --password <password> --schema amAuth.xml
    More information on the command line tool can be found in the Sun ONE Identity Server Administration Guide.


Application Authentication


Java™ applications use the authentication API to access, and authenticate to, the Authentication Service while C applications use a web browser. Both types of applications use the remote-auth.dtd to format the structure of the XML request messages used to transfer the authentication information.

Authentication API For Java Applications

External Java applications use the Authentication Java API to initiate the authentication process and communicate with the required authentication module. These Authentication Java API are organized in a package called com.sun.identity.authentication and can be executed locally or remotely to communicate locally with the Authentication Service. Communication between the API and the framework occurs by sending XML messages over HTTP(s).


Note

The Identity Server Javadocs can be accessed from any browser by copying the complete <identity_server_root>/SUNWam/docs/ directory into the <identity_server_root>/SUNWam/public_html directory and pointing the browser to http://<server_name.domain_name>:<port>/docs/index.html.




The AuthContext class is defined for each request desiring to authenticate to the Identity Server. Since Identity Server can handle multiple organizations, the AuthContext class must be initialized, at least, with the name of the organization to which the requestor is authenticating. Typical code would instantiate this class to begin the login process. The caller would then use the getRequirements method to ask for the requestor's credentials. The credentials are then submitted to the class using submitRequirements. If more information is required, the above process continues until all the required information has been supplied. The getStatus method is then called to check if the user has been successfully authenticated. If successful, the caller can then get the Subject and SSOToken for the user; if not, the caller obtains a LoginException. Identity Server is shipped with a sample that uses this class; for more information, see the section "Remote Client API".


Note

The Authentication API are also able to invoke authentication modules written using the pure JAAS API.





Authenticating Non-Java Applications

Non-Java applications can also authenticate to the Identity Server. Using the URL http://<host.domain:port>/<service_deploy_uri>/authservice, the application opens a connection and then exchanges XML messages with the Identity Server. The XML messages are structured according to the remote-auth.dtd. Information on this document can be found in "The remote-auth.dtd Structure". An example of the messages used by C applications can be found in "C Programs and Authentication".

The remote-auth.dtd Structure

Authentication requests and responses are sent to and received by the Authentication Java API or non-Java applications using an XML structure. The structure of these messages is defined in the remote-auth.dtd. The remote-auth.dtd defines the structure for the XML-based messages sent to, and received by, the Identity Server console. It provides definitions to initiate the collection of credentials and perform authentication. It is located in the <identity_server_root>/SUNWam/dtd directory. An explanation of the elements defined by the remote-auth.dtd follows. Each element has required and/or optional XML attributes.


AuthContext Element

AuthContext is the root element of the XML-based message. It must contain a Request or Response sub-element. The required XML attributes of AuthContext are version which takes a value equal to the version number.


Request Element

The Request element is used by the client to initialize and pass user credentials to the Authentication Service. It may contain one or more of the following sub-elements: NewAuthContext, QueryInformation, Login, SubmitRequirements, Logout or Abort. The required XML attribute of Request is authIdentifier which takes a value equal to a unique random number set by the Authentication Service and used to keep track of the authentication session.


NewAuthContext Element

The NewAuthContext element is initiates the authentication process by initializing the Authentication Service and creating a session token for each request. It contains no sub-elements. The required XML attribute of NewAuthContext is orgName which takes a value equal to the name of the organization or sub-organization for which the process is defined.


QueryInformation Element

The QueryInformation element is used by the remote client to get information about the authentication modules supported by the Identity Server or the organization. It contains no sub-elements. The required XML attribute of QueryInformation is requestedInformation which takes a value equal to the authentication module plug-ins configured for an organization or sub-organization.


Login Element

The Login element is used to initialize the authentication session. It will have an Empty sub-element, or can have an IndexTypeNamePair. The IndexTypeNamePair element can be used to specify the defined authentication type and value. It has no required XML attributes.


SubmitRequirements Element

The SubmitRequirements element is used by the remote client to submit the identity's authentication credentials to the Identity Server. It has a Callbacks sub-element and no required XML attributes.


Logout Element

The Logout element is used by the remote client to indicate that user wants to logout. It has an Empty sub-element and no required XML attributes.


Abort Element

The Abort element is used by the remote client to indicate that the user wants to end the login process. It has an Empty sub-element and no XML attributes.


Response Element

The Response element is used by the Authentication Service to ask the remote client to gather user credentials or to inform the remote client on the success or failure of the login as well as any errors that might have occurred. It may contain one or more of the following sub-elements: QueryResult, GetRequirements, LoginStatus or Exception. Table 3-3 shows the Request sub-elements and the possible Responses for each.


Table 3-3    Request Sub-Elements And Possible Responses

Request

Possible Responses

NewAuthContext  

LoginStatus or Exception  

QueryInformation  

QueryResult or Exception  

Login  

GetRequirements, LoginStatus or Exception  

SubmitRequirements  

GetRequirements, LoginStatus or Exception  

Logout  

LoginStatus or Exception  

Abort  

LoginStatus or Exception  

The required XML attribute of Response is authIdentifier which takes a value equal to a unique random number set by the Authentication Service and used to keep track of the authentication session.


QueryResult Element

The QueryResult element is used by Identity Server to send query information requested by the remote client. It must contain a Value sub-element. The required XML attribute of QueryResult is requestedInformation which takes a value equal to the authentication module plug-ins configured for an organization or sub-organization.


GetRequirements Element

The GetRequirements element is used by the Identity Server to request authentication credentials from the client. It has a Callbacks sub-element and no required XML attributes.


LoginStatus Element

The LoginStatus element is used by the Identity Server to indicate the status of the authentication process. It will have an Empty sub-element if a Subject or Exception sub-element is not defined. The XML attributes are status, ssoToken, successURL or failureURL; the latter three are optional. If the LoginStatus is successful, the sub-element Subject will be returned with the authenticated user names. The attribute ssoToken will have the session token status set to inprogress when a new AuthContext is created, to success when a login has been successful, to failed when a login has not been successful and completed when the user logs out. The successURL attribute represents the URL that the identity will be redirected to upon successful authentication and failureURL represents the URL that the identity will be redirected to upon failed authentication.


Exception Element

The Exception element is used by the Identity Server to inform the client about an exception that occurred during the login process. It has an Empty sub-element and four optional XML attributes: message which takes a value equal to that of the exception message, tokenId which takes a value equal to that of the user ID of the failed authentication, errorCode which takes a value equal to that of the error message code and templateName which takes a value equal to the name of the JSP template which will be used for this particular exception.


IndexTypeNamePair Element

The IndexTypeNamePair element identifies the defined authentication method that will be used to validate the client. It has the IndexName sub-element. The required XML attribute is IndexType which takes a value equal to that of the generic level at which the authentication method has been defined: authLevel, role, user, moduleInstance and service.


IndexName Element

The IndexName element identifies the specific name of the value specified by the IndexType attribute in the IndexTypeNamePair element. The authentication method can be defined at the organization level, the role level, the user level, the authentication level or the service/application level. The IndexType attribute defines this level; the IndexName element takes a value equal to that of the specific name of the level at which the authentication method has been defined. It has no sub-elements and no XML attributes.


Subject Element

The Subject element identifies a collection of one or more identities. It has no sub-elements and no XML attributes.


Callbacks Element

The Callbacks element is used to request and transfer user credentials between the remote client and Identity Server. Identity Server constructs callback objects for information gathering. The client program collects the credentials by prompting the user and returns the callback objects with the required data. The Callbacks element may contain one or more of the following sub-elements: NameCallback, PasswordCallback, ChoiceCallback, ConfirmationCallback, TextInputCallback, TextOutputCallback, LanguageCallback, PagePropertiesCallback and CustomCallback. The required XML attribute is length which takes a value equal to that of a token.


NameCallback Element

The NameCallback element is used to obtain the name of the user (or service) that is requesting authentication. It may contain one or more of the following sub-elements: Prompt or Value. It has no required XML attributes.


PasswordCallback Element

The PasswordCallback element is used to obtain the password of the user (or service) that is requesting authentication. It may contain one or more of the following sub-elements: Prompt or Value. The required XML attribute is echoPassword which takes a value of true or false. The default value of false indicates that there will be no password confirmation.


ChoiceCallback Element

The ChoiceCallback element is used when the user must choose from a selection of values. It may contain one or more of the following sub-elements: Prompt, ChoiceValue or SelectedValues. The required XML attribute is multipleSelectionsAllowed which takes a value of true or false. The default value of false indicates that the user can not choose more than one from the selection.


ConfirmationCallback Element

The ConfirmationCallback element is used by the Identity Server to request a confirmation from the user. It may contain one or more of the following sub-elements: Prompt, OptionValues, SelectedValue, and DefaultOptionValue. The required XML attributes are messageType (which defines the type of message, either information, warning or the default, error), and optionType which specifies the type of confirmation (ok_cancel, yes_no_cancel, unspecified or the default, yes_no).


TextInputCallback Element

The TextInputCallback element is used to get text information from the user. It may contain one or more of the following sub-elements: Prompt or Value. There are no required XML attributes.


TextOutputCallback Element

The TextOutputCallback element is used when the user must choose from a selection of values. It may contain the sub-element Value. The required XML attribute is messageType which defines the type of message, either information, warning or the default, error.


LanguageCallback Element

The LanguageCallback element is used by the Identity Server to obtain the user's locale information. It must contain the Locale sub-element. There are no required XML attributes.


PagePropertiesCallback Element

The PagePropertiesCallback element contains all GUI-related information. It may contain any of the following sub-elements: ModuleName, HeaderValue, ImageName, PageTimeOutValue, or TemplateName. The required XML attribute is isErrorState which takes a value of true or false. The default value is false which indicates that this page is not an error page.


ModuleName Element

The ModuleName element is takes a value equal to the name of the authentication module. It contains no sub-elements and no XML attributes.


HeaderValue Element

The HeaderValue element is takes a value equal to the header that will be displayed. It contains no sub-elements and no XML attributes.


ImageName Element

The ImageName element is takes a value equal to the name of the image to be displayed. It contains no sub-elements and no XML attributes.


PageTimeOutValue Element

The PageTimeOutValue element is the page time-out value in seconds. It contains no sub-elements and no XML attributes.


TemplateName Element

The TemplateName element is takes a value equal to the name of the template to be rendered. It contains no sub-elements and no XML attributes.


CustomCallback Element

The CustomCallback element is used to define user-defined Callbacks. It may contain the AttributeValuePair sub-element. The required XML attribute is the className which takes a value equal to that of the Callback name.


AttributeValuePair Element

The AttributeValuePair element contains the attribute and values for a Callback. It must contain the Attribute sub-element and it can contain the Value sub-element. There are no required XML attributes.


Attribute Element

The Attribute element defines the Callback parameter. It contains no sub-elements. The required XML attribute is name which takes a value equal to the name of the Callback parameter.


Prompt Element

The Prompt element is used by Identity Server to request the remote client to display the prompt. It contains no sub-elements and there are no required XML attributes.


Locale Element

The Locale element contains the value of the locale that will be used for authentication. It contains no sub-elements. The optional XML attributes are language (which represents the language code), country (which represents the country code) and variant (which represents the variant code).


ChoiceValues Element

The ChoiceValues element provides a list of choices. It must contain at least one the ChoiceValue sub-element. There are no required XML attributes.


ChoiceValue Element

The ChoiceValues element provides a single choice. It must contain at least one Value sub-element. The required XML attribute is isDefault which takes a value of yes or no. The default value of no specifies if the value has to be selected by default when displayed.


SelectedValues Element

The SelectedValues element provides a list of values selected by the user. It must contain at least one Value sub-element. There are no required XML attributes.


SelectedValue Element

The SelectedValue element provides a value selected by the user. It must contain at least one Value sub-element. There are no required XML attributes.


OptionValue Element

The SelectedValues element provides a single user-defined option value. It must contain at least one Value sub-element. There are no required XML attributes.


DefaultOptionValue Element

The DefaultOptionValue element is the default option value. The default value depends on whether user-defined values or predefined values are used in the callback. If user-defined values are used, the default value will be an index in the OptionValues element; if predefined, it will be one of the predefined option values.It must contain at least one Value sub-element. There are no required XML attributes.


Value Element

The Value element is used by the remote client to return a value, provided by the user (or service), back to the Identity Server. It must contain at least one Value sub-element. There are no required XML attributes.


Authentication SPI


The Authentication SPI implements the JAAS LoginModule API, and provides methods to access the Authentication Service and module configuration properties files. The SPI are organized in the com.iplanet.authentication.spi package and contain the abstract class, AMLoginModule, which must be sub-classed with the name of an authentication module. The class must also implement the init(), process() and getPrincipal() methods in order to communicate with the module configuration properties files. The callbacks are then dynamically generated based on this file. Other methods that can be defined include the setLoginFailureURL and setLoginSuccessURL which set the URLs to send the user to based on a failed or successful authentication, respectively. More information on the SPI can be found in the Javadocs located at <identity_server_root>/SUNWam/docs.


URL Parameters


A URL parameter is a name/value pair appended to the end of a URL. The parameter starts with a question mark (?) and takes the form name=value. If more than one URL parameter exists, each parameter is separated by an ampersand (&). URL parameters pass information from the browser to the Identity Server. The following parameters, when appended to an authentication URL and typed in a web browser's Location bar, will redirect the user to the appropriate resource after authentication.


C Programs and Authentication


Following is an example of how customers create XML messages to call the Authentication Service from a C program.

Authentication Request / Response Flow
  1. Create an AuthContext for the organization name to login to. The successful response for this is the authIdentifier which is the sessionID for this request. Code Example 3-4 illustrates what the Request XML message would look like.

    Code Example 3-4    Request XML Message For C Applications

"P0ST /amserver/authservice HTTP/1.0

Accept text/xml

Content-Length: <len>

Content-Type: text/xml;charset=UTF-8


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<RequestSet vers="1.0" svcid="auth" reqid="1">

<Request><![CDATA[<?xml version="1.0" encoding="UTF-8"?>

<AuthContext version="1.0"><Request authIdentifier="0">

<NewAuthContext orgName="/"></NewAuthContext>

</Request></AuthContext>]]></Request>

</RequestSet>



Code Example 3-5 illustrates what the Response XML message (which returns the unique session ID for the request) would look like.


Code Example 3-5    Response XML Message From C Applications 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<ResponseSet vers="1.0" svcid="auth" reqid="1">

<Response><![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>

<AuthContext version="1.0">

<Response authIdentifier="<sessionid>">

<LoginStatus status="in_progress"></LoginStatus>

</Response>

</AuthContext>]]>

</Response>

</ResponseSet>



  1. Start the authentication process using the Login Element. Code Example 3-6 illustrates this message.

    Code Example 3-6    XML Message To Start Authentication Process

    "P0ST /amserver/authservice HTTP/1.0

    Accept text/xml

    Content-Length: <len>

    Content-Type: text/xml;charset=UTF-8


    <xml version="1.0" encoding="UTF-8" standalone="yes"

    <RequestSet vers="1.0" svcid="auth" reqid="1">

    <Request><!CDATA[<?xml version="1.0" encoding="UTF-8"?>"

    <AuthContext version="1.0"><Request authIdentifier="<sessionid>"><Login/></Request>

    </AuthContext>]]></Request>

    </RequestSet>



    The Response to this Request will be the credentials required for the organization's configured authentication method. (Passing the credentials is done using JAAS Callbacks.) Assuming that the default authentication module is LDAP, Code Example 3-7 illustrates the Response.

    Code Example 3-7    XML Response To Authentication Process Request

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

    <ResponseSet vers="1.0" svcid="auth" reqid="1">

    <Response><![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>

    <AuthContext version="1.0">

    <Response authIdentifier="<sessionId>">

    <Callbacks length="3">

    <PagePropertiesCallback isErrorState="false">

    <ModuleName>LDAP</ModuleName>

    <HeaderValue>This server uses LDAP Authentication

    </HeaderValue>

    <ImageName>null</ImageName>

    <PageTimeOut>120</PagerValue>

    <TemplateName>null</TemplateName>

    </PagePropertiesCallback>

    <NameCallback><Prompt> User Name: </Prompt></NameCallback>

    <PasswordCallback echoPassword="false">

    <Prompt> Password:</Prompt>

    </PasswordCallback>

    </Callbacks>

    </Response>

    </AuthContext>]]>

    </Response>

    </ResponseSet>



  2. Send the required credentials back to the Identity Server. Code Example 3-8 illustrates this XML message. Code Example 3-8 illustrates the XML message that contains the authentication credentials.

    Code Example 3-8    XML Request With Authentication Credentials

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

    <RequestSet vers="1.0" svcid="auth" reqid="1">

    <Request><![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>

    <AuthContext version="1.0">

    <Request authIdentifier="<sessionId>">

    <SubmitRequirements>

    <Callbacks length="2">

    <NameCallback><Prompt> User Name: </Prompt>

    <Value> <value> </Value>

    </NameCallback>

    <PasswordCallback echoPassword="false">

    <Prompt> Password:</Prompt>

    <Value> <password> </Value>

    </PasswordCallback>

    </Callbacks>

    </SubmitRequirements>

    </Request>

    </AuthContext>]]></Request>

    </RequestSet>



    The Response for the above might be callbacks if the module requires more information or the LoginStatus. Assuming that there are no more callbacks, the XML Response is illustrated by Code Example 3-9.

    Code Example 3-9    XML Response To Authentication Credentials

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<ResponseSet vers="1.0" svcid="auth" reqid="1">

<Response><![CDATA[<?xml version="1.0" encoding="ISO-8859-1"?>

<AuthContext version="1.0">

<Response authIdentifier="<sessionid>">

<LoginStatus status="success" ssotoken="sessionid" successurl="http://www.yahoo.com">

</LoginStatus>

</Response>

</AuthContext>]]></Response>

</ResponseSet>





Authentication Samples


Authentication Service samples have been provided and can be found in the directory <identity_server_root>/SUNWam/samples/authentication. They include:

Remote Client API

This sample program demonstrates how to integrate the Remote Client API for authenticating users with the Identity Server. It uses LDAP authentication although it can be modified to use other existing or customized authentication modules. The instruction file is the readme.html file found in the <identity_server_root>/SUNWam/samples/authentication/LDAP directory.

Login Module

This sample demonstrates the steps needed to integrate a custom login module into the Identity Server. All the files needed to compile, deploy and run the sample authentication module that is shipped with Identity Server can be found in the <identity_server_root>/SUNWam/samples/authentication/providers directory. The instruction file is the Readme.html file in the same directory.

Previous     Contents     Index     Next     

Copyright 2002   Sun Microsystems, Inc. All rights reserved.
Last Updated December 02, 2002