|
This guide describes the RSA Authentication Agent application programming interfaces (APIs) for Java, and how to use them. The intended audience includes developers who use the APIs to integrate RSA SecurID into custom or third-party applications. The RSA Authentication Agent APIs for Java enable developers to integrate RSA SecurID into custom or third-party applications. Developers using this API to create their own agents must have an understanding of the basic operations involved in RSA SecurID authentication, which include:
In addition, the developer must take necessary precautions to protect all user-supplied data when in use and clear the data when it is not in use. Agent Administrator TasksThis guide is primarily intended for API developers; however, the sections Configuring Advanced API Settings, Working with Load Balancing and Deployment Guidelines are intended for agent administrators. RSA recommends that agent administrators read the RSA Authentication Manager Administrator's Guide available with RSA Authentication Manager to familiarize themselves with agent functionality. PrintingTo print this document, use the print-friendly version, print.html. Samples and specific pages of any reference material, if any, must be printed separately. |
|
The Authentication Agent API for Java enables you to develop your own custom agents to protect required resources. For information about agents, see Authentication Agents. API FeaturesThe following sections describe the Authentication Agent API features: Two-Step AuthenticationTo prevent an unauthorized person from capturing data from a SecurID authentication request, and using this data to authenticate to another RSA Authentication Manager, the agent sends a lock request before sending the user’s passcode. The Authentication Manager locks the user name, which prevents it from being accepted by any other server in the realm, and waits for the corresponding passcode to be submitted. Once the user enters the correct passcode, the Authentication Manager unlocks the user name and authenticates the user. This process is called two-step authentication.
Load BalancingAn agent that you link with the Authentication Agent API can communicate with multiple Authentication Managers in a realm. The API incorporates load-balancing routines to help the agent select the best Authentication Manager for communication. Load balancing occurs automatically based on data that the agent gathers dynamically at runtime and data acquired from the configuration files. As an alternative to the automatic load-balancing process, you can also balance the load manually. In the sdopts.rec file, which resides on the agent host, specify which of the Authentication Managers each agent host must use to process requests. For more information on load balancing, see Working with Load Balancing. Thread SafetyAll Authentication Agent API functions are thread-safe, which means you can safely call them from multithreaded applications without program failure or data corruption. Synchronous FunctionsAll of the Java API functions are synchronous.
|
|
Before you start using the Authentication Agent APIs, review the following section to ensure that your system meets the necessary minimum requirements. The Authentication Agent API supports the Java 2 Platform, Standard Edition, versions 1.5 and 1.6. Platform SupportThe Authentication Agent API supports the following operating systems: Windows
UNIX
Authentication Agent API is supported on VMware ESX 3.5 and VMware vSphere 4 with the following operating systems.
CompatibilityThis release of the Authentication APIs is compatible only with certain versions of the Authentication Manager server. Interoperability with Authentication ManagerThis release of the Authentication Agent API supports Authentication Manager 6.1.2 and 7.1 SP2 and 7.1 SP3. Backward CompatibilityYou can reuse your existing agent code which uses APIs from version 8.1. See Upgrading from Version 8.1 for information.
|
|
You are required to work with the APIs, and also perform a few setup tasks before you can develop a custom agent to communicate with the Authentication Manager server. The Auth SDK zip or tar kit contains the properties file, rsa_api.properties, the Release Notes and the following folders:
Critical and Sensitive FilesIn addition to the Authentication API jar files (authapi.jar, log4j-1.2.8.jar, and cryptoj.jar), the Authentication API maintains critical and sensitive files as listed below. The application using the SDK must restrict access to these files. One of the ways to restrict access, is by setting appropriate file permissions on the files and the complete directory structure in which they reside, before invoking the API.
Using the APIsTo work with the APIs:
For examples of correct calling sequences, refer to the sample code. See Using the Sample Code for information on how to use the sample code. Custom Agent Setup TasksOnce you have created a custom agent, you must complete the required setup tasks before you can use the agent to communicate with the Authentication Manager server.
Upgrading from Version 8.1To upgrade an agent created with 8.1 APIs to the 8.1 SP2 APIs, you must complete the following tasks. Convert or renew the node secret Verify authentication with the Authentication Manager Upgrade the APIs to 8.1 SP2To upgrade the APIs to 8.1 SP2:
Convert or Renew the Node SecretThe existing node secret in the 8.1 format is rendered unrecognizable once you upgrade the APIs to the 8.1 SP2 APIs. You must then either convert the existing node secret to the new format, or renew the node secret by deleting the existing node secret and creating a new one. For information on converting an existing node secret to the 8.1 SP2 format, see Convert an Existing Node Secret to 8.1 SP2 Format Renew the Node SecretTo renew the node secret:
Create a Node Secret FileA node secret file ensures encrypted communication between the agent host and the Authentication Manager server. A node secret file can be created either automatically or manually. The node secret file is automatically created at the first test authentication. For more information, see Performing a Test Authentication. You can manually create a node secret file in the Authentication Manager server. This file must be exported from the Authentication Manager server and imported into the agent host. Once imported, it must be extracted and loaded appropriately. See Load a New Node Secret for information. For information on how to manually create a node secret, see "Node Secret File" in the RSA Authentication Manager Administrator’s Guide. If the node secret on the agent host is corrupted or does not match the node secret in the Authentication Manager server, encrypted communication between the agent and Authentication Manager does not work. The agent gets an ACCESS_DENIED error code, and logs a node verification failure message in the Authentication Manager Server Activity Monitor. To resolve this issue, delete the securid file from the agent, and clear it from the Authentication Manager server. Using the agent_nsload UtilityThe agent_nsload utility available with the authentication SDK is used to: Convert an Existing Node Secret to 8.1 SP2 Format
Convert an Existing Node Secret to 8.1 SP2 FormatYou can convert the existing node secret to the new format by running the agent_nsload utility.
To run the agent_nsload utility to convert the node secret:
where: Existing_Securid_file_path is the path where the SecurID file exists. New_Securid_dir_path is the directory where the newly generated SecurID file should be stored. For example: On Windows: agent_nsload -c C:\RSA\securid C:\My_Dir On UNIX: agent_nsload -c /tmp/RSA/securid /var/ace/ Load a New Node SecretYou can manually create a node secret in the Authentication Manager server and export it to the agent host. Once the node secret file is imported into the agent host machine, you must run the agent_nsload utility to extract the node secret file and store it appropriately. The node secret can be stored either in the default path or in a user-defined path.
To run the agent_nsload utility to extract the node secret to the default location, type: On UNIX: agent_nsload -f /default_dir/nodesecret.rec On Windows: agent_nsload -f C:\default_path\ nodesecret.rec You will then be prompted for the password. Type the password and press Enter. To run the agent_nsload utility to extract the node secret to a user-defined location, type: On UNIX: agent_nsload -f /VAR_ACE/nodesecret.rec -d /VAR_ACE/new_dir/ On Windows: agent_nsload -f C:<windows path>\System32\ nodesecret.rec -d C:\<windows path>\System32\new_dir\ You will then be prompted for the password. Type the password and press Enter. Perform a Test AuthenticationIt is important that you perform an initial test authentication prior to rolling out an agent. In addition to verifying the authentication environment, the first successful authentication creates a node secret that is shared between the agent and the Authentication Manager. A copy of the node secret is encrypted and sent to the agent, which saves the received node secret to a securid file. Unless a specific path is provided, this file is saved in the current directory. You can use the code in the sample code file AuthUser.java to perform a test authentication. See Using the Sample Code for more information. A JAStatus.1 file is also created at the first authentication. This file is stored in the default application directory. It contains the current status of all the Authentication Manager servers in the realm. Verify the Status of the Authentication ManagerYou can verify the status of the Authentication Manager by running the code given in the sample code file AceStatus.java. This returns the status of each Authentication Manager on which the agent is registered as an agent host, and details including server name and address. The following table lists the information displayed in the Authentication Manager section.
The following table lists the status information displayed in the Authentication Manager section.
The following table lists the server status information displayed in the Authentication Manager section.
Identify the Version and Build Number of the Authentication APIPerform the following steps to determine the version and the build number of the authentication APIs:
Result CodesFor a list of result codes, see the AuthSession Field Summary table in the Javadoc Reference Documentation. |
|
By default, when you create the API instance, the API loads the rsa_api.properties file, which contains the default advanced configuration settings. You also have the option of using a custom properties file, or the system properties of your application.
If the default properties file and a custom properties file are both present, the API loads the properties in the following orderdefault, custom, and system properties. If the API finds duplicate keys in more than one set of properties, it uses the value defined in the last loaded properties. For example, if the different sets of properties have the following key-value settings:
If the API loads all three sets of properties, the API uses the following key values:
If the custom file is missing, the API uses the following key values:
You can configure advanced settings to do the following:
To configure advanced settings:
The following table describes the key-value settings in the properties file.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
An agent that you link with the Authentication Agent API can communicate with multiple Authentication Managers in a realm. The API incorporates load balancing routines to help the agent select the best Authentication Manager for communication. Load balancing occurs automatically based on the data that the agent gathers dynamically at runtime and from data acquired from configuration files. Load balancing can be either dynamic or manual. Dynamic Load BalancingBy default, the API uses dynamic load balancing, in which the agent sends a request to each RSA Authentication Manager server in the realm and determines a priority list based on the response time of each Authentication Manager server. The Authentication Manager server with the fastest response time gets the highest priority and receives the largest number of authentication requests. Other Authentication Manager servers get lower priorities and receive fewer requests. This priority list is refreshed each time a time request or authentication request times out, or when the internal server status differs from the status received in the server's response. To perform dynamic load balancing, the agent connects to the Authentication Manager server through firewalls using the alternate IP addresses (aliases) for the Authentication Manager servers. The Authentication Manager servers provide the list of aliases to the authentication agent during a response to an authentication request. The IP addresses are stored in the configuration record file (sdconf.rec) on the authentication agent host. For more information, see Configuring the sdopts.rec File. Manual Load BalancingWith manual load balancing, you specify the Authentication Manager server that each agent host uses. You also assign a priority to each Authentication Manager server so that the authentication agent can direct authentication requests to some Authentication Manager servers more frequently than the others. You specify manual load balancing by including the USESERVER statement in the sdopts.rec file, and associating priority settings with each Authentication Manager server specified for use. For more information, see Configuring the sdopts.rec File.
Using the sdopts.rec FileThis section describes how to create an sdopts.rec file. It also provides examples of ways you can use the components to set up load balancing. Create the sdopts.rec FileTo create the sdopts.rec file:
Configure the sdopts.rec File
The sdopts.rec file can contain the following types of lines:
Keyword value pairs can be any of the following:
The following table describes the priority values that you can specify.
You must assign a priority to each Authentication Manager server that you add to the sdopts.rec file. Otherwise, the entry is invalid. You must use priority values as specified or within the specified range only. The IP addresses in the file are verified against the list of valid Authentication Manager servers that the agent receives as part of its initial authentication.
Example: Configuring Manual Load BalancingYou configure manual load balancing by including the USESERVER keyword in the sdopts.rec file to specify IP addresses of the Authentication Manager servers that you want the agent host to use. You can list the IP addresses in the sdopts.rec file in any order, but you must list each separately, one per line. The following example shows how to use the USESERVER keywords to specify the IP addresses. ;Any line of text that starts with a semicolon is ignored ;(is considered a comment). ;Do not put a blank space between a keyword and its ;equal sign. Blank spaces are permitted after the ;equal sign, after the IP address, and after the ;comma that separates an IP address from a priority value. USESERVER=192.168.10.23, 10 USESERVER=192.168.10.22, 2 USESERVER=192.168.10.20, 1 USESERVER=192.168.10.21, 0 In this example, the Authentication Manager server identified by IP address 192.168.10.23 receives five times more authentication requests than the Authentication Manager server with IP address 192.168.10.22. Authentication Manager server with IP address 192.168.10.20 is used only if the Authentication Manager servers of higher priority are unavailable. The Authentication Manager server with IP address 192.168.10.21 is ignored except in rare circumstances (as described in Configuring the sdopts.rec File.)
Example: Specifying Alias IP Addresses for Use or ExclusionYou can use the sdopts.rec file to specify alias IP addresses for use or for exclusion. You can list the settings in the sdopts.rec file in any order, but you must list each setting separately, one setting per line. The following example shows how to use the ALIAS keywords in the sdopts.rec file. ;Any line of text that starts with a semicolon is ignored ;(is considered a comment). ;Do not put a blank space between a keyword and its ;equal sign. Blank spaces are permitted after the ;equal sign, after the IP address, and after the ;comma that separates an IP address from a priority value. USESERVER=192.168.10.23, 10 USESERVER=192.168.10.22, 2 USESERVER=192.168.10.20, 1 USESERVER=192.168.10.21, 0 ALIAS=192.168.10.23, 192.168.4.1, 192.168.4.2, 192.168.4.3 ALIAS=192.168.10.22, 192.168.5.2, 192.168.5.3 ALIAS=192.168.10.20, 192.168.5.2 ALIAS=192.168.10.21, 192.168.1.1 ALIAS_ONLY=192.168.10.23 IGNORE_ALIASES=192.168.10.22 In this example, the default is to use the alias or actual IP addresses, with some exceptions. The Authentication Manager server with the actual IP address 192.168.10.23 has three alias addresses specified for it, while Authentication Manager servers with IP addresses 192.168.10.20 and 192.168.10.21 each have only one alias. The Authentication Manager server with IP address 192.168.10.22 has two alias IP addresses. The alias IP addresses specified by the ALIAS keywords are in addition to any aliases specified in the sdconf.rec file and in the Authentication Manager server.
In this example, the default is to ignore aliases, with two exceptions: IGNORE_ALIASES ALIASES_ONLY=192.168.10.23 ALIASES_ONLY=192.168.10.22 The ALIASES_ONLY exceptions specify that the authentication agent must send its requests to RSA Authentication Manager server 192.168.10.23 and 192.168.10.22 by using only their alias IP addresses. In the following example, the default is to use aliases, with two exceptions: ALIASES_ONLY IGNORE_ALIASES=192.168.10.23 IGNORE_ALIASES=192.168.10.22 The IGNORE_ALIASES exceptions specify that the authentication agent must send its requests to the RSA Authentication Manager servers 192.168.10.23 and 192.168.10.22 by using only their actual IP addresses. Example: Specifying an Overriding IP AddressWhen the authentication agent runs on a host that has multiple network interface cards, and therefore multiple IP addresses, you must specify a primary agent host IP address to be used for encrypted communication between the agent and Authentication Manager. Agent hosts typically attempt to discover their own IP addresses. An agent host with multiple addresses can select an address that is unknown to the Authentication Manager, thus making communication between the agent and Authentication Manager impossible. You can specify an overriding primary IP address by including the CLIENT_IP keyword in an sdopts.rec file on the authentication agent host. For example: CLIENT_IP=192.168.10.19 This statement ensures that the authentication agent host always uses the specified IP address to communicate with Authentication Manager. The Dynamic Host Configuration Protocol allocates IP addresses to agent hosts dynamically. To avoid address conflicts, do not enable DHCP for agent hosts with multiple IP addresses. Conversely, it is unnecessary to specify the CLIENT IP for agent hosts that have single IP addresses, because there are no alternative addresses to override. For more information, see the RSA Authentication Manager Administrator's Guide. If you have specified secondary IP addresses for the agent host, you must enter these in the properties file record also, and update all addresses in this record if they change.
Example: Excluding an Authentication Manager Server During Dynamic Load BalancingIn dynamic load balancing, you exclude an Authentication Manager server from use for authentication by including the AVOID keyword in the sdopts.rec file. When you provide the actual IP address of an Authentication Manager server as a value, this keyword instructs the authentication agent to exclude this Authentication Manager server from use during dynamic load balancing.
If you use the AVOID statement with the IP address of the default Authentication Manager server, the statement is ignored unless another Authentication Manager server is available. The default Authentication Manager server is the server where the sdconf.rec file was created. If an Authentication Manager server is designated as the master, however, it becomes the default Authentication Manager server regardless of where the sdconf.rec file was created. The following example shows how to use the AVOID keywords in the sdopts.rec file: AVOID=192.100.123.5 In this example, the Authentication Manager server with the IP address 192.100.123.5 will not be used for authentication.
|
|
The following table maps the C functions from the RSA Authentication Agent API for C, to each Java method from the RSA Authentication Agent API for Java.
|
|
Install, upgrade and uninstall options for an agent may differ depending on the deployment environment. This section describes a few generic recommendations for agent deployment, and important points to be considered during installation and upgrade in different deployment scenarios. Single Agent on a HostA single agent on a host machine may store the jar files (authapi.jar, log4j-1.2.8.jar, cryptoj.jar) and configuration files (sdconf.rec, sdopts.rec, securid, jastatus.1) either in the default location (default application directory) or in a customized location. The agent APIs can be upgraded to the 8.1 SP2 APIs by updating the jar files. See Upgrading from 8.1. Multiple Agents on a Host Authenticating with a Common Authentication ManagerThe Java API looks for configuration information in the property file (default: rsa_api.properties). If the SDCONF_LOC, SDOPTS_LOC and SDNDSCRT_LOC have not been specified in this properties file, Java API looks for them in the default application directory. Since the application directory is specific to the application, multiple Java agents on the same host will have separate configuration files. Depending upon whether the authapi.jar is placed in an agent-specific class path or a class path common to all the deployed agents, they can either use a different set or the same set of jar files. The possible deployment types: Common Jar Files and Common Configuration Files Common Jar Files and Separate Configuration Files Separate Jar Files and Common Configuration Files Separate Jar Files and Separate Configuration Files Common Jar Files and Common Configuration FilesInstall Scenario Agent-A is installed on a host and successfully authenticating with the Authentication Manager. The jar files are placed in a class path common to all deployed agents and the API configuration file (rsa_api.properties) specifies the locations of the configuration files. Agent-B is installed on the same host. The jar files are placed in the same class path common to all deployed agents, and the API configuration file (rsa_api.properties) specifies the same locations as Agent-A. Upgrade When upgrading to 8.1 SP2, both agents must be upgraded. Since the jar files and the configuration files used are the same, when one agent is upgraded, the other agent automatically gets upgraded. For upgrade instructions, see Upgrading from 8.1. Uninstall If one of the agents is uninstalled, shared configuration files and jar files used by the other agent may get deleted, thus breaking the other agent. Common Jar Files and Separate Configuration FilesInstall Scenario Agent-A is installed on a host and successfully authenticating with the Authentication Manager. The jar files are placed in a class path common to all deployed agents and the configuration files are in the default application directory. Agent-B is installed on the same host. The jar files are placed in the same class path common to all deployed agents, and the configuration files are in the default application directory. The configuration files of Agent-A must be copied to Agent-B's default application directory for the new agent to successfully authenticate with the Authentication Manager. Upgrade When upgrading to 8.1 SP2, both agents must be upgraded. Since the jar files used are the same, when one agent is upgraded, the other agent automatically gets upgraded. Once the node secret for Agent-A is converted, it must be copied to the default application directory of Agent-B. For upgrade instructions, see Upgrading from 8.1. Uninstall If one of the agents is uninstalled, shared jar files used by the other agent may get deleted, thus breaking the other agent. Separate Jar Files and Common Configuration FilesInstall Scenario Agent-A is installed on a host and successfully authenticating with the Authentication Manager. The jar files are placed in an agent-specific class path and the API configuration file (rsa_api.properties) specifies the locations of the configuration files. Agent-B is installed on the same host. The jar files are placed in an agent-specific class path and the API configuration file (rsa_api.properties) specifies the same locations as Agent-A. Upgrade Since the jar files for each agent are separate, you can upgrade one agent at a time. Getting the upgraded agent to connect to the Authentication Manager server would require that the node secret be converted to the new 8.1 SP2 format. Since the configuration files are common, converting the node secret to the new format would make it unrecognizable by the other 8.1 agent. Hence the second agent must be upgraded too. For upgrade instructions, see Upgrading from 8.1. Uninstall If one of the agents is uninstalled, shared configuration files used by the other agent may get deleted, thus breaking the other agent. Separate Jar Files and Separate Configuration FilesInstall Scenario Agent-A is installed on a host and successfully authenticating with the Authentication Manager. The jar files are placed in an agent-specific class path and the configuration files are in the default application directory. Agent-B is installed on the same host. The jar files are placed in an agent-specific class path and the configuration files are in the default application directory. The configuration files of Agent-A must be copied to Agent-B's default application directory for the new agent to successfully authenticate with the Authentication Manager. Upgrade Since the jar files and configuration files for each agent are separate, you can upgrade one agent at a time. For upgrade instructions, see Upgrading from 8.1. To renew the node secret during upgrade or later, you must renew the node secret using the 8.1 agent, and obtain the node secret in the old format. This must then be converted to the new format for the upgraded agent.
Uninstall Since the jar files and configuration files for each agent are stored separately, one agent can be uninstalled without affecting the other.
|
|
To view the documentation for the RSA Authentication Agent classes, fields, and methods in the Java APIs, click here, or see the /doc/Javadoc directory. |
|
The RSA Authentication Agent API for Java includes a finished API application that you can run as a sample, as well as sample code for using the Java Authentication and Authorization Service (JAAS) implementation for BEA WebLogic Server. For information about using the sample code, click here or see /examples/sample/build.xml. For information about using the JAAS sample, click here or see /examples/securid_JAAS/build.xml.
|
|
This table lists the differences between the Java and C APIs.
|
|
The RSA SecurID solution provides two-factor authentication to protect access to data and applications. This access can be through remote dial-in connections, local access, domain and terminal services access, Internet and VPN connections, intranet and extranet applications. The SecurID solution consists of an Authentication Manager server, an authentication agent that communicates with it, and authenticators that provide the tokencode. The authentication agent initiates a SecurID authentication session when a user attempts to access a protected resource. It verifies data provided by a user with data stored in the Authentication Manager server. Based on the result, the user is either allowed or denied access. Apart from the RSA SecurID Agent, RSA also provides authentication agent APIs which can be used to develop a custom agent to communicate with the Authentication Manager server. These APIs are available as a dynamic library (.jar, .dll, or .so). Using these APIs, you can develop custom agents to protect required resources. Functioning of an Authentication AgentAn agent created using the RSA Authentication Agent APIs performs the steps detailed below in a secure manner.
In addition to providing basic access checks during standard authentication, agents also handle several security-related housekeeping tasks, such as those related to Next Tokencode mode and New PIN Mode. In the Next Tokencode mode, the Authentication Manager requests for the next tokencode displayed on the user’s token. If the next tokencode is not properly sent to the Authentication Manager, the authentication fails. The Authentication Manager administrator determines that the user associated with a particular token requires a new PIN. The administrator determines the characteristics of PINs, which your custom agent can test using the API functions. It is the agent you create, and not the API that handles all user input and user output associated with processing an authentication request.
|
|
RSA SecurCare Online Customer Support Information RSA Secured Partner Solutions Directory |