Running perl script using CLI on Siteminder Policy Server

book

Article ID: 128931

calendar_today

Updated On:

Products

CA Single Sign On Secure Proxy Server (SiteMinder) AXIOMATICS POLICY SERVER CA Single Sign On SOA Security Manager (SiteMinder) CA Single Sign-On

Issue/Introduction

A simple Perl script to print out all the agent names.

#Initialize the Policy Management API use Netegrity::PolicyMgtAPI; $policyapi = Netegrity::PolicyMgtAPI->New(); print "Step 1. Log in the admin and create an API session.\n"; $session = $policyapi->CreateSession("username", "password"); @agents = $session‑>GetAllAgents(); foreach $agent (@agents) { print "Agent Name = " . $agent‑>Name() . "\n"; } and the following have been loaded in my env variables: PERL5LIB=/opt/sm6/siteminder12/CA/CLI/lib/site_perl/5.8.4/sun4-solaris-thread-multi LD_LIBRARY_PATH=/opt/sm6/siteminder12/CA/CLI/lib:/opt/sm6/siteminder12/CA/lib PATH=/usr/bin::/opt/sm6/siteminder12/CA/CLI/bin/

However, when I run the script using the built-in perl: I get the following error: /opt/sm6/siteminder12/CA/CLI/bin/perl Test.pl Can't load '/opt/sm6/siteminder12/CA/CLI/lib/site_perl/5.8.4/sun4-solaris-thread-multi/auto/Netegrity/PolicyMgtAPI/PolicyMgtAPI.so' for module Netegrity::PolicyMgtAPI: ld.so.1: perl: fatal: libjvm.so: open failed: No such file or directory at /opt/sm6/siteminder12/CA/CLI/lib/5.8.4/sun4-solaris-thread-multi/XSLoader.pm line 68. at Test.pl line 3 Compilation failed in require at Test.pl line 3. BEGIN failed--compilation aborted at Test.pl line 3.

Environment

Release:
Component: SMAPC

Resolution

Need to source ca_ps_env.ksh

From the siteminder home directory, run following;

source ca_ps_env.ksh

Additional Information

* Scripting Interface https://docops.ca.com/ca-single-sign-on/12-8/en/programming/scripting-interface/