DMS API error: Failed to fetch SiteMinder registration scheme
search cancel

DMS API error: Failed to fetch SiteMinder registration scheme

book

Article ID: 214151

calendar_today

Updated On:

Products

SITEMINDER CA Single Sign On Agents (SiteMinder) CA Single Sign On Secure Proxy Server (SiteMinder) CA Single Sign On Federation (SiteMinder)

Issue/Introduction

When running DMS API code sample DmsApiSample.java, it encounters error:

Agent API IsProtected................: SUCCESS
Realm Context Name...........: sample realm
Realm Context OID............: 06-29fc3caf-121f-xxxxxxxxxx-xxxxxxxxxxx
Failed to get DMS context[facility=4 severity=3 reason=0 reason=0 status=34 message=Failed to fetch SiteMinder registration scheme]

According to documentation:

Before retrieving the DMS context object information, you need to create a realm object to pass into the getDmsContext() call. The realm object must:
  • Have a valid object identifier (OID) obtained from an agent call to AgentAPI.isProtected().
  • Be configured with a registration scheme.

 

How do you configure a registration scheme for a realm?

Environment

Release : 12.8.03

Component : SITEMINDER -SDK

Cause

The code sample expects "SiteMinder registration scheme" object is already exist, when missing, error will be thrown.

There are two ways to create "SiteMinder registration scheme" object:

1. Use PolicyApi, please see PolicyApiSample.java from SDK javapolicyapi kit.

2. Use XPSExplorer command line tool to manually create the required object. 

Resolution

Create "SiteMinder registration scheme" object first, before running DMS API code sample DmsApiSample.java.
 
Option 1:
SDK sample provides an example:
It is in PolicyApiSample.java from SDK kit.
 
 private SmApiResult
    createRegScheme(SmPolicyApi policyapi)
        throws SmApiException
    {
        SmUserDirectory userdir = new SmUserDirectory();
        policyapi.getUserDirectory(OBJNAME_PREFIX + "userdir", userdir);

        SmSelfReg regscheme = new SmSelfReg();
        regscheme.setName(OBJNAME_PREFIX + "regscheme");
        regscheme.setDescription(SAMPLE_DESC + "regscheme");
        regscheme.setEnableLogging(false);
        regscheme.setUserDir(userdir.getOid());
        regscheme.setRegistrationURL(bundle.getString("REG_WORKFLOW_LIB"));
        regscheme.setTemplatePath(bundle.getString("REG_TEMPLATE_PATH"));
        regscheme.setWelcomePathProvider(bundle.getString("REG_REGISTRATION_URL"));

        return policyapi.addSelfReg(regscheme);
    }
 
Option 2:
The same self registration scheme can be created via XPSExplorer tool as well.
 
Sample realm object doesn't have a SelfReg.
 
First create a selfreg object as below and then map it to the realm.
1) Run XPSExplorer
2) Look for SelfReg object. It is normally at #152.
 
3)
 
4) Then type N for creating new object
 
5) Update the mandatory parameters Name (03), UserDirectoryLink(06). Leave other parameters as default.
 
 
Look for the needed UserDirectory and map it.
 
Give the corresponding number #3
 
Validate "v" and Update "U" then Q
 
6) Now update the Realm with the above created SelfReg
 
7) Go to desired realm
 
Make a Writable copy by typing "W"
 
Enter the number for SelfRegLink item number which is "20"
 
Select the needed selfreg object that we configured above.
 
Validate "v" and Update "U", then Q multiple times to go to the home screen. Then P.
 
Quit from XPSExplorer

Attachments