LDAP auth plugin not referencing the correct section of the configuration

Bug #1491531 reported by Grant Murphy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Anchor
Fix Released
High
Stanislaw Pitucha

Bug Description

At some stage it looks as though the AnchorConf has been changed to use 'authentication', the LDAP auth plugin appears to expect 'auth'. This might be true for the other authentication plugins too.

AuthConfig:
  http://git.openstack.org/cgit/openstack/anchor/tree/anchor/jsonloader.py#n64

LDAP auth plugin:
 http://git.openstack.org/cgit/openstack/anchor/tree/anchor/auth/ldap.py#n42

Example output:

>>> import anchor
>>> from anchor.auth import ldap
>>> from getpass import getpass
>>> ldap.login('murphygr', getpass())
Password:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "anchor/auth/ldap.py", line 41, in login
    ldap_port = int(jsonloader.conf.auth['ldap'].get('port', 389))
  File "anchor/jsonloader.py", line 89, in __getattr__
    name)
AttributeError: 'AnchorConf' object has no attribute 'auth'

Changed in anchor:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Stanislaw Pitucha (stanislaw-pitucha)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to anchor (master)

Fix proposed to branch: master
Review: https://review.openstack.org/224462

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

Reviewed: https://review.openstack.org/224462
Committed: https://git.openstack.org/cgit/openstack/anchor/commit/?id=2993d5e265c842109cda293c793a8d9628ce2375
Submitter: Jenkins
Branch: master

commit 2993d5e265c842109cda293c793a8d9628ce2375
Author: Stanisław Pitucha <email address hidden>
Date: Thu Sep 17 16:01:03 2015 +1000

    Fix LDAP auth

    LDAP auth has been broken during the configuration layout changes and
    did not have enough tests to catch the issue.
    This commit fixes both problems.

    Change-Id: I9ee1750c42e61b37dd569102f170aefbff3e77af
    Closes-bug: 1491531

Changed in anchor:
status: In Progress → Fix Committed
Changed in anchor:
status: Fix Committed → Fix Released
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.