Authentication Plug-In DeveloperGuide
Authentication Plug-In DeveloperGuide
(On-Premise) 7.1
Authentication Plug-In Developers Guide
Contact Information
Go to the RSA corporate website for regional Customer Support telephone and fax numbers:
www.emc.com/domains/rsa/index.htm
Trademarks
RSA, the RSA Logo and EMC are either registered trademarks or trademarks of EMC Corporation in the United States and/or
other countries. All other trademarks used herein are the property of their respective owners. For a list of EMC trademarks, go
to www.emc.com/legal/emc-corporation-trademarks.htm#rsa.
License agreement
This software and the associated documentation are proprietary and confidential to EMC, are furnished under license, and
may be used and copied only in accordance with the terms of such license and with the inclusion of the copyright notice
below. This software and the documentation, and any copies thereof, may not be provided or otherwise made available to any
other person.
No title to or ownership of the software or documentation or any intellectual property rights thereto is hereby transferred. Any
unauthorized use or reproduction of this software and the documentation may be subject to civil and/or criminal liability.
This software is subject to change without notice and should not be construed as a commitment by EMC.
Note on Encryption Technologies
This product may contain encryption technology. Many countries prohibit or restrict the use, import, or export of encryption
technologies, and current use, import, and export regulations should be followed when using, importing or exporting this
product.
Distribution
Use, copying, and distribution of any EMC software described in this publication requires an applicable software license.
EMC believes the information in this publication is accurate as of its publication date. The information is subject to change
without notice.
THE INFORMATION IN THIS PUBLICATION IS PROVIDED "AS IS." EMC CORPORATION MAKES NO
REPRESENTATIONS OR WARRANTIES OF ANY KIND WITH RESPECT TO THE INFORMATION IN THIS
PUBLICATION, AND SPECIFICALLY DISCLAIMS IMPLIED WARRANTIES OF MERCHANTABILITY OR
FITNESS FOR A PARTICULAR PURPOSE.
Copyright 2013 EMC Corporation. All Rights Reserved. Published in the USA.
July 2013
RSA Adaptive Authentication (On-Premise) 7.1 Authentication Plug-In Developers Guide
Contents
Preface................................................................................................................................... 5
About This Guide................................................................................................................ 5
RSA Adaptive Authentication (On-Premise) Documentation ............................................ 5
Support and Service ............................................................................................................ 6
Before You Call Customer Support............................................................................. 6
Contents 3
RSA Adaptive Authentication (On-Premise) 7.1 Authentication Plug-In Developers Guide
4 Contents
RSA Adaptive Authentication (On-Premise) 7.1 Authentication Plug-In Developers Guide
Preface
Preface 5
RSA Adaptive Authentication (On-Premise) 7.1 Authentication Plug-In Developers Guide
Release Notes. Provides information about what is new and changed in this
release, as well as workarounds for known issues. It also includes the supported
platforms and work environments for platform certifications. The latest version of
the Release Notes is available on RSA SecurCare Online at
https://knowledge.rsasecurity.com.
Security Best Practices Guide. Provides recommendations for configuring your
network and RSA Adaptive Authentication (On-Premise) 7.1 securely.
Web Services API Reference Guide. Describes RSA Adaptive Authentication
(On-Premise) 7.1 web services API methods and parameters. This guide also
describes how to build your own web services clients and applications using web
services API to integrate and utilize the capabilities of Adaptive Authentication
(On-Premise).
Whats New. Highlights new features and enhancements in RSA Adaptive
Authentication (On-Premise) 7.1.
Workflows and Processes Guide. Describes the workflows and processes that
allow end users to interact with your system and that allow your system to interact
with RSA Adaptive Authentication (On-Premise) 7.1.
6 Preface
RSA Adaptive Authentication (On-Premise) 7.1 Authentication Plug-In Developers Guide
Overview
RSA Adaptive Authentication (On-Premise) for the web is a flexible, layered
authentication solution designed to match security with transaction risk, customer
need, preference, and usability. The Adaptive Authentication system offers two
distinct systems that take different authentication approaches in helping to meet the
needs of your user base:
Risk-Based Authentication
Multi-Credential Framework
The Authentication Plug-In enables external authentication providers to easily
integrate products with the Adaptive Authentication (On-Premise) system.
Authentication Plug-In software is integrated with the RSA Multi-Credential
Framework (MCF) to support particular types of authentication credentials. The
Authentication Plug-In is activated by the Adaptive Authentication core system, for
various business flows, according to the credential payload provided.
For each business flow, the Authentication Plug-In populates a data structure, stored
by MCF in the Core Database, as a part of the user information. Similarly, MCF can
provide an Authentication Plug-In with data stored for a user.
6. The wrapper receives a business response from the Authentication Plug-In. The
plug-in is responsible for populating the business response, for example, setting
the call status.
7. During the Authentication Plug-In flow execution, the plug-in can use
AcspContext for retrieving global plug-in definitions, and Request context for
handling session-level and user-level data. This data can be modified by the
plug-in and is stored in the Adaptive Authentication PassMarkDB database
(inside SESSIONACSP and ACSPUSERACCOUNT data) at the end of the flow
for future requests, as described in Storing Authentication Plug-In Data.
8. The wrapper returns one of the following responses:
Management
Authentication
Challenge
authStatus
System Requirements
The following are the system requirements for developing the SDK:
Platform that supports JDK 5 and earlier
Apache Ant
Note: The XSD file must reference the ACSP.xsd file included in the SDK for the
compilation to work.
Authentication
An Authentication payload must be populated with data, which is passed to the
Authentication Plug-In, to activate the Authentication request functionality.
The following sample code shows a one-time password (OTP) Authentication Plug-In
for an Authentication payload.
<tns:credentialDataList>
<tns:acspAuthenticationRequestData>
<tns:payload
xsi:type="smpl:SampleAcspAuthenticationRequest">
<smpl:sampleOtp>327453</smpl:sampleOtp>
<smpl:field1>f1</smpl:field1>
<smpl:field2>f2</smpl:field2>
<smpl:field3>f3</smpl:field3>
</tns:payload>
</tns:acspAuthenticationRequestData>
</tns:credentialDataList>
Authentication Status
An Authentication Status payload must be populated with data, which is passed to the
Authentication Plug-In, to activate the Authentication Status functionality.
The following sample code shows an Authentication Plug-In for an Authentication
Status payload.
<tns:credentialAuthStatusRequest>
<tns:acspAuthStatusRequestData>
<tns:payload
xsi:type="smpl:SampleAcspAuthStatusRequest">
<smpl:sampleOtp>849323</smpl:sampleOtp>
<smpl:field1>f1</smpl:field1>
<smpl:field2>f2</smpl:field2>
<smpl:field3>f3</smpl:field3>
</tns:payload>
</tns:acspAuthStatusRequestData>
</tns:credentialAuthStatusRequest>
Challenge
Even when there is no business data to be passed, an empty Challenge payload is
marked to indicate to the system to activate the Challenge functionality of the current
Authentication Plug-In.
The following sample code illustrates an OTP Authentication Plug-In for an empty
Challenge payload.
<tns:credentialChallengeRequestList>
<tns:acspChallengeRequestData>
<tns:payload xsi:type="otpns:OTPChallengeRequest"/>
</tns:acspChallengeRequestData>
</tns:credentialChallengeRequestList>
Any fields that you provide to the Authentication Plug-In must be included in the
payload, as shown in the following sample code.
<tns:credentialChallengeRequestList>
<tns:acspChallengeRequestData>
<tns:payload
xsi:type="smpl:SampleAcspChallengeRequest">
<smpl:field1>f1</smpl:field1>
<smpl:field2>f2</smpl:field2>
<smpl:field3>f3</smpl:field3>
</tns:payload>
</tns:acspChallengeRequestData>
</tns:credentialChallengeRequestList
Management
A Management payload must be populated for an Authentication Plug-In.
Even when there is no business data to be passed to the payload, an empty
Management payload is marked to indicate that the user is enrolled for the current
Authentication Plug-In.
The following sample code illustrates an OTP Authentication Plug-In for an empty
Management payload.
<tns:credentialManagementRequestList>
<tns:acspManagementRequestData>
<tns:credentialProvisioningStatus>ACTIVE</tns:credentialProvisi
oningStatus>
<tns:payload xsi:type="otpns:OTPManagementRequest"/>
</tns:acspManagementRequestData>
</tns:credentialManagementRequestList>
<tns:credentialChallengeRequestList>
<tns:acspChallengeRequestData>
<tns:payload
xsi:type="smpl:SampleAcspChallengeRequest">
<smpl:field1>f1</smpl:field1>
<smpl:field2>f2</smpl:field2>
<smpl:field3>f3</smpl:field3>
</tns:payload>
</tns:acspChallengeRequestData>
</tns:credentialChallengeRequestList>
AuthenticationRequest Object
The Authentication Plug-In AuthenticationRequest object contains the data elements
required by an Authentication request flow. The AuthenticationRequest object derives
from the AcspAuthenticationRequest class and is passed when the Authenticate
command is called in an Authentication Plug-In interface.
The following code sample shows a generated OTPAuthenticationRequest class
object.
/**
* OTPAuthenticationRequest.java
* This file was auto-generated from Schema
* by the RSA Authentication Plug-In SDK
*/
package com.rsa.csd;
/**
* OTPAuthenticationRequest plug-in bean class
*/
public class OTPAuthenticationRequest extends
com.rsa.acsp.AcspAuthenticationRequest
{
/**
* field for otp
*/
private java.lang.String otp;
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getOtp( )
{
return otp;
}
/**
* Auto generated setter method
* @param param Otp
*/
public void setOtp(java.lang.String param)
{
this.otp=param;
}
}
AuthStatusRequest Object
The Authentication Plug-In AuthStatusRequest object contains the data elements
required by the AuthStatus request flow. The AuthStatus business flow is used for an
asynchronous authentication session where this request is used for subsequent status
polling. The AuthStatusRequest object derives from the AcspAuthStatusRequest class
and is passed when the AuthStatus command is called in an Authentication Plug-In
interface.
The following code sample shows a generated OTPAuthStatusRequest object class.
/**
* OTPAuthStatusRequest.java
*
* This file was auto-generated from Schema
* by RSA Authentication Plug-In SDK
*/
package com.rsa.csd;
/**
* OTPAuthStatusRequest plug-in bean class
*/
public class OTPAuthStatusRequest extends
com.rsa.acsp.AcspAuthStatusRequest
{
/**
* field for otp
*/
private java.lang.String otp;
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getOtp( )
{
return otp;
}
/**
* Auto generated setter method
* @param param Otp
*/
public void setOtp(java.lang.String param)
{
this.otp=param;
}
}
ChallengeRequest Object
The Authentication Plug-In ChallengeRequest object contains the data elements
required by the Challenge request flow. The ChallengeRequest object derives from the
AcspChallengeRequest class and is passed when the Challenge command is called in
an Authentication Plug-In interface.
The following code sample shows a generated OTPChallengeRequest object class.
/**
* OTPChallengeRequest.java
*
* This file was auto-generated from Schema
* by RSA Authentication Plug-In SDK
*/
package com.rsa.csd;
/**
* OTPChallengeRequest plug-in bean class
*/
public class OTPChallengeRequest extends
com.rsa.acsp.AcspChallengeRequest
{
}
ManagementRequest Object
The Authentication Plug-In ManagementRequest object contains the data elements
required by a Management request. The ManagementRequest object derives from the
Authentication Plug-In ManagementRequest class and is passed when the
Management command is called in an Authentication Plug-In interface.
The following code sample shows a generated OTPManagementRequest object class.
/**
* OTPManagementRequest.java
*
* This file was auto-generated from Schema
Note: RSA recommends that you do not modify the generated response objects.
AuthenticationResponse Object
The Authentication Plug-In AuthenticationResponse object contains the data elements
returned for an Authentication request. The AuthenticationResponse object derives
from the AcspAuthenticationResponse class and is returned when the Authenticate
command is called in an Authentication Plug-In interface. The following code sample
shows a generated OTPAuthenticationResponse object class.
/**
* OTPAuthenticationResponse.java
*
* This file was auto-generated from Schema
* by RSA Authentication Plug-In SDK
*/
package com.rsa.csd;
/**
* OTPAuthenticationResponse plug-in bean class
*/
public class OTPAuthenticationResponse extends
com.rsa.acsp.AcspAuthenticationResponse
{
}
AuthStatusResponse Object
The Authentication Plug-In AuthStatusResponse object contains the data elements
returned for an AuthStatus request. The AuthStatusResponse object derives from the
AcspAuthStatusResponse class and is returned when the AuthStatus command is
called in an Authentication Plug-In interface. The following code sample shows a
generated OTPAuthStatusResponse object class.
/**
* OTPAuthStatusResponse.java
*
* This file was auto-generated from Schema
* by RSA Authentication Plug-In SDK
*/
package com.rsa.csd;
/**
* OTPAuthStatusResponse plug-in bean class
*/
public class OTPAuthStatusResponse extends
com.rsa.acsp.AcspAuthStatusResponse
{
}
ChallengeResponse Object
The Authentication Plug-In ChallengeResponse object contains the data elements
returned for a Challenge request. The ChallengeResponse object derives from the
AcspChallengeResponse class and is returned when the Challenge command is called
in an Authentication Plug-In interface. The following code sample shows a generated
OTPChallengeResponse object class.
/**
* OTPChallengeResponse.java
*
* This file was auto-generated from Schema
* by RSA Authentication Plug-In SDK
*/
package com.rsa.csd;
/**
* OTPChallengeResponse plug-in bean class
*/
public class OTPChallengeResponse extends
com.rsa.acsp.AcspChallengeResponse
{
/**
* field for otp
*/
private java.lang.String otp;
/**
* Auto generated getter method
* @return java.lang.String
*/
ManagementResponse Object
The Authentication Plug-In ManagementResponse object contains the data elements
returned for a Management request. The ManagementResponse object derives from
the AcspManagementResponse class and is returned when the Management command
is called in an Authentication Plug-In interface. The following code sample shows a
generated OTPManagementResponse object class.
/**
* OTPManagementResponse.java
*
* This file was auto-generated from Schema
* by RSA Authentication Plug-In SDK
*/
package com.rsa.csd;
/**
* OTPManagementResponse plug-in bean class
*/
public class OTPManagementResponse extends
com.rsa.acsp.AcspManagementResponse
{
}
CallStatus Object
Each response object returned by the Authentication Plug-In must contain the status
indication of the action performed by Authentication Plug-In and the reason for any
failure.
The status is obtained by using the infrastructural method setStatus(CallStatus), which
is available for each response object. The status must be set for each business flow,
otherwise the system throws an exception.
To create a CallStatus object, use one of the following options:
Constants:
CallStatus.OK: common OK status
CallStatus.SYSTEM_ERROR: unknown system error
CallStatus.INVALID_USER_REQUEST: invalid request supplied
The following class figure shows the CallStatus object and related classes.
The following class figure shows the Core Object Factory interface.
OTP
* @return core Authentication Plug-In challenge request
for OTP
*/
public AcspChallengeRequest getCoreAcspChallengeRequest(
)
{
return new OTPChallengeRequest( );
}
/**
* Get core Authentication Plug-In challenge response for
OTP
* @return core Authentication Plug-In challenge response
for OTP
*/
public AcspChallengeResponse
getCoreAcspChallengeResponse( )
{
return new OTPChallengeResponse( );
}
/**
* Get core Authentication Plug-In auth status request
for OTP
* @return core Authentication Plug-In auth status
request for OTP
*/
public AcspAuthStatusRequest
getCoreAcspAuthStatusRequest( )
{
return new OTPAuthStatusRequest( );
}
/**
* Get core Authentication Plug-In auth status response
for OTP
* @return core Authentication Plug-In auth status
response for OTP
*/
public AcspAuthStatusResponse
getCoreAcspAuthStatusResponse( )
{
return new OTPAuthStatusResponse( );
}
}
The developer must add to the code, generated by the Authentication Plug-In SDK, a
method called getEnumClassMappings() that will return a map that maps Axis style
classes to POJO classes. The following is an example of this code:
/**
* Get enum class mappings map
* @return enum class mappings map
*/
public Map getEnumClassMappings()
{
Map enumClassMappings = new HashMap();
enumClassMappings.put(org.myorg.ws.MyAxisEnum1.class,
org.myorg.MyPOJOEnum1.class);
enumClassMappings.put(org.myorg.ws.MyAxisEnum2.class,
org.myorg.MyPOJOEnum2.class);
enumClassMappings.put(org.myorg.ws.MyAxisEnum3.class,
org.myorg.MyPOJOEnum3.class);
return enumClassMappings;
}
The following class figure shows the Generated Object Factory interface.
getGeneratedAcspAuthenticationResponse( )
{
return new OTPAuthenticationResponse( );
}
public AcspManagementRequest
getGeneratedAcspManagementRequest( )
{
return new OTPManagementRequest( );
}
public AcspManagementResponse
getGeneratedAcspManagementResponse( )
{
return new OTPManagementResponse( );
}
public AcspChallengeRequest
getGeneratedAcspChallengeRequest( )
{
return new OTPChallengeRequest( );
}
public AcspChallengeResponse
getGeneratedAcspChallengeResponse( )
{
return new OTPChallengeResponse( );
}
public AcspAuthStatusRequest
getGeneratedAcspAuthStatusRequest( )
{
return new OTPAuthStatusRequest( );
}
public AcspAuthStatusResponse
getGeneratedAcspAuthStatusResponse( )
{
return new OTPAuthStatusResponse( );
}
}
import axis.generic.ExtensionMapperFactory;
import com.rsa.csd.ws.ExtensionMapper;
import javax.xml.stream.XMLStreamReader;
/**
* Extension Mapper Factory for OTP
*/
public class OTPExtensionMapperFactory implements
ExtensionMapperFactory
{
/**
* @param namespaceURI namespace
* @param typeName type name
* @param reader reader
* @return resolved object
* @throws java.lang.Exception
*/
public Object resolveObject(String namespaceURI, String
typeName, XMLStreamReader reader) throws Exception
{
return ExtensionMapper.getTypeObject(namespaceURI,
typeName, reader);
}
}
OTPAuthenticationResponse( );
// check whether OTP matches and populate CallStatus
accordingly
if ((otp != null) && otp.equals(password))
{
response.setStatus(new
CallStatus(CallStatusCode.SUCCESS, new
StatusDescription("OTP matches!")));
}
else
{
response.setStatus(new
CallStatus(CallStatusCode.ERROR, new StatusDescription("OTP
doesn't match!")));
}
return response;
}
public OTP(AcspContext acspContext, RequestContext
requestContext)
{
this.acspContext = acspContext;
this.requestContext = requestContext;
}
}
Session-Level Data
This data, which is always textual, is stored at the session level and is available during
the current sessions execution.
For example, the OTP value is stored in the database during the Challenge request
execution. Later, when the Authentication request is executed, this data is extracted
from the database and matched with the data provided in the Authentication request.
The storage of the session-level data is limited to the sessions life cycle. The
session-level data life cycle is the same as the life cycle for the entire session. When
the session expires, the session-level data and its life cycle are expelled from the
database.
The sessionData object must be obtained to activate the following API.
/**
* Get map of string values
* The map is cloned and its changes won't affect the
actual data stored in the DB
* @return map of vstring alues
*/
public Map<String, String> getStringData( );
/**
User-Level Data
This data contains the information that the Authentication Plug-In implementer wants
to store for a given user. The data can be textual or binary.
The data is available for all Authentication Plug-In methods that are not related to the
current session. The data can be updated in every Authentication Plug-In method. The
life cycle of the user-level data is the same as for the entire Authentication Plug-In. If
the plug-in is disabled for the user, the data is no longer available.
You can extract user-level data from the Adaptive Authentication database,
PassMarkDB, edit it, and then store it again.
The userData object must be obtained to enable activation of the following API.
/**
* Get map of string values
*/
public byte[ ] getBinaryValue(String key);
/**
* Update binary value in binary map
* @param key key
* @param value binary value
*/
public void updateBinaryValue(String key, byte[ ]
value);
/**
* Delete binary value from binary map
* @param key key
*/
public void deleteBinaryValue(String key);
/**
* Clear binary map
*/
public void clearBinaryData( );
Examples:
// store SSN value on the user level data
userData( ).addStringValue("SSN", "182987727");
// obtain SSN value from the user level data
String SSN = userData ( ).getStringValue("SSN");
// update SSN value on the user level data
userData ( ).updateStringValue("SSN", "180019273");
// remove SSN value from the user level data
userData ( ).deleteStringValue("SSN");
Installation Workflow
The Authentication Plug-In allows the RSA Adaptive Authentication (On-Premise)
system to use client-managed authentication. The following is a high-level workflow
for the installation:
1. Install the Authentication Plug-In.
2. Download and uncompress the distribution package. For more information about
distribution package file listings, see the Release Notes.
3. Ensure that the Adaptive Authentication Core database is installed. For more
information, see the Installation and Upgrade Guide.
Note: If you are upgrading from version 6.0.2.1 (or earlier) and want to enable the
Authentication Plug-In, you must upgrade your existing Adaptive Authentication
Core database to 7.1 and install the latest version of Adaptive Authentication
(On-Premise). For more information, see the Installation and Upgrade Guide.
The Authentication Plug-In configuration files must be placed together with the rest of
the Adaptive Authentication platform configuration directory.
Note: All of the code represented in the examples below for Authentication Plug-In
internal configuration, type and metadata must be combined together into an XML file
and loaded by the system. For information on integrating this file, see Customizing
the Admin Application Configuration File.
Example
<bean class="com.passmarksecurity.config.bean.ClassFreeBean"
id="sampleConfiguration">
<property name="parameters">
<map>
<entry key="otpKey">
<value>otp</value>
</entry>
<entry key="otpKeyLength">
<value>5</value>
</entry>
</map>
</property>
</bean>
<ref bean="otpConfiguration"/>
</property>
<property name="sessionTimeOut">
<value>600</value>
</property>
<property name="shouldCreAsFraud">
<value>true</value>
</property>
</bean>
Note: You can change the encryption of any of the out-of-the-box or user-installed
Authentication Plug-Ins in the Adaptive Authentication (On-Premise) system. The
default value for Knowledge-Based Authentication (KBA) and SMS encryption is
true.
Example
<bean class="com.rsa.csd.mcf.acsp.AcspMetaData"
id="SAMPLE_METADATA">
<property name="acspType">
<ref bean="SAMPLE_TYPE"/>
</property>
<property name="acspStatusString">
<value>ACTIVE</value>
</property>
<property name="billFlag">
<value>true</value>
</property>
<property name="encrypted">
<value>true</value>
</property>
</bean>
Example
<bean
class="com.rsa.csd.mcf.acsp.generic.GenericMetadataListEntry
" id="OTP_METADATA_ENTRY">
<property name="metadata">
<ref bean="SAMPLE_METADATA"/>
</property>
<property name="factory">
<value>org.sample.AcspSampleGenFactory</value>
</property>
</bean>
Note: Make sure that you update the list of authentication method parameters in the
Authentication Methods component of the Administration Console so that the entry
name appears in the Administration Console.
Example
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<bean
class="com.rsa.csd.mcf.acsp.generic.GenericMetadataList"
id="genericMetadataList">
<!--
add ACSP metadata entries here
-->
<property name="metadataList">
<list>
<ref bean="OTP_METADATA_ENTRY"/>
<ref bean="KBA_METADATA_ENTRY"/>
<ref bean="OOBSMS_METADATA_ENTRY"/>
</list>
</property>
</bean>
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
targetNamespace="http://ws.csd.rsa.com"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xsd:import namespace="http://your.namespace"
schemaLocation="Sample.xsd"/>
</xsd:schema>