Introduction Oracle Fusion Middleware Online Documentation Library

3-2 Oracle Fusion Middleware Developers Guide for Oracle Adaptive Access Manager

3.2 Oracle Adaptive Access Manager .NET SDK

The Oracle Adaptive Access Manager .NET development kit SDK is packaged in the ZIP file, oaam_native_dot_net.zip in ORACLE_HOMEoaamoaam_ libsdotNet. Sample .NET applications that enable OAAM features require the integration of the OAAM .NET APIs found in the SDK package oaam_native_dot_net.zip. The content of the archive needs to be extracted to the root directory of the web application: oaam_native_dot_net.zip could be obtained from {ORACLE_ HOME}oaamdistoaam_dist_finaloracle.oaam.libsdotNet.

3.3 Configuration Properties

The Oracle Adaptive Access Manager .NET SDK includes property files that specify values for configuration used by the Oracle Adaptive Access Manager API. A developer can modify these properties to specify application-specific values or add new ones.

3.3.1 How the API Uses Properties

The Oracle Adaptive Access Manager .NET API uses these properties to read configurable values at runtime, such as the location of images for virtual authentication devices. Virtual authentication devices are controls for user input and provide virtual keyboard and personalization. Properties are read and cached from a list of files at startup and updated whenever one of the properties files is updated. The sequence in which the properties files are loaded by Oracle Adaptive Access Manager .NET API is as follows: 1. The lookup.properties file, if present, is loaded first. 2. If the properties.filelist property is defined in lookup.properties, then all the files listed in that property are added to the queue in the listed order. 3. The bharosa_lookup.properties file, if present, is loaded. 4. If the properties.filelist property is defined in bharosa_ lookup.properties, then all the files listed in that property are added to the queue in the listed order 5. All files in the queue are loaded. 6. When any of the loaded properties files is changed, the properties are reloaded. The properties files, including lookup.properties, are searched in the following directories in the order stated in Table 3–1 ; the search for a given file stops when the file is first found or when no file is found. Table 3–1 .NET Property Files Directory Example ApplicationDirectory c:InetpubwwwrootMyApp CallingAssemblyDirectory c:WindowsSystem32 CurrentAssemblyDirectory c:InetpubwwwrootMyAppbin CurrentAssemblyDirectory.. c:InetpubwwwrootMyApp Integrating Native .NET Applications 3-3

3.3.2 Encrypting Property Values

A property value specified in a properties file can be encrypted using the command-line utility BharosaUtils.exe included in the Oracle Adaptive Access Manager .NET SDK. An encryption key arbitrarily selected by the user is required to encrypt and decrypt values. This key is available to Oracle Adaptive Access Manager .NET API through the property bharosa.cipher.client.key, which must be set in one of the application properties files. BharosaUtil.exe prompts the user to enter the encryption key and a value, and the encrypted value is output to the console. The following run of the utility illustrates how to encrypt a string: C:\ BharosaUtil.exe -enc Enter key min 14 characters len: your key Enter key again: your key Enter text to be encrypted: string to encryp Enter text to be encrypted again: string to encryp vCCKC19d14a39hQSKSirXSiWfgbaVG5SKIg==

3.3.3 Using User-Defined Enumerations to Define Elements

Visual Studio 2005 allows you to use enumerations defined in the .NET Framework. A user-defined enumerations are a collection of items; each item is assigned an integer and may contain several attributes. A user-defined enumeration is specified in a properties file, and its name, the names of its items, and the name of the item attributes must conform to the following rules: ■ The name of the enumeration has the suffix .enum ■ The name of an item has a prefix equals to the name of the enumeration ■ The name of an attribute of an item has a prefix equals to the name of the item Here is an example of a user-defined enumeration: Example of a user-defined enumeration auth.status.enum=Enumeration to describe authentication status first item and its attributes auth.status.enum.success=0 auth.status.enum.success.name=Success auth.status.enum.success.description=Success auth.status.enum.success.success=true second item and its attributes CurrentDirectory c:WindowsSystem32 ApplicationDirectorybharosa_properties c:InetpubwwwrootMyAppbharosa_properties CallingAssemblyDirectorybharosa_properties c:WindowsSystem32bharosa_properties CurrentAssemblyDirectorybharosa_properties c:InetpubwwwrootMyAppbinbharosa_properties CurrentAssemblyDirectory..bharosa_ properties c:InetpubwwwrootMyAppbharosa_properties CurrentDirectorybharosa_properties c:WindowsSystem32bharosa_properties Table 3–1 Cont. .NET Property Files Directory Example