v3 tokens contain an 'expires' attr instead of 'expires_at'

Bug #1133526 reported by Dolph Mathews
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Low
Malini Bhandaru

Bug Description

Implementation needs to catch up to a recent spec change that was made to improve consistency:

  https://github.com/openstack/identity-api/blob/master/openstack-identity-api/src/markdown/identity-api-v3.md

Dolph Mathews (dolph)
Changed in keystone:
assignee: Dolph Mathews (dolph) → nobody
Changed in keystone:
assignee: nobody → Malini Bhandaru (malini-k-bhandaru)
Revision history for this message
Malini Bhandaru (malini-k-bhandaru) wrote :

We have:
curl -d '{"auth":{"passwordCredentials":{"username": "<someone>", "password": "<somesecret>"}}}' -H "Content-type:\
 application/json" http://localhost:35357/v2.0/tokens

Is there are v3 version of such a url. Wondering for testing purposes.
Regards
Malini

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

Test coverage for this is located in tests/test_v3_auth.py

Revision history for this message
Malini Bhandaru (malini-k-bhandaru) wrote :

May be I am over thinking this one ...
How deep do we want this change? Initially I thought just outward facing, in a response body "expires_at" instead of "expires".
Then only tests that examine the response need change.

Then on re-reading the bug, may be we want internal token representations to conform to what we show users in a response.
We touch more files... test_auth.py and for that matter, does one assume that one has a v2 token or a v3 token there or make it work for both after checking whether token has "expires" or "expires_at" in its dictionary.

But then why stop there, do we change the token DB column to "expires_at" as opposed to "expires" to be fully consistent?
I am guessing too many DB scripts will not change because rarely will anyone migrate tokens .. these are ephemeral entities.

Thanks
Malini

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

I think the superficial change is necessary to meet the spec. In the interest of not producing more unexpected bugs, I think I'd vote for leaving the internals alone until we're open for Havana (db column, for example).

Revision history for this message
Malini Bhandaru (malini-k-bhandaru) wrote :

Thanks for the keep-it-simple vote Dolph! I have a patch submitted with just 2 file changes ..

For testing the V3 auth call ..
curl -d '{"auth":{"identity": {"methods":["password"], "password": {"user": {"name":"<a-user>", "password":"<a-secret>", "domain":{"id":"default"}}}}}}' -H "Content-type: application/json" http://localhost:35357/v3/auth/tokens

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

I don't see a related patch on gerrit? Can you be sure to include the bug number in the commit message as "bug 1133526" so that jenkins will link it back here? Thanks!

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/23215

Changed in keystone:
status: New → In Progress
Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/23215
Committed: http://github.com/openstack/keystone/commit/806a2caa5ba825f5e2c1e91eb5a18029b3b5f76d
Submitter: Jenkins
Branch: master

commit 806a2caa5ba825f5e2c1e91eb5a18029b3b5f76d
Author: Malini Bhandaru <email address hidden>
Date: Fri Mar 8 16:54:26 2013 -0800

    bug 1133526

    modify "expires" to "expires_at", most of the changes were
    already done by Guang-yee, added a pki-token-id test

    Change-Id: Ib3f39620db18aaea6b0cb5d0ae9c290afd870605

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: grizzly-rc1 → 2013.1
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.