Bug 857752 - Keystone assertion failing
Keystone assertion failing
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: openstack-keystone (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Adam Young
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-16 15:11 EDT by Steven Dake
Modified: 2016-04-26 12:05 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-31 14:36:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
patch which triggers keystone to assert incorrectly (4.77 KB, patch)
2012-09-16 15:20 EDT, Steven Dake
no flags Details | Diff

  None (edit)
Description Steven Dake 2012-09-16 15:11:38 EDT
Description of problem:
In service.py definition _get_token_ref(~line 380), an assertion fails:

        if belongs_to:
            assert token_ref['tenant']['id'] == belongs_to

Printing these values when the assertion occurs, belongs_to is None.  The token_ref is set to a token.  However, according to:

http://docs.python.org/library/stdtypes.html

The truth value of None is False, so the if conditional should not execute, but seems unclear to me why it is doing so.

According to PEP8 style guidelines:
http://www.python.org/dev/peps/pep-0008/

"Comparisons to singletons like None should always be done with is or is not, never the equality operators.

Also, beware of writing if x when you really mean if x is not None -- e.g. when testing whether a variable or argument that defaults to None was set to some other value. The other value might have a type (such as a container) that could be false in a boolean context!
"

Current master has similar problems with its assertions.

Note other keystone assertions have similar problems but if possible, I would like this one fixed since I think there may be a security problem with heat + f17.

Version-Release number of selected component (if applicable):
openstack-keystone-2012.1.1-1.fc17.noarch


How reproducible:
100%


Steps to Reproduce:
1. Modify heat to use proxy_token in novaclient
2.
3.
  
Actual results:
Keystone will assert and not complete the operation.

Expected results:
The meaning of proxy_token is undocumented (atleast I can't find any).  I expect the way it is meant to work is to use a token in place of a api_key so new authentication isn't necessary via an api_key (instead using the token) .  I have attached the heat patch from master if you want to duplicate.  If I delete the assertion, heat is able to authenticate via the token.

Additional info:
Comment 1 Steven Dake 2012-09-16 15:20:54 EDT
Created attachment 613499 [details]
patch which triggers keystone to assert incorrectly
Comment 2 Adam Young 2012-12-06 11:27:16 EST
Please open an upstream bug and add a link to it in this report.  Reproducing from Heat is not going to be sufficient:  please cache the actual web requests going to Keystone, to include the data used to populate the Keystone Repo.
Comment 3 Fedora End Of Life 2013-07-03 15:44:33 EDT
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 4 Fedora End Of Life 2013-07-31 14:36:08 EDT
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.