the code of get_token_provider in token.provider.py does not match docstring

Bug #1406172 reported by wanghong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Low
wanghong

Bug Description

The docstring says "Return the provider based on ``token_format`` if ``provider`` is not set. Otherwise, ignore ``token_format`` and return the configured ``provider`` instead.", refer to: https://github.com/openstack/keystone/blob/f5c06d619c762d5d39e8ec3bc752215ec02b2756/keystone/token/provider.py#L127

However, the codes check CONF.signing.token_format first and then check CONF.token.provider.

wanghong (w-wanghong)
Changed in keystone:
assignee: nobody → wanghong (w-wanghong)
Changed in keystone:
status: New → In Progress
description: updated
tags: added: documentation
description: updated
Revision history for this message
Lance Bragstad (lbragstad) wrote :

I think the documentation here is correct because it states the reason for checking signing.token_format is to be backwards compatible [1]. The doc string says that the value *should* come from token.provider, but we have to check signing.token_format as well. I think this can be grouped in the 'removed-as-of-kilo' bucket since it clearly states that in the doc string. Now that we are in the Kilo development cycle, I think that could be refactored.

[1] https://github.com/openstack/keystone/blob/f5c06d619c762d5d39e8ec3bc752215ec02b2756/keystone/token/provider.py#L123-L125

Changed in keystone:
importance: Undecided → Low
Revision history for this message
Lance Bragstad (lbragstad) wrote :

Looks like this is the patch addressing this:

https://review.openstack.org/#/c/144250/3

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

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

commit 5774f297996942beecfcd32662e5c7c738fdbb01
Author: wanghong <email address hidden>
Date: Mon Dec 29 12:00:30 2014 +0800

    remove the Conf.signing.token_format option support

    In the doc string, it clearly states that we ensure backwards
    compatibility for Conf.signing.token_format until Havana + 2.
    Now, we are in the Kilo development cycle, we can remove this
    support.

    partially-implements blueprint removed-as-of-kilo
    Closes-Bug: #1406172
    Change-Id: I3cd1e2e5a51c4a87edf00647bc1b95a0347e3316

Changed in keystone:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: kilo-3 → 2015.1.0
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.