Previous Topic: Policy Management Operations

Next Topic: Create and Manage System Objects

Initialize a Session

When you create a session, a number of session initialization flags are set to their default values. The following table lists the initialization methods in the PolicyMgtAPI object and their default values:

Method

Default

Description

DisableAudit()

0

(Auditing enabled)

Enables or disables:

  • Auditing of user activity, including authentication, authorization, and administration activities. (Administration activities include changes to the policy store.)
  • Monitoring of user sessions.

DisableManagement
WatchDog()

0

(Watchdog enabled)

Enables or disables the SiteMinder management watchdog. The watchdog is used internally and should not be disabled.

Disable
Validation()

0

(Validation enabled)

Enables or disables validation of policy store objects.

LoadAgentType
Dictionary()

0

(Pre-load
dictionary disabled)

Enables or disables the pre-loading of the agent type dictionary.

PreLoadCache()

0

(Pre-load cache disabled)

Enables or disables the pre-loading of SiteMinder caches.

Note: These methods have no effect if called after CreateSession().

Example: Initialize session operations

The following example enables all the session initialization operations that are not enabled by default. If the session is successfully initialized, the script displays the initialization flags:

use Netegrity::PolicyMgtAPI;

$username = "adminid";
$password = "adminpwd";

print "\nInitializing and connecting to PolicyMgtAPI...\n";
$policyapi = Netegrity::PolicyMgtAPI‑>New();
$policyapi‑>PreLoadCache(1);
$policyapi‑>LoadAgentTypeDictionary(1);

die "ERROR: Couldn't create session\n" unless ($session != undef);

print "Initialization settings:\n";
print "  Preload cache flag: ".$policyapi‑>PreLoadCache()."\n";
print "  Disable validation flag: " . 
                     $policyapi‑>DisableValidation()."\n";
print "  Load agent type dictionary flag: " . 
                     $policyapi‑>LoadAgentTypeDictionary()."\n";
print "  Disable audit flag: ".$policyapi‑>DisableAudit()."\n";
print "  Disable watchdog flag: " . 
                     $policyapi‑>DisableManagementWatchDog()."\n";


Copyright © 2010 CA. All rights reserved. Email CA about this topic