Bug 819402 - Streamline returns 401 on service errors - we should handle that as a "service unavailable", not "access denied"
Streamline returns 401 on service errors - we should handle that as a "servic...
Product: OpenShift Origin
Classification: Red Hat
Component: Website (Show other bugs)
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Clayton Coleman
libra bugs
: Security, Triaged
Depends On:
  Show dependency treegraph
Reported: 2012-05-07 02:37 EDT by Clayton Coleman
Modified: 2015-05-14 21:09 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-07-13 19:44:00 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Clayton Coleman 2012-05-07 02:37:11 EDT
Streamline can return 401 when the service is down

  ESC[1mESC[33mStreamline call (457.2ms)ESC[0m ESC[1mESC[1mauthenticateESC[0m /wapps/streamline/login.html [ exception: ESC[1mESC[1mAccessDeniedExceptionStreamline rejected the request (401)

{"errors":["service_error"]}ESC[0m, args: ESC[1mESC[1m{:login=>"ccoleman@redhat.com", :password=>""}ESC[0m ]

Add a conditional check in the when block for unauthorized status code to check for errors: ['service_error'].
Comment 1 Clayton Coleman 2012-05-09 01:11:15 EDT
This can slip this sprint.
Comment 2 Clayton Coleman 2012-06-18 13:48:25 EDT
Added unit tests to cover this failure and added a specific fix
Comment 3 Xiaoli Tian 2012-06-20 07:31:47 EDT
Not sure how to simulate 401 for streamline, just simulated 404:
Authenticating user yujzhang
  Streamline call (468.3ms) authenticate /wapps/streamlines/login.html [ code: 404, exception: StandardErrorInvalid JSON string: '<html><head><title>JBossWeb/2.0.0.GA_CP - Error report</title><style><!--H1 {font-{:login=>"yujzhang", :password=>"[FILTERED]"} ]
Exception occurred while calling streamline - Invalid JSON string:
<body><h1>HTTP Status 404 - /wapps/streamlines/login.html</h1><HR size="1" noshade="noshade"><p><b>type</b> Status report</p><p

Do you have suggestions to help us to simulate 401 for streamline?

Or we'll test it when streamline is down again next time.

Comment 4 Yujie Zhang 2012-07-06 02:17:08 EDT
(In reply to comment #1)
Tested this issue on devenv_1876, still can not return 401 error in the log, the latest log is here: http://pastebin.test.redhat.com/95926
Comment 5 Yujie Zhang 2012-07-06 02:56:01 EDT
(In reply to comment #2)
> Since the streamline is outage now, so tested on devenv_1876, not sure if the streamline return 401, but can not catch "['service_error']" check in the log,caught the following error:

Streamline call (40021.8ms) authenticate /wapps/streamline/login.html [ exception: OpenSSL::SSL::SSLErrorSSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A, args: {:login=>"yujzhang", :password=>"[FILTERED]"} ]
Exception occurred while calling streamline - SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A
Comment 6 Clayton Coleman 2012-07-09 23:15:43 EDT
In regards to comment 4 and comment 5, when this happens do you get an error in the Web UI that says "A system error has occurred. If the problem persists, please contact Red Hat support."?  Or do you get a different error?  If you get the former, then this bug is fixed in both cases.  Otherwise I'd say we can just close this because of the difficulty in reproduction.
Comment 7 Clayton Coleman 2012-07-09 23:16:19 EDT
If you don't get that message then this is something I would have to fix and it should be reopened.
Comment 8 Yujie Zhang 2012-07-09 23:22:06 EDT
(In reply to comment #7)
I did get the message of "A system error has occurred. If the problem persists, please contact Red Hat support." at that time, if this means the bug is fixed, we can verify this bug.

Note You need to log in before you can comment on or make changes to this bug.