Symantec Access Management

 View Only
  • 1.  Siteminder perl management api

    Posted Jun 25, 2015 05:35 AM

    Hi,

     

    I currently am using the siteminder perl management api and i encounter some problems.

     

    1/ When i use one of my scripts to perfom some changes into the policy store i am not able to see those changes into the WAMUI even after using xpssweeper. What can i do to see those changes into the WAMUI?

     

    2/ According to the siteminder perl management api documentation methods have a return value but if in my code i put them into a variable, methods always fails but works if i don't. Why is that so?

    here is an example (It happens in many cases):

     

         my $group = $session->GetAgentGroup("myAgentGroupName");

         if ($group == undef) { die "Error: cannot retrieve agent group\n"; }

         my $agent = $session->GetAgent("MyAgentName");

         if ($agent == undef) { die "Error: cannot retrieve agent\n"; }

     

         my $result = $group->Add($agent);                                                       => Here if i assign the return value of add function to $result, add method automatically fails but if don't, it works! Why?

         if ($result == undef) { die "Error: cannot add agent to agent gorup\n"; }

         print "OK";



  • 2.  Re: Siteminder perl management api

    Posted Jun 25, 2015 10:31 AM

    i think this was sent to the wrong community. it belongs in SSO, not API



  • 3.  Re: Siteminder perl management api

    Posted Jun 25, 2015 10:53 AM

    I moved this thread to the CA Security Community.



  • 4.  Re: Siteminder perl management api

    Posted Jun 26, 2015 02:15 AM

    Hi there,

     

    You asked :

     

    1/ When i use one of my scripts to perfom some changes into the policy store i am not able to see those changes into the WAMUI even after using xpssweeper. What can i do to see those changes into the WAMUI?

     

    Ujwol => Are you confident that your CLI routine ran successfully ?

    Can you validate this from Policy server trace logs ?

    Can you see if you can view them on XPSExplorer ?

    Is it visible on WAMUI after PS restart ?

     

    What I am trying to determine here is if it is only WAMUI which is unable to display the newly created object (through CLI call) or is the object not created at all.

     

    2/ According to the siteminder perl management api documentation methods have a return value but if in my code i put them into a variable, methods always fails but works if i don't. Why is that so?

    here is an example (It happens in many cases):

     

    Ujwol =>

    Not all methods have the same return type ..Different methods have different return type..You will need to refer to CLI reference guide ( $ Policy Server Install Directory$\CLI\docs\PolicyMgtAPI.html (or AgentAPI.htm) for this.

     

    For instance,

     

    You wrote :

     

    my $result = $group->Add($agent);                                                       => Here if i assign the return value of add function to $result, add method automatically fails but if don't, it works! Why?

         if ($result == undef) { die "Error: cannot add agent to agent gorup\n"; }

         print "OK";

    Here,

     

     

    If you look at the CLI reference guide for this method :

     

    *******************************************

    Netegrity::PolicyMgtGroup->Add( newMember )

     

    Adds an agent, response, rule, or nested group object to the group.

    Arguments

     

    newMember (objectType) -- The member to add to the group. objectType can be any of the following objects:

     

    • PolicyMgtAgent
    • PolicyMgtResponse
    • PolicyMgtRule
    • PolicyMgtGroup

     

    Returns

     

    0 on success or -1 on failure

    *******************************************

     

    As you could see above , the Add() method returns 0 or -1 not "undef"

     

    Hope this helps.

     

    Regards,

    Ujwol Shrestha



  • 5.  Re: Siteminder perl management api

    Posted Jun 26, 2015 04:16 AM

    Hi,

     

    Thank you for your answer.

     

    When i run my script all new objects are available in xpsexplorer, i guess this part is working. But the WAMUI isn't notified.

     

    You're right the doc says that the return value of add function is 0 or -1 but actually the return value is "undef" -> the documentation is wrong or outdated.

     

    But my second question was if i try to control the return value of the add method, the method automatically fails and if i don't control it (assign to a variable) the method works.

     

    My script runs well but i can't control what is happening because i can't test methods' return value.

     

    Best regards,

    Julien Bertrand



  • 6.  Re: Siteminder perl management api

    Posted Jun 26, 2015 08:25 AM

    Hi,

     

    I didn't know that perl automatically convert the value "undef" to "0" when it comes to numerical context.

     

    My second problem is fixed.

     

    But I still can't get the WAMUI notified of policy store changes.

     

    Thanks.

     

    Best regards,

    Julien Bertrand



  • 7.  Re: Siteminder perl management api

    Posted Jun 29, 2015 12:32 AM

    Hi,

     

    Is WAMUI pointing to the same Policy Server from where you are looking up XPSExplorer ?

    What is your policy store ?

    Is the change visible after you restart Policy server that WAMUI is connected to ?



  • 8.  Re: Siteminder perl management api

    Posted Jun 29, 2015 04:14 AM

    Hi,

     

    Yes the WAMUI is pointing to the same Policy Server.

     

    My policy store is an LDAP

     

    Yes the changes are visible after restarting the Policy Server that WAMUI is connected to.

     

    So I'll need to restart the Policy server each time I perform changes to the policy store? Is there a solution that doesn't imply a Policy Server restart?



  • 9.  Re: Siteminder perl management api

    Posted Jul 01, 2015 09:32 PM

    Hi ,

     

    No you shouldn't be needing the Policy server restart to view the changes.

    But in some release, we had some issues where Policy server had issue synchronizing the changes.

     

    Can you give us the exact Policy server version (including CR) ?

    Also what is your policy store , you said LDAP but which server ? Oracle, CA DIrectory, AD etc?