I would like to delete unused TrustedHosts from policy store. I have identified the Unused Trusted Hosts by checking the logs. It is in range of 5000 with random naming standard. WAMUI giving option of only deleting 10 at a time. XPSExplorer giving option to delete 1 at a time by using XID or Name.
Anybody has any thoughts on how can i achieve the objective of deleting 500 to 1000 at a time. Any guidance will be a great help.
Thanks & Regards,
Your best bet would be to use CA SSO SmPolicyAPI to perform this :
CA SiteMinder SDK r12.52sp1
public SmApiResult deleteTrustedHost(java.lang.String szTrustedHostName) throws SmApiException
If you aren't already familiar with using SDK. Then I would recommend installing CA SSO SDK, then inside samples folder you will find policyapi samples.
I have also attached the sample class for your quick reference.
Thank You Ujwol, I will take a look at it.
You can also use PERL API
Sample perl that deletes the TRUSTED host jsdksample-trustedhost
You can use perl API to read in a file list of each trusted one at a time, delete in a loop until EOF
#Initialize the Policy Management API
$MyTHName = 'jsdksample-trustedhost';
$adminName = 'siteminder';
$adminPwd = '***********';
$policyapi = Netegrity::PolicyMgtAPI->New();
print "Step 1. Log in the admin and create an API session.\n";
$session = $policyapi->CreateSession("$adminName", "$adminPwd");
print "Step 2. Deleting TrustedHost. \n";
print "$MyTHName \n\n";