Forum Discussion

klauern's avatar
klauern
Contributor
10 years ago

REST requests don't follow HTTP 303 redirects with Auth

When I set HTTP Basic Auth, the request sends an HTTP redirect. SoapUI 5.0.0 will follow that redirect, but it won't propogate the authentication credentials at all.

Log:

Wed Sep 24 11:52:08 CDT 2014:DEBUG:>> "GET /theURI HTTP/1.1[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:>> "Accept-Encoding: gzip,deflate[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:>> "Authorization: Basic AUTHCREDENTIALSGOHERE==[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:>> "Host: our-host.localhost.com:80[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:>> "Connection: Keep-Alive[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:>> "[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "HTTP/1.1 303 See Other[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "Content-Type: text/xml;charset=UTF-8[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "Location: ../../../../rds/sessionOutput/conversationID/i3FD8A49805B64E0B9B1FD5B57D74B1C7[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "Server: Microsoft-IIS/7.5[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "set-cookie: CRN=skin%3Dcorporate%26showHiddenObjects%3Dfalse%26columnsPerPage%3D3%26displayMode%3Dlist%26listViewSeparator%3Dnone%26automaticPageRefresh%3D30%26format%3DHTML%26showOptionSummary%3Dtrue%26contentLocale%3Den%26useAccessibilityFeatures%3Dfalse%26productLocale%3Den%26http%3A%2F%2Fdeveloper.cognos.com%2Fceba%2Fconstants%2FbiDirectionalOptionEnum%23biDirectionalFeaturesEnabled%3Dfalse%26showWelcomePage%3Dtrue%26timeZoneID%3DCST%26linesPerPage%3D15%26; Domain=.alliant-energy.com; Path=/cognos[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "set-cookie: cea-ssa=false; Domain=.alliant-energy.com; Path=/cognos[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "set-cookie: usersessionid="AggAAAA4MSxUAAAAAAoAAACVHBieO9cEWqPkFAAAAIraMa1XwjGBj3g5i3Db9Zt7DwKlBwAAAFNIQS0yNTYgAAAA7Rq1lDdNspuVCqcZyVrrmbP8GnfdrqOWtqWSqr3EqaI="; Version=1; Domain=.alliant-energy.com; Path=/cognos[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "set-cookie: cam_passport=MTsxMDE6NmJjNGJhNzctYWM1Yi04YmM4LWRkYzItYjVmMDdjMDlkNWMxOjM1NzMzNTA5MTA7MDszOzA7; Domain=.alliant-energy.com; Path=/cognos[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "set-cookie: userCapabilities=f%3Bfdbffe6d%3Bf000002f%3Bff87fefa%26AgcAAABTSEEtMjU2FAAAAIraMa1XwjGBj3g5i3Db9Zt7DwKl3%2BzvGXQ%2B1byWjviMjFnobafs6tdXYLQTVsYJoIjt2kw%3D; Domain=.alliant-energy.com; Path=/cognos[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "X-Powered-By: ASP.NET[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "Date: Wed, 24 Sep 2014 16:52:07 GMT[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "Connection: close[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "Content-Length: 290[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:>> "GET /theURI HTTP/1.1[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:>> "Host: our-host.localhost.com:80[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:>> "Connection: Keep-Alive[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:>> "Cookie: CRN=skin%3Dcorporate%26showHiddenObjects%3Dfalse%26columnsPerPage%3D3%26displayMode%3Dlist%26listViewSeparator%3Dnone%26automaticPageRefresh%3D30%26format%3DHTML%26showOptionSummary%3Dtrue%26contentLocale%3Den%26useAccessibilityFeatures%3Dfalse%26productLocale%3Den%26http%3A%2F%2Fdeveloper.cognos.com%2Fceba%2Fconstants%2FbiDirectionalOptionEnum%23biDirectionalFeaturesEnabled%3Dfalse%26showWelcomePage%3Dtrue%26timeZoneID%3DCST%26linesPerPage%3D15%26; cam_passport=MTsxMDE6NmJjNGJhNzctYWM1Yi04YmM4LWRkYzItYjVmMDdjMDlkNWMxOjM1NzMzNTA5MTA7MDszOzA7; cea-ssa=false; userCapabilities=f%3Bfdbffe6d%3Bf000002f%3Bff87fefa%26AgcAAABTSEEtMjU2FAAAAIraMa1XwjGBj3g5i3Db9Zt7DwKl3%2BzvGXQ%2B1byWjviMjFnobafs6tdXYLQTVsYJoIjt2kw%3D; usersessionid=AggAAAA4MSxUAAAAAAoAAACVHBieO9cEWqPkFAAAAIraMa1XwjGBj3g5i3Db9Zt7DwKlBwAAAFNIQS0yNTYgAAAA7Rq1lDdNspuVCqcZyVrrmbP8GnfdrqOWtqWSqr3EqaI=[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:>> "Cookie2: $Version=1[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:>> "[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "HTTP/1.1 401 Unauthorized[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "Content-Type: text/html[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "Server: Microsoft-IIS/7.5[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "WWW-Authenticate: Negotiate[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "WWW-Authenticate: NTLM[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "WWW-Authenticate: Basic realm="cidwincogqweb1.alliant-energy.com"[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "X-Powered-By: ASP.NET[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "Date: Wed, 24 Sep 2014 16:52:07 GMT[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "Content-Length: 1293[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "<html xmlns="http://www.w3.org/1999/xhtml">[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "<head>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "<title>401 - Unauthorized: Access is denied due to invalid credentials.</title>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "<style type="text/css">[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "<!--[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "fieldset{padding:0 15px 10px 15px;} [\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "h1{font-size:2.4em;margin:0;color:#FFF;}[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "h2{font-size:1.7em;margin:0;color:#CC0000;} [\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} [\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "background-color:#555555;}[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "#content{margin:0 0 0 2%;position:relative;}[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< ".content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "-->[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "</style>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "</head>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "<body>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "<div id="header"><h1>Server Error</h1></div>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "<div id="content">[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< " <div class="content-container"><fieldset>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< " <h2>401 - Unauthorized: Access is denied due to invalid credentials.</h2>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< " <h3>You do not have permission to view this directory or page using the credentials that you supplied.</h3>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< " </fieldset></div>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "</div>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "</body>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "</html>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:>> "GET /theURI HTTP/1.1[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:>> "Host: our-host.localhost.com:80[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:>> "Connection: Keep-Alive[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:>> "User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:>> "Cookie: CRN=skin%3Dcorporate%26showHiddenObjects%3Dfalse%26columnsPerPage%3D3%26displayMode%3Dlist%26listViewSeparator%3Dnone%26automaticPageRefresh%3D30%26format%3DHTML%26showOptionSummary%3Dtrue%26contentLocale%3Den%26useAccessibilityFeatures%3Dfalse%26productLocale%3Den%26http%3A%2F%2Fdeveloper.cognos.com%2Fceba%2Fconstants%2FbiDirectionalOptionEnum%23biDirectionalFeaturesEnabled%3Dfalse%26showWelcomePage%3Dtrue%26timeZoneID%3DCST%26linesPerPage%3D15%26; cam_passport=MTsxMDE6NmJjNGJhNzctYWM1Yi04YmM4LWRkYzItYjVmMDdjMDlkNWMxOjM1NzMzNTA5MTA7MDszOzA7; cea-ssa=false; userCapabilities=f%3Bfdbffe6d%3Bf000002f%3Bff87fefa%26AgcAAABTSEEtMjU2FAAAAIraMa1XwjGBj3g5i3Db9Zt7DwKl3%2BzvGXQ%2B1byWjviMjFnobafs6tdXYLQTVsYJoIjt2kw%3D; usersessionid=AggAAAA4MSxUAAAAAAoAAACVHBieO9cEWqPkFAAAAIraMa1XwjGBj3g5i3Db9Zt7DwKlBwAAAFNIQS0yNTYgAAAA7Rq1lDdNspuVCqcZyVrrmbP8GnfdrqOWtqWSqr3EqaI=[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:>> "Cookie2: $Version=1[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:>> "[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "HTTP/1.1 401 Unauthorized[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "Content-Type: text/html[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "Server: Microsoft-IIS/7.5[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "WWW-Authenticate: Negotiate[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "WWW-Authenticate: NTLM[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "WWW-Authenticate: Basic realm="host-auth-realm.com"[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "X-Powered-By: ASP.NET[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "Date: Wed, 24 Sep 2014 16:52:07 GMT[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "Content-Length: 1293[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "<html xmlns="http://www.w3.org/1999/xhtml">[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "<head>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "<title>401 - Unauthorized: Access is denied due to invalid credentials.</title>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "<style type="text/css">[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "<!--[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "fieldset{padding:0 15px 10px 15px;} [\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "h1{font-size:2.4em;margin:0;color:#FFF;}[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "h2{font-size:1.7em;margin:0;color:#CC0000;} [\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} [\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "background-color:#555555;}[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "#content{margin:0 0 0 2%;position:relative;}[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< ".content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "-->[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "</style>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "</head>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "<body>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "<div id="header"><h1>Server Error</h1></div>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "<div id="content">[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< " <div class="content-container"><fieldset>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< " <h2>401 - Unauthorized: Access is denied due to invalid credentials.</h2>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< " <h3>You do not have permission to view this directory or page using the credentials that you supplied.</h3>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< " </fieldset></div>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "</div>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "</body>[\r][\n]"
Wed Sep 24 11:52:08 CDT 2014:DEBUG:<< "</html>[\r][\n]"

1 Reply

  • I just tested against the latest nightly build of the 5.0.0 release and found that this is fixed. It would be nice if there was a release sometime soon, though.