python-monascaclient does not discard expired token before re-authenticating

Bug #1441306 reported by Rohit Jaiswal
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Monasca
Fix Committed
Undecided
Cindy O'Neill

Bug Description

The attempt to re-authenticate on possible token expiry actually re-uses the expired token, which is clearly bound to fail in the expired case.

As a result, unless the client explicitly handles the 401, client will stop working once the original token has expired (by default after 24 hours).

and these errors are seen in the logs -

monascaclient.exc [-] exception: Authentication failed. Please try again with option --include-password or export MONASCA_INCLUDE_PASSWORD=1

It will probably be good to handle this case in the client itself rather than the users of the client.

Refer the similar bug in novaclient - https://bugs.launchpad.net/python-novaclient/+bug/1192656

Revision history for this message
Allan G (greental) wrote :

Triage: Cindy to work on, corresponding JIRA ticket=JAH-1401

Changed in monasca:
assignee: nobody → Cindy O'Neill (oneilcin)
status: New → Triaged
Cindy O'Neill (oneilcin)
Changed in monasca:
status: Triaged → In Progress
Revision history for this message
Cindy O'Neill (oneilcin) wrote :

Now if you construct the Python API Client with the credentials needed to re-authenticate with keystone, the monascaclient will re-authenticate with keystone for you whenever it sees the expired token (401) exception.
This fix has been merged: https://review.openstack.org/#/c/184625/

Changed in monasca:
status: In Progress → Fix Committed
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.