6 Replies Latest reply on May 28, 2019 7:51 AM by Ariel Manka

    How to get REST authentication token from ARS with RSSO enabled?

    Ariel Manka
      Share This:

      Hi,

       

      I have a very typical setup of ARS 18.08.00 with RSSO. I'm using SoapUI to build test cases and when I try to get the REST authentication token using POST method on the /api/jwt/login resource, server responds with:

      <html>

         <head>

            <meta content="HTML Tidy for Java (vers. 26 Sep 2004), see www.w3.org" name="generator"/>

            <title>Redirecting to Remedy Single Sign-On</title>

            <meta content="text/html;charset=utf-8" http-equiv="Content-Type"/>

            <script type="text/javascript">function submitForm() {    var rssoForm = document.getElementById('rssoForm');    if (window.location.hash) {        rssoForm.action += window.location.hash    }    rssoForm.submit();}window.onload = submitForm;</script>

         </head>

         <body>

            <form action="http://cent4.localdomain.com:8081/rsso/start" method="post" id="rssoForm">

               <div>

                  <input value="http://cent4.localdomain.com:8008/api/jwt/login?username=appadmin&password=" name="goto" type="hidden"/>

                  <input value="*@*" name="tenant" type="hidden"/>

                  <input value="appadmin" name="username" type="hidden"/>

                  <input value="appadmin" name="password" type="hidden"/>

               </div>

            </form>

            <noscript>

               <form action="http://cent4.localdomain.com:8081/rsso/start" method="post">

                  <div>

                     <input value="http://cent4.localdomain.com:8008/api/jwt/login?username=appadmin&password=" name="goto" type="hidden"/>

                     <input value="*@*" name="tenant" type="hidden"/>

                     <input value="appadmin" name="username" type="hidden"/>

                     <input value="appadmin" name="password" type="hidden"/>

                     <input value="Redirect" type="submit"/>

                  </div>

               </form>

               <p>Since your browser does not support JavaScript, you must enable it and refresh the page or press the Redirect button once to proceed.</p>

            </noscript>

         </body>

      </html>

       

      I suppose SoapUI should be configured to use Oauth2 for authentication? I created a client in RSSO, got the client id and secret. I also entered the http://cent4.localdomain.com:8008//api/jwt/login as Redirect URL. Soap UI is expecting three URIs in the Oauth2 configuration: Authorization URI, Authentication Token URI and Redirect URI. Does anyone have experience with this kind of setup?

       

      Regards,

      Ariel