auth_token middleware have twice cache for a valided token

Bug #1066785 reported by zhoubing
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-keystoneclient
Won't Fix
Low
Unassigned

Bug Description

when a user_token == UUID_TOKEN_LENGTH(32) ,it means the code execu data = self.verify_uuid_token(user_token, retry)

            if (len(user_token) > cms.UUID_TOKEN_LENGTH):
                verified = self.verify_signed_token(user_token)
                data = json.loads(verified)
            else:
                data = self.verify_uuid_token(user_token, retry)
            self._cache_put(user_token, data)

in verify_uuid_token function ,if the the user_token is valided(200),it will cache the user_token and data,

if response.status == 200:
            self._cache_put(user_token, data)
            return data

so ,when function return, the main code also cache again.

i think ,it only need to cache once ,when function return.

Revision history for this message
zhoubing (zhoubing00) wrote :
Revision history for this message
Adam Young (ayoung) wrote :

Please submit your fix as a patch in gerrit? If, for some reason you cannot, please attach your fix to the bug as a diff, ideally one generated using git format-patch

Changed in keystone:
status: New → Confirmed
assignee: nobody → Adam Young (ayoung)
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/14661

Changed in keystone:
assignee: Adam Young (ayoung) → zhoubing (zhoubing00)
status: Confirmed → In Progress
Dolph Mathews (dolph)
affects: keystone → python-keystoneclient
Changed in python-keystoneclient:
importance: Undecided → Low
Revision history for this message
Dolph Mathews (dolph) wrote :

Unassigning due to inactivity.

Changed in python-keystoneclient:
assignee: zhoubing (zhoubing00) → nobody
status: In Progress → Triaged
Revision history for this message
Morgan Fainberg (mdrnstm) wrote :

This will not be fixed as the middleware in keystoneclient is frozen (receiving only security fixes). Keystonemiddleware (new package) is where development is occuring for the auth_token middleware. This issue can be tracked with bug #1289075 against keystonemiddleware.

Changed in python-keystoneclient:
status: Triaged → Won't Fix
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.