CA Service Management

  • 1.  [REST API] How to Impersonate

    Posted Nov 18, 2015 07:05 AM

    Hello,

     

    I'm trying to update a ticket and inform who changed this (e.g.: sending last_mod_by and last_mod_date on payload). But the ticket use the information of my credentials.

     

    Is possible to impersonate another user to make those updates (Using REST)?

     

    Thank you.



  • 2.  Re: [REST API] How to Impersonate

    Posted Nov 18, 2015 08:36 AM

    Hi Andrade, if you are updating the ticket first, then it will change the last mod by to the logged in user, which in this case is the user you are connecting to REST with.  I am not sure that impersonating a user would do what you need in this case.  Can you give us a use case example of what you are doing and what you want to accomplish in the end?

    Thanks,

    Jon I.



  • 3.  Re: [REST API] How to Impersonate

    Posted Nov 18, 2015 08:47 AM

    Hi Jon,

     

    We going to use one login only (an integration login) to make all calls when is necessary.

     

    So, if we have a new interaction on our system we going to use this interaction login to update the ticket, sending who user has request this update.

     

    So, is necessary to make the impersonation.



  • 4.  Re: [REST API] How to Impersonate

    Posted Nov 18, 2015 09:40 AM

    Hi Andrade,  I dont believe that will work unfortunately.  It will use the user that is logging in via REST.  I dont think you can pass through a "do update as" type thing.  NOt sure if anyone else here has come across that before.

    Jon



  • 5.  Re: [REST API] How to Impersonate

    Posted Nov 19, 2015 02:18 AM

    Hi Andrade,

     

    I'm not aware that impersonation is supported by the REST webservice. But it is supported by the SOAP webservice of SDM.

     

    Kind Reards

    ..............Michael



  • 6.  Re: [REST API] How to Impersonate
    Best Answer

    Posted Nov 19, 2015 05:51 AM

    Hi Michael_Mueller,

     

    Thank you for your reply, I used SOAP to achieve that:

     

    1. Created an Access Policy with impersonate
    2. Generated the PKI key
    3. Used that to login using loginServiceManaged() on SOAP
    4. Used getBopsid() on SOAP to get a BOPSID to user who I want to impersonate on REST
    5. Used logoff() to logoff my connection used on SOAP
    6. Used rest_access to login using X-BOPSID as header to make a login impersonating the user (on REST)
    7. Make the update of the ticket

     

    Regards,

     

    Andrade.