REST API translation not working on authentication failure

Bug #1274638 reported by Luis A. Garcia
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Medium
Luis A. Garcia

Bug Description

The error message returned from a REST API authentication that fails is not getting translated in --debug mode and in normal mode.

In debug mode the expected translation is an error saying: "Invalid user / password" and in normal mode the error message is the generic "The request that you made requires authentication".

They are both failing to translate and apparently for different reasons.

Brad Pokorny (bpokorny)
Changed in keystone:
status: New → Confirmed
Luis A. Garcia (luisg-8)
Changed in keystone:
assignee: nobody → Luis A. Garcia (luisg-8)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/70196

Changed in keystone:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/70197

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to keystone (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/70198

Revision history for this message
Dolph Mathews (dolph) wrote :

The difference in messages is very much by design. Authentication can fail for any number of reasons, and those reasons are suppressed outside of debug mode.

Changed in keystone:
status: In Progress → Won't Fix
status: Won't Fix → Confirmed
importance: Undecided → Medium
Revision history for this message
Dolph Mathews (dolph) wrote :

Totally misread the bug description, but I suppose the above is still relevant :)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/70197
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=b0a01de64ec1237d57337d0beba5793c40112c37
Submitter: Jenkins
Branch: master

commit b0a01de64ec1237d57337d0beba5793c40112c37
Author: Luis A. Garcia <email address hidden>
Date: Thu Jan 30 19:07:54 2014 +0000

    Use message when creating Unauthorized exception

    The Unauthorized exception was being created with an underlying
    exception as its message instead of that underlying exception's message,
    such that it can be translated.

    Change-Id: I57a7729d2416dda8098da2ea67e867cad31ff83b
    Partial-Bug: #1274638

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to keystone (master)

Reviewed: https://review.openstack.org/70198
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=a7625502c951bbc579a075ecfb61f8bf4d37d69a
Submitter: Jenkins
Branch: master

commit a7625502c951bbc579a075ecfb61f8bf4d37d69a
Author: Luis A. Garcia <email address hidden>
Date: Thu Jan 30 19:12:13 2014 +0000

    Avoid use of str() with exceptions

    The new Message class does not allow str() so all locales can be safely
    translated. It requires use of unicode() instead.

    Change-Id: I1fd9142b0211cecc746578f4080cb2ddfa663b0d
    Related-Bug: #1274638

Changed in keystone:
status: Confirmed → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → juno-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: juno-1 → 2014.2
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.