This is a snapshot of Indico's old Trac site. Any information contained herein is most probably outdated. Access our new GitHub site here.

Opened 17 months ago

Last modified 15 months ago

#1539 new defect

Removal of LocalIds not possible after switch to LdapAuthenticator

Reported by: hoffmann Owned by:
Priority: low Milestone: v1.2.1
Component: General Version: 1.1
Keywords: Cc:

Description

There is a bug, or at least an inconsistency between
https://indico-software.org/browser/indico/indico/MaKaC/authentication/AuthenticationMgr.py
and
https://indico-software.org/browser/indico/bin/utils/removePasswords.py#L47

The call to AuthenticationMgr.removeId() should remove an instance of LocalIdentity(). Let's call it id.
However, in the remove() method as well as in the add() method of class AuthenticationMgr there is a call to self.getById( id.getAuthenticatorTag(). The id.getAuthenticatorTag() must be 'Local' in this case.
However, if the LocalAuthenticator is switched of in the configuration, the call to AuthenticationMgr.getById() returns a None object. Thus removal of "old" LocalIds? from the Avatars will not work with the given code.

Proposed solution(s):

  1. (workaround) Hardcode call to LocalAuthenticator.remove(id) instead of AuthenticationMgr().removeId(id).
  2. (better) Add method AuthenticationMgr.getByIdWhateverAuthenticatorIsActiveOrNot() which gets the right authenticator in any case. Use that in add() and remove().

Change History (4)

comment:1 Changed 17 months ago by hoffmann

PS: I can create any of these solutions, but I cannot make the choice which one you want to have in the official code. Just let me know in case.

comment:2 Changed 15 months ago by pferreir

I would vote for solution 2, but in a slightly more Pythonic way: adding a parameter to getById(...) (which isn't itself very pythonic, but anyway...), something like only_active, which would default to True. We could then set it to False in that situation.

comment:3 Changed 15 months ago by pferreir

  • Milestone set to v1.2.1

comment:4 Changed 15 months ago by hoffmann

OK, I have to rethink it again and not available before end of August, I am afraid.
If you want, you can assign me the ticket, and I will ask for more instructions later, if needed. Timeline end of fall 2014? (This information is missing in your roadmap for v1.2.1!)

Last edited 15 months ago by hoffmann (previous) (diff)
Note: See TracTickets for help on using tickets.