Exception on unauthorized user/pass/token

Bug #1316298 reported by Leandro Ignacio Costantino
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
High
Leandro Ignacio Costantino

Bug Description

( couldn't find mistral client launchpad )

When Mistral API fails to authenticate against keystone:
2014-05-05 16:48:52.479 30993 WARNING keystoneclient.middleware.auth_token [-] Unexpected response from keystone service: {u'error': {u'message': u'Invalid user / password', u'code': 401, u'title': u'Unauthorized'}}
2014-05-05 16:48:52.479 30993 WARNING keystoneclient.middleware.auth_token [-] Authorization failed for token
2014-05-05 16:48:52.480 30993 INFO keystoneclient.middleware.auth_token [-] Invalid user token - rejecting request
localhost - - [05/May/2014 16:48:52] "GET /v1/workbooks HTTP/1.1" 401 23

mistral-client return a ValueError exception since it's trying to decode as json the "Authorization Failed" message.

Changed in mistral:
status: New → Confirmed
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to python-mistralclient (master)

Reviewed: https://review.openstack.org/92198
Committed: https://git.openstack.org/cgit/stackforge/python-mistralclient/commit/?id=762e1cdc3c50b677555ef99207cfdf3f609cdc3d
Submitter: Jenkins
Branch: master

commit 762e1cdc3c50b677555ef99207cfdf3f609cdc3d
Author: Leandro I. Costantino <email address hidden>
Date: Mon May 5 16:55:33 2014 -0300

    Return response as error if not valid json object

    If the response returned by Mistral do not contain a valid json an
    exception is thrown by the client due to invalid json format.
    If there's a ValueError exception and it's an error code try to return
    the response text instead. (Ex: Authorization Failed )

    This may be a temporary fix if the BE is able to return the json
    error msg returned by keystone.

    Change-Id: I540f3aaa35fb15adc04bf0a33e46af8ac614c814
    Closes-Bug: #1316298

Changed in mistral:
status: Confirmed → Fix Committed
Changed in mistral:
assignee: nobody → Leandro Ignacio Costantino (leandro-i-costantino)
milestone: none → 0.1
importance: Undecided → High
no longer affects: mistral/juno
Changed in mistral:
milestone: 0.1 → 0.0.4
Changed in mistral:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.