Symantec Privileged Access Management

Expand all | Collapse all

A2A Integration Java Basic .retrieveCredentials() method error

  • 1.  A2A Integration Java Basic .retrieveCredentials() method error

    Posted Mar 15, 2017 08:39 AM

    1.) A2A Integration Java Basic .retrieveCredentials() method error;

     

    What is the reason of not able to retrieve the .retrieveCredentials() method values, but, I am able to retrieve the "StatusCode". Even though I am providing all the required values, Why I am getting the "ArrayIndexOutOfBoundsException"? 

     

    2.) A2A Client connection status is still Unknown (Yellow Bubble), how can I change to Online(Green Bubble) status.

     

    3.) cspmclientd service is not starting immediately, I have to start multiple times then only cspmclientd service is starting. Sometimes not able to start the service for that I am restarting the system.

     

     

    Kindly help me for the above issues.



  • 2.  Re:  A2A Integration Java Basic .retrieveCredentials() method error

    Broadcom Employee
    Posted Mar 15, 2017 10:00 AM

    Hi Satya,

    There is a known issue with calling the retrieveCredentials() method from the main method. This is also wrong in the Example java source included in the A2A client install. Move the call into another method that is called from main and it will work. We can provide a working sample source file and class if needed.

    Also make sure there is no local or remote firewall restricting communication between the A2A client and CA PAM. Port 443 needs to be open from client to PAM. Port 28888 needs to be open from PAM to the client. To check on service startup, edit file cspmclient\config\cspm_client_config.xml and set the loglevel to FINE, like <loglevel>FINE</loglevel>. This should log more information in the log file in cspmclient\log. If the problem persists, please open a support case.

    Ralf



  • 3.  Re:  A2A Integration Java Basic .retrieveCredentials() method error

    Posted Mar 16, 2017 03:07 AM

    Hello Ralf,

     

    1.)  As you mentioned, I move call into another method and calling from main but it's not working.

    2.) And Port 443 has opened from client to PAM.

    3.) loglevel sets to FINE.

    But, 4.) Port 28888 showing, connection status as closed (i.e; A closed port is accessible (it receives and responds to Nmap probe packets), but there is no application listening on it.). I am trying to set status as open, but I can't. Can you please help. Moreover, cspmclientd service is not starting immediately. I need to start it multiple times, even though sometimes it's not starting.

    If possible can you provide a working sample source file and class.



  • 4.  Re:  A2A Integration Java Basic .retrieveCredentials() method error

    Broadcom Employee
    Posted Mar 16, 2017 09:20 AM
      |   view attached

    Hi Satya,

    I am attaching a zip file containing the source and class file, as well as a modified Run_Example.bat file. It also includes two screenshots showing how the script (class file) is registered with CA PAM and the mapping that defines which A2A account this application is allowed to access.

     

    Hope this helps.

     

    Ralf

    Attachment(s)

    zip
    Java_A2A_Example.zip   41 KB 1 version


  • 5.  Re:  A2A Integration Java Basic .retrieveCredentials() method error

    Posted Mar 17, 2017 12:26 AM

    Hello Ralf,

     

    Thank you very much for your reply. I am working on that, I will update you what's happening about A2A Java program.

     

    Thanks & Regards,

    Swaroop S.



  • 6.  Re:  A2A Integration Java Basic .retrieveCredentials() method error

    Posted Mar 17, 2017 01:04 AM

    Hello Ralf,

     

    1.) I am getting error while generating the "Get Script Hash". You can find in "A2A Script_hash_error.jpeg" screenshot.
    2.) When I tried to open the Port 28888 from PAM to Client, connection status is showing as closed and service as UNKNOWN.
    You can find in "PortScanResult_error.jpeg" screenshot. I think, if the connection status shows as open then it is working fine.
    When I tried to telnet within the system also it's not working.
    I am checking with the below command,
    ---> telnet 10.129.137.226 28888
    Below is the error;
    Connecting To 10.129.137.226...Could not open connection to the host, on port 28888: Connect failed
    3.) And, can you please check my Java code. Please find it in the attachment file. I am executing this Java file from
    Eclipse. In Java Build Path I added the cspmclient.jar, cwjcafips.jar, cwjssefips.jar.

     

    Thank you very much for your support to me.



  • 7.  Re:  A2A Integration Java Basic .retrieveCredentials() method error

    Posted Mar 17, 2017 02:04 AM

    Hello Ralf,

     

    I check that, there is no firewall block.

     

    Thanks & Regards,

    Swaroop S.



  • 8.  Re:  A2A Integration Java Basic .retrieveCredentials() method error
    Best Answer

    Broadcom Employee
    Posted Mar 17, 2017 10:55 AM

    Hi Satya,

    If the A2A agent is running, you should see a listener on port 28888. Run e.g. "netstat -abno > netstat.out” on Windows, or "netstat -tuapen > netstat.out” on Linux and look for "28888”. If you don't find a listener, the service isn't running, or didn't complete startup. This would be the first problem you have to solve. As mentioned before, if you continue to have problems with that, please open a support case. A community thread should not be used to post debug data.

    Your sample code works ok for me. You are using class com.a2a.A2AJavaSample, so the A2A script you define in PAM needs to use "com.a2a.A2AJavaSample” as the Script/App name. And in the authorization mapping keep "Check Execution Path”, "Check File Path” and "Perform Script Integrity Validation” unchecked. Once everything works, you could add checking of the execution path, but not the other two if you use a class that is part of a package because the package name like "com.a2a” causes a problem for the file path check.

    Ralf



  • 9.  Re:  A2A Integration Java Basic .retrieveCredentials() method error

    Posted Mar 22, 2017 08:36 AM

    Dear Ralf,

                   Due to urgent tasks, I am little bit busy with production tasks. So, I will inform you after checking from me. Thank you for your support.

     

    Regards,

    Swaroop S.



  • 10.  Re:  A2A Integration Java Basic .retrieveCredentials() method error

    Posted May 18, 2017 08:01 AM

    Hello Ralf,

     

       How are you, I need a help from you. We are working on A2A Tomcat_Sample application but we are not able to execute that application. We placed cspmclient.jar,cloakwareJdbc.jar into Apache Tomcat lib. What are the other steps we need to do, to execute the application successfully. I would like to ask about ANT and HSQLDB, in what way these are useful to the application.

     

    Thanks & Regards,

    Swaroop S.



  • 11.  Re:  A2A Integration Java Basic .retrieveCredentials() method error

    Broadcom Employee
    Posted May 18, 2017 02:35 PM

    Hi Swaroop, your classpath should include cspmclient.jar and cwjcafips.jar for the A2A calls to succeed. You also need to configure the script and mapping. I don't understand your references to ANT and HSQLDB.

     

    Regards,

    Ralf



  • 12.  Re:  A2A Integration Java Basic .retrieveCredentials() method error

    Posted May 19, 2017 01:34 AM

    Hello Ralf,

     

                 Thank you very much application is running successfully.

     

    Thanks & Regards,

    Satya Swaroop S.



  • 13.  Re:  A2A Integration Java Basic .retrieveCredentials() method error

    Posted Apr 27, 2017 07:14 AM

    Hello Ralf,

     

    After my production work, We successfully completed A2A application by your sample code.

    Thank you soooooooo much for your support.

     

    Thanks & Regards,

    Swaroop S.



  • 14.  Re:  A2A Integration Java Basic .retrieveCredentials() method error

    Posted Nov 08, 2017 05:38 AM

    Hello Ralf,

     

               Thank you very much for providing support in A2A integration with Java.

    Now, we have requirement i.e; 

    We are trying to integrate A2A with DotNet application.

    What we did is,

         We developed a DotNet application and ran that application using IIS Server. It is running successfully.

     

    Now,  we are trying to connect DotNet application with CA PAM.

    In PAM A2A document, given that place the DotNet application in to below IIS directory.

    $CSPM_CLIENT_HOME\cloakware\cspmclient\examples\Csharp\IIS directory.

    But, we are not able to find the IIS directory in the above path.

     

    Kindly, guide us how to integrate DotNet application with CA PAM A2A.

    If possible, send the A2ADotNet files.

     

     

    Thanks & Regards,

    Satya.