When configuring a auth_uri without a auth_port auth_token will crash

Bug #944720 reported by Chmouel Boudjnah
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Undecided
Chmouel Boudjnah

Bug Description

I have for tokenauth :

[filter:tokenauth]
paste.filter_factory = keystone.middleware.auth_token:filter_factory
auth_uri = http://127.0.0.1:35357
admin_token = ADMIN
admin_user = admin
admin_password = ADMIN
memcache_hosts = 127.0.0.1:11211

this will crash due of the casting without NULL check of auth_port :

Traceback (most recent call last):
  File "/usr/local/bin/swift-proxy-server", line 7, in <module>
    execfile(__file__)
  File "/shared/GIT/openstack/swift/bin/swift-proxy-server", line 22, in <module>
    run_wsgi(conf_file, 'proxy-server', default_port=8080, **options)
  File "/shared/GIT/openstack/swift/swift/common/wsgi.py", line 123, in run_wsgi
    loadapp('config:%s' % conf_file, global_conf={'log_name': log_name})
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
    return context.create()
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
    return self.object_type.invoke(self)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 207, in invoke
    app = filter(app)
  File "/shared/GIT/openstack/keystone/keystone/middleware/auth_token.py", line 477, in auth_filter
    return AuthProtocol(app, conf)
  File "/shared/GIT/openstack/keystone/keystone/middleware/auth_token.py", line 133, in __init__
    self.auth_port = int(conf.get('auth_port'))
TypeError: int() argument must be a string or a number, not 'NoneType'

Changed in keystone:
assignee: nobody → Chmouel Boudjnah (chmouel)
Changed in keystone:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/4805
Committed: http://github.com/openstack/keystone/commit/94abc7ed3e8105cf80ad60558d01fc0839adc027
Submitter: Jenkins
Branch: master

commit 94abc7ed3e8105cf80ad60558d01fc0839adc027
Author: Chmouel Boudjnah <email address hidden>
Date: Fri Mar 2 11:34:16 2012 +0000

    Make sure we have a port number before int it.

    - Remove unused auth_location in s3_token along the way.
    - Fixes bug 944720.

    Change-Id: Ib6e48511d09798868c5ca3fa00472525bc9f8823

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