Symantec IGA

  • 1.  Invoke powershell through CA IDM

    Posted Apr 24, 2014 10:12 AM

    Hi All,

    I am a bit beginner level in CA IDM.

    Need your help in understanding whether there is any direct configuration to invoke powershell script commands from CA IDM interface.(Similar to invoking java code)



  • 2.  RE: [CA IdentityMinder (formerly CA Identity Manager) General Discussion] I
    Best Answer

    Posted Apr 24, 2014 01:04 PM
    Previously provided resolution (credit Ken V.)

    CA IM does not support calling Powershell commands.
    This is because Powershell returns "objects" instead of serialized text and therefore the IM application doesn't detect that that the execution is complete.

    There is a way to workaround this product limitation and invoke powershell commands as long as you are using JDK 1.6 versus JDK 1.5 by writing your own java class to invoke the powershell instead of relying on the internal IM code. In this way your java class wrapper can force a close.

    Start out by reviewing the following Tech Doc so you gain an understanding
    of the process involved in using PX to Run Java Code

    https://support.ca.com/irj/portal/anonymous/kbtech?docid=583969

    You would create a file such as PowershellWrapper.java and inside it has:
    package com.ca.px.example;
    import java.io.IOException;
    public class PowershellWrapper {
    public static void main(String[] args) throws IOException
    {
    String command = "c:\\windows\\system32\\windowspowershell\\v1.0\\powershell.exe" + " " + args[0];
    Runtime runtime = Runtime.getRuntime();
    Process proc = runtime.exec(command);
    proc.getOutputStream().close();
    }
    }

    You would then compile this file such as:
    "c:\program files\java\jdk1.6.0_29\bin\javac.exe" PowershellWrapper.java

    You then need to copy the generated PowershellWrapper.class file over to your IM Server as the Tech Doc mentioned (i.e. user_console.war\web-inf\classes\com\ca\px\example).
    If you have a cluster you copy it to all nodes.
    You then restart IMServer and you define your PX to have the action rule to External Codes\Run Java Code\Execute a main function The class name vaule is com.ca.px.example.PowershellWrapper and you set a Parameter such as c:\\temp\\file.ps1 where your powershell command is in the file.ps1 just like it is now.

    From: CA Security Global User CommunityMessage Boards [mailto:CommunityAdmin@communities-mail.ca.com]
    Sent: Thursday, April 24, 2014 10:12 AM
    To: mb_message.2252815.114132993@myca-email.ca.com
    Subject: [CA IdentityMinder (formerly CA Identity Manager) General Discussion] Invoke powershell through CA IDM


    Hi All,

    I am a bit beginner level in CA IDM.

    Need your help in understanding whether there is any direct configuration to invoke powershell script commands from CA IDM interface.(Similar to invoking java code)


    Posted by:idm.engineer
    --
    CA Communities Message Boards
    114135533
    mb_message.2252815.114132993@myca-email.ca.com<mailto:mb_message.2252815.114132993@myca-email.ca.com>
    https://communities.ca.com


  • 3.  Re: Invoke powershell through CA IDM

    Posted Dec 22, 2017 12:22 AM

    Also to add , Even in the scenario that IDM server is running on variants of UNIX we can use SSHD to execute the call on remote windows machine (which would require additional setup)



  • 4.  Re: Invoke powershell through CA IDM

    Broadcom Employee
    Posted Dec 19, 2017 03:52 AM

    updated link to Tech doc references

    How to call external java methods from Policy Xpress 



  • 5.  RE: Re: Invoke powershell through CA IDM

    Broadcom Employee
    Posted Feb 26, 2020 04:03 PM
    Updated link to Knowledge document reference.

    How to call external java methods from Policy Xpress


    https://ca-broadcomcsm.wolkenservicedesk.com/wolken/esd/knowledgebase_search?articleId=49105

    ------------------------------
    Best regards,

    Scott Owens
    Sr Support Engineer

    ------------------------------
    And, as always Perhaps there are others in the communities who have experience in doing this and we invite them to comment here also.

    Another option may be to reach out to our partner HCL Technologies to see in what way they can assist further. The Enterprise Studio team of HCL can be reached at enterprisestudio@hcl.com. https://www.hcltech.com/enterprise-studio
    ------------------------------
    ------------------------------