Mapping API
The following table lists Mapping API support in the BlackBerry AtHoc server:
Server version | Notes |
---|---|
6.1.8.84 CP8 | Processed during SO. |
6.1.8.84 CP9 | Broken (not processed during SO.) |
6.1.8.85 R3SP1 | In DesktopSignOn. |
6.1.8.85 R3SP4 CP1 | Restored (processed during SO.) |
Mapping API was provided as a way to support unforeseen authentication requirements. Mapping API is a reference to a COM function that is called by name during sign on (in legacy VB COM code, “CallByName” is used). CallByName takes an object and procedure name, so the “API” is a string that contains the class name and procedure name in this format:
className::procedureName.
The above formatted value is stored in DSW_SIGNON_MAPPING_API column of the PRV_EXTENDED_PARAMS_TAB table. CallByName creates an instance of the object with name className, and calls the function procedureName. All of the desktop app parameters are sent to the function and may be returned with updated values.
Legacy Visual Basic code uses the Mapping API as follows:
comClassName = Mid(className, 1, InStr(className, "::") - 1)
comInterface = Mid(className, InStr(className, "::") + 2)
Set comClass = CreateObject(comClassName)
output = CallByName(comClass, comInterface, VbMethod, nProviderId, sDomainName, sDomainUserName, sClientCerts)
The one known use of Mapping API uses a WSC component written in vbscript. The custom WSC component interface is:
<component>
<?component error="true" debug="false" ?>
<registration
progid="AtHocRedirector.wsc"
…
<public>
<method name="ClientMachineLookup"/>
</public>
<script language="VBScript">
<![CDATA[
Public Function ClientMachineLookup(lUserId, lProviderId, sToken, sClientIP, sMachineName, sDomainUserName, sDomainName, sClientCerts)
…
Finally the function makes a database call to look up redirector information that applies to the user. The function parameters are populated from results of the database query:
SELECT PROVIDER_ID, OPERATOR, CRITERION, REDIRECT_TO_VPS FROM RDR_RULE_TAB WITH (NOLOCK) WHERE ATTRIBUTE_NAME = 'Machine Name' AND OPERATOR = 'starts with' AND charIndex(criterion, ?) = 1
Add a parameter to replace “?” with clientMachineName.